-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tells playit program to use platform specific config path by default unless a local playit.toml file is present * Use config path and add wix to build msi * Move Directory def * wix: Try fixes * wix: register key for app data folder * wix: set product id and ref component * wix: add start menu shortcut * wix: fix path name for shortcut * wix: fix shortcut? * github actions: add wix builder for windows * Fix install command * github actions: fix windows msi asset path
- Loading branch information
1 parent
81988b8
commit f1a0d5c
Showing
11 changed files
with
421 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,16 +38,6 @@ jobs: | |
apt_install: gcc-arm-linux-gnueabihf | ||
artifact: playit-linux-armv7 | ||
|
||
- name: windows 32bit | ||
os: windows-latest | ||
arch: i686-pc-windows-msvc | ||
artifact: playit-windows-i686.exe | ||
|
||
- name: windows 64bit | ||
os: windows-latest | ||
arch: x86_64-pc-windows-msvc | ||
artifact: playit-windows-amd64.exe | ||
|
||
runs-on: ${{ matrix.platform.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -72,24 +62,71 @@ jobs: | |
command: build | ||
args: --target ${{ matrix.platform.arch }} --release --all | ||
|
||
- name: Upload Binary | ||
if: matrix.platform.os != 'windows-latest' | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ./target/${{ matrix.platform.arch }}/release/playit-cli | ||
asset_name: ${{ matrix.platform.artifact }} | ||
asset_content_type: application/octet-stream | ||
windows_build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- name: windows 32bit | ||
os: windows-latest | ||
arch: i686-pc-windows-msvc | ||
artifact: playit-windows-x86 | ||
arch_code: x86 | ||
- name: windows 64bit | ||
os: windows-latest | ||
arch: x86_64-pc-windows-msvc | ||
artifact: playit-windows-x86_64 | ||
arch_code: x86_64 | ||
runs-on: ${{ matrix.platform.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get release | ||
id: get_release | ||
uses: bruceadams/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- name: Setup MSBuild | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: Set path for candle and light | ||
run: echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" >> $GITHUB_PATH | ||
shell: bash | ||
|
||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: ${{ matrix.platform.arch }} | ||
|
||
- run: cargo install cargo-wix | ||
- run: cargo wix --target ${{ matrix.platform.arch }} --package playit-cli --nocapture | ||
|
||
- name: Upload .exe | ||
if: matrix.platform.os == 'windows-latest' | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ./target/${{ matrix.platform.arch }}/release/playit-cli.exe | ||
asset_name: ${{ matrix.platform.artifact }} | ||
asset_name: ${{ matrix.platform.artifact }}.exe | ||
asset_content_type: application/octet-stream | ||
|
||
- name: Upload Binary | ||
if: matrix.platform.os != 'windows-latest' | ||
- name: Upload .msi | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ./target/${{ matrix.platform.arch }}/release/playit-cli | ||
asset_name: ${{ matrix.platform.artifact }} | ||
asset_path: ./target/wix/playit-cli-*-${{ matrix.platform.arch_code }}.msi | ||
asset_name: ${{ matrix.platform.artifact }}.msi | ||
asset_content_type: application/octet-stream |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#[cfg(windows)] | ||
fn main() { | ||
let mut res = winres::WindowsResource::new(); | ||
res.set_icon("wix/Product.ico"); | ||
res.compile().unwrap(); | ||
} | ||
|
||
#[cfg(not(windows))] | ||
fn main() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Oops, something went wrong.