Author Topic: Mozturbo help  (Read 54539 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4775
  • Karma: +99/-1
    • View Profile
Mozturbo help
« on: April 13, 2019, 09:10:52 pm »
Looking for volunteers to help with mozturbo.
Icons would be nice.
Be nice to have a Rexx script that runs highmem to mark the Mozilla DLLs high and add the turbo program to the startup folder.

David Graser

  • Hero Member
  • *****
  • Posts: 869
  • Karma: +84/-0
    • View Profile
Re: Mozturbo help
« Reply #1 on: April 14, 2019, 05:09:38 am »
Dave,

I am playing around with ideas.  Attached are a couple PNGs and one icon.  8 bit detailed icons are challenging.
« Last Edit: April 14, 2019, 05:55:47 am by David Graser »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4775
  • Karma: +99/-1
    • View Profile
Re: Mozturbo help
« Reply #2 on: April 14, 2019, 06:44:08 am »
They look good. Not sure which one I like better. The bottom one would be easier to adapt to the other apps with a common look.
These don't have to be 8 bits, though I guess that could change. Firefox has the icon embedded and needs lxliting as it and the DLLs are huge (10x).
Currently I was just thinking of shipping the icons with the binaries, so ffturbo.exe and ffturbo.ico though perhaps icons for "ffturbo -l" and ffturbo -u" (load and unload) would be good for the most common type of install where "ffturbo -l" would be in the startup folder and the -u version somewhere else as "ffturbo -u" would likely only be used when upgrading.

xynixme

  • Guest
Re: Mozturbo help
« Reply #3 on: April 14, 2019, 02:25:11 pm »
0. A disadvantage of starting with 80x80 icons may be that scaling down to even 40x40 becomes too hard, if you have a choice.

Be nice to have a Rexx script that runs highmem to mark the Mozilla DLLs high and add the turbo program to the startup folder.
Willing, but it could be a component of a WPI package which fully agrees with your recommended settings (a.o. LIBPATHSTRICT). I do recommend an own installer.

1. Can you ship the *TURBO.EXE with your builds? To avoid "Please enter the full path of FIREFOX.EXE and its XUL.DLL".

2. What's the HIGHMEM command? I know the ABOVE512-one. Other candidates may be supported too, as long as the command is provided.

3. Which DLLs always? Which DLLs optionally (but recommended)?

4. PM UI (drop HIGHMEM.EXE or ABOVE512.EXE, if not found in PATH) or CLI (Please enter the full path of HIGHMEM.EXE or ABOVE512.EXE, or press ENTER to search for it in all directories).

5. Which default setting of the *TURBO.EXEs?

6. I'll insert a sample file, which assumes the -t parameter of the turbo, assumes the use of ABOVE512.EXE and its -c parameter, and is only aware of one DLL in its "database": XUL.DLL. No SysFileTree error checking (out of memory: rc=2). Not fully verified, but the syntax is checked by the Object Rexx interpreter. The root directory is not fully supported, albeit I'm expecting e.g. a subdirectory anyway.

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

CALL RxFuncAdd 'SysCreateObject','RexxUtil','SysCreateObject'
CALL RxFuncAdd 'SysDriveInfo','RexxUtil','SysDriveInfo'
CALL RxFuncAdd 'SysDriveMap','RexxUtil','SysDriveMap'
CALL RxFuncAdd 'SysFileTree','RexxUtil','SysFileTree'
CALL RxFuncAdd 'SysSearchPath','RexxUtil','SysSearchPath'

/* 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'

/* 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.'

/* If the Mozilla product isn't the legacy browser, then try to find XUL.DLL */

dll.0=1
dll.1='XUL.DLL'
IF Length(product)>2 THEN dll.0=0
DO i=1 TO dll.0
   IF Stream(dll.i,'C','QUERY EXISTS')='' THEN DO
      SAY 'Error, cannot find' dll.i 'in the current directory:' Directory()
      SAY
      CALL CharOut '','Press <ENTER>... '
      PULL .
      EXIT
   END
   SAY dll.i 'found.'
   SAY
   SAY 'Do you want to use memory above 512 MiB for' dll.i '(default, recommended),'
   CALL CharOut '','which does not require having more than 512 MiB of RAM installed (Y/n)? '
   PULL answer
   loadhigh=0
   answer.i=Strip(answer)
   IF answer.i='' THEN answer.i='Y'
   IF answer.i='Y' THEN loadhigh=1

END i

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

IF loadhigh=1 THEN DO
   file='ABOVE512.EXE'
   high=Stream(file,'C','QUERY EXISTS')
   IF high='' THEN high=SysSearchPath('PATH',file)
   IF high='' THEN DO
      SAY
      SAY 'Enter the full path to' file||', or press nothing but <ENTER> to try to'
      CALL CharOut '','find it: '
      PARSE PULL high
      IF Strip(high)<>'' THEN DO
         IF Right(high,1)<>'\' THEN high=high||'\'
         high=high||file
         IF Stream(high,'C','QUERY EXISTS')='' THEN DO
            SAY
            SAY 'Error: cannot find file' high
            SAY
            CALL CharOut '','Press <ENTER>... '
            PULL .
            EXIT
         END
      END
   END
   IF Strip(high)='' THEN DO   
      SAY
      SAY file 'not found in current directory nor PATH. 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)
            pattern=Word(drives,i)||'\'||file
            CALL SysFileTree pattern,'hit.','FOS'
            IF hit.0>0 THEN DO
               high=hit.1
               SAY
               SAY 'Found:' high
            END
         END
      END i
   END
   SAY
   IF high='' THEN DO
      SAY
      SAY 'Error:' file 'not found.'
      SAY
      CALL CharOut '','Press <ENTER>... '
      PULL .
      EXIT
   END
   DO i=1 TO dll.0
      IF answer.i='Y' THEN '@'||high dll.i '-c'
   END i
END

SAY
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'

name=Strip(name 'Turbo')
SAY
IF SysCreateObject('WPProgram',name,'<WP_START>','EXENAME=CMD.EXE;PARAMETERS=/c detach' here||'\'||turbo '-t;STARTUPDIR='||here||';MINIMIZED=YES;SET LIBPATHSTRICT=T;SET BEGINLIBPATH='||here||';OBJECTID=<TURBO_'||product||'>','R') THEN DO
   SAY 'WPS program object created in startup folder.'
   SAY
   CALL CharOut '','Press <ENTER>... '
   PULL .
   EXIT
END
   
SAY 'Error: cannot create WPS program object in startup folder.'
SAY
CALL CharOut '','Press <ENTER>... '
PULL .

EXIT

xynixme

  • Guest
Re: Mozturbo help
« Reply #4 on: April 14, 2019, 02:43:57 pm »
BTW, the Rexx script doesn't use any of David Graser's excellent icons.

Insert a WPS setup string like "ICONFILE=P:\ATH\ICONS\MY_NEW_FF.ICO;", if that file exists, to assign a classic icon to the created WPS program object.

And searching for ABOVE512.EXE can be removed from the Rexx file, if that's overdoing it. All it does it avoiding a typing user, whom has to remember a full path to a rarely used executable. I've checked if your utility is in a ArcaOS system path by using your earlier AOS file structure dump, but apparently - and thanks Goodness - such an utility isn't an OS component.
« Last Edit: April 14, 2019, 02:48:03 pm by André Heldoorn »

David Graser

  • Hero Member
  • *****
  • Posts: 869
  • Karma: +84/-0
    • View Profile
Re: Mozturbo help
« Reply #5 on: April 14, 2019, 04:03:22 pm »
I have some new 8 bit icons and some new 80x80 PNGs.  The icons are based on the PNGS.  WIFI doesn't work at work, so will have to wait until I get off work today. 

David Graser

  • Hero Member
  • *****
  • Posts: 869
  • Karma: +84/-0
    • View Profile
Re: Mozturbo help
« Reply #6 on: April 14, 2019, 11:38:33 pm »
Some to chose.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4775
  • Karma: +99/-1
    • View Profile
Re: Mozturbo help
« Reply #7 on: April 15, 2019, 02:27:57 am »
0. A disadvantage of starting with 80x80 icons may be that scaling down to even 40x40 becomes too hard, if you have a choice.

Be nice to have a Rexx script that runs highmem to mark the Mozilla DLLs high and add the turbo program to the startup folder.
Willing, but it could be a component of a WPI package which fully agrees with your recommended settings (a.o. LIBPATHSTRICT). I do recommend an own installer.

I was thinking of the user just unzipping the package in the program directory and running the script as even getting users to mark the DLLs high can be a nightmare according to reports.
BTW, LIBPATHSTRICT and BEGINLIBPATH are no longer required for the mozapps as of 45.9. It's done by the program. Same with run! not being  needed.
Quote
1. Can you ship the *TURBO.EXE with your builds? To avoid "Please enter the full path of FIREFOX.EXE and its XUL.DLL".

I'm thinking on it. If the turbo program is run from the mozapp's program directory, entering the path is unneeded.

Quote
2. What's the HIGHMEM command? I know the ABOVE512-one. Other candidates may be supported too, as long as the command is provided.

It's been floating around, might have originated from the OS4 guys, I don't know but they host it. It is also available as an RPM and there should be a corresponding zip.

Quote
3. Which DLLs always? Which DLLs optionally (but recommended)?
Quote

All of them, including in components(SM) or browser\components(FF) but not in add ons.
Code: [Select]
highmem -c *dll works well. There are readonly DLLs in SM and TB, I wouldn't worry too much about them though they could be marked  as read/write. I'm not sure why they're marked readonly when packaged, installing doesn't mark them.

Quote
4. PM UI (drop HIGHMEM.EXE or ABOVE512.EXE, if not found in PATH) or CLI (Please enter the full path of HIGHMEM.EXE or ABOVE512.EXE, or press ENTER to search for it in all directories).

5. Which default setting of the *TURBO.EXEs?
Quote
turbo.exe -l and turbo.exe -u to load and unload. The -l should be in the startup folder. Some users may find it simpler to reboot after updating rather then mess with stopping and restarting turbo.exe but the choice should be there. Perhaps the network desktop folder would be a good place to install to, with a shadow in the startup folder.

Quote
6. I'll insert a sample file, which assumes the -t parameter of the turbo, assumes the use of ABOVE512.EXE and its -c parameter, and is only aware of one DLL in its "database": XUL.DLL. No SysFileTree error checking (out of memory: rc=2). Not fully verified, but the syntax is checked by the Object Rexx interpreter. The root directory is not fully supported, albeit I'm expecting e.g. a subdirectory anyway.

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

CALL RxFuncAdd 'SysCreateObject','RexxUtil','SysCreateObject'
CALL RxFuncAdd 'SysDriveInfo','RexxUtil','SysDriveInfo'
CALL RxFuncAdd 'SysDriveMap','RexxUtil','SysDriveMap'
CALL RxFuncAdd 'SysFileTree','RexxUtil','SysFileTree'
CALL RxFuncAdd 'SysSearchPath','RexxUtil','SysSearchPath'

/* 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'

/* 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.'

/* If the Mozilla product isn't the legacy browser, then try to find XUL.DLL */

dll.0=1
dll.1='XUL.DLL'
IF Length(product)>2 THEN dll.0=0
DO i=1 TO dll.0
   IF Stream(dll.i,'C','QUERY EXISTS')='' THEN DO
      SAY 'Error, cannot find' dll.i 'in the current directory:' Directory()
      SAY
      CALL CharOut '','Press <ENTER>... '
      PULL .
      EXIT
   END
   SAY dll.i 'found.'
   SAY
   SAY 'Do you want to use memory above 512 MiB for' dll.i '(default, recommended),'
   CALL CharOut '','which does not require having more than 512 MiB of RAM installed (Y/n)? '
   PULL answer
   loadhigh=0
   answer.i=Strip(answer)
   IF answer.i='' THEN answer.i='Y'
   IF answer.i='Y' THEN loadhigh=1

END i

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

IF loadhigh=1 THEN DO
   file='ABOVE512.EXE'
   high=Stream(file,'C','QUERY EXISTS')
   IF high='' THEN high=SysSearchPath('PATH',file)
   IF high='' THEN DO
      SAY
      SAY 'Enter the full path to' file||', or press nothing but <ENTER> to try to'
      CALL CharOut '','find it: '
      PARSE PULL high
      IF Strip(high)<>'' THEN DO
         IF Right(high,1)<>'\' THEN high=high||'\'
         high=high||file
         IF Stream(high,'C','QUERY EXISTS')='' THEN DO
            SAY
            SAY 'Error: cannot find file' high
            SAY
            CALL CharOut '','Press <ENTER>... '
            PULL .
            EXIT
         END
      END
   END
   IF Strip(high)='' THEN DO   
      SAY
      SAY file 'not found in current directory nor PATH. 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)
            pattern=Word(drives,i)||'\'||file
            CALL SysFileTree pattern,'hit.','FOS'
            IF hit.0>0 THEN DO
               high=hit.1
               SAY
               SAY 'Found:' high
            END
         END
      END i
   END
   SAY
   IF high='' THEN DO
      SAY
      SAY 'Error:' file 'not found.'
      SAY
      CALL CharOut '','Press <ENTER>... '
      PULL .
      EXIT
   END
   DO i=1 TO dll.0
      IF answer.i='Y' THEN '@'||high dll.i '-c'
   END i
END

SAY
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'

name=Strip(name 'Turbo')
SAY
IF SysCreateObject('WPProgram',name,'<WP_START>','EXENAME=CMD.EXE;PARAMETERS=/c detach' here||'\'||turbo '-t;STARTUPDIR='||here||';MINIMIZED=YES;SET LIBPATHSTRICT=T;SET BEGINLIBPATH='||here||';OBJECTID=<TURBO_'||product||'>','R') THEN DO
   SAY 'WPS program object created in startup folder.'
   SAY
   CALL CharOut '','Press <ENTER>... '
   PULL .
   EXIT
END
   
SAY 'Error: cannot create WPS program object in startup folder.'
SAY
CALL CharOut '','Press <ENTER>... '
PULL .

EXIT

I'll look at the code later, thanks.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4775
  • Karma: +99/-1
    • View Profile
Re: Mozturbo help
« Reply #8 on: April 15, 2019, 02:29:21 am »
Some to chose.

Nice, almost need a poll to choose :)
Thanks.

David Graser

  • Hero Member
  • *****
  • Posts: 869
  • Karma: +84/-0
    • View Profile
Re: Mozturbo help
« Reply #9 on: April 15, 2019, 02:54:08 am »
Dave

Concerning the nightly.  I did two new icons based on the official Firefox icons.  The difference is the globe is dark grey to stand for night.  I have attached a pic and the icon and PNG.  Icon done in 8 bits.
« Last Edit: April 15, 2019, 02:57:05 am by David Graser »

xynixme

  • Guest
Re: Mozturbo help
« Reply #10 on: April 15, 2019, 06:31:05 pm »
Quote
I was thinking of the user just unzipping the package in the program directory and running the script as even getting users to mark the DLLs high can be a nightmare according to reports.

BTW, LIBPATHSTRICT and BEGINLIBPATH are no longer required for the mozapps as of 45.9.

If the turbo program is run from the mozapp's program directory, entering the path is unneeded.

All of them, including in components(SM) or browser\components(FF) but not in add ons.

turbo.exe -l and turbo.exe -u to load and unload. The -l should be in the startup folder.

Perhaps the network desktop folder would be a good place to install to, with a shadow in the startup folder.
FWIW: I do repackage your FF/SM distributions, with XUL.DLL marked high. Those ZIP files are back-upped, instead of the installed files. One of the extra packages to be installed is the *TURBO.ZIP, in the same directory as the program. No conflicting file names, including the documentation. Other packages are langpacks, noscript 5.1.9, and so on. The only side-effect of loading explicitly recommended DLLs high may be that Object Rexx seems to be running out of (shared) memory sooner.

Then you can delete both matching SET statements, which with a ";" as the final character. I'm still using it, just to be sure and for consistency. Recently I've been looking for non-unique DLL names, and then this is a hit.

eCS installed its (outdated) MOZTURBO.EXE in the Mozilla program directory, which is the easiest solution indeed. The Rexx install script uses this concept too, for example to recognize the Mozilla product, but that can be changed.

Support for more DLLs and/or DLLs in subdirectories tested or added. Please check if the list is complete (dll.X=Y.DLL-lines).

Replace all of my ABOVE512.EXEs by HIGHMEN.EXE, and reverse the order of the arguments.

I've used -t, but you can replace that (PARAMETERS-setting of the SysCreateObject-line).

I'll create objects at the desktop, and (without asking) a shadow in the <WP_START> folder. You can replace <WP_DESKTOP> by the matching network folders object-ID.

I'll apply (most of) the changes above to the Rexx code below.

Patches/restrictions:

Removed SET LIBPATSTRICT=T
Removed SET BEGINLIBPATH=...
Standard *TURBO.EXE parameter is now -l, instead of -t
Location of the WPProgram object is <WP_DESKTOP> instead of <WP_START>
Create second, -u <WP_DESKTOP> WPProgram object (program settings untested)
Create a shadow of the -l object in <WP_START> folder
Only XUL.DLL is supported for all of Dave's builds. Other DLLs, compiled by Dave, only if it's FF or SM (I don't have a TB copy).
To replace ABOVE512.EXE by HIGHMEM.EXE, change the text ABOVE512.EXE to HIGHMEM.EXE twice (comment, variable)
And to replace ABOVE512.EXE by HIGHMEM.EXE, change the text "high dll.i '-c'" to "high '-c' dll.i"
Killed bug: loadhigh=0 was in loop
Unchanged: no "ICONFILE=[full path of icon file];" in WPS setup strings of SysCreateObject().
Requirements: Classic Rexx or Object Rexx interpreter, REXXUTIL.DLL, ABOVE512.EXE (until changed to HIGHMEM.EXE).

Test log:

[R:\MEUK\firefox]unzip d:\database\software\firefox\ff*
Archive:  d:/database/software/firefox/ffturbo-v0.5.zip
replace CHANGES? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
  inflating: CHANGES
  inflating: ffturbo.exe
  inflating: LICENSE
  inflating: readme

[R:\MEUK\firefox]insturbo.cmd

Product found: FF
FFTURBO.EXE found.
XUL.DLL found.

Do you want to use memory above 512 MiB for XUL.DLL (default, recommended),
which does not require having more than 512 MiB of RAM installed (Y/n)? y
LGPLLIBS.DLL found.

Do you want to use memory above 512 MiB for LGPLLIBS.DLL (default, recommended),

which does not require having more than 512 MiB of RAM installed (Y/n)? n
MOZSQLT3.DLL found.

Do you want to use memory above 512 MiB for MOZSQLT3.DLL (default, recommended),

which does not require having more than 512 MiB of RAM installed (Y/n)? y
browser\components\BRWSRCMP.DLL found.

Do you want to use memory above 512 MiB for browser\components\BRWSRCMP.DLL (def
ault, recommended),
which does not require having more than 512 MiB of RAM installed (Y/n)? n
gmp-clearkey\0.1\CLEARKEY.DLL found.

Do you want to use memory above 512 MiB for gmp-clearkey\0.1\CLEARKEY.DLL (defau
lt, recommended),
which does not require having more than 512 MiB of RAM installed (Y/n)? n

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

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

Found: D:\Utilities\Above512\ABOVE512.exe

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
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


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

Press <ENTER>...
Code: [Select]
/* InsTurbo.CMD */

CALL RxFuncAdd 'SysCreateObject','RexxUtil','SysCreateObject'
CALL RxFuncAdd 'SysDriveInfo','RexxUtil','SysDriveInfo'
CALL RxFuncAdd 'SysDriveMap','RexxUtil','SysDriveMap'
CALL RxFuncAdd 'SysFileTree','RexxUtil','SysFileTree'
CALL RxFuncAdd 'SysSearchPath','RexxUtil','SysSearchPath'

/* 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'

/* 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.'

/* If the Mozilla product isn't the legacy browser, then try to find XUL.DLL */

dll.0=1
dll.1='XUL.DLL'
dll.2='LGPLLIBS.DLL'
dll.3='MOZSQLT3.DLL'
IF product='FF' THEN DO
   dll.0=5
   dll.4='browser\components\BRWSRCMP.DLL'
   dll.5='gmp-clearkey\0.1\CLEARKEY.DLL'
END
IF product='SM' THEN DO
   dll.0=7
   dll.4='LDAP60.DLL'
   dll.5='LDIF60.DLL'
   dll.6='PRLDAP60.DLL'
   dll.7='components\SUITE.DLL'
END

IF Length(product)>2 THEN dll.0=0
loadhigh=0
DO i=1 TO dll.0
   IF Stream(dll.i,'C','QUERY EXISTS')='' THEN DO
      SAY 'Error, cannot find' dll.i 'in the current directory:' Directory()
      SAY
      CALL CharOut '','Press <ENTER>... '
      PULL .
      EXIT
   END
   SAY dll.i 'found.'
   SAY
   SAY 'Do you want to use memory above 512 MiB for' dll.i '(default, recommended),'
   CALL CharOut '','which does not require having more than 512 MiB of RAM installed (Y/n)? '
   PULL answer
   answer.i=Strip(answer)
   IF answer.i='' THEN answer.i='Y'
   IF answer.i='Y' THEN loadhigh=1

END i

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

IF loadhigh=1 THEN DO
   file='ABOVE512.EXE'
   high=Stream(file,'C','QUERY EXISTS')
   IF high='' THEN high=SysSearchPath('PATH',file)
   IF high='' THEN DO
      SAY
      SAY 'Enter the full path to' file||', or press nothing but <ENTER> to try to'
      CALL CharOut '','find it: '
      PARSE PULL high
      IF Strip(high)<>'' THEN DO
         IF Right(high,1)<>'\' THEN high=high||'\'
         high=high||file
         IF Stream(high,'C','QUERY EXISTS')='' THEN DO
            SAY
            SAY 'Error: cannot find file' high
            SAY
            CALL CharOut '','Press <ENTER>... '
            PULL .
            EXIT
         END
      END
   END
   IF Strip(high)='' THEN DO   
      SAY
      SAY file 'not found in current directory nor PATH. 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)
            pattern=Word(drives,i)||'\'||file
            CALL SysFileTree pattern,'hit.','FOS'
            IF hit.0>0 THEN DO
               high=hit.1
               SAY
               SAY 'Found:' high
            END
         END
      END i
   END
   SAY
   IF high='' THEN DO
      SAY
      SAY 'Error:' file 'not found.'
      SAY
      CALL CharOut '','Press <ENTER>... '
      PULL .
      EXIT
   END
   DO i=1 TO dll.0
      IF answer.i='Y' THEN '@'||high dll.i '-c'
   END i
END

SAY
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'

name=Strip(name 'Turbo')
SAY
IF SysCreateObject('WPProgram',name,'<WP_DESKTOP>','EXENAME=CMD.EXE;PARAMETERS=/c detach' here||'\'||turbo '-l;STARTUPDIR='||here||';MINIMIZED=YES;OBJECTID=<TURBO_'||product||'>','R') THEN DO
   SAY 'Object created:' name
   IF SysCreateObject('WPProgram',name '(unload)','<WP_DESKTOP>','EXENAME='||here||'\'||turbo||';PARAMETERS=-u;STARTUPDIR='||here||';MINIMIZED=YES;OBJECTID=<TURBO_'||product||'_UNLOAD>','R') THEN DO
      SAY 'Object created:' name '(unload)'
      IF SysCreateShadow('<TURBO_'||product||'>','<WP_START>') THEN DO
         SAY'WPS shadow object of' name 'created in the startup folder.'
         SAY
         CALL CharOut '','Press <ENTER>... '
         PULL .
         EXIT
      END
   END
END
   
SAY 'Error: cannot create all 3 WPS objects.'
SAY
CALL CharOut '','Press <ENTER>... '
PULL .

EXIT

No need for credits. This is nothing compared to your efforts in Death Valley, and it isn't supported. And please cancel that silly beauty contest poll. I'll concede, so David's the winner... ;-)
« Last Edit: April 15, 2019, 06:38:06 pm by André Heldoorn »

xynixme

  • Guest
Re: Mozturbo help
« Reply #11 on: April 15, 2019, 06:43:51 pm »
Concerning the nightly.  I did two new icons based on the official Firefox icons.  The difference is the globe is dark grey to stand for night.  I have attached a pic and the icon and PNG.  Icon done in 8 bits.
If there's a final winner, can we then please have a matching (eCS-style) folder icon too?

At least 40x40 and 20x20. It doesn't have to look that good/detailed. Some orange and dark blue blur in the usual bottom left corner will do. I've created folder icons with just the blue planet, but that's not worth publishing, doesn't look as good as your orange ones, and does look like other default folder icons with some globe.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4775
  • Karma: +99/-1
    • View Profile
Re: Mozturbo help
« Reply #12 on: April 17, 2019, 06:31:29 am »
Hi André, this works pretty well, though having to accept every DLL to mark high seems tiring, especially if we add more DLLs, which may happen as it may be easier to update in tree NSS.
BTW, Thunderbird uses the same DLLs as SM excepting suite.dll
Thanks

xynixme

  • Guest
Re: Mozturbo help
« Reply #13 on: April 17, 2019, 11:34:40 am »
having to accept every DLL to mark high seems tiring, especially if we add more DLLs, which may happen as it may be easier to update in tree NSS.

BTW, Thunderbird uses the same DLLs as SM excepting suite.dll
Sorted, the number of prompts was the result of (a) only XUL.DLL included and (b) code supporting more than one DLL later.

Now SUITE.DLL is the last DLL if the product is SM or TB, and the number of items is one less if the product is TB.

Other main changes and comments:

Reduction of the excessive number of possible requirements by one, due to included but untested support for HIGHMEM.EXE too. The penalty for lazy users is that looking for their high mem utility may take about twice as long.

Educational full collection of RxFuncAdds replaced by SysLoadFuncs.

I've excluded an option to use -t instead of -l, for one because I'm not the one supporting the subject of a *TURBO.EXE.

Fully untested with Mozilla (classic), SM and TB. In the case of Mozilla we could check if the right MOZTURBO.EXE is installed. Yours, which seems to avoid the SYS2070s I haven't seen since yours is in use.

The Rexx code still assumes that the *TURBO.EXEs can be found in the directory of the matching product's EXE.

Products are hard-coded everywhere. If e.g. the fire fox, one of the bear-cat animals, becomes BEARCAT.EXE, then one may consider C'ish #defines instead of the hard-coded FFs, Firefoxes and FIREFOX.EXEs.

Icon still excluded. Embed icons (for FF.TURBO.EXE, MOZTURBO.EXE, SMTURBO.EXE and TBTURBO.EXE), or assign an icon by inserting a WPS setup string like "ICONFILE=chrome\icons\default\smturbo.ico" for a SMTURBO.EXE icon.

ABOVE512.EXE is the default. It will be found first. The number of scans per drive can be reduced to one, and the number of drives can be reduced to one, but that's hardly worth the efforts. Using such a Rexx script should be a rare event, and the user has the option to type the full path, if HIGHMEM.EXE isn't installed in a PATH directory by RPM anyway (I'm not that sure if HIGHMEM.EXE qualifies for a PATH directory of all users anyway).

And finally, not being a goal: a Rexx installer could also install the product's objects (SM, FF Safe Mode, TB Send Mail, ...), but I guess it's quite likely that the product itself is already installed by e.g. the OS or by the user.

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

[R:\MEUK\firefox]insturbo

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)? nope


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

Press <ENTER>...

Code: [Select]
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)? yeah

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
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
module : LGPLLIBS.DLL
 object 0 : base 0x00010000, size 0x00069c80, flags 0x00002005
  readable, !writeable, executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, !himem
   modified,
    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
module : MOZSQLT3.DLL
 object 0 : base 0x00010000, size 0x000a7110, flags 0x00002005
  readable, !writeable, executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, !himem
   modified,
    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
module : browser\components\BRWSRCMP.DLL
 object 0 : base 0x00010000, size 0x00076990, flags 0x00002005
  readable, !writeable, executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, !himem
   modified,
    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 0x00002005
  readable, !writeable, executable, !resource, !discardable, !shared,
  !preload, !invalid, swappable, !16:16 alias, !conforming,
  32bit, !IOPL, !himem
   modified,
    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.

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'

/* 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
   dll.0=1
   dll.1='XUL.DLL'
   dll.2='LGPLLIBS.DLL'
   dll.3='MOZSQLT3.DLL'
   IF product='FF' THEN DO
      dll.0=5
      dll.4='browser\components\BRWSRCMP.DLL'
      dll.5='gmp-clearkey\0.1\CLEARKEY.DLL'
   END
   IF product='SM' | product='TB' THEN DO
      dll.0=7
      dll.4='LDAP60.DLL'
      dll.5='LDIF60.DLL'
      dll.6='PRLDAP60.DLL'
      dll.7='components\SUITE.DLL'
      IF product='TB' THEN dll.0=6
   END
   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
      arguments=dll.i '-c'
      IF Translate(FileSpec('N',high))='HIGHMEM.EXE' THEN arguments='-c' dll.i
      '@'||high arguments
   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'

name=Strip(name 'Turbo')
SAY
IF SysCreateObject('WPProgram',name,'<WP_DESKTOP>','EXENAME=CMD.EXE;PARAMETERS=/c detach' here||'\'||turbo '-l;STARTUPDIR='||here||';MINIMIZED=YES;OBJECTID=<TURBO_'||product||'>','R') THEN DO
   SAY 'Object created:' name
   IF SysCreateObject('WPProgram',name '(unload)','<WP_DESKTOP>','EXENAME='||here||'\'||turbo||';PARAMETERS=-u;STARTUPDIR='||here||';MINIMIZED=YES;OBJECTID=<TURBO_'||product||'_UNLOAD>','R') THEN DO
      SAY 'Object created:' name '(unload)'
      IF SysCreateShadow('<TURBO_'||product||'>','<WP_START>') THEN DO
         SAY'WPS shadow object of' name 'created in the startup folder.'
         SAY
         CALL CharOut '','Press <ENTER>... '
         PULL .
         EXIT
      END
   END
END
   
SAY 'Error: cannot create all 3 WPS objects.'
SAY
CALL CharOut '','Press <ENTER>... '
PULL .

EXIT

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4775
  • Karma: +99/-1
    • View Profile
Re: Mozturbo help
« Reply #14 on: April 20, 2019, 07:50:50 am »
Sorry for not testing sooner, basically testing new builds.
This one worked very well, found highmem.exe quickly, didn't ask too many questions.
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.
Thanks