From b60c72bde886d594f6ba32e9aabc4ab90dd90d83 Mon Sep 17 00:00:00 2001 From: Simon Gerstmeier Date: Fri, 26 Apr 2024 20:12:13 +0200 Subject: [PATCH] Configured "file harvesting" for the windows installer. It automatically converts the build result into components. --- .gitignore | 1 - installers/windows/AppComponents.wxs | 151 +-------------------- installers/windows/ClientExeTransform.xslt | 26 ++++ installers/windows/Folders.wxs | 26 +--- installers/windows/README.md | 40 +++--- installers/windows/ServerExeTransform.xslt | 23 ++++ installers/windows/windows.wixproj | 31 +++++ 7 files changed, 108 insertions(+), 190 deletions(-) create mode 100644 installers/windows/ClientExeTransform.xslt create mode 100644 installers/windows/ServerExeTransform.xslt diff --git a/.gitignore b/.gitignore index 48ffdd5..f92f3f1 100644 --- a/.gitignore +++ b/.gitignore @@ -50,7 +50,6 @@ app.*.map.json # Installer artifacts installers/windows/bin installers/windows/obj -installers/windows/cabinet/* installers/windows/.vs # Android Studio will place build artifacts here diff --git a/installers/windows/AppComponents.wxs b/installers/windows/AppComponents.wxs index 4d958fa..f171857 100644 --- a/installers/windows/AppComponents.wxs +++ b/installers/windows/AppComponents.wxs @@ -1,17 +1,10 @@ - - - - - - - - - - - + + + + @@ -29,141 +22,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/installers/windows/ClientExeTransform.xslt b/installers/windows/ClientExeTransform.xslt new file mode 100644 index 0000000..ad9e1f9 --- /dev/null +++ b/installers/windows/ClientExeTransform.xslt @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/installers/windows/Folders.wxs b/installers/windows/Folders.wxs index 0122cd9..ebb1896 100644 --- a/installers/windows/Folders.wxs +++ b/installers/windows/Folders.wxs @@ -2,31 +2,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/installers/windows/README.md b/installers/windows/README.md index 4e16036..ea9f2bf 100644 --- a/installers/windows/README.md +++ b/installers/windows/README.md @@ -12,27 +12,31 @@ The build uses MSBuild via Visual Studio 2022. * Open the `windows.sln` solution in VS2022 -### Provide the file cabinet +### Provide the payload files -The files in the cabinet are embedded in the installer during its build. +The files that are embedded in the installer are "harvested" from different locations during the build. The paths are defined relative to this (`installers/windows`) directory. * Build the client (run `flutter build windows` in this repository's root directory). -* Find the build result at `[...]\ez_badminton_admin_app\build\windows\x64\runner\Release` -* Copy the files to the `cabinet` directory - * It should look something like this - ``` - ez_badminton_admin_app\installers\windows\cabinet - - data - - ez_badminton_admin_app.exe - - flutter_windows.dll - - ... - ``` -* Rename `ez_badminton_admin_app.exe` to `ezBadminton.exe` -* Download the ezBadminton server executable from the [releases](https://github.com/ezBadminton/ezBadmintonServer/releases) - * Take the windows-amd64 one -* Create a directory called `local_server` in the `cabinet` directory -* Move the server executable to `local_server` -* Rename the server executable to `ezBadmintonServer.exe` +* Verify that the build result is at `ez_badminton_admin_app\build\windows\x64\runner\Release` +* It should look something like this +``` +ez_badminton_admin_app\build\windows\x64\runner\Release + - data + - ez_badminton_admin_app.exe + - flutter_windows.dll + - ... +``` +* The installer build will automatically take the files from here + +--- + +The client can run locally and has the ability to start a local server on its own. Therefore the server executable has to be included with the installer. + +* Build the server or download the windows-amd64 one from the server repository's [releases](https://github.com/ezBadminton/ezBadmintonServer/releases) +* Place it in a directory named `server` one level above the repository + * Like this: `ez_badminton_admin_app\..\server\ezBadmintonServer-windows-amd64-vX.Y.Z.exe` +* The installer build will harvest it from there + ### Build the installer diff --git a/installers/windows/ServerExeTransform.xslt b/installers/windows/ServerExeTransform.xslt new file mode 100644 index 0000000..6334782 --- /dev/null +++ b/installers/windows/ServerExeTransform.xslt @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/installers/windows/windows.wixproj b/installers/windows/windows.wixproj index ea2f4c6..b9a54f9 100644 --- a/installers/windows/windows.wixproj +++ b/installers/windows/windows.wixproj @@ -1,8 +1,39 @@  + + + + + FileComponents + INSTALLFOLDER + true + ClientExeTransform.xslt + + + + + + + ServerComponents + SERVERFOLDER + true + ServerExeTransform.xslt + + + + + + + + + + + true + + en-US ezBadminton-installer-windows