Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JPersson77 committed Jan 21, 2025
2 parents ae45912 + d1abf05 commit d8eaf61
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 18 deletions.
44 changes: 29 additions & 15 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ jobs:
fail-fast: false
matrix:
configuration: [Release, Debug]
arch: [x64, arm64]
outputs:
hashReleaseInstaller: ${{ steps.hash.outputs.hashRelease }}
hashDebugInstaller: ${{ steps.hash.outputs.hashDebug }}
x64_hashReleaseInstaller: ${{ steps.hash.outputs.hashRelease_x64 }}
x64_hashDebugInstaller: ${{ steps.hash.outputs.hashDebug_x64 }}
arm64_hashReleaseInstaller: ${{ steps.hash.outputs.hashRelease_arm64 }}
arm64_hashDebugInstaller: ${{ steps.hash.outputs.hashDebug_arm64 }}
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
Expand All @@ -22,26 +25,27 @@ jobs:
with:
manifest-dir: ${{ github.workspace }} # Set to directory containing vcpkg.json
# pkgs: nlohmann-json boost-asio boost-optional boost-utility boost-date-time boost-beast wintoast openssl
triplet: x64-windows-static
triplet: ${{ matrix.arch }}-windows-static
token: ${{ github.token }}
github-binarycache: true
- run: vcpkg integrate install
- run: msbuild LGTVCompanion.sln /p:VcpkgEnableManifest=true
env:
Configuration: ${{ matrix.configuration }}
Platform: ${{ matrix.arch }}
- name: Generate hash
id: hash
shell: bash
run: |
echo "hash${{ matrix.configuration }}=$( sha256sum 'LGTV Companion Setup/bin/${{ matrix.configuration }}/LGTV Companion Setup.msi' | base64 -w0 )" >> "$GITHUB_OUTPUT"
echo "hash${{ matrix.configuration }}_${{ matrix.arch }}=$( sha256sum 'LGTV Companion Setup/bin/${{ matrix.arch }}/${{ matrix.configuration }}/LGTV Companion Setup ${{ matrix.arch }}.msi' | base64 -w0 )" >> "$GITHUB_OUTPUT"
- uses: actions/upload-artifact@v4
with:
name: LGTVCompanion-Output-${{ matrix.configuration }}
path: x64/${{ matrix.configuration }}/
name: LGTVCompanion-Output-${{ matrix.configuration }}-${{ matrix.arch }}
path: ${{ matrix.arch }}/${{ matrix.configuration }}/
- uses: actions/upload-artifact@v4
with:
name: LGTVCompanion-Setup-${{ matrix.configuration }}
path: LGTV Companion Setup/bin/${{ matrix.configuration }}/
name: LGTVCompanion-Setup-${{ matrix.configuration }}-${{ matrix.arch }}
path: LGTV Companion Setup/bin/${{ matrix.arch }}/${{ matrix.configuration }}/
provenance:
needs: [build]
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -51,7 +55,7 @@ jobs:
contents: write # To add assets to a release.
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
with:
base64-subjects: "${{ needs.build.outputs.hashReleaseInstaller }}"
base64-subjects: "${{ needs.build.outputs.x64_hashReleaseInstaller }} ${{ needs.build.outputs.arm64_hashReleaseInstaller }}"
draft-release: false
upload-assets: false # Optional: Upload to a new release
release:
Expand All @@ -61,19 +65,29 @@ jobs:
permissions:
contents: write # To add assets to a release.
steps:
- name: Download Installer
- name: Download x64 Installer
uses: actions/download-artifact@v4
with:
name: LGTVCompanion-Setup-Release
- name: Download Provenance
name: LGTVCompanion-Setup-Release-x64
- name: Download arm64 Installer
uses: actions/download-artifact@v4
with:
name: LGTV Companion Setup.msi.intoto.jsonl
name: LGTVCompanion-Setup-Release-arm64
- name: Download x64 Provenance
uses: actions/download-artifact@v4
with:
name: LGTV Companion Setup x64.msi.intoto.jsonl
- name: Download arm64 Provenance
uses: actions/download-artifact@v4
with:
name: LGTV Companion Setup arm64.msi.intoto.jsonl
- name: Upload assets
uses: softprops/action-gh-release@v2
with:
files: |
LGTV Companion Setup.msi
LGTV Companion Setup.msi.intoto.jsonl
LGTV Companion Setup x64.msi
LGTV Companion Setup arm64.msi
LGTV Companion Setup x64.msi.intoto.jsonl
LGTV Companion Setup arm64.msi.intoto.jsonl
draft: true
generate_release_notes: true
14 changes: 11 additions & 3 deletions Docs/Build how-to.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# BUILD INSTRUCTIONS AND DEPENDENCIES
To build the projects (UI, Service, Daemon) in Visual Studio 2022 please ensure that Vcpkg (https://github.com/microsoft/vcpkg) is installed. Vcpkg is a free library Manager for Windows. You should use Vcpkg in one of two ways:
To build the projects (UI, Service, Daemon, Console and Installer) in Visual Studio 2022 please ensure that [Vcpkg](https://github.com/microsoft/vcpkg) is installed. Vcpkg is a free library Manager for Windows. You should use Vcpkg in one of two ways:

### Manifest
A Vcpkg manifest is included with the source code and the necessary dependencies will be automatically downloaded, configured and installed, if you choose to enable it. To enable the manifest please open the properties for each project in the solution, then
navigate to the vcpkg section and Select "Yes" for "Use Manifest". Do so for both the "Debug" and "Release" project configurations.
navigate to the vcpkg section and Select "Yes" for "Use Manifest". Do so for the "Debug" and "Release" project configurations and X64 and ARM64 Platforms.

### Manual
Alternatively, You can manually install the dependencies, with the following commands:
Expand All @@ -15,6 +15,14 @@ Alternatively, You can manually install the dependencies, with the following com
vcpkg install boost-beast:x64-windows-static
vcpkg install wintoast:x64-windows-static
vcpkg install openssl:x64-windows-static

vcpkg install nlohmann-json:arm64-windows-static
vcpkg install boost-asio:arm64-windows-static
vcpkg install boost-utility:arm64-windows-static
vcpkg install boost-date-time:arm64-windows-static
vcpkg install boost-beast:arm64-windows-static
vcpkg install wintoast:arm64-windows-static
vcpkg install openssl:arm64-windows-static

### Building the setup package
To build the setup package please ensure that the WiX Toolset is installed (https://wixtoolset.org/) and that the WiX Toolset Visual Studio Extension (WiX v3 Visual Studio 2022 Extension) is installed.
To build the setup package please ensure that the [Heatwave](https://www.firegiant.com/docs/heatwave/) for VS2022 extension is installed.

0 comments on commit d8eaf61

Please sign in to comment.