jaPBe 3.13.4 [IDE for PB 4 and PB 5]

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

gnozal wrote:Update

- added /UNICODE compiler switch
I have test it, doesn't work :?
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.
Image
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

ts-soft wrote:
gnozal wrote:Update
- added /UNICODE compiler switch
I have test it, doesn't work :?
How do you test ?
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).
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

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
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.
Image
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

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 ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Must be, for command line compiling. Surely? I thought it was just sending /UNICODE in the program parameters.

But I know zip about unicode.

Where's Xombie!? Help!
@}--`--,-- A rose by any other name ..
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

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

Code: Select all

PostThreadMessage_(CompilerThreadID, PB_MSG_ID, #PB_MSG_Start_Compilation, flags)
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 ...

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 ?
;
; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

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.
quidquid Latine dictum sit altum videtur
mipooh
New User
New User
Posts: 4
Joined: Tue Dec 21, 2004 2:45 am

Post by mipooh »

Thanks for continuing JaPBe, I always liked it.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

freak 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.
Thank you very much for the information , Freak :D
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

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.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

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

Code: Select all

pbcompiler main.pb /UNICODE /EXE "main.exe"
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!
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

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.
Image
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Xombie wrote:I've tested the Unicode option (Thank you!) but it doesn't work yet.
Hmm, it seems to work for ts-soft.
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).
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

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?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Xombie 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?
Compile/Run should also work [F5/F6] ... seems to work for ts-soft :?:
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).
Post Reply