Portable NutEm/PC

Portable NutEm/PC

Postby mike-stgt » Mon Apr 17, 2023 12:32 am

Edit 4/19/23: As it turned out that ooRexx portable release fails if the drive letter changes, I modified my startup program as a temporary workaround. That is why the ZIP is replaced, the recipe remains the same, added a "graphical view" of the folder structure.

Edit 7/1/23: ooRexx 5.oo is also avalable as portable version.

How to run NutEm/PC directly from a memory stick without installation of ooRexx on your PC:

First: [...] this original warning is obsolete since there is also non-beta portable ooRexx version available.

2nd: get either portable ooRexx for Windows here or the beta version of next release.
While up to revision 12653 for Windows10 only, there are for younger revisions four flavours for Windows, addressing mode 32- or 64bit and including descriptions and samples or not, the later marked by "runtime". Since I have no idea which addressing mode has less errors in storage, I do not advise which one to choose. Same for description and samples, w/o the download is 3 MB or less, while with it it's 20 MB more, unpacked about additional 39 MB. Completely your choice.
Unpack the ZIP and transfer the resulting directory to your memory stick. I shortened the directory name on the stick to "ooRexx-5.1.0-12662" since the rest is of minor importance for me. After alteration of the directory name (if any) read the contained readme.txt and execute as adviced in "First Step (Setup)".
Note -- while this setup must be repeated each and every time the drive letter of the memory stick changed, this is not needed for the start of NutEm/PC with attached starter routine.

3rd: Start a new directory within this created in step 2, naming at will. It's purpose is to hold all your REXX programs to run under portable ooRexx. It also makes it very easy to move in one go all your programs in case there is a new ooRexx revision. Ensure "your" directory is in the same level as 'bin', 'lib' and 'include'.

Next: Get my NutEm/PC, update 6/4/2023 or younger, from here
Note: all revisions of NutEm/PC before the a. m. will fail when running with ooRexx 5.oo (and highly likely with 5.1.0 too, I suppose).
Unpack it and copy the directory 'ooNUlb' into the one created in step 3. In case you picked in step 2 the 64bit version unpack 'NutL64.zip' in directory 'ooNUlb' and replace the 32bit versions in there with the same file names.

Now: download ZIP attached to this post and unpack it into the directory created in step 3. It contains two files, the first is a cmd to start the second with portable ooRexx. (Note: the second file has on purpose no sufix so to forestall accidental start without the portable environment set in the CMD.) In Windows Explorer double-click on NutEmSel.cmd, it should display a file open dialog to choose the config file to use (and by that which model to run) with NutEm/PC. In case nothing happens, or something else as described, please change in NutEmSel.cmd "rexxhide.exe" to "rexx.exe", save it and run NutEmSel.cmd again. Either fix it on your own or report what went wrong, TY.

The new NutEmSel.cmd is now (4/19/23):
Code: Select all
@echo off
REM do not call rxenv.cmd as it fails when drive letter changed
setlocal
set a=%~dp0
cd..
set REXX_HOME=%cd%
set PATH=%REXX_HOME%\bin;%PATH%
set LIB=%REXX_HOME%\lib;%LIB%
set INCLUDE=%REXX_HOME%\include;%INCLUDE%
cd %a%
REM run NutEmSel w/o cmd window
start rexxhide.exe NutEmSel

while NutEmSel sorts out no and wrong input or starts NutEm/PC with it.
Code: Select all
/* NutEmSel: Choose which model to run with NutEm/PC */
   delim = '00'x
   fmask = 'Config file (*.CFG)'  || delim || '*.CFG' || delim
   parse source . . f
   fid = FileNameDialog(filespec('P', f)'ooNUlb\', , fmask,,
          'LOAD', 'Choose which CFG to use')
   select
      when fid = 0 then say 'No file selected.'         /* in fact a nop */
      when upper(FileSpec("E", fid)) <> "CFG" then exit,   /* quit */
       RxMessageBox('Filetype of' FileSpec("N", fid) 'is not .CFG',
       , 'Pls consider', 'OK', 'INFORMATION')
      otherwise
      address '' 'CD' FileSpec("P", fid)      /* so ooNUlb finds the CFG file */
      call ooNUlb.rx fid
   end

::requires "ooDialog.cls"

This works only if as a. m. the folder structure looks like this
Code: Select all
\---ooRexx-5.1.0-12674
    +---bin
    +---include
    +---lib
    \---rx
        \---ooNUlb
            +---...
with 'rx' containing the routines from the ZIP. Note: the folder name 'rx' is a suggestion only, important is where it sits.

Have fun.
Attachments
NutEmSel.zip
Starter of portable NutEm/PC
(898 Bytes) Downloaded 3039 times
mike-stgt
.........
.........
 
Posts: 182
Joined: Tue Dec 24, 2019 12:12 pm

Return to HP-41 Emulators/Simulators

Who is online

Users browsing this forum: No registered users and 1 guest