133 lines
2.4 KiB
Bash
Executable File
133 lines
2.4 KiB
Bash
Executable File
#!/bin/bash
|
|
#!/bin/sh
|
|
# Linux packaging script by insofaras
|
|
#
|
|
# Usage:
|
|
#
|
|
# * Put all the .txt, .ttf, etc stuff in TEMPLATE_DIR and it'll get copied over
|
|
# (including the 3rd party folder)
|
|
#
|
|
# * Put the makefile (included at the end of this file) in the dir above 4coder/code
|
|
#
|
|
# * Change the other dir variables as appropriate
|
|
#
|
|
|
|
TEMPLATE_DIR="$HOME/Desktop/4coder/release_template/"
|
|
CODE_DIR="$HOME/Desktop/4coder"
|
|
TMP_DIR="/tmp/4coder"
|
|
OUT_ZIP="$HOME/Desktop/4coder-linux-64.zip"
|
|
OUT_ZIP_32="$HOME/Desktop/4coder-linux-32.zip"
|
|
OUT_ZIP_SUPER="$HOME/Desktop/4coder-linux-super-64.zip"
|
|
OUT_ZIP_SUPER_32="$HOME/Desktop/4coder-linux-super-32.zip"
|
|
|
|
echo "template: $TEMPLATE_DIR"
|
|
echo "base: $CODE_DIR"
|
|
echo "temp: $TMP_DIR"
|
|
echo "out: $OUT_ZIP"
|
|
|
|
rm -rf "$OUT_ZIP"
|
|
rm -rf "$OUT_ZIP_SUPER"
|
|
rm -rf "$OUT_ZIP_32"
|
|
rm -rf "$OUT_ZIP_SUPER_32"
|
|
|
|
mkdir -p "$TMP_DIR"
|
|
|
|
pushd "$CODE_DIR"
|
|
|
|
echo "Alpha User"
|
|
|
|
# ALPHA-32
|
|
pushd "$CODE_DIR/code"
|
|
make clean
|
|
make release32
|
|
popd
|
|
|
|
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/alpha"
|
|
cp ./4ed ./4ed_app.so "$TMP_DIR/alpha/"
|
|
cp ./code/README.txt ./code/TODO.txt "$TMP_DIR/alpha/"
|
|
|
|
echo " "
|
|
|
|
pushd "$TMP_DIR"
|
|
zip -r "$OUT_ZIP_32" "$(basename alpha)"
|
|
popd
|
|
rm -rf "$TMP_DIR/alpha"
|
|
|
|
echo " "
|
|
|
|
# ALPHA-64
|
|
pushd "$CODE_DIR/code"
|
|
make clean
|
|
make release
|
|
popd
|
|
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/alpha"
|
|
cp ./4ed ./4ed_app.so "$TMP_DIR/alpha/"
|
|
cp ./code/README.txt ./code/TODO.txt "$TMP_DIR/alpha/"
|
|
|
|
echo " "
|
|
|
|
pushd "$TMP_DIR"
|
|
zip -r "$OUT_ZIP" "$(basename alpha)"
|
|
popd
|
|
rm -rf "$TMP_DIR/alpha"
|
|
|
|
echo " "
|
|
|
|
|
|
|
|
echo "Super User"
|
|
|
|
# SUPER-32
|
|
pushd "$CODE_DIR/code"
|
|
make clean
|
|
make release32_super
|
|
popd
|
|
|
|
cp ./4ed ./4ed_app.so ./code/4coder_*.h ./code/4coder_*.cpp "$TMP_DIR/super/"
|
|
cp ./code/buildsuper.sh "$TMP_DIR/super/"
|
|
cp ./code/README.txt ./code/SUPERREADME.txt ./code/TODO.txt "$TMP_DIR/super/"
|
|
cp ./code/*.html "$TMP_DIR/super/"
|
|
|
|
echo " "
|
|
|
|
pushd "$TMP_DIR"
|
|
zip -r "$OUT_ZIP_SUPER_32" "$(basename super)"
|
|
popd
|
|
rm -rf "$TMP_DIR/super"
|
|
|
|
echo " "
|
|
|
|
# SUPER-64
|
|
pushd "$CODE_DIR/code"
|
|
make clean
|
|
make release_super
|
|
popd
|
|
|
|
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/super/"
|
|
cp ./4ed ./4ed_app.so ./code/4coder_*.h ./code/4coder_*.cpp "$TMP_DIR/super/"
|
|
cp ./code/buildsuper.sh "$TMP_DIR/super/"
|
|
cp ./code/README.txt ./code/SUPERREADME.txt ./code/TODO.txt "$TMP_DIR/super/"
|
|
cp ./code/*.html "$TMP_DIR/super/"
|
|
|
|
echo " "
|
|
|
|
pushd "$TMP_DIR"
|
|
zip -r "$OUT_ZIP_SUPER" "$(basename super)"
|
|
popd
|
|
rm -rf "$TMP_DIR/super"
|
|
|
|
echo " "
|
|
|
|
|
|
|
|
make clean
|
|
|
|
rm -rf "$TMP_DIR"
|
|
|
|
popd
|
|
|
|
echo "Created linux 4coder packages"
|
|
|
|
exit
|
|
|