Post Reply 
[WP34S] New GUI features
01-02-2016, 10:04 PM
Post: #21
RE: [WP34S] New GUI features
(01-02-2016 10:00 PM)Dieter Wrote:  The .ini file was only used for transferring programs and data between the emulator and "the real thing". On my Windows system this file is located in the "emulator" directory that also contains wp34s.exe and wp34sgui.exe.

This used to be the case in releases prior to the import/export functionality. The location is not necessarily the directory where the wp34sgui.exe file resides. It is the "current directory" or "working directory" which can be set in the desktop link to the program file.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-03-2016, 12:03 AM
Post: #22
RE: [WP34S] New GUI features - Wine
(01-02-2016 09:19 PM)BarryMead Wrote:  I was able to create an ini file that
references the wp34s_asm.pl or wp34s_asm.exe files, but that still didn't work, because either one expects to find a windows native perl library that will not exist on a Linux system.

Berry, try it with "start /unix /usr/bin/perl <toolsdir>/wp34s_asm.pl" as the config in wp34s.ini. Replace <toolsdir> with the appropriate path. If perl is elsewhere adjust its path, too.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-03-2016, 12:15 AM
Post: #23
RE: [WP34S] New GUI features
(01-03-2016 12:03 AM)Marcus von Cube Wrote:  Barry, try it with "start /unix /usr/bin/perl <toolsdir>/wp34s_asm.pl" as the config in wp34s.ini. Replace <toolsdir> with the appropriate path. If perl is elsewhere adjust its path, too.
I tried this suggestion and several variations and still no luck. I guess I can wait for the Qt version.
Find all posts by this user
Quote this message in a reply
01-03-2016, 01:45 PM
Post: #24
RE: [WP34S] New GUI features
Marcus, a question for you:
I see that also the console version (wp34s.exe) has changed a lot (about 6kB bigger), so what effect have these new features on the console version?
There's no menu, so I don't know if (or how) these Open/Save/Import/Export function are also available in this version.

BTW, of course it's just a matter of taste, but I would prefer 'Load' instead of 'Open' (since Load is the opposite of Save, like Import vs. Export).

Franz
Visit this user's website Find all posts by this user
Quote this message in a reply
01-03-2016, 02:56 PM
Post: #25
RE: [WP34S] New GUI features
(01-03-2016 01:45 PM)fhub Wrote:  Marcus, a question for you:
I see that also the console version (wp34s.exe) has changed a lot (about 6kB bigger), so what effect have these new features on the console version?
There's no menu, so I don't know if (or how) these Open/Save/Import/Export function are also available in this version.

BTW, of course it's just a matter of taste, but I would prefer 'Load' instead of 'Open' (since Load is the opposite of Save, like Import vs. Export).

Franz

I'd prefer "throw away" as an antonym for "save"...

SCNR :D

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
01-03-2016, 03:27 PM
Post: #26
RE: [WP34S] New GUI features
(01-03-2016 02:56 PM)Massimo Gnerucci Wrote:  I'd prefer "throw away" as an antonym for "save"...

SCNR Big Grin
Well, my suggestion was indeed meant seriously:
Opening a file usually means that a window opens containing this file (where you may e.g. edit it), but 'opening' a Wp34s state file does not really open it, it just loads it into the calcs memory.
(IMO Open would be the partner of Close)

Franz
Visit this user's website Find all posts by this user
Quote this message in a reply
01-03-2016, 03:47 PM (This post was last modified: 01-03-2016 04:05 PM by Marcus von Cube.)
Post: #27
RE: [WP34S] New GUI features
Franz,

I tried to follow well established conventions. I'm pretty sure you can patch the menu text to your liking. Wink

Edit: It shouldn't be necessary any more. Smile

The new features are compiled into the console version but Pauli needs to create a user interface for them to be useful. I just wanted to make sure that my code compiles correctly.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-03-2016, 04:05 PM
Post: #28
RE: [WP34S] New GUI features
(01-03-2016 12:15 AM)BarryMead Wrote:  I tried this suggestion and several variations and still no luck. I guess I can wait for the Qt version.

The "start" trick can't work (I should have known better).

I've updated wp34sgui to better handle changes to the current directory. In order to test it, I've installed a trial version of CrossOver for the Mac (a commercial Wine implementation). I was able to assemble a source file with the wp34s_asm.exe version of the assembler. Can you try it again on Linux and post the error messages, if any?

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-03-2016, 04:21 PM
Post: #29
RE: [WP34S] New GUI features
(01-03-2016 03:47 PM)Marcus von Cube Wrote:  I tried to follow well established conventions.
I just wanted to write "Aah I see, conventions are more important to you than logic", but then I saw SVN 3857: "Just to please Franz..." - LOL.

But I don't think that you just wanted to please me (that would indeed be new) -
I'm rather sure you realized that 'Load' is just more logical. Wink

And adding 'State' to 'Load' (resp. 'Program' to 'Import) is even better - really a good idea!

Franz
Visit this user's website Find all posts by this user
Quote this message in a reply
01-03-2016, 04:22 PM (This post was last modified: 01-03-2016 04:34 PM by BarryMead.)
Post: #30
RE: [WP34S] New GUI features
(01-03-2016 04:05 PM)Marcus von Cube Wrote:  I've updated wp34sgui to better handle changes to the current directory. In order to test it, I've installed a trial version of CrossOver for the Mac (a commercial Wine implementation). I was able to assemble a source file with the wp34s_asm.exe version of the assembler. Can you try it again on Linux and post the error messages, if any?
Marcus: I just downloaded the 3857 SVN tree and tried assembling again.
I get the following error:

Import Failed
Can't locate Win32.pm in @INC (@INC contains .) at -e line 779. BEGIN failed--compilation aborted at -e line 965

Marcus: Can you tell me which directory is your current working directory when you ran your test on the mac? Also what were the contents of your wp34s.ini file?

On my system my current working directory was $HOME/wp34s-3857/trunk/windows/bin, and the contents of my wp34s.ini file were:
COM6
../../tools/wp34s_asm.exe

Does this help you to diagnose the issue? Thanks, Barry
Find all posts by this user
Quote this message in a reply
01-03-2016, 04:44 PM
Post: #31
RE: [WP34S] New GUI features
(01-03-2016 04:22 PM)BarryMead Wrote:  On my system my current working directory was $HOME/wp34s-3857/trunk/windows/bin, and the contents of my wp34s.ini file were:
COM6
../../tools/wp34s_asm.exe

Does this help you to diagnose the issue? Thanks, Barry
The config looks ok to me. The error must come from running wp34s_exe. It is started by wp34sgui.exe but can't find its (embedded) perl modules. Did you use Franz' version of the executables? Either way, can you use the other one instead?

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-03-2016, 05:13 PM
Post: #32
RE: [WP34S] New GUI features
(01-03-2016 04:44 PM)Marcus von Cube Wrote:  
(01-03-2016 04:22 PM)BarryMead Wrote:  On my system my current working directory was $HOME/wp34s-3857/trunk/windows/bin, and the contents of my wp34s.ini file were:
COM6
../../tools/wp34s_asm.exe

Does this help you to diagnose the issue? Thanks, Barry
The config looks ok to me. The error must come from running wp34s_exe. It is started by wp34sgui.exe but can't find its (embedded) perl modules. Did you use Franz' version of the executables? Either way, can you use the other one instead?
I used the executables that were included in the standard SVN download. The exe file isn't fully standalone from what I can tell. It assumes that a Win32.pm module will be available somewhere on the system, and it isn't.
Find all posts by this user
Quote this message in a reply
01-03-2016, 05:27 PM
Post: #33
RE: [WP34S] New GUI features
(01-03-2016 05:13 PM)BarryMead Wrote:  I used the executables that were included in the standard SVN download. The exe file isn't fully standalone from what I can tell. It assumes that a Win32.pm module will be available somewhere on the system, and it isn't.
It shouldn't use anything "perlish" outside itself. It works on CrossOver on a Mac so I assume a problem with your environment. I'm neither a Perl nor a Wine specialist. Maybe someone else can chime in?

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-03-2016, 05:29 PM (This post was last modified: 01-03-2016 05:47 PM by BarryMead.)
Post: #34
RE: [WP34S] New GUI features
Marcus:

I can run the perl assembler from native Linux just fine either via perl or compiled perl script. I run into trouble because under wine the windows executable for wp34sgui.exe assumes that it is on a windows machine, and tries to execute the windows compiled perl script wp34s_asm.exe, but perl (or compiled perl scripts) do not run under wine. Or at least my computer isn't set-up to run perl under wine. Yesterday, I did try to install a wine version of strawberry perl on my Linux system, but that didn't seem to solve anything (still got the missing Win32.pm error), so I uninstalled it. When the Qt version of the emulator is released it will run in native Linux and there will be no confusion as to which environment perl or compiled perl scripts are running in. I think that will solve all of these Windows/Linux perl compatibility problems.

Do you have a wine compatible version of perl installed on your Mac? If you type "wine perl -v" on your Mac do you see errors or a perl version?
On my Linux system I see: (wine: cannot find L"C:\\windows\\system32\\perl.exe")

Which version of perl do you have installed on your Windows machine?
Find all posts by this user
Quote this message in a reply
01-03-2016, 06:06 PM
Post: #35
RE: [WP34S] New GUI features
CrossOver does not install the "wine" executable but I can start a command prompt within the emulated windows environment. From there, "perl" isn't recognized as a command. I'm pretty sure that there are subtle differences between the open source wine implementation and the commercial CrossOver application.

On my development Windows 7 VM I've installed ActivePerl.

You shouldn't have to wait too long for the Qt emulator. Stay tuned!

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-04-2016, 06:23 AM
Post: #36
RE: [WP34S] New GUI features
I've uploaded new Qt emulators for testing. Tools is inside the distribution and Import/Export works on OSX & Linux32, at least on my machines.

The other functions should behave like wp34sgui.exe as they call the same code but I've not tested them yet.

For some reason, Import does not work on Windows. I'll fix it later.
Find all posts by this user
Quote this message in a reply
01-04-2016, 11:32 AM
Post: #37
RE: [WP34S] New GUI features
(01-04-2016 06:23 AM)pascal_meheut Wrote:  For some reason, Import does not work on Windows. I'll fix it later.
Hi Pascal,

I've checked it with a debugger and the problem is that you create 2 temporary files (wp34stmp_XXXXXX), but both files have the same name (I don't know why the 2 calls to 'mktemp' don't return different names).
So writing to this file while it's already open for reading results in an error message.

BTW, being able to choose the folder where the tools (asm/pp/lib) are located, would be nice (I have these tools already for the normal (non-QtGUI) emulator in a different folder).
And maybe creating the temporary files in the current folder (i.e. where WP-34s.exe is) would be better than placing them into the root-folder '\'.

Franz
Visit this user's website Find all posts by this user
Quote this message in a reply
01-04-2016, 01:34 PM
Post: #38
RE: [WP34S] New GUI features
(01-04-2016 11:32 AM)fhub Wrote:  I've checked it with a debugger and the problem is that you create 2 temporary files (wp34stmp_XXXXXX), but both files have the same name (I don't know why the 2 calls to 'mktemp' don't return different names).
So writing to this file while it's already open for reading results in an error message.
Ok. I'll check as the same call to mktemp works perfectly on both OSX & Linux.

(01-04-2016 11:32 AM)fhub Wrote:  BTW, being able to choose the folder where the tools (asm/pp/lib) are located, would be nice (I have these tools already for the normal (non-QtGUI) emulator in a different folder).
I plan to do this. The current version is a beta one.

(01-04-2016 11:32 AM)fhub Wrote:  And maybe creating the temporary files in the current folder (i.e. where WP-34s.exe is) would be better than placing them into the root-folder '\'.
The temporary files cannot be in the current folder as this one may be read-only. This was the default configuration and it didn't work on OSX.
The code is written so that they should be in the system temp folder but as usual, getting the same behavior on the 3 platforms is tedious.
Find all posts by this user
Quote this message in a reply
01-04-2016, 03:38 PM
Post: #39
RE: [WP34S] New GUI features
Due to a program error on my side the temporary files used to be created in the root directory of the current drive. On XP no problem but on Windows 7 the directory is not accessible without admin permissions. This might be a reason for the failure.

Regarding the tmpfile problem: Just compare the two names and append an underscore to one if they are identical.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-04-2016, 03:57 PM
Post: #40
RE: [WP34S] New GUI features
(01-04-2016 03:38 PM)Marcus von Cube Wrote:  Due to a program error on my side the temporary files used to be created in the root directory of the current drive.
Well, I see the temporary files of your emulator in the current directory (of wp34sgui.exe), not in the root. But I have write permission to all my folders, so no problem for me.
Quote:Regarding the tmpfile problem: Just compare the two names and append an underscore to one if they are identical.
I've patched the Qt-version in a similar way: I've changed the second name from wp34stmp_... to __34stmp..., and it's now working perfectly.

@Pascal:
Maybe you can also change the order of Export and Import in the File menu, so that it's the same as in the normal emulator.

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




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