-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·44 lines (34 loc) · 1.51 KB
/
build.sh
File metadata and controls
executable file
·44 lines (34 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# This script builds the love files, and the windows exe for the game
# pass "local" if you want just a local build, and "just-love" if you want just the love files
# pass "discard-love" for the second argument if you want to delete the love files
#
# Your panel-attack repository needs to have a directory in the directory above the repo named "love-12.0-win64"
# That directory is expected to contain the contents of the unzipped 32-bit windows version of love downloaded from the love2d mainpage
shopt -s extglob
build_dir="../dev-build/"
win_files_dir="../love-12.0-win64/"
# Cleanup the build dir
rm -Rf "${build_dir}"
mkdir "${build_dir}"
echo "Building... Results can be found at ${build_dir}"
echo "Generating panel attack love file"
# We are explicitly specifying which files are included. Make sure to add specific files in alphabetical order.
zip -r --quiet "${build_dir}panel-attack.love" conf.lua main.lua COPYING COPYING-ASSETS THANKS.md docs client common -x ".*" \*__MACOSX* \*\.DS_Store client/tests/**\* common/tests/**\*
if [ -n "$1" ] && [ $1 == "local" ]
then
echo "Generating Custom Build EXE"
loveFile="${build_dir}panel-attack.love"
fi
if [ -z "$1" ] || [ $1 != "just-love" ]
then
cp -R "${win_files_dir}." "${build_dir}"
cat "${build_dir}love.exe" $loveFile > "${build_dir}panel.exe"
rm "${build_dir}love.exe"
rm "${build_dir}lovec.exe"
fi
if [ -n "$2" ] && [ $2 == "discard-love" ]
then
echo "Removing panel attack love from build directory"
rm "${build_dir}panel-attack.love"
fi