I have test it, doesn't workgnozal wrote:Update
- added /UNICODE compiler switch
jaPBe 3.13.4 [IDE for PB 4 and PB 5]
Moderator: gnozal
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
How do you test ?ts-soft wrote:I have test it, doesn't workgnozal wrote:Update
- added /UNICODE compiler switch
All I notice is that the executable's size is different : 3584 bytes with /UNICODE and 3072 bytes without. I don't know how or what to test. I am still using Win98 ...
Is there more to do than just adding the switch at compile time ? I don't know...
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
I habe test an source with only in unicode run's. with the normal ide and unicode support + utf8 it's run. with japbe with Unicode - UTF8 (65001) and Unicode-Support, no Function, also as exe.
The Testsource are here: viewtopic.php?t=19296
The Testsource are here: viewtopic.php?t=19296
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Thanks.
Seems to be for XP only ... Can't use it.
Anyway, does someone know the requirements to compile a unicode executable without the official IDE ? Is it possible ?
Seems to be for XP only ... Can't use it.
Anyway, does someone know the requirements to compile a unicode executable without the official IDE ? Is it possible ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Ok, I found the problem with the new compiler options. I should have read the jaPBe sources more carefully ...
- jaPBe calls PBCompiler.exe directly only in 'Compile Manually' mode, so "/UNICODE" should work in this mode
- else (Compile/Run or CreateEXE), jaPBe uses PostThreadMessage() to communicate with the compiler
so the problem is : what are the flags for /THREAD and UNICODE ? And what are the other changes ?
I think I found the /THREAD flag value, but not the /UNICODE ...
Could someone from the PB team help us with this undocumented PostThreadMessage_() stuff ?
PS : I have uploaded a new version : the threadsafe option should now work (TLS functions imported by the EXE).
- jaPBe calls PBCompiler.exe directly only in 'Compile Manually' mode, so "/UNICODE" should work in this mode
- else (Compile/Run or CreateEXE), jaPBe uses PostThreadMessage() to communicate with the compiler
Code: Select all
PostThreadMessage_(CompilerThreadID, PB_MSG_ID, #PB_MSG_Start_Compilation, flags)
I think I found the /THREAD flag value, but not the /UNICODE ...
Code: Select all
;
; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
; Compiler flags
#PB_FLG_INLINEASM = 1
#PB_FLG_ENABLENT4 = 1 << 1 ; still ok ?
#PB_FLG_DEBUGGER = 1 << 2
#PB_FLG_CONSOLE = 1 << 3
#PB_FLG_DLL = 1 << 4
#PB_FLG_ENABLEXP = 1 << 5
#PB_FLG_CPU_MMX = 1 << 6
#PB_FLG_CPU_3DNOW = 1 << 7
#PB_FLG_CPU_SSE = 1 << 8
#PB_FLG_CPU_SSE2 = 1 << 9
#PB_FLG_CPU_DYNAMIC = 1 << 10
#PB_FLG_ENABLEONERROR = 1 << 11
;
; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
;
; ////////////// what are the compiler flags for /THREAD and /UNICODE ?
;
#PB_FLG_THREADSAFE = 1 << 13 seems ok, the EXE imports Tls functions (TlsAlloc ...)
#PB_FLG_UNICODE = 1 << X ?
;
; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
PS : I have uploaded a new version : the threadsafe option should now work (TLS functions imported by the EXE).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
I will do a more complete info later, but this should help for now:
You are correct about the Thread flag.
The EnableNT4 flag has no effect anymore, you have to use /SUBSYSTEM NT4 (see below)
For Unicode and Subsystem, there is no flag to change this while the compiler is running.
(the compiler has to know the mode when it is started)
So you have to include the /UNICODE and /SUBSYSTEM parameters in the call
that starts the compiler, and whenever the setting changes, you have to kill
and restart the compiler with the needed flags set.
You are correct about the Thread flag.
The EnableNT4 flag has no effect anymore, you have to use /SUBSYSTEM NT4 (see below)
For Unicode and Subsystem, there is no flag to change this while the compiler is running.
(the compiler has to know the mode when it is started)
So you have to include the /UNICODE and /SUBSYSTEM parameters in the call
that starts the compiler, and whenever the setting changes, you have to kill
and restart the compiler with the needed flags set.
quidquid Latine dictum sit altum videtur
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Thank you very much for the information , Freakfreak wrote:I will do a more complete info later, but this should help for now:
You are correct about the Thread flag.
The EnableNT4 flag has no effect anymore, you have to use /SUBSYSTEM NT4 (see below)
For Unicode and Subsystem, there is no flag to change this while the compiler is running.
(the compiler has to know the mode when it is started)
So you have to include the /UNICODE and /SUBSYSTEM parameters in the call
that starts the compiler, and whenever the setting changes, you have to kill
and restart the compiler with the needed flags set.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Update
Changes :
- compiler restarts if NT4 and/or UNICODE flag has changed.
Could someone test the unicode stuff ? It seems to work as my little test executable now calls MessageBoxW and not MessageBoxA.
Changes :
- compiler restarts if NT4 and/or UNICODE flag has changed.
Could someone test the unicode stuff ? It seems to work as my little test executable now calls MessageBoxW and not MessageBoxA.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Sorry for not posting again but I was in China for a while there.
I've tested the Unicode option (Thank you!) but it doesn't work yet. The program is compiled but it doesn't seem like it's actually having an effect. Manually compiling with this option
does work. Hope that helps and thanks a lot for updating japbe!
Now that I'm back, I look forward to finally being able to post my main project (couldn't while pb4 was alpha) and contributing some more!
I've tested the Unicode option (Thank you!) but it doesn't work yet. The program is compiled but it doesn't seem like it's actually having an effect. Manually compiling with this option
Code: Select all
pbcompiler main.pb /UNICODE /EXE "main.exe"
Now that I'm back, I look forward to finally being able to post my main project (couldn't while pb4 was alpha) and contributing some more!
I have test it, with Codepage Unicode/UTF8 and Unicode-Support, it's run good, in jaPBe and as exe also
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Hmm, it seems to work for ts-soft.Xombie wrote:I've tested the Unicode option (Thank you!) but it doesn't work yet.
Did you change the code page in jaPBe to Unicode/UTF8 in Files\Preferences\CodePage and enabled Unicode support in Project\Project Options\General\Unicode executable ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Compile/Run should also work [F5/F6] ... seems to work for ts-softXombie wrote:Yeah. But let me amend that. If I do "Create Executable" then yes, it works just great. But if I hit the Compile/Run or Compile/Debug buttons, then no, it does not seem to notice the /Unicode option. Is that by design?
Could you check in \Compilers if the generated executable after Compile/Run (Purebasic0.exe for exemple) imports the W functions (MessageBoxW ...) ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).