diff --git a/.gitignore b/.gitignore index 3bfa72e..3682cf7 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ unity-menubar.patch mozconfig Makefile librewolf - +tmp.nsi diff --git a/installer_win.nsi b/installer_win.nsi index c2fb520..7fae344 100644 --- a/installer_win.nsi +++ b/installer_win.nsi @@ -2,12 +2,12 @@ # Change these values to fit your application... # -!define APPNAME "LibreWolf" # Full app name, like: "Gtk+ 2.0 Hello World" -!define PROGNAME "librewolf" # executable name, like: gtk2hello -!define PROG_VERSION "86.0" # the program version, like: 0.3.0 -!define ICON_NAME "librewolf.ico" # filename of icon to use for this app -!define COMPANYNAME "LibreWolf" # Your name, or company (or just the program name) -!define ESTIMATED_SIZE 190000 # Estimated size (in KB) of installed program for use in "add or remove programs" / 190 MB +!define APPNAME "LibreWolf" # Full app name, like: "Gtk+ 2.0 Hello World" +!define PROGNAME "librewolf" # executable name, like: gtk2hello +!define PROG_VERSION "pkg_version" # the program version, like: 0.3.0 +!define ICON_NAME "librewolf.ico" # filename of icon to use for this app +!define COMPANYNAME "LibreWolf" # Your name, or company (or just the program name) +!define ESTIMATED_SIZE 190000 # Estimated size (in KB) of installed program for use in "add or remove programs" / 190 MB # # The actual installer/uninstaller, you should not need to change much here below @@ -52,6 +52,33 @@ Section "${PROGNAME}" # Set the INSTALLSIZE constant (!defined at the top of this script) so Add/Remove Programs can accurately report the size WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "EstimatedSize" ${ESTIMATED_SIZE} + + # + # Registry information to let Windows pick us up in the list of available browsers + # + + WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf" "" "LibreWolf" + WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities" "ApplicationDescription" "LibreWolf" + WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities" "ApplicationIcon" "C:\Program Files\LibreWolf\librewolf.exe,0" + WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities" "ApplicationName" "LibreWolf" + WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities\FileAssociations" ".htm" "LibreWolfHTM" + WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities\FileAssociations" ".html" "LibreWolfHTM" + WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities\Startmenu" "StartMenuInternet" "LibreWolf" + WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\DefaultIcon" "" "C:\Program Files\LibreWolf\librewolf.exe,0" + WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\shell\open\command" "" "C:\Program Files\LibreWolf\librewolf.exe" + + WriteRegStr HKLM "Software\RegisteredApplications" "LibreWolf" "Software\Clients\StartMenuInternet\LibreWolf\Capabilities" + + WriteRegStr HKLM "Software\Classes\LibreWolfHTM" "" "LibreWolf Handler" + WriteRegStr HKLM "Software\Classes\LibreWolfHTM" "AppUserModelId" "LibreWolf" + WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "AppUserModelId" "LibreWolf" + WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationIcon" "C:\Program Files\LibreWolf\librewolf.exe,0" + WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationName" "LibreWolf" + WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationDescription" "Howling to Freedom" + WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationCompany" "LibreWolf" + WriteRegStr HKLM "Software\Classes\LibreWolfHTM\DefaultIcon" "" "C:\Program Files\LibreWolf\librewolf.exe,0" + WriteRegStr HKLM "Software\Classes\LibreWolfHTM\shell\open\command" "" "C:\Program Files\LibreWolf\librewolf.exe %1" + SectionEnd # Before uninstall, ask for confirmation @@ -77,5 +104,13 @@ section "uninstall" # Remove uninstaller information from the registry DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" + + # + # Windows default browser integration + # + + DeleteRegKey HKLM "Software\Clients\StartMenuInternet\LibreWolf" + DeleteRegKey HKLM "Software\RegisteredApplications" + DeleteRegKey HKLM "Software\Classes\LibreWolfHTM" sectionEnd diff --git a/installer_win.sh b/installer_win.sh index a7a3b95..ba972fc 100644 --- a/installer_win.sh +++ b/installer_win.sh @@ -123,7 +123,8 @@ END # now to try to make the installer. cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico -makensis-3.01.exe installer_win.nsi +sed "s/pkg_version/$pkgver/g" < installer_win.nsi > tmp.nsi +makensis-3.01.exe tmp.nsi if [ $? -ne 0 ]; then exit 1; fi sha256sum.exe librewolf-$pkgver.en-US.win64-setup.exe > librewolf-$pkgver.en-US.win64-setup.exe.sha256sum if [ $? -ne 0 ]; then exit 1; fi