-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Grégoire Henry
committed
Dec 14, 2023
1 parent
c7cec78
commit abd9085
Showing
5 changed files
with
72 additions
and
73 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
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,7 @@ | ||
#!/bin/bash | ||
|
||
echo "Build main executable." | ||
cargo build -r --all-features && strip target/release/kalast | ||
|
||
echo "Build custom executable for specific example." | ||
cargo build -r --all-features --example viewer-picker && strip target/release/examples/viewer-picker |
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,26 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p bundle | ||
cp -r examples bundle | ||
cp target/release/kalast$EXT bundle | ||
cp target/release/examples/viewer-picker$EXT bundle/examples/viewer-picker | ||
cp include/kalast.ico bundle | ||
cp -r include/assets bundle | ||
cp preferences.yaml bundle | ||
cp README.md bundle | ||
|
||
if [ ${{ matrix.os }} == "windows-latest" ]; then | ||
cp include/windows/* bundle | ||
fi | ||
|
||
cd bundle | ||
cp -r examples/viewer/cfg . | ||
|
||
cd .. | ||
mv bundle $BUNDLE_NAME | ||
|
||
if [ ${{ matrix.os }} == "windows-latest" ]; then | ||
iscc compile/installer.iss /DVERSION=${{ github.ref_name }} /DSETUP_NAME=${{ env.RELEASE_FILE }} /DBUNDLE_PATH=.\bundle /DASSETS_PATH=.\assets | ||
else | ||
tar cvzf $RELEASE_FILE $BUNDLE_NAME | ||
fi |
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,26 @@ | ||
#!/bin/bash | ||
|
||
if [ ${{ matrix.os }} == "ubuntu-latest" ]; then | ||
echo "PLATFORM=ubuntu" >> "$GITHUB_ENV" | ||
elif [ ${{ matrix.os }} == "macos-latest" ]; then | ||
echo "PLATFORM=macos-x86_64" >> "$GITHUB_ENV" | ||
elif [ ${{ matrix.os }} == "windows-latest" ]; then | ||
echo "PLATFORM=windows" >> "$GITHUB_ENV" | ||
fi | ||
|
||
if [ ${{ matrix.os }} == "windows-latest" ]; then | ||
echo "EXT=.exe" >> "$GITHUB_ENV" | ||
echo "OUT_EXT=.exe" >> "$GITHUB_ENV" | ||
else | ||
echo "EXT=" >> "$GITHUB_ENV" | ||
echo "OUT_EXT=.tar.gz" >> "$GITHUB_ENV" | ||
fi | ||
|
||
echo "BUNDLE_NAME=kalast-$GITHUB_REF_NAME-$PLATFORM" >> "$GITHUB_ENV" | ||
echo "RELEASE_FILE=$BUNDLE_NAME$OUT_EXT" >> "$GITHUB_ENV" | ||
|
||
echo $PLATFORM | ||
echo $EXT | ||
echo $OUT_EXT | ||
echo $BUNDLE_NAME | ||
echo $RELEASE_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
if [ ${{ matrix.os }} == "ubuntu-latest" ]; then | ||
sudo apt install -y libsdl2-dev | ||
elif [ ${{ matrix.os }} == "macos-latest" ]; then | ||
brew install SDL2 | ||
elif [ ${{ matrix.os }} == "windows-latest" ]; then | ||
cp include/windows/* . | ||
fi |