Post Reply 
[WP34S] New GUI features
01-02-2016, 11:26 AM (This post was last modified: 01-02-2016 12:28 PM by fhub.)
Post: #2
RE: [WP34S] New GUI features
(01-01-2016 10:56 PM)Marcus von Cube Wrote:  I've enhanced the classic Windows GUI application with new menu choices:
Great new features, Marcus - many thanks!

There's only one small problem - importing only works when Perl is installed, i.e. when using wp34s_asm.pl as compiler.
I'm using wp34s_asm.exe instead (not the Perl version), and so I get an error message that ".pl is not associated with any program".

What I understand from your sources (in storage.c) it should try it again with wp34s_asm.exe (if wp34s_asm.pl fails), but it doesn't work - here's your code:
Code:

while ( rc >= 2 && retry-- ) {
  sprintf( buffer, "%s\\wp34s_asm%s -pp %s -o %s 1>%s 2>&1", Tools, ext, filename, tempname, logname );
  rc = system( buffer );
  ext = ".exe";
}
Since I'm no C-programmer I don't know what system(buffer) should return, but as I saw with a debugger it always returns 0 (even if the call to .pl fails), so the while-loop is not repeated with ".exe".

Of course I could solve the problem by patching the wp34sgui.exe, but I think it would be better to solve this problem in the sources (especially because I'm sure that most Windows users would rather use the EXE version of wp34s_asm than the PL version).

I guess the easiest fix would be to just swap the order of ".pl" and ".exe", i.e. first try assembling it with the EXE version, and if that fails then using the PL version.
A second method would be to first check if wp34s_asm.exe exists in the folder stated in wp34s.ini, and if yes then use it - if not then use the .pl version.
And a third method: the user could specify directly in wp34s.ini which assembler should be used, i.e. not only enter the folder but even the complete porgram, e.g. "..\tools\wp34s_asm.exe".
But my first suggestion (i.e. trying ".exe" first) is certainly the most simple way.

Edit:
I've now tried it with swapped ".exe" and ".pl", and now users which only have the PL version would have problems, because if the wp34s_asm.exe does NOT exist, the while-loop is also NOT repeated with ".pl".
So I guess it would indeed be the best to check for the existence of wp34s_asm.exe and wp34s_asm.pl, and use the one that in fact exists in the ..\tools folder.

Franz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
[WP34S] New GUI features - Marcus von Cube - 01-01-2016, 10:56 PM
RE: [WP34S] New GUI features - fhub - 01-02-2016 11:26 AM
RE: [WP34S] New GUI features - fhub - 01-02-2016, 12:34 PM
RE: [WP34S] New GUI features - fhub - 01-02-2016, 02:00 PM
RE: [WP34S] New GUI features - fhub - 01-02-2016, 06:25 PM
RE: [WP34S] New GUI features - BarryMead - 01-02-2016, 06:54 PM
RE: [WP34S] New GUI features - fhub - 01-02-2016, 07:18 PM
RE: [WP34S] New GUI features - BarryMead - 01-02-2016, 07:26 PM
RE: [WP34S] New GUI features - BarryMead - 01-02-2016, 08:48 PM
RE: [WP34S] New GUI features - BarryMead - 01-02-2016, 09:19 PM
RE: [WP34S] New GUI features - Dieter - 01-02-2016, 10:00 PM
RE: [WP34S] New GUI features - fhub - 01-03-2016, 01:45 PM
RE: [WP34S] New GUI features - fhub - 01-03-2016, 03:27 PM
RE: [WP34S] New GUI features - fhub - 01-03-2016, 04:21 PM
RE: [WP34S] New GUI features - BarryMead - 01-03-2016, 12:15 AM
RE: [WP34S] New GUI features - BarryMead - 01-03-2016, 04:22 PM
RE: [WP34S] New GUI features - BarryMead - 01-03-2016, 05:13 PM
RE: [WP34S] New GUI features - BarryMead - 01-02-2016, 09:40 PM
RE: [WP34S] New GUI features - BarryMead - 01-03-2016, 05:29 PM
RE: [WP34S] New GUI features - fhub - 01-04-2016, 11:32 AM
RE: [WP34S] New GUI features - fhub - 01-04-2016, 03:57 PM
RE: [WP34S] New GUI features - fhub - 01-04-2016, 04:20 PM
RE: [WP34S] New GUI features - fhub - 01-04-2016, 11:45 PM
RE: [WP34S] New GUI features - BarryMead - 01-07-2016, 11:04 PM
RE: [WP34S] New GUI features - BarryMead - 01-08-2016, 12:01 PM
RE: [WP34S] New GUI features - BarryMead - 01-08-2016, 06:33 PM
RE: [WP34S] New GUI features - BarryMead - 01-08-2016, 09:30 PM
RE: [WP34S] New GUI features - fhub - 01-09-2016, 12:59 PM
RE: [WP34S] New GUI features - Nigel (UK) - 01-10-2016, 09:25 PM
RE: [WP34S] New GUI features - fhub - 01-11-2016, 02:32 PM
RE: [WP34S] New GUI features - fhub - 01-11-2016, 04:10 PM
RE: [WP34S] New GUI features - fhub - 01-23-2016, 10:18 AM
RE: [WP34S] New GUI features - fhub - 01-23-2016, 03:06 PM
RE: [WP34S] New GUI features - fhub - 01-23-2016, 03:36 PM
RE: [WP34S] New GUI features - BarryMead - 01-11-2016, 07:20 PM
RE: [WP34S] New GUI features - fhub - 01-11-2016, 10:00 PM
RE: [WP34S] New GUI features - Nigel (UK) - 01-22-2016, 09:58 PM
RE: [WP34S] New GUI features - Nigel (UK) - 01-23-2016, 02:38 PM
RE: [WP34S] New GUI features - fhub - 01-23-2016, 03:11 PM
RE: [WP34S] New GUI features - fhub - 01-26-2016, 08:19 PM
RE: [WP34S] New GUI features - fhub - 01-26-2016, 10:15 PM



User(s) browsing this thread: 1 Guest(s)