Jump to content

Firefox SFX Maker 5.5


mooms

Recommended Posts

  • 1 month later...

Hi mooms,

thanks for the new SFX-Maker!

Do you have the possibility to set for the SFX a FF-Icon?

1 question for the How-To in French:

Quote

Profitez-en aussi pour effacer les lignes suivantes :
user_pref("browser.startup.homepage_override.buildID", "20111104165243");
user_pref("browser.startup.homepage_override.mstone", "rv:8.0");

actually is the Firefox-version in that line, not the Gecko-version: is it still necessary to erase that line, even with the FF-version?

Have a very Nice Christmas and a Happy New Year.

Thiersee

Edited by Thiersee
Link to comment
Share on other sites

Hi Thierse,

You can use resource hacker, that's what I used. You may have to uncompress the sfx module with UPX before (and recompress it after, but it's facultative).

 

For the question about the custom profile:

I remove every line that is not "generic" (ie relative to the Firefox version, local path, etc...) but that's not mandatory, only cleaner.

The only mandatory thing is to add the line

user_pref("extensions.autoDisableScopes", 14);

Or the extensions will be disabled.

 

Have a very Nice Christmas and a Happy New Year  too.

Link to comment
Share on other sites

  • 2 weeks later...
On 23.12.2016 г. at 0:30 AM, mooms said:

 

You can use resource hacker, that's what I used. You may have to uncompress the sfx module with UPX before (and recompress it after, but it's facultative).

Hello mooms  Happy new Year!Pleas could you be more specific,the point is that 1. SFX Maker do not recognize resource haker,and to I have no idea how to change integrate icon in exe file! thanks in advance dude! All the best to all!

 

 

 

Link to comment
Share on other sites

Happy new year too, stashmajcherc

Resource Hacker should be used to change the icon in the sfx module (named fx.sfx in the bin folder). I never talked about using it with SFX maker or something.

You can find many tutos for Resource Hacker with a little Google search.

Link to comment
Share on other sites

Version 5.0 is out.

What's new:

  • Added the choice to download latest esr, dev, & nightly
  • Tweaked the questions
  • Optimized the script
  • updated the included profile
  • updated 7zip & sfx module
  • correct icon is used according to the version

Please note that if you include a profile with dev version, it will not be used.

Link to comment
Share on other sites

  • 4 weeks later...

I know but as script version are very different between FF & TB, I though it was better to post here (as my mod is based on latest FF Sfx maker version).

I'll try to adapt FF Sfx Maker to TB, code source need to be reworked a bit for Thunderbird, but I don't know if my batch coding skill is enough to do it.

 

Edit: crosspost was replying to Thiersee :)

Edited by cyberyeye
Link to comment
Share on other sites

Hi mooms,

1) I put in two places a warning because some extensions are no more compatible to FF 57.0.

2) Line 420 (original file) should be "successfully" (my opinion).

Just have a look and decide, if you want to include this warnings.

Spoiler

:: Firefox SFX Maker by mooms

@echo off
Title= Firefox SFX Maker v5.3
SETLOCAL ENABLEEXTENSIONS
pushd %~dp0
SET CFG=".\bin\fx.cfg"
set INI="ENTRIES_Firefox.ini"
call :CLEANUP
IF NOT EXIST ".\bin\7za.exe"  GOTO MISSING_FILES
IF NOT EXIST ".\bin\7zsplit.exe"  GOTO MISSING_FILES
IF NOT EXIST ".\bin\fx.sfx"  GOTO MISSING_FILES
IF NOT EXIST ".\bin\aria2c.exe"  GOTO MISSING_FILES
SET ARIA=".\bin\aria2c" -x4 --file-allocation=none
SET DIR=--dir=".\download"
SET SZA=".\bin\7za.exe"
set sfx=".\bin\fx.sfx"
md "download"

::______________________________________________________________________________

:: You can specify some settings below to skip some or all the questions.
:: Uncomment (= remove the two :: at the beginning of the line) one or more
:: of the following 'set" line(s) and modify it to suit your need.
:: If they are not set, question(s) will be asked.

:: Set the language of Firefox:
:: (see possible values in the readme file)
::set lng=fr


:: Create a nLite/RVMi AddOn: [0,1]
set addon=0

:: Make Firefox the default browser: [0,1]
::set default=1

:: Copy a custom profile in the user profile: [0,1]
::set profile=1

:: Specify which version to download
:: Only needed if you want to download a specific version
::set vrs=50.0.2

:: Delete the Desktop icon [0,1]
::set del_desktop=1

::______________________________________________________________________________

 


:Quest_lng
IF "%lng%"=="" (ECHO Language is not defined) ELSE (goto :Quest_Prof)
color 3F
echo.
echo.
echo              Which language of Firefox would you want to use ?
echo       Please have first a look to Readme.txt for the available languages.
echo                   (en-US, de, it, fr, es-ES and so on)
echo.
echo Please choose language and press ENTER:
set /p lng=

 

:Quest_Prof
IF "%profile%"=="" (goto :suite1)
IF %profile%==1 (set ext=1&&set OwnExt=_ext&&goto :Quest_def)
IF %profile%==0 (set ext=0&&goto :Quest_def)
:suite1
cls
color 3F
echo.
echo.
echo     Do you want to integrate a default profile with extensions, prefs, etc...?
echo.
echo     The default profile must be put in the "Profile" folder,
echo     You can see an example there.
echo.
echo.
echo     Be careful, many extensions are NOT (yet) compatible with the actual
echo     version (57.0) and will NOT be installed!
echo     If you still need such extensions use version 56.0.2 instead.
echo.

echo.         Validate your choice with ENTER key
echo.
echo.
echo               -  Yes       - tap 1
echo               -  No        - tap 2
echo.
set /p q1=
if /I "%q1%"=="1" (set ext=1&&set OwnExt=_ext&&goto :Quest_def)
if /I "%q1%"=="2" (set ext=0&&goto :Quest_def)
goto :Quest_Prof

:Quest_def
IF "%default%"=="" (goto :suite2)
IF "%default%"=="1" (goto :Quest_addon)
IF "%default%"=="0" (goto :Quest_addon)
:suite2
cls
color 2F
echo.
echo.
echo           Do you want to set Firefox as the default browser ?
echo.                    Validate your choice with ENTER key
echo.
echo               -  Yes       - tap 1
echo               -  No        - tap 2
echo.
set /p q2=
if /I "%q2%"=="1" (set default=1&&goto :Quest_addon)
if /I "%q2%"=="2" (set default=0&&goto :Quest_addon)
goto :suite2

:Quest_addon
IF "%addon%"=="" (ECHO null) ELSE (goto :Quest_Desktop)
cls
color 5F
echo.
echo.
echo               Do you want to create a nLite/RVMI AddOn ?
echo.                Validate your choice with ENTER key
echo.
echo               -  Yes       - tap 1
echo               -  No        - tap 2
echo.
set /p q3=
if /I "%q3%"=="1" (set addon=1&&goto :Quest_Desktop)
if /I "%q3%"=="2" (set addon=0&&goto :Quest_Desktop)
goto :Quest_addon


:Quest_Desktop
IF "%del_desktop%"=="" (ECHO null) ELSE (goto :Quest_vers)
cls
color 2F
echo.
echo.
echo               Do you want to delete the Desktop Icon ?
echo.                Validate your choice with ENTER key
echo.
echo               -  Yes, delete the icon      - tap 1
echo               -  No, keep the icon         - tap 2
echo.
set /p q4=
if /I "%q4%"=="1" (set del_desktop=1&&goto :Quest_vers)
if /I "%q4%"=="2" (set del_desktop=0&&goto :Quest_vers)
goto :Quest_Desktop

:: If you want to skip the question about the version:
:: set the arch: possible values: x86|x64|AIO
:: and uncomment one of the following lines:

:: If you want the latest version:
:: example:
::set arch=x86&&goto :latest

:: If you want the latest beta, esr, nightly, or dev version,
:: set also the desired version: possible values: beta|esr|nightly|dev
:: example:
::set arch=x64&&set beta=1&&goto :latest


:: If you have set a version:
::set arch=x86&&goto :version
::set arch=x64&&goto :version
::set arch=AIO&&goto :version


:Quest_vers
cls
color 1F
echo.
echo.
echo               Which version of Firefox would you want to use ?
echo.                    Validate your choice with ENTER key
echo.
echo.
echo            -   32 bits                 - tap 1
echo            -   64 bits                 - tap 2
echo            -   32 + 64 bits            - tap 3
echo.
set /p q5=
if /I "%q5%"=="1" (set arch=x86&&goto :Quest_vers2)
if /I "%q5%"=="2" (set arch=x64&&goto :Quest_vers2)
if /I "%q5%"=="3" (set arch=AIO&&goto :Quest_vers2)
goto :Quest_vers

:Quest_vers2
cls
color 1F
echo.
echo.
echo               Which version of Firefox would you want to use ?
echo.
echo     Be careful, many extensions are NOT (yet) compatible with the actual
echo     version (57.0) and will NOT be installed!
echo     If you still need such extensions use version 56.0.2 instead.
echo.

echo.                    Validate your choice with ENTER key
echo.
echo.
echo            -  latest                 - tap 1
echo            -  latest esr             - tap 2
echo            -  latest beta            - tap 3
echo            -  latest dev             - tap 4
echo            -  latest nightly         - tap 5
echo.
echo            -  specified version      - tap 6
echo.
echo.
set /p q6=
if /I "%q6%"=="1" (goto :latest)
if /I "%q6%"=="2" (SET esr=1&&goto :latest)
if /I "%q6%"=="3" (SET beta=1&&goto :latest)
if /I "%q6%"=="4" (SET dev=1&&goto :latest)
if /I "%q6%"=="5" (SET nightly=1&&goto :latest)
if /I "%q6%"=="6" (goto :Choosevrs)
goto :Quest_vers2

:Choosevrs
cls
color 5F
IF "%vrs%"=="" (ECHO Version is not defined) ELSE (goto :version)
echo.
echo.
echo         Please enter the version you need -exactly-
echo         For example 44.0 or 45.0.1 or 46.0b1 or 52.2.1esr
echo.
echo Please choose your version and press ENTER:
set /p vrs=
IF "%vrs%"=="" (goto :Choosevrs)
goto :version


:latest
SET v1=latest
IF "%esr%"=="1" SET v1=esr-latest
IF "%dev%"=="1" SET v1=devedition-latest
IF "%nightly%"=="1" SET v1=nightly-latest
IF "%beta%"=="1" SET v1=beta-latest
IF "%arch%"=="AIO" (SET DIR=--dir=".\download\x86"&&SET v2=Win)
call :download
IF "%arch%"=="AIO" (SET DIR=--dir=".\download\x64"&&SET v2=Win64&&call :download)
IF "%arch%"=="x86" (goto :create)
IF "%arch%"=="x64" (goto :create)
IF "%arch%"=="AIO" (goto :create_AIO)

:version
SET v1=%vrs%
IF "%arch%"=="AIO" (SET DIR=--dir=".\download\x86"&&SET v2=Win)
call :download
IF "%arch%"=="AIO" (SET DIR=--dir=".\download\x64"&&SET v2=Win64&&call :download)
IF "%arch%"=="x86" (goto :create)
IF "%arch%"=="x64" (goto :create)
IF "%arch%"=="AIO" (goto :create_AIO)

:download
cls
color 0F
IF "%arch%"=="x86" (SET v2=Win)
IF "%arch%"=="x64" (SET v2=Win64)
echo.
echo "downloading http://download.mozilla.org/?product=firefox-%v1%&os=%v2%&lang=%lng%"
echo.
%ARIA% %DIR% "http://download.mozilla.org/?product=firefox-%v1%&os=%v2%&lang=%lng%"
goto :eof

:create
IF NOT EXIST ".\download\Firefox*.exe"  GOTO :MISSING_SETUP
FOR /F "tokens=*" %%A IN ('dir /b .\download\*.exe') DO SET exename=%%~nA
IF "%nightly%"=="1" (call :version2_n) else (call :version2)
ren ".\download\Firefox*.exe" "fx.exe"
IF NOT EXIST "output" md "output"
".\bin\7ZSplit.exe" ".\download\fx.exe" -rh -m ".\download\fx.sfx" -c ".\download\1.txt" -a ".\download\fx.7z"
if %ext%==1 (call :extension)
call :config_sfx
call :config_vrs
copy /b %sfx% + %CFG% + ".\download\fx.7z" ".\output\Firefox%dv%_%VRS%_%arch%_%lng%%OwnExt%_SFX.exe"
if %addon%==1 (call :addon)
goto :END


:extension
%SZA% x ".\download\fx.7z" -y -o.\tmpfx
DEL /F /Q ".\download\fx.7z"
COPY ".\bin\override.ini" "tmpfx\core\browser"
%SZA% a ".\tmpfx\ext.7z" ".\Profile\*" -mx=9 -mfb=256
COPY /b %sfx% + ".\bin\ext.cfg" + ".\tmpfx\ext.7z" ".\tmpfx\ext.exe"
DEL /f /q ".\tmpfx\ext.7z"
%SZA% a ".\download\fx.7z" ".\tmpfx\*" -mx=9 -mfb=256
rmdir "tmpfx" /s /q
goto :eof

:version2
SET VRS=%exename:Firefox Setup =%
goto :eof
:version2_n
SET VRS=%exename:~8,6%
goto :eof

:create_AIO
IF NOT EXIST ".\download\x86\Firefox*.exe"  GOTO :MISSING_SETUP
IF NOT EXIST ".\download\x64\Firefox*.exe"  GOTO :MISSING_SETUP
FOR /F "tokens=*" %%A IN ('dir /b .\download\x86\*.exe') DO SET exename=%%~nA
IF "%nightly%"=="1" (call :version2_n) else (call :version2)
ren ".\download\x86\Firefox*.exe" "fx.exe"
ren ".\download\x64\Firefox*.exe" "fx.exe"
IF NOT EXIST "output" md "output"
%SZA% x ".\download\x86\fx.exe" -y -o.\tmpfx\x86
%SZA% x ".\download\x64\fx.exe" -y -o.\tmpfx\x64
if %ext%==1 (call :extension_AIO)
%SZA% a ".\download\fx.7z" ".\tmpfx\*" -mx=9 -mfb=256
rmdir "tmpfx" /s /q
call :config_sfx
call :config_vrs
copy /b %sfx% + %CFG% + ".\download\fx.7z" ".\output\Firefox%dv%_%VRS%_%arch%_%lng%%OwnExt%_SFX.exe"
if %addon%==1 (call :addon)
goto :END


:extension_AIO
COPY ".\bin\override.ini" "tmpfx\x86\core\browser"
COPY ".\bin\override.ini" "tmpfx\x64\core\browser"
%SZA% a ".\tmpfx\ext.7z" ".\Profile\*" -mx=9 -mfb=256
COPY /b %sfx% + ".\bin\ext.cfg" + ".\tmpfx\ext.7z" ".\tmpfx\ext.exe"
DEL /f /q ".\tmpfx\ext.7z"
goto :eof

:config_sfx
ECHO ;!@Install@!UTF-8!> %CFG%
ECHO GUIMode="2">> %CFG%
ECHO MiscFlags="4">> %CFG%
IF "%arch%"=="x86" (call :conf_normal)
IF "%arch%"=="x64" (call :conf_normal)
IF "%arch%"=="AIO" (call :conf_AIO)
IF "%ext%"=="1" (call ::conf_profile)
IF "%default%"=="1" (call :conf_default)
IF "%del_desktop%"=="1" (call ::conf_del_desktop)
ECHO ;!@InstallEnd@!>> %CFG%
ECHO. >> %CFG%
GOTO :eof
:conf_normal
ECHO RunProgram="setup.exe -ms">> %CFG%
GOTO :eof
:conf_AIO
ECHO RunProgram="%%%%P\\setup.exe -ms">> %CFG%
GOTO :eof
:conf_profile
ECHO RunProgram="ext.exe">> %CFG%
GOTO :eof
:conf_default
ECHO RunProgram="hidcon:cmd /c \"%%ProgramFiles%%\\Mozilla Firefox\\uninstall\\helper.exe\" /SetAsDefaultAppUser">> %CFG%
ECHO RunProgram="x64:hidcon:cmd /c \"%%ProgramW6432%%\\Mozilla Firefox\\uninstall\\helper.exe\" /SetAsDefaultAppUser">> %CFG%
GOTO :eof
:conf_del_desktop
ECHO Delete="%%CommonDesktop%%\\Mozilla Firefox.lnk">> %CFG%
GOTO :eof

:config_vrs
IF "%esr%"=="1" SET dv=_ESR
IF "%dev%"=="1" SET dv=_DEV
IF "%beta%"=="1" SET dv=_BETA
IF "%nightly%"=="1" SET dv=_NIGTHLY
goto :eof

:addon
md "svcpack"
COPY ".\output\SFX_Firefox_%VRS%_%arch%_%lng%%OwnExt%.exe" ".\svcpack\sfx_fx.exe"
ECHO [general]> %INI%
ECHO builddate=%date%>> %INI%
ECHO description=Mozilla Firefox %VRS% %lng% %arch%>> %INI%
ECHO language=%lng%>> %INI%
ECHO version=%VRS%>> %INI%
ECHO website=http://www.mozilla.org/>> %INI%
ECHO. >> %INI%
ECHO [EditFile]>> %INI%
ECHO I386\SVCPACK.INF,SetupHotfixesToRun,AddProgram>> %INI%
ECHO. >> %INI%
ECHO [AddProgram]>> %INI%
ECHO sfx_fx.exe>> %INI%
%SZA% a ".\output\Firefox_%VRS%_%arch%_%lng%%OwnExt%_AddOn.zip" %INI% ".\svcpack"
goto :eof

:CLEANUP
IF EXIST "download" rmdir "download" /s /q
IF EXIST "svcpack" rmdir "svcpack" /s /q
IF EXIST "tmpfx" rmdir "tmpfx" /s /q
IF EXIST %CFG% DEL /F /Q %CFG%
IF EXIST %INI% DEL /F /Q %INI%
goto :eof

:MISSING_SETUP
call :CLEANUP
cls
color 4F
echo.
ECHO ============ FIREFOX SETUP IS MISSING !!! ============
ECHO.
ECHO   Firefox Setup was not found.
ECHO   Please check your Internet connection/Firewall.
ECHO.
ECHO   Exiting without creating sfx installer.
ECHO.
pause
exit

:MISSING_FILES
call :CLEANUP
cls
color 4F
echo.
ECHO ============ IMPORTANT FILES ARE MISSING !!! ==============
ECHO.
ECHO   It seems one or more files in the bin folder are missing.
ECHO.
ECHO   Exiting without creating sfx installer.
ECHO.
pause
exit

:END
call :CLEANUP
cls
color 3F
echo.
echo.
echo      Successfully made SFX_Firefox%dv%_%VRS%_%arch%_%lng%%OwnExt%.exe
echo.
echo.
timeout /t 10
exit

 

Edited by Thiersee
Link to comment
Share on other sites

Hi Thiersee,

1) Not worth it IMO, users of this script are likely to be advanced users and they should already know about the deprecation of the XUL extensions.

Note that I only embedded Web extensions, and only two (the most useful to my opinion: uBlock Origin & DecentralEyes). I've also added user.js and userchrome.css to show some example of customizations for Firefox 57+.

2) Thanks, it will be corrected in the next version.

 

As always, thank your for your inputs & suggestions.

Link to comment
Share on other sites

5 hours ago, mooms said:

Hi Thiersee,

1) Not worth it IMO, users of this script are likely to be advanced users and they should already know about the deprecation of the XUL extensions.

Note that I only embedded Web extensions, and only two (the most useful to my opinion: uBlock Origin & DecentralEyes). I've also added user.js and userchrome.css to show some example of customizations for Firefox 57+.

2) Thanks, it will be corrected in the next version.

 

As always, thank your for your inputs & suggestions.

Anyway, I forgot an hint:

I modified the line 256 (downloading:......) in two lines, because the showed path was cutted off at the end in my cmd-windows (standard)

echo downloading:
echo "http://download.mozilla.org/?product=firefox-%v1%&os=%v2%&lang=%lng%"

 

Link to comment
Share on other sites

22 hours ago, filter said:

uBlock Origin is a must have extension for Firefox

Yes, and Decentraleyes too, it don't need any configuration so you have a better privacy without any cons.

 

21 hours ago, Thiersee said:

Anyway, I forgot an hint:

I modified the line 256 (downloading:......) in two lines, because the showed path was cutted off at the end in my cmd-windows (standard)


echo downloading:
echo "http://download.mozilla.org/?product=firefox-%v1%&os=%v2%&lang=%lng%"

 

You're right, it's better that way.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...