From 890d2f6387f7b540444497c2f4797deab62cb15b Mon Sep 17 00:00:00 2001 From: Petr Semiletov Date: Sun, 8 Oct 2023 19:33:34 +0300 Subject: [PATCH] NSIS upd --- .github/workflows/cmake-nsis-windows.yml | 2 +- install.nsi | 45 ++++++++++-------------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/.github/workflows/cmake-nsis-windows.yml b/.github/workflows/cmake-nsis-windows.yml index be1b5ca..943c09b 100644 --- a/.github/workflows/cmake-nsis-windows.yml +++ b/.github/workflows/cmake-nsis-windows.yml @@ -21,7 +21,7 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -SMULTI=ON - name: Build # Build your program with the given configuration diff --git a/install.nsi b/install.nsi index e68c758..d2eb007 100644 --- a/install.nsi +++ b/install.nsi @@ -36,22 +36,14 @@ UninstallSubCaption 0 ": Confirmation" UninstallSubCaption 1 ": Removing files" UninstallSubCaption 2 ": Done" -;C:\Program Files\Common Files\VST3\drumlabooh.vst3 - ; The file to write OutFile "drumlabooh-installer.exe" ; The default installation directory InstallDir "$PROGRAMFILES\Common Files\VST3\drumlabooh.vst3" - -; The text to prompt the user to enter a directory -;DirText "Select VSTi folder please" -;ComponentText "Select the compoments to install" - - ; The stuff to install -Section "Files (mandatory)" +Section "Drumlabooh (Stereo)" ; Set output path to the installation directory. SetOutPath $INSTDIR ; Put file there @@ -68,38 +60,39 @@ Section "Files (mandatory)" SectionEnd -Section "Basic drumkits" +; The stuff to install +Section "Drumlabooh (Multi)" ; Set output path to the installation directory. - SetOutPath "C:\drumlabooh-kits" -;D:/a/drumlabooh/drumlabooh/build/_deps/drum_sklad-src + SetOutPath "$PROGRAMFILES\Common Files\VST3\drumlabooh-multi.vst3" ; Put file there - File /r "D:\a\drumlabooh\drumlabooh\build\_deps\drum_sklad-src\*.*" + File /r "D:\a\drumlabooh\drumlabooh\build\drumlabooh-multi_artefacts\Release\VST3\drumlabooh-multi.vst3\Contents\Resources\moduleinfo.json" + File /r "D:\a\drumlabooh\drumlabooh\build\drumlabooh-multi_artefacts\Release\VST3\drumlabooh-multi.vst3\Contents\x86_64-win\drumlabooh-multi.vst3" + + WriteRegStr HKLM SOFTWARE\Drumlabooh_multi "Install_Dir" "$PROGRAMFILES\Common Files\VST3\drumlabooh-multi.vst3" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Drumlabooh-multi" "DisplayName" "Drumlabooh-multi (remove)" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Drumlabooh-multi" "UninstallString" '"$PROGRAMFILES\Common Files\VST3\drumlabooh-multi.vst3\nsUninst.exe"' + WriteUninstaller "nsUninst.exe" ; ExecShell "open" '"$INSTDIR\doc\note_for_users.html"' SectionEnd -;Section "Ярлыки в Главном меню (выборочно)" - -; CreateDirectory "$SMPROGRAMS\TEA" -; CreateShortCut "$SMPROGRAMS\TEA\Tea.lnk" "$INSTDIR\tea.exe" -; CreateShortCut "$SMPROGRAMS\TEA\Удалить Tea.lnk" "$INSTDIR\nsUninst.exe" - -;SectionEnd +Section "Basic drumkits" + ; Set output path to the installation directory. + SetOutPath "C:\drumlabooh-kits" +;D:/a/drumlabooh/drumlabooh/build/_deps/drum_sklad-src + ; Put file there + File /r "D:\a\drumlabooh\drumlabooh\build\_deps\drum_sklad-src\*.*" -;Section "Создать ярлык на Рабочем столе" +; ExecShell "open" '"$INSTDIR\doc\note_for_users.html"' - ;CreateShortCut "$DESKTOP\Tea(Win32).lnk" "$INSTDIR\tea.exe" +SectionEnd -;SectionEnd Section "Uninstall" -; Delete $DESKTOP\Tea.lnk -; Delete $SMPROGRAMS\TEA\*.* -; RMDir $SMPROGRAMS\TEA Delete $INSTDIR\nsUninst.exe Delete $INSTDIR\*.* Delete "C:\drumlabooh-kits\*.*"