diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 65a5778..a943382 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -15,7 +15,12 @@ jobs: build: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + clean: true + persist-credentials: true + set-safe-directory: true # get version from pubspec.yaml and check if release already exists - name: Get version id: get_version @@ -58,21 +63,28 @@ jobs: Move-Item .\build\windows\x64\runner\Release\wsl2distromanager.msix .\wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.msix Copy-Item -Path ./windows-dlls/* -Destination ./build/windows/x64/runner/Release/ Compress-Archive -Path ./build/windows/x64/runner/Release/* -DestinationPath .\wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.zip - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 name: Create nightly release (ZIP) if: ${{ steps.get_version.outputs.exists == 'true' }} with: name: wsl2-distro-manager-nightly-archive - path: | - ./wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.zip - - uses: actions/upload-artifact@v3 + path: ./wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.zip + if-no-files-found: error + retention-days: 30 + compression-level: 6 + overwrite: true + + - uses: actions/upload-artifact@v4 name: Create nightly release (MSIX) if: ${{ steps.get_version.outputs.exists == 'true' }} with: name: wsl2-distro-manager-nightly-msix - path: | - ./wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.msix - + path: ./wsl2-distro-manager-v${{ steps.get_version.outputs.version }}-nightly.msix + if-no-files-found: error + retention-days: 30 + compression-level: 6 + overwrite: true + # Create full release with tag (only if branch is main) - name: Create release if: ${{ steps.get_version.outputs.exists == 'false' && github.ref == 'refs/heads/main' }} diff --git a/installer/setup.bat b/installer/setup.bat new file mode 100644 index 0000000..64019cb --- /dev/null +++ b/installer/setup.bat @@ -0,0 +1,11 @@ +@echo off +REM Check for Redistributable and install if needed +if not exist "C:\Windows\System32\vcruntime140.dll" ( + echo Installing VC++ Redistributable + :: Uncomment the correct line below for your architecture + :: vc_redist.x86.exe /install /quiet /norestart + vc_redist.x64.exe /install /quiet /norestart +) + +mkdir "C:\Program Files\WSL Manager" +copy "WSL Manager.exe" "C:\Program Files\WSL Manager" diff --git a/installer/setup.sed b/installer/setup.sed new file mode 100644 index 0000000..38d1f9b --- /dev/null +++ b/installer/setup.sed @@ -0,0 +1,60 @@ +[Version] +Class=IEXPRESS +SEDVersion=3 + +[Options] +PackagePurpose=InstallApp +ShowInstallProgramWindow=0 +HideExtractAnimation=0 +UseLongFileName=1 +InsideCompressed=1 +CAB_FixedSize=0 +CAB_ResvCodeSigning=0 +RebootMode=N +InstallPrompt= +DisplayLicense=%SourceFiles0%\LICENSE +FinishMessage=Installation Complete +TargetName=%EXTRACT_DIR%\wsl2-distro-manager-setup.exe +FriendlyName=WSL2 Distro Manager Installation +AppLaunched=cmd.exe /c setup.bat +PostInstallCmd= +AdminQuietInstCmd= +UserQuietInstCmd= + +[Strings] +InstallPrompt= +DisplayLicense=%SourceFiles0%\LICENSE +FinishMessage=Installation Complete +TargetName=%EXTRACT_DIR%\wsl2-distro-manager-setup.exe +FriendlyName=WSL2 Distro Manager Installation +AppLaunched=cmd.exe /c setup.bat +PostInstallCmd= +AdminQuietInstCmd= +UserQuietInstCmd= + +[SourceFiles] +SourceFiles0=installer\ + +[SourceFiles0] +FILE0="setup.bat" +FILE1="vc_redist.x64.exe" +FILE2="desktop_window_plugin.dll" +FILE3="flutter_acrylic_plugin.dll" +FILE4="flutter_localization_plugin.dll" +FILE5="flutter_windows.dll" +FILE6="screen_retriever_windows_plugin.dll" +FILE7="system_theme_plugin.dll" +FILE8="url_launcher_windows_plugin.dll" +FILE9="window_manager_plugin.dll" +FILE10="LICENSE" +%FILE0%= +%FILE1%= +%FILE2%= +%FILE3%= +%FILE4%= +%FILE5%= +%FILE6%= +%FILE7%= +%FILE8%= +%FILE9%= +%FILE10%=