Author Topic: Mozturbo help  (Read 54954 times)

xynixme

  • Guest
Re: Mozturbo help
« Reply #15 on: April 20, 2019, 01:19:58 pm »
Not sure about doing the install for the app, probably easier to leave it for the users though I guess the choice wouldn't hurt.

Might have to expand the DLL list, currently playing around with installing NSPR and NSS as I've been updating the certs, which brings up the problem of readonly files. I used make install to install which left the NSPR DLLs set to readonly. If doing make package, IIRC, the NSPR DLLs and the LDAP DLLs are left readonly.
Lster I'll insert a few line to create some (unverified) FF/SM/TB objects too. Without folder icons and other artwork. Installing is easy, and you can delete that section of code easily. Basicly the question and a few SysCreateObject-lines per product. We're already in the right directory, and the right Mozilla product was already detected for the *TURBO.EXE.

Without NSPR and NSS in my (test) install directory tree of just your repackaged Mozilla products, I had to execute ATTRIB -R *60* to cover all readonly DLLs (FTTOMH LDAP60, LDIF60 & PRLDAP60). But readonly should't no problem. With the DIR-command of Rexx, SysFileTree, you can query and set file attributes.

I'll actually use a more clear list of DLLs near the beginning of the Rexx code, without having to decrease or increase some counters if you'd append NSPR and NSS.

I'll also insert code to mark all qualifying readonly DLLs as non-readonly during the ABOVE512/HIGMEM phase, if a DLL is readonly. With ABOVE512 it's possible to (try to) unlock DLLs too, but I didn't use that parameter.

FWIW, if someone want to insert parts of some final Rexx installer inside a WarpIN Rexx install package, then of course that won't be disallowed by me. This is not a competing install script, albeit I'm often using a Rexx install script instead of a huge install package.

FWIW/2: since the apparently working HIGMEM support requirements are an usual IBM-compliant (Classic or Object) Rexx interpreter, the usual  REXXUTIL.DLL, and ABOVE512 or HIGHMEM.

xynixme

  • Guest
Re: Mozturbo help
« Reply #16 on: April 20, 2019, 03:51:46 pm »
Done. The list of DLLs now are sentences of Rexx' words. An avoidable disadvantage is that embedded spaces in relative DLL file names no longer are supported. So you can install TB as "C:\Internet Apps\thunderbird\thunderbird.exe", but you cannot use the full file spec "C:\Internet Apps\thunderbird\original dlls\NSS.DLL". Because, according to Rexx, "original" and "dlls\NSS.DLL" are 2 words (and 2 files), due to the blank character. This problem doesn't exist at the moment.

If one has no clue what the number of Rexx words of "original dlls\nss.dll" is: REXXTRY.CMD SAY Words('original dlls\nss.dll')
The output for INSTURBO.CMD must be 1. One Rexx "word" (per one DLL file). As stated above: the problem doesn't exist now.

Untested: installing SM (and TB?) uses icon files distributed via the original ZIP file.

Fully untested: Mozilla, because typically the OS will install that legacy browser and the only update should be the new, recommended MOZTURBO.EXE. No DLLs loaded high, no MOZILLA.EXE objects created.

Main changes were announced earlier. New DLLs can be appended as words in the section of line numbers 30-40 (generic, FF, SM and TB, SM only). Read-only file attribute unset and set for all qualifying read-only DLLs, albeit without error checking (a.o. SysFileTree not running out of memory, no fatal error message when restoring read-only failed). And (default = no) creating a folder and objects inside that folder. The Turbo objects can be created there too.

BTW, if RPM or whatever installs HIGHMEM.EXE in a PATH directory, then it's quite likely that it will be found quite fast indeed. The search order is first ABOVE512.EXE (just because I've got that) and next HIGHMEM.EXE. If the user doesn't type the full path, then the slowest time will be having no ABOVE512.EXE and having a Z:\ZZZZZ\Microsoft Cloud\Huge Network drive\Family\The wife\Tools\HIGHMEM.EXE file.

Possible tests, excluding user-I/O:

Check the relative DLL file names (not changed).

Check if the icons are right for SM/TB (as used in INSTURBO.CMD's FILESPEC=xxx\yyy.ico).

Copy (MOZILLA.EXE,) MOZTURBO.EXE and INSTURBO.CMD to x:\TEST. This should only create the 3 turbo-related objects.

Unzip FF/SM/TB in x:\TEST, copy xxTURBO.EXE and INSTURBO.CMD to the 3 main directories. Optionally mark or unmark DLLs as read-only, and execute the 3 INSTURBO.CMDs.

Basic FF test, starting with installing a FFTURBO.ZIP package in the main FF directory and making sure that some DLL's are(n't) marked as read-only:

Check if the command "THUNDERBIRD.EXE -mail" makes sense. If not, change its "CALL SysCreateObject ..." to "IF product='SM' THEN CALL SysCreateObect ...".

Code: [Select]
  inflating: CHANGES
  inflating: ffturbo.exe
  inflating: LICENSE
  inflating: readme

[R:\meuk\firefox]attrib +r mozsqlt3.dll

[R:\meuk\firefox]attrib +r xul.dll

[R:\meuk\firefox]attrib -r lgpllibs.dll

[R:\meuk\firefox]insturbo.cmd

Product found: FF
FFTURBO.EXE found.

Do you want to use memory above 512 MiB for DLLs (default, recommended),
which doesn't require having more than 512 MiB of RAM installed (Y/n)?

All expected DLLs found.

Please enter the full path to ABOVE512.EXE or HIGHMEM.EXE, or press nothing
but <ENTER> to try to find it:

ABOVE512.EXE or HIGHMEM.EXE not found in current directory nor PATH.
Searching...
Scanning drive C:
Scanning drive D:

Found: D:\Utilities\Above512\ABOVE512.exe
DLL unmarked as a read-only file.
module : XUL.DLL
 object 0 : base 0x00010000, size 0x036e3e20, flags 0x00012005
  readable, !writeable, executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, himem
 object 1 : base 0x03700000, size 0x0009b5f0, flags 0x00002003
  readable, writeable, !executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, !himem
 object 2 : base 0x00000000, size 0x00002324, flags 0x00002039
  readable, !writeable, !executable, resource, discardable, shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, !himem
DLL marked as a read-only file again.
module : LGPLLIBS.DLL
 object 0 : base 0x00010000, size 0x00069c80, flags 0x00012005
  readable, !writeable, executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, himem
 object 1 : base 0x00080000, size 0x00017e10, flags 0x00002003
  readable, writeable, !executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, !himem
DLL unmarked as a read-only file.
module : MOZSQLT3.DLL
 object 0 : base 0x00010000, size 0x000a7110, flags 0x00012005
  readable, !writeable, executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, himem
 object 1 : base 0x000c0000, size 0x00001bf0, flags 0x00002003
  readable, writeable, !executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, !himem
DLL marked as a read-only file again.
module : browser\components\BRWSRCMP.DLL
 object 0 : base 0x00010000, size 0x00076990, flags 0x00012005
  readable, !writeable, executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, himem
 object 1 : base 0x00090000, size 0x00017f50, flags 0x00002003
  readable, writeable, !executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, !himem
module : gmp-clearkey\0.1\CLEARKEY.DLL
 object 0 : base 0x00010000, size 0x00061f50, flags 0x00012005
  readable, !writeable, executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, himem
 object 1 : base 0x00080000, size 0x00017d10, flags 0x00002003
  readable, writeable, !executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, !himem

Object created: Firefox Turbo
Object created: Firefox Turbo (unload)
WPS shadow object of Firefox Turbo created in the startup folder.

Do you want to try to create WPS objects for Firefox (y/N)? y

Folder Firefox created.

Press <ENTER>...

Code: [Select]
/* InsTurbo.CMD */

CALL RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'
CALL SysLoadFuncs

/* Find Mozilla product in the current directory */

SAY
product=''
IF Stream('MOZILLA.EXE','C','QUERY EXISTS')<>'' THEN product='Mozilla'
IF Stream('THUNDERBIRD.EXE','C','QUERY EXISTS')<>'' THEN product='TB'
IF Stream('FIREFOX.EXE','C','QUERY EXISTS')<>'' THEN product='FF'
IF Stream('SEAMONKEY.EXE','C','QUERY EXISTS')<>'' THEN product='SM'
IF product='' THEN DO
   SAY 'Error, cannot find any main Mozilla executable in the current directory:'
   SAY '      ' Directory()
   SAY
   CALL CharOut '','Press <ENTER>... '
   PULL .
   EXIT
END
SAY 'Product found:' product
IF product='Mozilla' THEN product='MOZ'

/* Compile a list of DLLs, with one space between relative full DLL file specs */

dlls=''
IF Length(product)=2 THEN DO
   
   /* DLLs shared by all non-legacy products */
   dlls='XUL.DLL LGPLLIBS.DLL MOZSQLT3.DLL'
   
   /* Additional DLLs exclusive for FF only */
   IF product='FF' THEN dlls=dlls 'browser\components\BRWSRCMP.DLL gmp-clearkey\0.1\CLEARKEY.DLL'
   
   /* Additional DLLs exclusive for both SM and TB */
   IF product='SM' | product='TB' THEN dlls=dlls 'LDAP60.DLL LDIF60.DLL PRLDAP60.DLL'
   
   /* Additional DLLs exclusive for SM only */
   IF product='SM' THEN dlls=dlls 'components\SUITE.DLL'

END

dll.0=Words(dlls)
DO i=1 TO dll.0
   dll.i=Word(dlls,i)
END i

/* Find the matching TURBO.EXE in the same current directory */

turbo=product||'TURBO.EXE'
IF Stream(turbo,'C','QUERY EXISTS')='' THEN DO
   SAY 'Error, cannot find' turbo 'in the current directory:' Directory()
   SAY
   CALL CharOut '','Press <ENTER>... '
   PULL .
   EXIT
END
SAY turbo 'found.'

/* Load DLLs high, if the product is not the legacy Mozilla? */

loadhigh=0
IF Length(product)=2 THEN DO
   SAY
   SAY 'Do you want to use memory above 512 MiB for DLLs (default, recommended),'
   CALL CharOut '',"which doesn't require having more than 512 MiB of RAM installed (Y/n)? "
   PULL answer
   answer=Strip(answer)
   IF answer='' THEN answer='Y'
   IF Left(answer,1)='Y' THEN loadhigh=1
   SAY
END

/* Load high */

IF loadhigh=1 THEN DO
   DO i=1 TO dll.0
      IF Stream(dll.i,'C','QUERY EXISTS')='' THEN DO
         SAY
         SAY 'Error: cannot find' dll.i
         SAY
         CALL CharOut '','Press <ENTER>... '
         PULL .
         EXIT
      END
   END i   
   
   SAY 'All expected DLLs found.'
   SAY

   /* Try to find ABOVE512.EXE or HIGHMEM.EXE, if the answer was (Y)es */

   file='ABOVE512.EXE'
   high=Stream(file,'C','QUERY EXISTS')
   IF high='' THEN high=Stream('HIGHMEM.EXE','C','QUERY EXISTS')
   IF high='' THEN high=SysSearchPath('PATH',file)
   IF high='' THEN high=SysSearchPath('PATH','HIGHMEM.EXE')
   IF high='' THEN DO
      SAY 'Please enter the full path to' file 'or HIGHMEM.EXE, or press nothing'
      CALL CharOut '','but <ENTER> to try to find it: '
      PARSE PULL high
      SAY
      IF Strip(high)<>'' THEN DO
         IF Right(high,1)<>'\' THEN high=high||'\'
         high=high||file
         IF Stream(high,'C','QUERY EXISTS')='' THEN DO
            SAY 'Error: cannot find file' high
            SAY
            CALL CharOut '','Press <ENTER>... '
            PULL .
            EXIT
         END
      END
   END
   IF Strip(high)='' THEN DO   
      SAY file 'or HIGHMEM.EXE not found in current directory nor PATH.'
      SAY 'Searching...'
      drives=SysDriveMap('A:')
      IF drives='' THEN DO
         SAY
         SAY 'Error: no drives found.'
         SAY
         CALL CharOut '','Press <ENTER>... '
         PULL .
         EXIT
      END
      drive.0=Words(drives)
      DO i=1 TO drive.0
         okay.i=0
         IF SysDriveInfo(Word(drives,i))<>'' THEN okay.i=1
      END i
      DO i=1 TO drive.0
         IF okay.i=0 THEN ITERATE i
         IF high='' THEN DO
            SAY 'Scanning drive' Word(drives,i)
            pattern1=Word(drives,i)||'\'||file
            pattern2=Word(drives,i)||'\HIGHMEM.EXE'
            CALL SysFileTree pattern1,'hit.','FOS'
            IF hit.0=0 THEN CALL SysFileTree pattern2,'hit.','FOS'
            IF hit.0>0 THEN DO
               high=hit.1
               SAY
               SAY 'Found:' high
            END
         END
      END i
   END
   IF high='' THEN DO
      SAY
      SAY 'Error:' file 'nor HIGHMEM.EXE found.'
      SAY
      CALL CharOut '','Press <ENTER>... '
      PULL .
      EXIT
   END
   DO i=1 TO dll.0
      /* Is the DLL read-only? */
      restore=0
      CALL SysFileTree dll.i,'readonly.','F','***+*'
      /* If so, then (try to) toggle the setting */
      IF readonly.0=1 THEN DO
         restore=1
         CALL SysFileTree dll.i,'readonly.','F',,'***-*'
         CALL SysFileTree dll.i,'readonly.','F','***-*'
         IF readonly.0>0 THEN SAY dll 'unmarked as a read-only file.'
      END
      arguments=dll.i '-c'
      IF Translate(FileSpec('N',high))='HIGHMEM.EXE' THEN arguments='-c' dll.i
      '@'||high arguments
      /* (Try to) restore the read-only setting, if possibly changed */
      IF restore=1 THEN DO
         CALL SysFileTree dll.i,'readonly.','F',,'***+*'
         CALL SysFileTree dll.i,'readonly.','F','***+*'
         IF readonly.0>0 THEN SAY dll 'marked as a read-only file again.'
      END
   END i
END

here=Translate(Directory())
name=''
IF product='FF' THEN name='Firefox'
IF product='MOZ' THEN name='Mozilla'
IF product='SM' THEN name='SeaMonkey'
IF product='TB' THEN name='Thunderbird'

name2=name 'Turbo'
SAY
IF SysCreateObject('WPProgram',name2,'<WP_DESKTOP>','EXENAME=CMD.EXE;PARAMETERS=/c detach' here||'\'||turbo '-l;STARTUPDIR='||here||';MINIMIZED=YES;OBJECTID=<TURBO_'||product||'>','R') THEN DO
   SAY 'Object created:' name2
   IF SysCreateObject('WPProgram',name2 '(unload)','<WP_DESKTOP>','EXENAME='||here||'\'||turbo||';PARAMETERS=-u;STARTUPDIR='||here||';MINIMIZED=YES;OBJECTID=<TURBO_'||product||'_UNLOAD>','R') THEN DO
      SAY 'Object created:' name2 '(unload)'
      IF SysCreateShadow('<TURBO_'||product||'>','<WP_START>') THEN DO
         SAY'WPS shadow object of' name2 'created in the startup folder.'
         SAY
         answer='N'
         IF Length(product)=2 THEN DO
            CALL CharOut '','Do you want to try to create WPS objects for' name||' (y/N)? '
            PULL answer
            answer=Strip(answer)
         END
         IF answer='' THEN answer='N'
         IF Left(answer,1)='Y' THEN DO
            SAY
            folderid='<'||product||'_FOLDER>'
            IF SysCreateObject('WPFolder',name,'<WP_DESKTOP>','OBJECTID='||folderid,'R') THEN DO       
               SAY 'Folder' name 'created.'
               IF product='FF' THEN exename=here||'\'||'FIREFOX.EXE'
               IF product='SM' THEN exename=here||'\'||'SEAMONKEY.EXE'
               IF product='TB' THEN exename=here||'\'||'THUNDERBIRD.EXE'
               CALL SysCreateObject 'WPProgram',name 'Profile Manager',folderid,'EXENAME='||exename||';PARAMETERS=-ProfileManager;STARTUPDIR='||here
               CALL SysCreateObject 'WPProgram',name 'Read Me',folderid,'EXENAME=E.EXE;PARAMETERS='||here||'README.OS2;STARTUPDIR='||here
               CALL SysCreateObject 'WPProgram',name 'Safe Mode',folderid,'EXENAME='||exename||';PARAMETERS=-safe-mode;STARTUPDIR='||here
               IF product='SM' | product='TB' THEN DO
                  CALL SysCreateObject 'WPProgram',name 'Composer',folderid,'EXENAME='||exename||';PARAMETERS=-edit;STARTUPDIR='||here,';ICONFILE='||here||'\chrome\icons\default\editorWindow.ico'
                  CALL SysCreateObject 'WPProgram',name 'Mail',folderid,'EXENAME='||exename||';PARAMETERS=-mail;STARTUPDIR='||here,';ICONFILE='||here||'\chrome\icons\default\messengerWindow.ico'
                  CALL SysCreateObject 'WPProgram',name 'News',folderid,'EXENAME='||exename||';PARAMETERS=-news;STARTUPDIR='||here,';ICONFILE='||here||'\chrome\icons\default\messengerWindow.ico'
                  CALL SysCreateObject 'WPProgram',name 'Send Mail',folderid,'EXENAME='||exename||';PARAMETERS=-compose mailto:[mailto:];STARTUPDIR='||here,';ICONFILE='||here||'\chrome\icons\default\msgcomposeWindow.ico'
               END
               /* Main EXE last, so it's selected by default when the folder is opened in icon view */
               CALL SysCreateObject 'WPProgram',name,folderid,'EXENAME='||exename||';STARTUPDIR='||here
            END
            SAY
         END         
         CALL CharOut '','Press <ENTER>... '
         PULL .
         EXIT
      END
   END
END
   
SAY 'Error: cannot create all 3 WPS objects.'
SAY
CALL CharOut '','Press <ENTER>... '
PULL .

EXIT
« Last Edit: April 20, 2019, 04:12:21 pm by André Heldoorn »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Mozturbo help
« Reply #17 on: April 21, 2019, 04:13:21 am »
Preliminary testing shows this version as a keeper with a few minor changes such as the programs to include the version so as not to conflict with earlier installed versions, eg firefox-45.9.
I tested by adding the nss and nspr DLLs and they got their attributes changed correctly and changed back.
Next, I'll try on a new install and see how installing the mozapps goes and some of your other tests.
How hard would it be to add setting Firefox or SeaMonkey as the default browser, Thunderbird as the default email client? Same with associations?

xynixme

  • Guest
Re: Mozturbo help
« Reply #18 on: April 21, 2019, 11:36:31 am »
FWIW: the code to find ABOVE512.EXE or HIGHMEM.EXE can be optimized by asking what your weapon of choice is, by scanning a drive once and use that "DIR Z:\*.EXE /S" output to find the file, and/or by selecting a drive. As stated earlier, an alternative is to use the PATH (not sure if those tools are path-worthy) or to type the full path.
a few minor changes such as the programs to include the version so as not to conflict with earlier installed versions, eg firefox-45.9.

some of your other tests.

How hard would it be to add setting Firefox or SeaMonkey as the default browser, Thunderbird as the default email client? Same with associations?
There are several ways to check versions, if we may exclude downgrades. Check file dates/times, and compare those timestamps with a hard-coded "database" of known versions. Read e.g. the README.OS2 of FF, and find the highest "number" with 2 dots. Read e.g. an identification string of LGPLLIBS.DLL or MOZSQLT3.DLL, and append the version number to WPS object IDs and WPS object names. CHANGES.OS2 seems to be a good candidate, if you're maintaining that. Then a restricted number of lines has to be read, which also reduces the memory footprint of Rexx.

Without rereading the code myself, you could also give the script a try in an empty directory. And a system without high mem tools (i.e. just replace the text HIGMMEM by FOOBAR in the code, if you have no executable FOOBAR file).

Associations are quite easy, if the script installs the WPS objects too. Apperently, with a Dutch OS, I can insert "ASSOCTYPE=HTML,tekst/html;ASSOCFILTER=*.htm,*.html;" in the WPS setup string. AFAIK changing the order requires editing an INI file. Rexx has got SysIni().

There may different types of default browsers. Here *.HTML is linked to Netscape (type 1) for fast local browsing, and IIRC changing the default browser (type 2) didn't fully change all browser settings of WPUrl objects (type 3). In a nutshell Rexx has access to OS/2 INI files, and it should be possible to import RegEdit2-settings.

If "type 2" is equal to "type 3", then I may be remembering not being able to change all settings of WPUrl objects. That's probably the reason why Mozilla still is my default browser. Not being able to set a DEFAULTWORKINGDIR to (NULL). I'm using the SM suite instead of TB, so I don't know about mailer settings.

WPTOOLS.DLL would be required to query settings of WPS objects.

Please keep in mind that associating *.HTML with FF by default may introduce 3 questions: do you want to associate *.HTML files, do you want to associate *HTML files too, and do you want this to be(come) the first association. And you may want to undo a change. To avoid that an Internet Exploder decides it's your default, and there's no tool to undo that decision.

With my typical setup, which isn't anything to go by, Netscape is a default browser for local files and SM should be a default browser for WPUrl objects (Mozilla is, due to not being able to change all settings).

It's also possible to split Rexx files, just like there's also a MozSounds.cmd file too. As such you don't need HIGHMEM.EXE to change associations later.

BTW, can you go to an ArcaOS prompt near you and type "PMREXX.EXE REXXTRY"? Next type "SAY Address()". It's output is either CMD (old bug) or PMREXX (bug fixed). If a fixed PMREXX is GA, then a PMREXX.EXE which returns PMREXX may make a dual-mode app possible (use SAY if the environment is CMD.EXE, or "WinMessageBox" if the environment is a hidden PM Rexx window).

The commands "HELP WPSREF WPPROGRAM" and "HELP WPSREF WPURL" show WPS settings which are available while creating or updating a WPS object. ASSOCFILTER, ASSOCTYPE, BROWSER, DEFAULTBROWSER, and so on.

So the question first is: what do you want to set/change where? Some settings are easy, some aren't, some are hard, and some are impossible. An answer may be: associate the installed FF browser with *.HTML. Is this a new association in the OS/2 INI file, then make it the default one (unless the section PMWP_ASSOC_CHECKSUM would make that too hard, if that would be involved).

If someone wants to play with WPS setup strings, here is the code to create WPProgram and WPUrl test objects (with known object IDs):

Code: [Select]
/**/
CALL RxFuncAdd 'SysCreateObject','RexxUtil','SysCreateObject'
CALL SysCreateObject 'WPUrl','WPUrl settings'||D2C(10)||'test object','<WP_DESKTOP>','URL=https://www.os2world.com;OBJECTID=<WPURL_SETTEST>','R'
CALL SysCreateObject 'WPProgram','WPProgram settings'||D2C(10)||'test object','<WP_DESKTOP>','EXENAME=E.EXE;OBJECTID=<WPPROGRAM_SETTEST>','R'
EXIT

And here's the Rexx code to play with WPS setup strings of the objcts with a known object-ID. Perhaps back-up the WPS and record existing settings before changing WPUrl defaults (the sample code doesn't):

Code: [Select]
/**/
CALL RxFuncAdd 'SysSetObjectData','RexxUtil','SysSetObjectData'
IF SysSetObjectData('<WPURL_SETTEST>','BROWSER=FOO.BAR') THEN SAY 'WPUrl-setting touched successfully'.
IF SysSetObjectData('<WPPROGRAM_SETTEST>','PARAMETERS=crash test dummy;STARTUPDIR=F:\OO.BAR') THEN SAY 'WPProgram-setting touched successfully'.
EXIT

Oh, and FTR: the assumed version of ABOVE512 is http://hobbes.nmsu.edu/download/pub/os2/dev/util/above512_001b.zip. version 001a isn't tested.
« Last Edit: April 21, 2019, 11:54:05 am by André Heldoorn »

xynixme

  • Guest
Re: Mozturbo help
« Reply #19 on: April 21, 2019, 06:03:28 pm »
FTR/2: I've deleted my sample copy of InsTurbo.CMD each time, for one because the code can (and perhaps should) be changed. If the database of this website would have crashed, then my data source could be lost. I have no back-up copy.
« Last Edit: April 21, 2019, 06:29:34 pm by André Heldoorn »

xynixme

  • Guest
Re: Mozturbo help
« Reply #20 on: April 22, 2019, 04:06:13 pm »
0. Retorical: there's no i686-build for SM SUa1 (yet).

1. According to EDM/2 (http://www.edm2.com/index.php/WPUrl), using WPUrl to set the DEFAULTBROWSER may introduce OS/2 Warp 4+ as an implied requirement.

2. Perhaps a default browser shouldn't somehow require LIBPATHSTRICT=T. Multiple browsers don't require LIBPATHSTRICT=T anymore (a.o. Links 2.19, without possibly conflicting own DLLs since a recent linking change).

3. I may post or upload a more generic (PM?) app to (try to) change the default WPUrl-objects browser later. Without support for default arguments, like Netscape's, because I'm not sure (yet) if that setting can be changed to (NULL) again.

xynixme

  • Guest
Re: Mozturbo help
« Reply #21 on: April 22, 2019, 05:19:28 pm »
Code: [Select]
[R:\MEUK]SetDefaultWPUrlBrowser.CMD

 1 - Dooble
 2 - Firefox
 3 - Lightweight2
 4 - Links
 5 - Mozilla
 6 - Netscape
 7 - Qbrows
 8 - QtWeb
 9 - QupZilla
10 - SeaMonkey
11 - Surfer

Please enter the number of a (new) default WPUrl browser? 10

Please enter the drive and directory of SEAMONKEY.EXE? e:\internet\seamonkey


Previous default browser setting: D:\PROGRAMS\Mozilla\Mozilla.exe
Previous working directory      : D:\PROGRAMS\Mozilla

New default browser setting: E:\INTERNET\SEAMONKEY\SEAMONKEY.EXE
New working directory      : E:\INTERNET\SEAMONKEY

Press <ENTER>...

Code: [Select]
/* SetDefaultWPUrlBrowser.CMD, sample to change default WPUrl browser and working directory (by using SysIni) */

CALL RxFuncAdd 'SysIni','RexxUtil','SysIni'

'@MODE 80,25'
SAY

/* Help, or browser's entered or dropped executable? */

PARSE ARG exe
exe=Strip(exe)
IF Left(exe,1)='-' | Left(exe,1)='/' THEN DO
   SAY
   SAY 'Set default WPUrl browser. This requires OS/2 Warp 4, eCS or ArcaOS, and'
   SAY "a browser which doesn't require the setting LIBPATHSTRICT=T."
   SAY
   SAY "Usage: SetDefaultWPUrlBrowser.CMD [full file path of browser's executable]"
   SAY
   SAY 'Drop or enter the main executable of a browser, execute this in the main'
   SAY 'directory of a (supported) browser, or select a (supported) browser from'
   SAY 'a list.'
   SAY
   CALL CharOut '','Press <ENTER>... '
   PULL .
   EXIT
END
/* Support for CLI long file name */
IF Left(exe,1)='"' THEN PARSE VAR exe '"' exe '"' .
   
IF exe<>'' THEN exe=Stream(exe,'C','QUERY EXISTS')

/* List of upto 23 browsers (single Rexx-word EXEs minus the extension .EXE) */

IF exe='' THEN DO
   browsers='Dooble Firefox Lightweight2 Links Mozilla Netscape Qbrows QtWeb QupZilla SeaMonkey Surfer'

   /* Create table of browsers, find 1st match to avoid dialog (if possible) */

   browser.0=Words(browsers)
   IF browser.0<1 | browser.0>23 THEN DO
      SAY
      SAY 'Error: valid number of supported browsers is 1-23, found' browser.0
      SAY
      CALL CharOut '','Press <ENTER>... '
      PULL .
      EXIT
   END
   DO i=1 TO browser.0
      browser.i=Word(browsers,i)
      IF exe='' THEN exe=Stream(browser.i||'.EXE','C','QUERY EXISTS')
   END i

   /* No match found in current directory? */

   IF exe='' THEN DO
      DO i=1 TO browser.0
         SAY Format(i,2) '-' browser.i
      END i
      SAY
      CALL CharOut '','Please enter the number of a (new) default WPUrl browser? '
      PULL choice
      SAY
      choice=Strip(Translate(choice))     
      IF choice='' THEN EXIT
      IF Pos('E',choice,1)>0 THEN EXIT
      IF DataType(choice,'W')=0 THEN EXIT
      IF choice<1 | choice>browser.0 THEN EXIT
      browser.choice=Translate(browser.choice)||'.EXE'
      CALL CharOut '','Please enter the drive and directory of' browser.choice||'? '
      PULL where
      SAY
      IF Right(where,1)<>'\' THEN where=where||'\'
      exe=where||browser.choice
   END
END

IF Stream(exe,'C','QUERY EXISTS')='' THEN DO
   SAY
   SAY "Error: file" exe "doesn't exist"
   SAY
   CALL CharOut '','Press <ENTER>... '
   PULL .
   EXIT
END

SAY
old1=SysIni('USER','WPURLDEFAULTSETTINGS','DefaultBrowserExe')
old2=SysIni('USER','WPURLDEFAULTSETTINGS','DefaultWorkingDir')
IF old1='ERROR:' | Length(old1)<1 | old2='ERROR:' | Length(old2)<3 THEN DO
   SAY 'Error: cannot query current default settings of WPUrl objects'
   SAY
   CALL CharOut '','Press <ENTER>... '
   PULL .
   EXIT
END
SAY 'Previous default browser setting:' old1
SAY 'Previous working directory      :' old2
SAY

PARSE VALUE Reverse(exe) WITH . '\' where
where=Reverse(where)
new1=SysIni('USER','WPURLDEFAULTSETTINGS','DefaultBrowserExe',exe||D2C(0))
new2=SysIni('USER','WPURLDEFAULTSETTINGS','DefaultWorkingDir',where||D2C(0))
IF new1='ERROR:' | new2='ERROR:' THEN DO
   SAY 'Warning: cannot set all new default settings of WPUrl objects'
   SAY
   CALL CharOut '','Press <ENTER>... '
   PULL .
   SAY
   EXIT
END

old1=SysIni('USER','WPURLDEFAULTSETTINGS','DefaultBrowserExe')
old2=SysIni('USER','WPURLDEFAULTSETTINGS','DefaultWorkingDir')
IF old1='ERROR:' | old2='ERROR:' THEN DO
   SAY 'Error: cannot query updated default settings of WPUrl objects'
   SAY
   CALL CharOut '','Press <ENTER>... '
   PULL .
   EXIT
END
SAY 'New default browser setting:' old1
SAY 'New working directory      :' old2
SAY
CALL CharOut '','Press <ENTER>... '
PULL .

EXIT
« Last Edit: April 22, 2019, 06:03:33 pm by André Heldoorn »

xynixme

  • Guest
Re: Mozturbo help
« Reply #22 on: April 22, 2019, 07:00:15 pm »
And a sample Rexx script to update ALL existing WPUrl objects in a single WPS Folder (/ subdirectory). Obviously an user could have intentionally entered any value, so this can destroy a setup. Change the parameter FO of SysFileTree to FOS to include subdirectories.

The app assumes that FIREFOX.EXE, MOZILLA.EXE or SEAMONKEY.EXE is installed in the current directory, and uses this EXE and its directory as the new setting for a single WPUrl object.

Presumably it doesn't support a MOZILLA.EXE in a root directory (easy fix, but an unlikely install of that legacy browser).

Code: [Select]
[R:\MEUK\FIREFOX]updatewpurl

Usage: UpdateWPUrl.CMD [base directory, e.g. C:\HOME\DESKTOP\TestFolder]

[R:\MEUK\FIREFOX]updatewpurl d:\home\desktop
1 files found.
Adjusted: d:\home\desktop\WPUrlTestObject

Code: [Select]
/* UpdateWPUrl.CMD - Updates existing WPUrl objects in single WPS folder/directory */

CALL RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'
CALL SysLoadFuncs

PARSE ARG base
base=Strip(base)
IF Left(base,1)='"' THEN PARSE VAR base '"' base '"' .
IF base='' THEN DO
   SAY
   SAY 'Usage: UpdateWPUrl.CMD [base directory, e.g. C:\HOME\DESKTOP\TestFolder]'
   EXIT
END

here=Directory()
browser=Stream(here||'\FIREFOX.EXE','C','QUERY EXISTS')
IF browser='' THEN browser=Stream(here||'\SEAMONKEY.EXE','C','QUERY EXISTS')
IF browser='' THEN browser=Stream(here||'\MOZILLA.EXE','C','QUERY EXISTS')
IF browser='' THEN DO
   SAY
   SAY 'Error: FIREFOX.EXE, MOZILLA.EXE nor SEAMONKEY.EXE found in' here
   EXIT
END

IF Right(base,1)<>'\' THEN base=base||'\'
base=base||'*'
CALL SysFileTree base,'object.','FO'
IF object.0=0 THEN EXIT
SAY object.0 'files found.'
flag=1

DO i=1 TO object.0
   IF SysGetEA(object.i,'.TYPE','typeinfo')=0 THEN DO
      PARSE VAR typeinfo 1 . 11 type
      IF type=='UniformResourceLocator' THEN DO
         IF SysSetObjectData(object.i,'BROWSER='||browser||';WORKINGDIR='||here) THEN SAY 'Adjusted:' object.i
      END
   END
END i

EXIT
« Last Edit: April 22, 2019, 07:05:53 pm by André Heldoorn »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Mozturbo help
« Reply #23 on: April 23, 2019, 03:44:37 am »
0. Retorical: there's no i686-build for SM SUa1 (yet).

Sorry, once I get this debug build I've been fighting to finish, I'll build you one. I think I might use a frame rate of 30 instead of 60 as well for performance. I experimented a bit with it and didn't notice any harmful affects and it should work better on lower end hardware.

xynixme

  • Guest
Re: Mozturbo help
« Reply #24 on: April 23, 2019, 12:32:39 pm »
Your seamonkey-2.42.9esr_r3_s.en-US.os2.zip works fine with (all) eCS hardware with enough physical RAM.

If browsing about:blank is a disaster due to browser component changes now, then you could skip SM i686. I do have FF i686 installed, but I tend to only use that when performance doesn't matter. Install and seldomly use a XPI file which doesn't support SM, for example. All recent FFs were very slow, compared to the SM r3_s release and previous releases.

I can confirm that a reasonable general performance is more important for a i686 build than a cOOl FPS rate. For "modern" videos I may have to use W10-hardware anyway, and even that's frequently too slow for e.g. unavoidable video ads.

Limited disk space is one of the main reasons why I don't consider saving a second optimized copy for newer eCS hardware, despite of the fact that I may own at least one eCS Pentium-M CPU.

---

Back on-topic is the same (lack of) speed a reason why I didn't really take a look at both setting a new WPUrl default browser and changing existing BROWSER settings if the old BROWSER setting was the previous default browser. One may intentionally use any legacy browser when it would take minutes to launch FF to browse a local HTML file.

Setting a new default browser can be restricted to a specific family of products, you don't always have to support QtWeb as s theoretically competing browser, but then it may require a PM UI with many "checkboxes" to confirm changing the BROWSER setting of each existing WPUrl object. And a select all-button, and a reverse selection-button, and so on.

It could also look like the 3rd tab of WPProgram's settings, with a "Add" and "Remove" button. Left: don't touch. Right: update. It won't be as "easy" as Windows' "Do you want to use Firefox as the default browser for everything?". We've got an OO choice, which e.g. I've used (*.HTML Netscape, WPUrl Mozilla (http(s):m file:) or Netscape (file:, regular browsing mainly SM or FF). But with such a PM app I'll have to look at about 170 WPUrl objects. Excluding the ones with a non-default BROWSER setting, but including file: ones installed by installers of programs. I may be tempted to select "Don't change anything" when a long list pops up, for one because most/all OS/2-related web sites won't require a modern browser. I'll probably just change the default browser for new WPUrl objects, if I would create new WPUrl objects quite frequently.

xynixme

  • Guest
Re: Mozturbo help
« Reply #25 on: May 07, 2019, 03:26:04 pm »
1. Can all of ...

nspr4.dll
nspr4k.dll
nss3.dll
nss3k.dll
nssckbi.dll
nssckbik.dll
nssdbm3.dll
nssdbm3k.dll
nssuti3k.dll
nssutil3.dll

... be appended to the safe list of DLLs to mark as 'load high'?


2. Since PKILL.EXE somehow appears to be an OS component since eCS 2.x EN/DE or ArcaOS, and PKILL.EXE is available as an infomal update for e.g. eCS 1.x, but PMREXX.EXE may still be broken since Warp 3 FP0 because Address() doesn't return PMREXX as its environment anymore, this is a simple way to write a PM app. With disadvantages. It may be far too simple, and e.g. VX-REXX is a superior choice. Nevertheless, FWIW:

Code: [Select]
/* Execute this Rexx script with PMREXX.EXE (PMREXX REXXAPP.CMD) !!!!!!!!!!!!!!!!!!!!! */

answer=RxMessageBox('Text','Title','YESNOCANCEL','QUESTION')
SAY 'Answer:' answer
SAY
SAY 'Press <ENTER>...'
PULL .

/* Suicide is painless */
'@PKILL.EXE PMREXX.EXE'

EXIT
/* Or perhaps '@EXIT', if a window remains open */

Possible when the questions will be restricted to yes/no-questions only ("Do you want to ..."), without other dialogs halfway. It's not as good as it used to be:

Code: [Select]
/* Dual mode Rexx app (pseudo-code for OS/2 Warp 3 FP0) */
IF Address='PMREXX' THEN CALL RxMessageBox 'Select OK to exit','PM mode','OK' ELSE DO
   CALL CharOut '','Text mode. Press <ENTER> to exit... '
   PULL .
END

EXIT
/* Or perhaps '@EXIT', if a PM or VIO window remains open with OS/2 Warp FP0 */

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Mozturbo help
« Reply #26 on: May 08, 2019, 04:37:29 am »
1. Can all of ...

nspr4.dll
nspr4k.dll
nss3.dll
nss3k.dll
nssckbi.dll
nssckbik.dll
nssdbm3.dll
nssdbm3k.dll
nssuti3k.dll
nssutil3.dll

... be appended to the safe list of DLLs to mark as 'load high'?

I believe so. The *k.dll ones are legacy and aren't used by current builds. I'm marking all high using your last InsTurbo.cmd with the above, minus the *k.dll ones, added to the script. Do need to adjust the error handling so if a DLL is not present, the script just mentions it instead of dying.

Quote
2. Since PKILL.EXE somehow appears to be an OS component since eCS 2.x EN/DE or ArcaOS, and PKILL.EXE is available as an infomal update for e.g. eCS 1.x, but PMREXX.EXE may still be broken since Warp 3 FP0 because Address() doesn't return PMREXX as its environment anymore, this is a simple way to write a PM app. With disadvantages. It may be far too simple, and e.g. VX-REXX is a superior choice. Nevertheless, FWIW:

Code: [Select]
/* Execute this Rexx script with PMREXX.EXE (PMREXX REXXAPP.CMD) !!!!!!!!!!!!!!!!!!!!! */

answer=RxMessageBox('Text','Title','YESNOCANCEL','QUESTION')
SAY 'Answer:' answer
SAY
SAY 'Press <ENTER>...'
PULL .

/* Suicide is painless */
'@PKILL.EXE PMREXX.EXE'

EXIT
/* Or perhaps '@EXIT', if a window remains open */

Possible when the questions will be restricted to yes/no-questions only ("Do you want to ..."), without other dialogs halfway. It's not as good as it used to be:

Code: [Select]
/* Dual mode Rexx app (pseudo-code for OS/2 Warp 3 FP0) */
IF Address='PMREXX' THEN CALL RxMessageBox 'Select OK to exit','PM mode','OK' ELSE DO
   CALL CharOut '','Text mode. Press <ENTER> to exit... '
   PULL .
END

EXIT
/* Or perhaps '@EXIT', if a PM or VIO window remains open with OS/2 Warp FP0 */

I think for now it is simpler to just stay with the cmd line version.
Thanks

xynixme

  • Guest
Re: Mozturbo help
« Reply #27 on: May 08, 2019, 01:42:08 pm »
Thank you. After checks I'll delete the NS*K.DLL files and will mark the safe other NS*.DLL ones as load-high too.
Do need to adjust the error handling so if a DLL is not present, the script just mentions it instead of dying.
In different sample code, probably to be inserted in an early phase, before doing anything with DLLs files.

Code: [Select]
/* Untested */

/* Already covered by SysLoadFuncs call in earlier sample code */
CALL RxFuncAdd 'SysBootDrive','RexxUtil','SysBootdrive'

/* Boot drive to find x:\CONFIG.SYS in production, and the number of test DLLs */

bootdrive=SysBootDrive()
dll.0=11

/* List of test "DLLs" */

dll.1='FOO.BAR'
dll.2='FOO.DLL'
dll.3=bootdrive||'\CONFIG.SYS'
dll.4=bootdrive||'\sys\apps\AMOUSE\AMou001.dll'
dll.5=bootdrive||'\OS2\APPS\tilehk.dll'
dll.6='tilehk.dll'
dll.7='XUL.DLL'
dll.8='clearkey.dll'
dll.9='gmp-clearkey\0.1\clearkey.dll'
dll.10='nspr4.dll'
dll.11='CONFIG.SYS'

/* LIBPATH section only required for the optional LIBPATH section */
dircounter=0
source=bootdrive||'\CONFIG.SYS'
DO WHILE Lines(source)>0
   line=Strip(LineIn(source))
   IF Left(Translate(line),8)='LIBPATH=' THEN DO
      PARSE VAR line 1 . 9 line
      begin=Strip(Value('BEGINLIBPATH',,'ENVIRONMENT'))
      IF Right(begin,1)<>';' THEN begin=begin||';'
      IF begin<>';' THEN line=begin||line
      DO WHILE line<>''
         dircounter=dircounter+1
         PARSE VAR line dir.dircounter ';' line
         IF Right(dir.dircounter,1)<>'\' THEN dir.dircounter=dir.dircounter||'\'
      END
   END
END
CALL LineOut source
dir.0=dircounter
/* End of LIBPATH parsing section */

/* Fatal error counter */
errors=0

/* Loop */
DO i=1 TO dll.0
   /* Does the file exist? */
   SAY 'DLL test file' Format(i,2)||':' dll.i
   IF Stream(dll.i,'C','QUERY EXISTS')='' THEN DO
      SAY 'DLL file' dll.i 'not found with starting point' Directory()
      errors=errors+1

      /* Optional section, LIBPATH check */
      /* Undo added error because of the following retry */
      errors=errors-1
      DO j=1 TO dir.0
         retry=Stream(dir.j||FileSpec('N',dll.i),'C','QUERY EXISTS')
         IF retry<>'' THEN DO
            SAY "Don't worry, hopefully you meant" retry
            dll.i=dir.j||FileSpec('N',dll.i)
            j=dir.0
         END
      END j   
      IF retry='' THEN DO
         SAY 'nor in a LIBPATH directory.'
         errors=errors+1
      END
      /* End of optional LIBPATH section */
   
   END
   SAY
END i

IF errors>0 THEN DO
   CALL Charout '',errors 'fatal DLL file error(s). Please press <ENTER> to exit... '
   PULL .
   EXIT
END

SAY 'All expected files found, somewhere.'

EXIT

Output sample with eCS 1.2 in FIREFOX.EXE's directory (product irrelevant, earlier fully functional sample code already uses the real right list of DLLs per product, no "SET BEGINLIBPATH=..." in use:

Code: [Select]
DLL test file  1: FOO.BAR
DLL file FOO.BAR not found with starting point D:\interweb\firefox
nor in a LIBPATH directory.

DLL test file  2: FOO.DLL
DLL file FOO.DLL not found with starting point D:\interweb\firefox
nor in a LIBPATH directory.

DLL test file  3: C:\CONFIG.SYS

DLL test file  4: C:\sys\apps\AMOUSE\AMou001.dll
DLL file C:\sys\apps\AMOUSE\AMou001.dll not found with starting point D:\interweb\firefox
nor in a LIBPATH directory.

DLL test file  5: C:\OS2\APPS\tilehk.dll

DLL test file  6: tilehk.dll
DLL file tilehk.dll not found with starting point D:\interweb\firefox
nor in a LIBPATH directory.

DLL test file  7: XUL.DLL

DLL test file  8: clearkey.dll
DLL file clearkey.dll not found with starting point D:\interweb\firefox
nor in a LIBPATH directory.

DLL test file  9: gmp-clearkey\0.1\clearkey.dll

DLL test file 10: nspr4.dll
DLL file nspr4.dll not found with starting point D:\interweb\firefox
Don't worry, hopefully you meant D:\interweb\Bin\nspr4.dll

DLL test file 11: CONFIG.SYS
DLL file CONFIG.SYS not found with starting point D:\interweb\firefox
Don't worry, hopefully you meant C:\CONFIG.SYS

5 fatal DLL file error(s). Please press <ENTER> to exit...

Post your last version (a.o. including NS*.DLLs) and the code to be inserted (which may exclude the LIBPATH retry), if you want someone else to insert the stand-alone sample code above. Mainly coming down to checking variable names and using the real DLL file name array.

The (BEGIN)LIBPATH won't work with SysSearchPath, because SysSearchPath requires (SET=...) environment variables. The PATH is, but the LIBPATH isn't. I've inserted that complicating (BEGIN)LIBPATH checking code to account for setups with NS*.DLLs outside of e.g. a distributed "old" FF 45.9 package. The log file section of DLL test file 10 shows this construction may actually work.

xynixme

  • Guest
Re: Mozturbo help
« Reply #28 on: May 08, 2019, 02:38:53 pm »
Additionally setting a default browser is not related to a specific product. But the author of a specific product can, of course, promote the own product. My generic app uses SysIni. An alternative solution could be to SysCreateObject a WPUrl object with SET DEFAULT=... settings in e.g. the folder "<WP_NOWHERE>", and to (try to) SysDestroyObject that WPUrl object immediately.

Or you can create a WPUrl object which refers to a file or the homepage of the product, open the settings, and tell the user to go to the Browser tab and use the button to set a default browser there.

In the case of InsTurbo.CMD I'd recommend SysIni. It has found the main EXE and its directory, which is all you need as long as the browser doesn't require LIBPATHSTRICT=T and SET BEGINLIBPATH=... anymore.

A quick & dirty test or my memory failed. ISTR I created a WPUrl test object (no ".EXE." in its EAs), changed the default browser via SysIni, but the created test object still was opened with the previous default browser.

A PM app would be useful if you want an user has OLDBROWSER.EXE in EAs of existing WPUrl object. Then you can present a list of changes (do you want to change the intentionally set OLDBROWSER.EXE of "ecomstation.com" to e.g. Firefox?).

My default-browser selector does use the fact that the name of the product, like SeaMonkey, always matches the name of the EXE (SEAMONKEY.EXE).

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Mozturbo help
« Reply #29 on: May 09, 2019, 05:19:27 am »
This is the version I'm testing, works fine if all DLLs are present. Be nice if it also worked with older builds without NSS and NSPR DLLs present.
Not too worried right now about program objects for the browser etc, just making marking the DLLs to load high and putting the turbo programs on desktop/startup folder.
Thanks