The compiler asks twice to overwrite

Forum for discussion about the Windows IDE of Hollywood
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

The compiler asks twice to overwrite

Post by amyren »

There is a minor annoyance when compiling and you want to replace a previous executable.
It will prompt you that the file already exist, and ask if you want to overwrite this.
If yes it will continue, asking about compression. Then as the last step before saving the executable, it will again prompt you about overwriting the file.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: The compiler asks twice to overwrite

Post by airsoftsoftwair »

Which platform is this?
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: The compiler asks twice to overwrite

Post by amyren »

I think its a general issue, it happens both when compiling for 68k or for Windows x64. The same thing happens when creating applets as well.
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

Re: The compiler asks twice to overwrite

Post by lazi »

I think he asks about what is the system where the compiler runs on, not the target platform.
User avatar
Clyde
Posts: 348
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: The compiler asks twice to overwrite

Post by Clyde »

I assume "Windows" as amyren has posted that in "Windows IDE" ...
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: The compiler asks twice to overwrite

Post by airsoftsoftwair »

Ok, this is a minor nuisance which can easily be worked around by changing the following line

Code: Select all

%HWPATH %SCRIPT -compile %OUTEXE -exetype %EXEPLATFORM -debugdevice ::hwnd%IDEWINDOW
to this line:

Code: Select all

%HWPATH %SCRIPT -compile %OUTEXE -exetype %EXEPLATFORM -debugdevice ::hwnd%IDEWINDOW -overwrite
...in Settings-Hollywood-Options for compiling scripts.
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: The compiler asks twice to overwrite

Post by amyren »

Yes, that worked. Now it only asks once.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: The compiler asks twice to overwrite

Post by airsoftsoftwair »

Ok, I won't fix this, though. The reason is that when compiling Windows executables or Hollywood applets, Hollywood will automatically add ".exe" or ".hwa" to the specified file if this extension wasn't specified. So if you choose a file named "foo" Hollywood will compile as "foo.exe" instead if you compile for Windows but the file requester might not complain because you just chose "foo" and then files could get overwritten without asking. So better ask twice than overwrite stuff unwantedly :)
User avatar
mrupp
Posts: 147
Joined: Sun Jan 31, 2021 7:44 pm
Location: Switzerland
Contact:

Re: The compiler asks twice to overwrite

Post by mrupp »

I think the first overwrite-request comes from the file requester, the second comes from the hollywood compiler.
So if you choose a file named "foo" Hollywood will compile as "foo.exe" instead if you compile for Windows but the file requester might not complain because you just chose "foo" and then files could get overwritten without asking. So better ask twice than overwrite stuff unwantedly :)
I agree, the second one from the compiler should stay, but maybe the first one from the file requester could be turned off and that would fix it?
plouf
Posts: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: The compiler asks twice to overwrite

Post by plouf »

No since compiler time maybe ita late

Imho if you "agree" in ide ide should compile with a possible overwrite attribute
I.e
Hollywood -overwrite main.hws main.exe
Christos
Post Reply