#HW_...

Report any Hollywood bugs here
Post Reply
djg
Posts: 7
Joined: Wed Feb 12, 2020 10:37 pm

#HW_...

Post by djg » Sat May 23, 2020 9:58 pm

Hi,

If I run a script, a constant like #HW_WINDOWS is defined, but when I run the compiled applet, it is not.
When I compile it into an executable for Windows, #HW_WINDOWS is defined again, but when I do the same for Android, #HW_ANDROID is not defined here.
I could use the GetVersion() command in some cases, but I want to use the constants in an @IF command for other preprocessor commands like @DISPLAY.

Maybe I am missing something?

plouf
Posts: 107
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: #HW_...

Post by plouf » Sat May 23, 2020 10:19 pm

you shoulld run the command in order to do it IDE has not yet has it

hollywood test.hws -compile test.hwa -exetype android

already fixed... but in hollywood 9 i guess :)
viewtopic.php?f=4&t=2053&p=10956#p10834

User avatar
airsoftsoftwair
Posts: 3445
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: #HW_...

Post by airsoftsoftwair » Sun May 24, 2020 11:25 am

djg wrote:
Sat May 23, 2020 9:58 pm
Maybe I am missing something?
See the manual:
Also note that when compiling applets, none of the architectural constants above will be
set. Applets are completely platform-agnostic so if you compile an applet, none of the
architectural constants will be set. An exception is if you compile an applet explicitly
for Android or iOS by passing "android" or "ios" to the -exetype console argument.
In that case, #HW_ANDROID and #HW_IOS, respectively, will indeed be set. If you compile
a platform-independent applet by passing "applet" to the -exetype argument, though,
none of the architectural constants will be set.
More info here.

djg
Posts: 7
Joined: Wed Feb 12, 2020 10:37 pm

Re: #HW_...

Post by djg » Sun May 24, 2020 12:11 pm

Damn, I didn't RTFM far enough.

Thanks.

Maybe this should be possible in the IDE too somehow. Personally I would prefer it if I didn't have to use the console.

Post Reply