feat(tauri): migrate from GitLite to Gitty and clean up legacy data
publish / publish-tauri (appimage, 1, ubuntu-22.04, linux-x86_64) (release) Successful in 19m47s
publish / publish-tauri (nsis, , windows-latest, windows-x86_64) (release) Successful in 27m57s

This commit updates the installer and configuration to transition from
GitLite to Gitty. It includes macros for migrating legacy data and
uninstalling the previous GitLite installation, ensuring a smoother
upgrade experience for users.

- Added migration and uninstallation macros for legacy GitLite data
- Updated application identifier from com.git-lite to com.gitty
- Enhanced post-installation cleanup for legacy shortcuts
This commit is contained in:
Christoph Brandau
2026-07-08 20:48:22 +02:00
parent 2383abb496
commit e0a77607f5
2 changed files with 44 additions and 5 deletions
+43 -4
View File
@@ -1,11 +1,50 @@
!macro NSIS_HOOK_POSTINSTALL !macro GITTY_MIGRATE_LEGACY_DATA_DIR oldDir newDir
${IfNot} ${FileExists} "${newDir}\*.*"
${AndIf} ${FileExists} "${oldDir}\*.*"
CreateDirectory "${newDir}"
Rename "${oldDir}" "${newDir}"
${EndIf}
!macroend
!macro GITTY_UNINSTALL_LEGACY_GITLITE rootKey
ClearErrors
ReadRegStr $R0 ${rootKey} "Software\Microsoft\Windows\CurrentVersion\Uninstall\GitLite" "UninstallString"
${If} "$R0" != ""
ReadRegStr $R1 ${rootKey} "Software\git-lite\GitLite" ""
${If} "$R1" == ""
ReadRegStr $R1 ${rootKey} "Software\Microsoft\Windows\CurrentVersion\Uninstall\GitLite" "InstallLocation"
${EndIf}
DetailPrint "Removing legacy GitLite installation"
${If} "$R1" != ""
ExecWait '$R0 /S _?=$R1' $R2
${Else}
ExecWait '$R0 /S' $R2
${EndIf}
${EndIf}
DeleteRegKey ${rootKey} "Software\Microsoft\Windows\CurrentVersion\Uninstall\GitLite"
DeleteRegKey ${rootKey} "Software\git-lite\GitLite"
DeleteRegKey /ifempty ${rootKey} "Software\git-lite"
!macroend
!macro GITTY_CLEANUP_LEGACY_SHORTCUTS
Delete "$DESKTOP\GitLite.lnk" Delete "$DESKTOP\GitLite.lnk"
Delete "$SMPROGRAMS\GitLite.lnk" Delete "$SMPROGRAMS\GitLite.lnk"
RMDir /r "$SMPROGRAMS\GitLite" RMDir /r "$SMPROGRAMS\GitLite"
!macroend !macroend
!macro NSIS_HOOK_PREINSTALL
!insertmacro GITTY_MIGRATE_LEGACY_DATA_DIR "$APPDATA\com.git-lite" "$APPDATA\com.gitty"
!insertmacro GITTY_MIGRATE_LEGACY_DATA_DIR "$LOCALAPPDATA\com.git-lite" "$LOCALAPPDATA\com.gitty"
!insertmacro GITTY_UNINSTALL_LEGACY_GITLITE HKCU
!insertmacro GITTY_UNINSTALL_LEGACY_GITLITE HKLM
!macroend
!macro NSIS_HOOK_POSTINSTALL
!insertmacro GITTY_CLEANUP_LEGACY_SHORTCUTS
!macroend
!macro NSIS_HOOK_POSTUNINSTALL !macro NSIS_HOOK_POSTUNINSTALL
Delete "$DESKTOP\GitLite.lnk" !insertmacro GITTY_CLEANUP_LEGACY_SHORTCUTS
Delete "$SMPROGRAMS\GitLite.lnk"
RMDir /r "$SMPROGRAMS\GitLite"
!macroend !macroend
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "Gitty", "productName": "Gitty",
"version": "2026.7.16", "version": "2026.7.16",
"identifier": "com.git-lite", "identifier": "com.gitty",
"build": { "build": {
"beforeDevCommand": "npm run dev", "beforeDevCommand": "npm run dev",
"devUrl": "http://127.0.0.1:1420", "devUrl": "http://127.0.0.1:1420",