Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Scripting Languages / Re: ScriptBasic Windows 64 Bit
« Last post by John on August 27, 2021, 06:58:59 pm »
Your scriba.exe and pui.dll worked. Only problem is there is no Windows style / theme support like sbc.exe and sbw.exe provided.

Is it possible your sb64gui.o was causing the issue not loading? I believe I used the IUP resource for the 32 bit sbgui.o.

Can you post your pui Makefile so I can generate a static linked IUP and not have to include IUP DLLs with the distribution?

12
Scripting Languages / Re: ScriptBasic Windows 64 Bit
« Last post by John on August 27, 2021, 06:51:36 pm »
We are thinking alike. Before reading your post I tried a really old SB Windows 64 build and the PUI extension module worked.

I'll give your build a try.

13
Scripting Languages / Re: ScriptBasic Windows 64 Bit
« Last post by AIR on August 27, 2021, 06:43:51 pm »
Your problem is with sbc/sbw.

The 64bit scriba I built previously works with the statically built pui.dll I created (no need for all the silly IUP dll's, another reason why I don't use it).

You're going to have to figure out what you changed that is causing the issue.

Attached is the 64bit scriba I built and tested with, and the pui.dll I built.


14
Scripting Languages / Re: ScriptBasic Windows 64 Bit
« Last post by John on August 27, 2021, 06:00:22 pm »
Hi AIR,

I hope you are still interested in seeing a 64 bit build of SB.

I have tried just about everything I could think of to get the pui.dll (IUP extension module) to load. If you have a spare moment can you try it on your end? At least we know IUP 64 bit libraries work with TDM-GCC-64. All my Makefile seem to compile without error. Getting the module to load in SB is the problem.

I have attached my iup64 directory which may save you some time from downloading IUP.

 
15
Scripting Languages / Re: ScriptBasic Windows 64 Bit
« Last post by John on August 26, 2021, 10:07:46 pm »
I changed the Makefile a bit to get rid of the 32 bit references. Compiled with no errors. It still won't load the extension module.

Code: Bash
  1. all : pui.a pui.dll
  2.  
  3. pui.a : bin\mod\obj\pui\s_interface.o
  4.         ar -r ..\..\bin\mod\lib\pui.a ..\..\bin\mod\obj\pui\s_interface.o C:\iup64\libiup.a C:\iup64\libiupcd.a C:\iup64\libiupcontrols.a C:\iup64\libiupimglib.a C:\iup64\libfreetype6.a
  5.  
  6. pui.dll : bin\mod\obj\pui\interface.o
  7.         gcc -Wno-write-strings -pipe -shared -w -s -O2 -m64 -Wl,--add-stdcall-alias,--output-def,"..\..\bin\mod\dll\pui_imp.def",--out-implib,"..\..\bin\mod\dll\pui_imp.a" -o ..\..\bin\mod\dll\pui.dll ..\..\bin\mod\obj\pui\interface.o -LC:\iup64 -IC:\iup64\include -liup -liupcd -liupcontrols -liupimglib -lfreetype6
  8.  
  9. bin\mod\obj\pui\interface.o : interface.c
  10.         gcc -w -D_WIN32 -m64 -c -LC:\iup64 -IC:\iup64\include -o ..\..\bin\mod\obj\pui\interface.o interface.c
  11.  
  12. bin\mod\obj\pui\s_interface.o : interface.c
  13.         gcc -w -D_WIN32 -m64 -c -LC:\iup64 -IC:\iup64\include -o ..\..\bin\mod\obj\pui\s_interface.o interface.c
  14.  

I thought I would try to compile one of IUP's examples as an .exe executable. It worked great using the IUP library I'm trying to get working with SB.

Code: C
  1. // gcc -m64 matrixlist.c -o matlst64.exe -LC:\iup64 -IC:\iup64\include -liup -liupcontrols -lcd
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6.  
  7. #include <iup.h>
  8. #include <iupcontrols.h>
  9. #include <cd.h>
  10.  
  11.  
  12. static int imagevaluechanged_cb(Ihandle *self, int item, int state)
  13. {
  14.         printf("imagevaluechanged_cb(item=%d, state=%d)\n", item, state);
  15.         return IUP_DEFAULT;
  16. }
  17.  
  18. static int listclick_cb(Ihandle *self, int lin, int col, char *status)
  19. {
  20.   char* value = IupGetAttributeId(self, "", lin);
  21.   if (!value) value = "NULL";
  22.   printf("listclick_cb(%d, %d)\n", lin, col);
  23.   printf("  VALUE%d:%d = %s\n", lin, col, value);
  24.   return IUP_DEFAULT;
  25. }
  26.  
  27. static int listaction_cb(Ihandle *self, int item, int state)
  28. {
  29.   printf("listaction_cb(item=%d, state=%d)\n", item, state);
  30.   return IUP_DEFAULT;
  31. }
  32.  
  33. int main(int argc, char **argv)
  34. {
  35.   Ihandle *dlg, *mlist;
  36.   IupOpen(&argc, &argv);      
  37.   IupControlsOpen();
  38.  
  39.   mlist = IupMatrixList();
  40.   IupSetInt(mlist, "COUNT", 10);
  41.   IupSetInt(mlist, "VISIBLELINES", 9);
  42.     IupSetAttribute(mlist, "COLUMNORDER", "LABEL:COLOR:IMAGE");
  43. //  IupSetAttribute(mlist, "COLUMNORDER", "LABEL:COLOR");
  44. //  IupSetAttribute(mlist, "COLUMNORDER", "LABEL");
  45. //  IupSetAttribute(mlist, "ACTIVE", "NO");
  46. //  IupSetAttribute(mlist, "FOCUSCOLOR", "BGCOLOR");
  47.   IupSetAttribute(mlist, "SHOWDELETE", "Yes");
  48. //  IupSetAttribute(mlist, "EXPAND", "Yes");
  49.  
  50.   IupSetAttribute(mlist, "EDITABLE", "Yes");
  51.   IupSetCallback(mlist,"LISTCLICK_CB",(Icallback)listclick_cb);
  52.   IupSetCallback(mlist,"LISTACTION_CB",(Icallback)listaction_cb);
  53.   IupSetCallback(mlist, "IMAGEVALUECHANGED_CB", (Icallback)imagevaluechanged_cb);
  54.  
  55.   /* Bluish style */
  56.   if (1)
  57.   {
  58.     IupSetAttribute(mlist, "TITLE", "Test");
  59.     IupSetAttribute(mlist, "BGCOLOR", "220 230 240");
  60.     IupSetAttribute(mlist, "FRAMECOLOR", "120 140 160");
  61.     IupSetAttribute(mlist, "ITEMBGCOLOR0", "120 140 160");
  62.     IupSetAttribute(mlist, "ITEMFGCOLOR0", "255 255 255");
  63.   }
  64.  
  65.   IupSetAttribute(mlist, "1", "AAA");
  66.   IupSetAttribute(mlist, "2", "BBB");
  67.   IupSetAttribute(mlist, "3", "CCC");
  68.   IupSetAttribute(mlist, "4", "DDD");
  69.   IupSetAttribute(mlist, "5", "EEE");
  70.   IupSetAttribute(mlist, "6", "FFF");
  71.   IupSetAttribute(mlist, "7", "GGG");
  72.   IupSetAttribute(mlist, "8", "HHH");
  73.   IupSetAttribute(mlist, "9", "III");
  74.   IupSetAttribute(mlist, "10","JJJ");
  75.  
  76.   IupSetAttribute(mlist, "COLOR1", "255 0 0");
  77.   IupSetAttribute(mlist, "COLOR2", "255 255 0");
  78.   //IupSetAttribute(mlist, "COLOR3", "0 255 0");
  79.   IupSetAttribute(mlist, "COLOR4", "0 255 255");
  80.   IupSetAttribute(mlist, "COLOR5", "0 0 255");
  81.   IupSetAttribute(mlist, "COLOR6", "255 0 255");
  82.   IupSetAttribute(mlist, "COLOR7", "255 128 0");
  83.   IupSetAttribute(mlist, "COLOR8", "255 128 128");
  84.   IupSetAttribute(mlist, "COLOR9", "0 255 128");
  85.   IupSetAttribute(mlist, "COLOR10", "128 255 128");
  86.  
  87.   IupSetAttribute(mlist, "ITEMACTIVE3", "NO");
  88.   IupSetAttribute(mlist, "ITEMACTIVE7", "NO");
  89.   IupSetAttribute(mlist, "ITEMACTIVE8", "NO");
  90.  
  91.   IupSetAttribute(mlist, "IMAGEACTIVE9", "No");
  92.  
  93.   IupSetAttribute(mlist, "IMAGEVALUE1", "ON");
  94.   IupSetAttribute(mlist, "IMAGEVALUE2", "ON");
  95.   IupSetAttribute(mlist, "IMAGEVALUE3", "ON");
  96.  
  97.   dlg = IupDialog(IupVbox(mlist, NULL));
  98.   IupSetAttribute(dlg, "TITLE", "IupMatrixList");
  99.   IupSetAttribute(dlg, "MARGIN", "10x10");
  100. //  IupSetAttribute(dlg, "FONT", "Helvetica, 24");
  101.   IupShowXY(dlg, IUP_CENTER, IUP_CENTER);
  102.  
  103.   IupSetAttribute(mlist, "APPENDITEM","KKK");
  104.  
  105.   IupMainLoop();
  106.   IupClose();  
  107.   return EXIT_SUCCESS;
  108. }
  109.  

16
Scripting Languages / Re: ScriptBasic Windows 64 Bit
« Last post by John on August 26, 2021, 07:00:49 pm »
I was able to compile an IUP extension module for 64 bit Windows but the module won't load with ScriptBasic. Not sure why yet. IUP/CD/IM was combined into the C:\iup64 directory. I'm using TDM-GCC-64. Here is my Makefile.

Code: Bash
  1.  
  2. all : pui.a pui.dll
  3.  
  4. pui.a : bin\mod\obj\pui\s_interface.o
  5.         ar -r ..\..\bin\mod\lib\pui.a ..\..\bin\mod\obj\pui\s_interface.o C:\iup64\libiup.a C:\iup64\libiupcd.a C:\iup64\libiupcontrols.a C:\iup64\libiupimglib.a C:\iup64\libfreetype6.a C:\TDM-GCC-64\x86_64-w64-mingw32\lib\libws2_32.a C:\TDM-GCC-64\x86_64-w64-mingw32\lib\libadvapi32.a
  6.  
  7. pui.dll : bin\mod\obj\pui\interface.o
  8.         gcc -Wno-write-strings -pipe -shared -w -s -O2 -m64 -Wl,--add-stdcall-alias,--output-def,"..\..\bin\mod\dll\pui_imp.def",--out-implib,"..\..\bin\mod\dll\pui_imp.a" -o ..\..\bin\mod\dll\pui.dll ..\..\bin\mod\obj\pui\interface.o -LC:\iup64 -IC:\iup64\include -liup -liupcd -liupcontrols -liupimglib -lfreetype6 -lws2_32 -ladvapi32
  9.  
  10. bin\mod\obj\pui\interface.o : interface.c
  11.         gcc -w -D_WIN32 -m64 -c -LC:\iup64 -IC:\iup64\include -o ..\..\bin\mod\obj\pui\interface.o interface.c
  12.  
  13. bin\mod\obj\pui\s_interface.o : interface.c
  14.         gcc -w -D_WIN32 -m64 -c -LC:\iup64 -IC:\iup64\include -o ..\..\bin\mod\obj\pui\s_interface.o interface.c
  15.  
17
Scripting Languages / Re: ScriptBasic Windows 64 Bit
« Last post by John on August 23, 2021, 01:21:27 pm »
AIR,

I'm working on trying to get IUP working with SB 64 bit. I also plan to do direct callbacks to SB rather than the loop step wait method I'm using now.



18
Scripting Languages / Re: ScriptBasic Windows 64 Bit
« Last post by John on August 22, 2021, 11:20:28 pm »
I was able to get TCP working with MS SQL Server 64 bit. It seems TCP was disabled for 64 bit but enable for 32 bit. I enabled TCP and now creating a 64 bit DSN works for MS SQL Server.

Step 6 - Check that TCP/IP and Named Pipes are enabled

Check the TCP/IP and Named Pipes protocols and port. Open SQL Server Configuration Manager and check the SQL Server Network Configuration protocols. You should enable Named Pipes and TCP/IP protocol.
19
Scripting Languages / Re: ScriptBasic Windows 64 Bit
« Last post by John on August 22, 2021, 01:41:16 pm »
AIR,

I know you're not a Windows 32 bit fan but my clients still use 32 bit accounting software with OLE Automation. If I want to get paid I still need to support a 32 bit SB.

I'm excited to see we are making progress on the 64 bit SB front. cURL and ODBC where two modules holding me back with 64 bit SB. We are now past that wall.
20
Scripting Languages / Re: ScriptBasic Windows 64 Bit
« Last post by John on August 22, 2021, 12:37:00 pm »
I got it working on MS SQL Server on my development laptop. It looks like 64 bit doesn't like a TCP/IP connection. (couldn't be found error) Named pipes solved the problem. TCP works fine when configuring the driver for 32 bit access.

My guess is that 64 bit MS SQL Server ODBC dynamic port selection is either selecting a port already in use or it's a firewall issue. What is the default port for MS SQL Server?

I tried to allow the TCP and UDP ports with these PowerShell commands but it only works with Named Pipe.

New-NetFirewallRule -DisplayName "SQLServer default instance" -Direction Inbound -LocalPort 1433 -Protocol TCP -Action Allow
New-NetFirewallRule -DisplayName "SQLServer Browser service" -Direction Inbound -LocalPort 1434 -Protocol UDP -Action Allow
Pages: 1 [2] 3 4 ... 10