Skip to content

Commit

Permalink
testing build
Browse files Browse the repository at this point in the history
  • Loading branch information
QueenOfSquiggles committed Apr 5, 2024
1 parent 3abe5c7 commit 516f1de
Showing 1 changed file with 52 additions and 45 deletions.
97 changes: 52 additions & 45 deletions build_release.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#! /usr/bin/bash

read -p 'Bundle zip archive as well? y/n :]' do_bundle

echo "Building artifacts for Sqore"

spinner()
Expand Down Expand Up @@ -79,81 +81,86 @@ echo " Done"
##
##

# make folder
echo "Making folders"
mkdir addons
mkdir addons/sqore
mkdir addons/sqore/target
mkdir addons/sqore/target/debug
mkdir addons/sqore/target/release

echo "Copying files over"

# metadata
cp README.md addons/sqore/README.md
cp LICENSE addons/sqore/LICENSE
cp sqore.gdextension addons/sqore/sqore.gdextension

# Stage for zip archive
# Stage for local (using as a git submodule)

# Windows libraries

cp target/x86_64-pc-windows-gnu/debug/sqore.dll \
addons/sqore/target/debug/sqore.dll
target/debug/sqore.dll

cp target/x86_64-pc-windows-gnu/release/sqore.dll \
addons/sqore/target/release/sqore.dll
target/release/sqore.dll

# Linux libraries
cp target/x86_64-unknown-linux-gnu/debug/libsqore.so \
addons/sqore/target/debug/libsqore.so
target/debug/libsqore.so

cp target/x86_64-unknown-linux-gnu/release/libsqore.so \
addons/sqore/target/release/libsqore.so
target/release/libsqore.so

# Mac libraries
cp target/x86_64-apple-darwin/debug/libsqore.dylib \
addons/sqore/target/debug/libsqore.dylib
target/debug/libsqore.dylib

cp target/x86_64-apple-darwin/release/libsqore.dylib \
addons/sqore/target/release/libsqore.dylib
target/release/libsqore.dylib

# Stage for local (using as a git submodule)
if [ "$do_bundle" == 'y' ]; then

# Windows libraries

cp target/x86_64-pc-windows-gnu/debug/sqore.dll \
target/debug/sqore.dll
# make folder
echo "Making folders"
mkdir addons
mkdir addons/sqore
mkdir addons/sqore/target
mkdir addons/sqore/target/debug
mkdir addons/sqore/target/release

cp target/x86_64-pc-windows-gnu/release/sqore.dll \
target/release/sqore.dll
echo "Copying files over"

# Linux libraries
cp target/x86_64-unknown-linux-gnu/debug/libsqore.so \
target/debug/libsqore.so
# metadata
cp README.md addons/sqore/README.md
cp LICENSE addons/sqore/LICENSE
cp sqore.gdextension addons/sqore/sqore.gdextension

cp target/x86_64-unknown-linux-gnu/release/libsqore.so \
target/release/libsqore.so
# Stage for zip archive

# Mac libraries
cp target/x86_64-apple-darwin/debug/libsqore.dylib \
target/debug/libsqore.dylib
# Windows libraries

cp target/x86_64-apple-darwin/release/libsqore.dylib \
target/release/libsqore.dylib
cp target/x86_64-pc-windows-gnu/debug/sqore.dll \
addons/sqore/target/debug/sqore.dll

cp target/x86_64-pc-windows-gnu/release/sqore.dll \
addons/sqore/target/release/sqore.dll

# Linux libraries
cp target/x86_64-unknown-linux-gnu/debug/libsqore.so \
addons/sqore/target/debug/libsqore.so

cp target/x86_64-unknown-linux-gnu/release/libsqore.so \
addons/sqore/target/release/libsqore.so

# Mac libraries
cp target/x86_64-apple-darwin/debug/libsqore.dylib \
addons/sqore/target/debug/libsqore.dylib

cp target/x86_64-apple-darwin/release/libsqore.dylib \
addons/sqore/target/release/libsqore.dylib

echo "Copying folders over"
echo "Copying folders over"
# static files folders
cp -r scenes addons/sqore/scenes/
cp -r assets addons/sqore/assets/
cp -r doc addons/sqore/doc

# static files folders
cp -r scenes addons/sqore/scenes/
cp -r assets addons/sqore/assets/
cp -r doc addons/sqore/doc
echo "Creating zip archive"
zip -r -q sqore_release addons && rm -r addons/
echo "Your archive should be in this directory as 'sqore_release.zip'"
fi

echo "Creating zip archive"
zip -r -q sqore_release addons && rm -r addons/
echo "Done building"

echo "Your archive should be in this directory as 'sqore_release.zip'"



Expand Down

0 comments on commit 516f1de

Please sign in to comment.