Page 1 of 1
Different source code options for different OS!
Posted: Thu Aug 29, 2013 11:22 am
by Lebostein
At the moment it is annoying to create executables on different OS with single code:
Code: Select all
; UseIcon = engine_v3.icns
; Executable = engine_v3.app
or
Code: Select all
; UseIcon = engine_v3.ico
; Executable = engine_v3.exe
That should be better:
Code: Select all
; UseIcon_mac = engine_v3.icns
; Executable_mac = engine_v3.app
; UseIcon_win = engine_v3.ico
; Executable_win = engine_v3.exe
Re: Different source code options for different OS!
Posted: Thu Aug 29, 2013 11:47 am
by PB
From the manual:
Code: Select all
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_AmigaOS
; some Amiga specific code
CompilerCase #PB_OS_Linux
; some Linux specific code
CompilerEndSelect
But you can't compile a Mac app from a Windows PC,
if that's what you're after? Cross-platform compilation
is not possible, nor coming (it's been requested before).
Re: Different source code options for different OS!
Posted: Thu Aug 29, 2013 11:58 am
by IdeasVacuum
Cross-platform compilation
is not possible, nor coming (it's been requested before).
...and though it sounds great, it's not really practical because you need to conduct your testing on the actual platforn targeted.
Re: Different source code options for different OS!
Posted: Thu Aug 29, 2013 12:01 pm
by Deluxe0321
I assume Lebostein meant the compiler settings (Icon, Version, "applocation", etc.) for each OS - not the code itself.
Currently you need to redefine these settings every time if you switch the OS.
I recommend to use a Purebasic project in order to define a "compile-target" for each OS.
Re: Different source code options for different OS!
Posted: Thu Aug 29, 2013 1:01 pm
by Fred
This request makes sens