forked from counter185/voidsprite
-
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
buj
committed
Sep 15, 2024
1 parent
dc145a4
commit 60813df
Showing
6 changed files
with
42 additions
and
11 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
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
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 |
---|---|---|
@@ -1,6 +1,12 @@ | ||
#!/usr/bin/env sh | ||
|
||
D="$(dirname "$0")" | ||
SOURCE=${BASH_SOURCE[0]} | ||
while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | ||
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd ) | ||
SOURCE=$(readlink "$SOURCE") | ||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located | ||
done | ||
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd ) | ||
|
||
LD_LIBRARY_PATH="$D/lib:$LD_LIBRARY_PATH" exec -a voidsprite "$D/__freesprite" $@ | ||
LD_LIBRARY_PATH="$DIR/lib:$LD_LIBRARY_PATH" exec -a voidsprite "$DIR/__freesprite" $@ | ||
|
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 |
---|---|---|
@@ -1,9 +1,33 @@ | ||
set -e | ||
|
||
SOURCE=${BASH_SOURCE[0]} | ||
while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | ||
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd ) | ||
SOURCE=$(readlink "$SOURCE") | ||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located | ||
done | ||
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd ) | ||
|
||
echo ':: building imagecdylib ::' | ||
|
||
cd ../freesprite/imagecdylib | ||
cargo build --release | ||
cd "$DIR" | ||
|
||
echo ':: building voidsprite ::' | ||
|
||
cmake -G Ninja | ||
ninja | ||
mkdir -p dist | ||
cp -r lib dist/ | ||
|
||
echo ':: packaging ::' | ||
|
||
mkdir -p dist/lib/ | ||
|
||
cp ../freesprite/imagecdylib/target/release/lib* dist/lib/ | ||
|
||
find ../freesprite \( -name "*.ico" -o -name "*.ttf" \) -exec cp {} dist/ \; | ||
cp -r ../freesprite/assets/ dist/ | ||
cp freesprite dist/__freesprite | ||
cp _voidsprite.sh dist/voidsprite | ||
|
||
echo ':: done ::' |