Register Livebook Desktop for Windows in Add/Remove Programs (#2398)

This commit is contained in:
Wojtek Mach 2023-12-12 13:58:43 +01:00 committed by GitHub
parent fab41cfb60
commit 5df690f705
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View file

@ -38,6 +38,16 @@ Section "Install"
CreateDirectory "$LOCALAPPDATA\Livebook\Logs" CreateDirectory "$LOCALAPPDATA\Livebook\Logs"
WriteUninstaller "$INSTDIR\LivebookUninstall.exe" 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 SectionEnd
Section "Desktop Shortcut" Section "Desktop Shortcut"
@ -87,6 +97,9 @@ Section "Uninstall"
DeleteRegKey HKCR ".livemd" DeleteRegKey HKCR ".livemd"
DeleteRegKey HKCR "Livebook.LiveMarkdown" DeleteRegKey HKCR "Livebook.LiveMarkdown"
DeleteRegKey HKCR "livebook" DeleteRegKey HKCR "livebook"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Livebook"
DeleteRegKey HKLM "Software\Dashbit\Livebook"
DeleteRegKey /ifempty HKLM "Software\Dashbit"
DetailPrint "Terminating Livebook..." DetailPrint "Terminating Livebook..."
ExecWait "taskkill /f /t /im Livebook.exe" ExecWait "taskkill /f /t /im Livebook.exe"

View file

@ -18,4 +18,7 @@ if [ ! -f $vc_redist_path ]; then
curl -L --fail --output $vc_redist_path $url curl -L --fail --output $vc_redist_path $url
fi 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