diff --git a/CLIENT_DATA/setup64.ins b/CLIENT_DATA/setup64.ins index e55fef5..ba9c0d8 100644 --- a/CLIENT_DATA/setup64.ins +++ b/CLIENT_DATA/setup64.ins @@ -19,6 +19,9 @@ DefVar $OLD_CREATOR_TAG$ DefVar $OLD_RELEASE$ DefVar $RealInstallMsi$ +; DefVar $InstallDir$ +DefVar $ProgExe$ + Set $LogDir$ = "%SystemDrive%\tmp" ; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh @@ -31,6 +34,9 @@ Set $LogDir$ = "%SystemDrive%\tmp" ; @@BUILDER_VARIABLES@@ + + + ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- @@ -68,6 +74,11 @@ else Winbatch_install Sub_check_exitcode + comment create associations +; Set $InstallDir$ = $InstallDir32$ + Set $ProgExe$ = $Prog64$ + DosInAnIcon_install winst /Sysnative + comment "Copy files" Files_install /64Bit @@ -79,6 +90,46 @@ else endif +[DosInAnIcon_install] +@echo off +If exist "%System%\defaultassociations.xml" (copy "%System%\defaultassociations.xml" "$LogDir$") ELSE (copy "%ScriptPath%\defaultassociations.xml" "$LogDir$") + +rem Handling for X86 installation directory since Windows Vista +SET InstallDir=$InstallDir$ +for /f "tokens=1-3 delims=\" %%a in ("$InstallDir$") do ( +set a=%%a +set b=%%b +set c=%%c +) +IF "%b%" == "Program Files (x86)" SET InstallDir=%a%^\Program Files ^^(x86^^)^\%c% + +SET Prog=$ProgExe$ +SET Prog=%Prog:~0,-4% +SET SC=HKLM\Software\Classes +SET Extn=http-1 https-1 ftp-1 .htm-1 .html-1 .shtml-1 .xht-1 .xhtml-1 + +FOR %%j IN (%Extn%) DO ( + + FOR /F "tokens=1,2 delims=-" %%A IN ("%%j") DO ( + REG ADD %SC%\%%A /VE /D "Waterfox-%%A" /F + REG ADD %SC%\Waterfox-%%A /VE /D "%%A Waterfox" /F + REG ADD %SC%\Waterfox-%%A\DefaultIcon /VE /D "$InstallDir$\%Prog%.exe,%%B" /F + REG ADD %SC%\Waterfox-%%A\shell\open\command /VE /D "\"%InstallDir%\%Prog%.exe\" -osint -url \"%%1\"" /F + copy "$LogDir$\defaultassociations.xml" "$LogDir$\defaultassociations.xml.old" + xml ed -d /DefaultAssociations/Association[@Identifier='%%A'] "$LogDir$\defaultassociations.xml.old"> "$LogDir$\defaultassociations.xml" + copy "$LogDir$\defaultassociations.xml" "$LogDir$\defaultassociations.xml.old" + xml ed -s /DefaultAssociations -t elem -n Association_new -v "" -i /DefaultAssociations/Association_new -t attr -n Identifier -v %%A -i /DefaultAssociations/Association_new -t attr -n ProgId -v FirefoxURL -i /DefaultAssociations/Association_new -t attr -n ApplicationName -v "Waterfox" -r "/DefaultAssociations/Association_new" -v Association "$LogDir$\defaultassociations.xml.old"> "$LogDir$\defaultassociations.xml" + ) +) + +rem Set Default Associations for Windows 8 +move "$LogDir$\defaultassociations.xml" "%System%" +REG ADD HKLM\Software\Policies\Microsoft\Windows\System /V DefaultAssociationsConfiguration /D "%System%\defaultassociations.xml" /F + +rem Special case for Waterfox +REG ADD %SC%\FirefoxURL\DefaultIcon /VE /D "$InstallDir$\%Prog%.exe,1" /F +REG ADD %SC%\FirefoxURL\shell\open\command /VE /D "\"%InstallDir%\%Prog%.exe\" -osint -url \"%%1\"" /F + [Winbatch_extract] "$InstallExe$" /extract:"$LogDir$" diff --git a/builder-product.cfg b/builder-product.cfg index 30fd050..294292d 100644 --- a/builder-product.cfg +++ b/builder-product.cfg @@ -90,3 +90,11 @@ WINST_VALUE[1]="86C0563" OPSI_INI_SECTION[0]="X86_64" OPSI_INI_OPTION[0]="MsiId" OPSI_INI_VALUE[0]="{FD7DEB7B-8CEA-44E5-AB2D-7C66786C0563}" + +OPSI_INI_SECTION[1]="X86" +OPSI_INI_OPTION[1]="Prog32" +OPSI_INI_VALUE[1]="waterfox.exe" + +OPSI_INI_SECTION[2]="X86_64" +OPSI_INI_OPTION[2]="Prog64" +OPSI_INI_VALUE[2]="waterfox.exe" \ No newline at end of file diff --git a/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.xpi.sha1sum b/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.xpi.sha1sum index 140cf2d..41e5f66 100644 --- a/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.xpi.sha1sum +++ b/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.xpi.sha1sum @@ -1 +1 @@ -fea9c595c461e32d721a9bcc3a800c0761520b30 /home/mario/.opsi-dist-cache/waterfoxproject.waterfox-18.0.1/X86_64/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.xpi +5c3816e9a2d3a49fde2d1cde2868ab4b9e7dd73c /home/opsiproducts/.opsi-dist-cache/waterfoxproject.waterfox-18.0.1/X86_64/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.xpi