Author Topic: Universal installer for Firefox, Thunderbird & Seamonkey !  (Read 16089 times)

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Universal installer for Firefox, Thunderbird & Seamonkey !
« on: July 29, 2015, 08:13:59 am »
Here's a universal installer for Firefox, Thunderbird & Seamonkey !

http://os2notes.net/os2firefoxdd.html 

Just install and Drag & Drop zip file to install Firefox.




Clean install tested:

- firefox-31.8.0.en-US.os2.beta_5.zip
- thunderbird-31.6.0.en-US.os2.7z
- seamonkey-2.28b5r2.en-US.os2.zip


NOTE: 7z files other then thunderbird-31.6.0.en-US.os2.7z will need to be added to the install routines.


Or some fine folk could write a little code to handle 7z files ?!?!


Cheers,

Greggory
« Last Edit: February 24, 2016, 05:17:32 pm by Greggory Shaw »

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: Universal installer for Firefox, Thunderbird & Seamonkey !
« Reply #1 on: July 29, 2015, 12:40:38 pm »
In REXX I'm looking how to check the file extension ?

I need to see if it's a 7z file, then call that routine. So I can get rid of the IF ELSE statements.

Thanks

Greggory

dbanet

  • Guest
Re: Universal installer for Firefox, Thunderbird & Seamonkey !
« Reply #2 on: July 29, 2015, 01:35:48 pm »
In REXX I'm looking how to check the file extension ?

I need to see if it's a 7z file, then call that routine. So I can get rid of the IF ELSE statements.

Thanks

Greggory

How can you know which file's extension do you want to check prior to knowing the file's name, which includes the extension itself?

dbanet

  • Guest
Re: Universal installer for Firefox, Thunderbird & Seamonkey !
« Reply #3 on: July 29, 2015, 01:55:25 pm »
Anyways, if your full file name is fullfilename, then substr(fullfilename,lastpos(.,fullfilename)).

dbanet

  • Guest
Re: Universal installer for Firefox, Thunderbird & Seamonkey !
« Reply #4 on: July 29, 2015, 02:13:02 pm »
Quickfix: if you don't want to include the dot (i.e. need only the extension itself), then add a unity: substr(fullfilename,1+lastpos(.,fullfilename)).

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: Universal installer for Firefox, Thunderbird & Seamonkey !
« Reply #5 on: July 29, 2015, 03:39:39 pm »
In REXX I'm looking how to check the file extension ?

I need to see if it's a 7z file, then call that routine. So I can get rid of the IF ELSE statements.

Thanks

Greggory

How can you know which file's extension do you want to check prior to knowing the file's name, which includes the extension itself?

Thanks Boris for the info !

I get the file name by droping the zip file on the object created, - %* %**N it passes it to the variable, then using IF ELSE statements. Then defaults to zip.  I don't know REXX, so looking up each KEY WORD is slooow !  So it's not the best way by far, but it works :)

« Last Edit: July 29, 2015, 03:48:06 pm by Greggory Shaw »

dbanet

  • Guest
Re: Universal installer for Firefox, Thunderbird & Seamonkey !
« Reply #6 on: July 29, 2015, 04:16:17 pm »
I neither don't know REXX, but REXX.INF saves the day.

Quote
Filename: C:\OS2\BOOK\REXX.INF
  Title: OS/2 Procedures Language 2/REXX
  Topic Count: 180
  Index Count: 274
  Dictionary Count: 3330
  Size: 204189

Total Topic Count: 180
Total Index Count: 274
Total File Size: 204189

Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: Universal installer for Firefox, Thunderbird & Seamonkey !
« Reply #7 on: July 30, 2015, 02:37:06 am »
Hi All

My rexx is pretty lousy but I find the Rexx Tips and Tricks book, RXtt36.INF, useful as there is often an example of the code that I can "butcher" to my purpose.


Regards

Pete

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: Universal installer for Firefox, Thunderbird & Seamonkey !
« Reply #8 on: August 10, 2015, 10:25:33 am »
Get the extension:
PARSE VALUE REVERSE( fullfilename ) WITH ext'.'base
ext = REVERSE( ext )

Determine file type with magic numbers:
file_size = STREAM( fullfilename, 'C', 'QUERY SIZE' )
IF file_size < 4 THEN RETURN 99 /* Error, not a complete file?! */

magic.1 = '55 122 188 175 39 28'
magic.1.format = '7z'
magic.2 = '80 75 3 4'
magic.2.format = 'zip'
magic.0 = 2
magic.0.max = 0

/* Build Magic Numbers */
DO i = 1 TO magic.0
  magic.i.code = ''
  DO j = 1 TO WORDS( magic.i )
    magic.i.code = magic.i.code||D2C(SUBWORD( magic.i, j, 1 ))
  END
  magic.0.max = MAX( magic.0.max, WORDS( magic.i ) )
END

/* Read the first characters from the file */
input = CHARIN( fullfilename, 1, magic.0.max )
CALL STREAM fullfilename, 'C', 'CLOSE'

/* Compare the magic characters/numbers with the list we have */
DO i = 1 TO magic.0
  DO j = 1 TO WORDS( magic.i )
    IF LEFT( input, LENGTH( magic.i.code ) ) = magic.i.code THEN
      RETURN magic.i.format
  END
END

/* No match found */
RETURN ''
« Last Edit: August 10, 2015, 04:07:18 pm by Jan-Erik Lärka »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Universal installer for Firefox, Thunderbird & Seamonkey !
« Reply #9 on: August 10, 2015, 04:53:17 pm »
Using magic is the proper way. Installing file (yum install file or hunt down a zip file) will install magic for reference,with yum/rpm in @UNIXROOT\usr\share\misc\magic. File is used to ID files, file foo.

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: Universal installer for Firefox, Thunderbird & Seamonkey !
« Reply #10 on: February 24, 2016, 07:46:16 am »
Updated to 38 - Here's a universal installer for Firefox, Thunderbird & Seamonkey !

http://os2notes.net/os2firefoxdd.html

02/24/2016
===========
- removed '+' from directory name that caused issues (copy files).
- updat3ed to firefox-38.2.1.en-US.os2.zip support
- changed setup /w adv install. Uses RUN! with ELK and FIREFOX!.ENV conf file support (if present FIREFOX!.ENV will be over-written see backup made any help /w this ?)
- hidden multipass install option




Just install and Drag & Drop zip file to install Firefox, TB, SM  (all dlls are NO LONGER included).

Use Yum/RPM (or usually someone uploads req. files to Hobbes)

Clean install tested most versions from FF 10+:

- firefox-38.2.1.en-US.os2.zip
- firefox-31.8.0.en-US.os2.beta_5.zip

- thunderbird-31.8.0.en-US.os2.zip
- thunderbird-31.6.0.en-US.os2.7z

- seamonkey-2.35a1.en.os2.zip
- seamonkey-2.28b5r2.en-US.os2.zip

NOTE: 7z files other then thunderbird-31.6.0.en-US.os2.7z will need to be added to the install routines.

Or some fine folk could write a little code to handle 7z files ?!?!

Also REXX help -  How would you check to see if file is present in a directory and skip over-writing it (FIREFOX!.ENV), and/or more importantly backup it (renaming it) ?


Cheers,

Greggory
« Last Edit: February 24, 2016, 05:21:17 pm by Greggory Shaw »

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: Universal installer for Firefox, Thunderbird & Seamonkey !
« Reply #11 on: February 28, 2016, 09:25:49 pm »
Updated to 38 - Here's a universal installer for Firefox, Thunderbird & Seamonkey !

http://os2notes.net/os2firefoxdd.html

02/24/2016
===========
- removed '+' from directory name that caused issues (copy files).
- updat3ed to firefox-38.2.1.en-US.os2.zip support
- changed setup /w adv install. Uses RUN! with ELK and FIREFOX!.ENV conf file support (if present FIREFOX!.ENV will be over-written see backup made any help /w this ?)
- hidden multipass install option

...

Release FIREFOXDD-038_FINAL.zip

FIXED - if present FIREFOX!.ENV will be over-written.

http://os2notes.net/os2firefoxdd.html


Greggory

« Last Edit: February 28, 2016, 11:25:52 pm by Greggory Shaw »

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: Universal installer for Firefox, Thunderbird & Seamonkey !
« Reply #12 on: June 04, 2016, 04:47:30 am »
Updated script to support latest Firefox 38.8 test:

NO DLLs are included anymore - use YUM/RPM
Fixed: nspr4.dll, plc4.dll, plds4.dll from 38.2 were marked read only causing issues



Working on above suggestions now (SM changes added) , anyone want to help !

5. TODO
===============
         
  - Auto revert from backup
  - Detect if FF is running.
  - Learn how to detect if installing to root and remove backslash


http://os2notes.net/os2firefoxdd.html


Download here:

http://os2notes.net/files/firefoxdd/



Cheers,

Greggory
« Last Edit: June 04, 2016, 05:01:16 am by Greggory Shaw »

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: Universal installer for Firefox, Thunderbird & Seamonkey !
« Reply #13 on: June 19, 2016, 06:30:36 pm »
Updated script to support latest Firefox 38.8 - FINAL:

NO DLLs are included anymore - use YUM/RPM
- Fixed: nspr4.dll, plc4.dll, plds4.dll from 38.2 were marked read only causing issues.
- Checks for profile folder



Working on above suggestions now (SM changes added) , anyone want to help !

5. TODO
===============
         
  - Auto revert from backup
  - Detect if FF is running.
  - Learn how to detect if installing to root and remove backslash


http://os2notes.net/os2firefoxdd.html


Download here:

http://os2notes.net/files/firefoxdd/



Cheers,

Greggory