[19 Sep 2008] Return value of Hollywood compiler

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
User avatar
Clyde
Posts: 351
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

[19 Sep 2008] Return value of Hollywood compiler

Post by Clyde »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 19 Sep 2008 22:55:55 +0200

Hi list,

for my Hollywood extension for Cubic IDE I am programming a compiler frontend with Fabios SCUILib (thanks, mate! :-)). This frontend starts the Hollywood compiler for all plattforms that are selected to have an exe for. I start the compiling process with

Code: Select all

Execute("Hollywood "..sf.value.." -compile ..........)
Now, is there a value that Hollywood returns in case of successfully compiling the source and in case of not doing it? And: Is this value passed through to the Execute command so I can evaluate that in my Hollywood script?

Thanks a lot in advance!

Micha
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
User avatar
airsoftsoftwair
Posts: 5833
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[20 Sep 2008] Re: Return value of Hollywood compiler

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 20 Sep 2008 00:00:56 +0200
Hi list,

for my Hollywood extension for Cubic IDE I am programming a compiler frontend with Fabios SCUILib (thanks, mate! :-)). This frontend starts the Hollywood compiler for all plattforms that are selected to have an exe for. I start the compiling process with

Code: Select all

Execute("Hollywood "..sf.value.." -compile ..........)
Now, is there a value that Hollywood returns in case of successfully compiling the source and in case of not doing it? And: Is this value passed through to the Execute command so I can evaluate that in my Hollywood script?
No, that's not possible. But you can simply check if the executable-to-be-created exists after Execute() returns. If it doesn't exist, then Hollywood failed, obviously. If it's there, everything went fine... the GUI that comes with Hollywood does it exactly the same way IIRC :)
User avatar
Clyde
Posts: 351
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

[20 Sep 2008] Re: Return value of Hollywood compiler

Post by Clyde »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 20 Sep 2008 00:04:56 +0200

Ah, great and simple solution! Thanks a lot, Andreas!

Good night
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
User avatar
Clyde
Posts: 351
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

[31 Oct 2008] Re: Return value of Hollywood compiler

Post by Clyde »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 31 Oct 2008 22:40:03 +0100

Hi there,

sorry for grave digging, but your solution doesn't work correctly in every case, I think. :-( Let's assume that I have compiled a script successfully so a file called "myprog.exe" was created. After a while I do an error in the source code and while compiling HW tells me that there is this and that error. _But_ as the file was created some time ago and can't use the exist method now to recognize whether there was an error or not ... :-( Any ideas? :-)

Hm, I could use the datetime of creation ... Hm ... Anyone knows how to do this with ARexx? :-)

Thanks a lot in advance, Micha
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
User avatar
Allanon
Posts: 742
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

[31 Oct 2008] Re: Return value of Hollywood compiler

Post by Allanon »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 31 Oct 2008 22:34:45 -0000

In this case you can check the creation date, if I remember correctly there is a command to check the creation date of a file but unfortunatly I don't have Hollywood docs with me so I can tell you the command name ^_^

Alternatively you can use a separate folder after all operations has finished, something like:

- Compile your script
- Check if executable has been created
- If yes move it to an other folder, if no notify an error

You can achieve your goal clearing your working folder before starting with the compile process...

Anyway I think that checking the creation date is more simple and you can even prompt the user saying him that a previous version is already compiled "Do you want to move it to another directory or proceed with overwriting it?" ;)

Fabio
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | All my links
User avatar
Clyde
Posts: 351
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

[31 Oct 2008] Re: Re: Return value of Hollywood compiler

Post by Clyde »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 31 Oct 2008 23:49:21 +0100

Hi Fabio,
In this case you can check the creation date, if I remember correctly there is a command to check the creation date of a file but unfortunatly I don't have Hollywood docs with me so I can tell you the command name ^_^
Yep, I also had this idea. The command in Hollywood is GetFileAttributes(), but I also need to get this information with ARexx! Anyone knows how to do it with ARexx?
Alternatively you can use a separate folder after all operations has finished, something like: - Compile your script - Check if executable has been created - If yes move it to an other folder, if no notify an error You can achieve your goal clearing your working folder before starting with the compile process...
Yeah, also good idea. Thanks for that!
Anyway I think that checking the creation date is more simple and you can even prompt the user saying him that a previous version is already compiled "Do you want to move it to another directory or proceed with overwriting it?"
Definitely! So if anyone has the ARexx syntax ... :-) Can't find sth regarding this in the ARexx guide. :-(

Thanks in advance, Micha
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
User avatar
lazi
Posts: 646
Joined: Thu Feb 24, 2011 11:08 pm

[01 Nov 2008] Re: Return value of Hollywood compiler

Post by lazi »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 01 Nov 2008 08:01:24 +0100

Hello Michael

You can use alternatively use md5sum before and after compiling and compare the two checksums.
User avatar
Clyde
Posts: 351
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

[02 Nov 2008] Re: Re: Return value of Hollywood compiler

Post by Clyde »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 02 Nov 2008 11:27:22 +0100

Hi,

thanks for this idea! Interesting. Is this very much CPU consuming? But it seems I found the solution for doing it with ARexx -> http://amiga-news.de/forum/thread.php?i ... &BoardID=1

Thanks, Micha
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
Locked