From 7e1d6f610018426aeacc449ff08a1fe2eaaad410 Mon Sep 17 00:00:00 2001 From: DJ2LS Date: Sun, 3 Mar 2024 11:09:29 +0100 Subject: [PATCH] added version to Installer name, add start menu entries, refresh audio devices on request --- .github/workflows/build_nsis_bundle.yml | 2 ++ freedata-nsis-config.nsi | 30 ++++++++++++++++++++- gui/src/components/main_startup_check.vue | 33 +++++++++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_nsis_bundle.yml b/.github/workflows/build_nsis_bundle.yml index 8b6c2a2c..45e13bb5 100644 --- a/.github/workflows/build_nsis_bundle.yml +++ b/.github/workflows/build_nsis_bundle.yml @@ -65,3 +65,5 @@ jobs: with: draft: true files: ./FreeDATA-Installer.exe + tag_name: ${{ github.ref_name }} + name: 'FreeDATA-Installer-${{ github.ref_name }}' \ No newline at end of file diff --git a/freedata-nsis-config.nsi b/freedata-nsis-config.nsi index 57d2a066..b95c457f 100644 --- a/freedata-nsis-config.nsi +++ b/freedata-nsis-config.nsi @@ -42,6 +42,9 @@ InstallDirRegKey HKCU "Software\FreeDATA" "Install_Dir" ; Language (you can choose and configure the language(s) you want) !insertmacro MUI_LANGUAGE "English" +!define StartMenuFolder "FreeDATA" + + ; Installer Sections Section "FreeData Server" SEC01 ; Set output path to the installation directory @@ -63,6 +66,16 @@ doneBackup: ; Create Uninstaller WriteUninstaller "$INSTDIR\Uninstall.exe" + ; Create a Start Menu directory + CreateDirectory "$SMPROGRAMS\${StartMenuFolder}" + + ; Create shortcut in the Start Menu directory + CreateShortCut "$SMPROGRAMS\${StartMenuFolder}\FreeDATA Server.lnk" "$INSTDIR\freedata-server\freedata-server.exe" + + ; Create an Uninstall shortcut + CreateShortCut "$SMPROGRAMS\${StartMenuFolder}\Uninstall FreeDATA.lnk" "$INSTDIR\Uninstall.exe" + + ; Backup "config.ini" before overwriting files backupConfig: Rename $INSTDIR\freedata-server\config.ini $INSTDIR\freedata-server\config.ini.bak @@ -86,6 +99,13 @@ Section "FreeData x64 GUI" SEC02 ; Create a shortcut on the desktop for the GUI CreateShortCut "$DESKTOP\FreeDATA GUI.lnk" "$INSTDIR\freedata-gui\freedata.exe" + + ; Create a start menu shortcut + CreateShortCut "$SMPROGRAMS\${StartMenuFolder}\FreeDATA GUI.lnk" "$INSTDIR\freedata-gui\freedata.exe" + + ; Create an Uninstall shortcut + CreateShortCut "$SMPROGRAMS\${StartMenuFolder}\Uninstall FreeDATA.lnk" "$INSTDIR\Uninstall.exe" + SectionEnd ; Uninstaller Section @@ -102,5 +122,13 @@ Section "Uninstall" Delete "$DESKTOP\FreeDATA Server.lnk" Delete "$DESKTOP\FreeDATA GUI.lnk" - ; Additional uninstallation commands here +; Remove Start Menu shortcuts + Delete "$SMPROGRAMS\${StartMenuFolder}\*.*" + RMDir "$SMPROGRAMS\${StartMenuFolder}" + + ; Attempt to delete the uninstaller itself + Delete $EXEPATH + + ; Now remove the installation directory if it's empty + RMDir /r $INSTDIR SectionEnd diff --git a/gui/src/components/main_startup_check.vue b/gui/src/components/main_startup_check.vue index 61d3d853..168ac6a2 100644 --- a/gui/src/components/main_startup_check.vue +++ b/gui/src/components/main_startup_check.vue @@ -9,6 +9,7 @@ setActivePinia(pinia); import { settingsStore as settings, onChange } from "../store/settingsStore.js"; import { sendModemCQ } from "../js/api.js"; +import { loadAudioDevices } from "../js/deviceFormHelper"; import { useStateStore } from "../store/stateStore.js"; const state = useStateStore(pinia); @@ -201,11 +202,28 @@ function testHamlib() { + +
+ + +