diff --git a/rel/app/windows/Installer.nsi b/rel/app/windows/Installer.nsi index 8f0e7a0d4..f255277ef 100644 --- a/rel/app/windows/Installer.nsi +++ b/rel/app/windows/Installer.nsi @@ -38,6 +38,16 @@ Section "Install" CreateDirectory "$LOCALAPPDATA\Livebook\Logs" WriteUninstaller "$INSTDIR\LivebookUninstall.exe" + + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Livebook" "DisplayName" "Livebook" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Livebook" "DisplayVersion" "${LIVEBOOK_VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Livebook" "DisplayIcon" "$INSTDIR\Livebook.exe" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Livebook" "Publisher" "Dashbit" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Livebook" "UninstallString" '"$INSTDIR\LivebookUninstall.exe"' + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Livebook" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Livebook" "NoRepair" 1 + + WriteRegStr HKLM "Software\Dashbit\Livebook" "InstallRoot" "$INSTDIR" SectionEnd Section "Desktop Shortcut" @@ -87,6 +97,9 @@ Section "Uninstall" DeleteRegKey HKCR ".livemd" DeleteRegKey HKCR "Livebook.LiveMarkdown" DeleteRegKey HKCR "livebook" + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Livebook" + DeleteRegKey HKLM "Software\Dashbit\Livebook" + DeleteRegKey /ifempty HKLM "Software\Dashbit" DetailPrint "Terminating Livebook..." ExecWait "taskkill /f /t /im Livebook.exe" diff --git a/rel/app/windows/build_installer.sh b/rel/app/windows/build_installer.sh index 6c9c91143..c80ef1226 100755 --- a/rel/app/windows/build_installer.sh +++ b/rel/app/windows/build_installer.sh @@ -18,4 +18,7 @@ if [ ! -f $vc_redist_path ]; then curl -L --fail --output $vc_redist_path $url fi -makensis //DERTS_VERSION=`elixir -e "IO.puts :erlang.system_info(:version)"` Installer.nsi +makensis \ + //DERTS_VERSION=`elixir -e "IO.puts :erlang.system_info(:version)"` \ + //DLIVEBOOK_VERSION=`elixir -e "Mix.start() ; Mix.Project.in_project(:livebook, \"../../..\", fn _ -> IO.puts Mix.Project.config()[:version] end)"` \ + Installer.nsi