Menu

#826 Portable ooRexx should be more portable

5.1.0
rejected
nobody
None
none
1
2023-04-25
2023-04-19
m-stgt
No

After installling portable ooRexx on a memory stick, what includes to run setupoorexx.cmd so to prepare rxenv.cmd and setenv2rxenv.cmdthe stick's currently drive letter is fixed in there. When moving the stick to another PC the drive letter may be different. That is why rxenv.cmd and setenv2rxenv.cmdwill fail, if not running setupoorexx.cmd again (and again and again when changing the PC again.) Windows Batch Scripting offers options to make it "a bit more portable."

Discussion

  • Rony G. Flatscher

    The current setup is intentional. There are two objectives that may not meet the eye:

    • use the same scripts for all operating systems, i.e. Linux, MacOS, Windows
    • allow the generated scripts to be copied to other locations, e.g. one own's bin directory (hence no relative paths in the generated scripts)
     
    • m-stgt

      m-stgt - 2023-04-19

      Your first point "use the same scripts for all operating systems" is not in accord with the current distributions of portable ooRexx: when comparing setupoorexx.cmd vs setupoorexx.sh not a single line does match, in contrast setupoorexx.rexis exatly the same, but it discerns under which OS it runs to write different rxenv.cmd and setenv2rxenv.cmd or suffixed ".sh" otherwise. Thus the resulting scripts differ. In addition I am not convinced, you could install portable ooRexx on a stick under Windows and use this stick later under Linux (what shows already the gazillion different distributions of portable ooRexx, me think).

      Your 2nd point "allow the generated scripts to be copied to other locations" makes pretty obvious that highly likely you did not take the time to consider for what %~d0in Windows batch scrips could be used. This cryptic percent tilde returns the drive letter of the batch at runtime, thus wildly replicating the scripts to other directories of your memory stick do not harm the objective of the scripts -- but(!) the stick could be mounted to any drive letter and it would work right away, with no need to run setupoorexx each time you take it to another PC (and then replicate the generated scripts to all location you copied them before).

       
      • Rony G. Flatscher

        Hmm, maybe I was too brief:

        • the Rexx-scripts are the same for both Unix and Windows, the generated scripts are equivalent in their behavior,
        • the portable versions allow for different versions of ooRexx to be usable in parallel, e.g. a released or a beta version of a specific revision, maybe even mixing 32- and 64-bit.
        • In the case that you have a need to use the same version on different PCs off the same USB stick you could instead use the fully qualified path of some script you create and place in the same directory as setupoorexx.rex in which you use the rexx binary (rexx.exe on Windows, i.e. %~dp0\bin\rexx.exe).

        (Note also that the environment in the scripts created by setupoorexx.rex makes sure that that portable version of ooRexx gets also used if a non-Rexx program dynamically loads the Rexx interprter.)

         
        • m-stgt

          m-stgt - 2023-04-21

          Maybe I used too many words for a petty little matter. So just one..two simple question:

          i) The generated scripts rxenv.cmd and setenv2rxenv.cmd do have a purpose -- do they still fulfil this purpose when the memory stick is plugged to another PC and mounted to a different drive letter than before?
          ii) is it intentional use of "portable ooRexx" to run setupoorexx.cmd each and every time the memory stick is plugged to another PC? In case the answer to this question is YES this feature request is obsolete.

           

          Last edit: m-stgt 2023-04-21
          • Rony G. Flatscher

            ad i) not necessarily, this depends on your usage pattern ;)
            ad ii) yes, it is one simple command

             
            • m-stgt

              m-stgt - 2023-04-21

              i) was a rhetorical question only, your reply to ii) reveals a totally different "comprehension" of portable. For me it's "plug&play", not "plug&reinstall again before play". IMO this ticket may be closed.

               
  • Rony G. Flatscher

    • status: unread --> rejected
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB