OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Setup & Installation => Topic started by: Greggory Shaw on July 29, 2015, 08:13:59 am

Title: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: Greggory Shaw 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.

(http://os2notes.duckdns.org/images/os2firefoxdd/firefoxdd.png)


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
Title: Re: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: Greggory Shaw 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
Title: Re: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: dbanet 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?
Title: Re: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: dbanet on July 29, 2015, 01:55:25 pm
Anyways, if your full file name is fullfilename, then substr(fullfilename,lastpos(.,fullfilename)).
Title: Re: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: dbanet 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)).
Title: Re: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: Greggory Shaw 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 :)

Title: Re: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: dbanet 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
Title: Re: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: Pete 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
Title: Re: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: Jan-Erik Lärka 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 ''
Title: Re: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: Dave Yeo 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.
Title: Re: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: Greggory Shaw 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


(http://os2notes.duckdns.org/images/os2firefoxdd/firefoxdd.png)

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 (https://github.com/bitwiseworks/mozilla-os2/releases)
- 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 (https://bitbucket.org/dryeo/dry-comm-esr31/downloads/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
Title: Re: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: Greggory Shaw 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

Title: Re: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: Greggory Shaw 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

(http://os2notes.duckdns.org/images/os2firefoxdd/firefoxdd.png)

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
Title: Re: Universal installer for Firefox, Thunderbird & Seamonkey !
Post by: Greggory Shaw 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

(http://os2notes.duckdns.org/images/os2firefoxdd/firefoxdd.png)

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