including package scripts
This commit is contained in:
parent
264100d81a
commit
b62543188c
|
@ -0,0 +1,28 @@
|
|||
@echo off
|
||||
|
||||
pushd W:\4ed
|
||||
call "misc\build_all.bat" /O2
|
||||
copy build\4ed.exe current_dist\4coder\*
|
||||
copy build\4ed_app.dll current_dist\4coder\*
|
||||
copy data\* current_dist\4coder\*
|
||||
del current_dist\4coder\basic.cpp
|
||||
|
||||
call "misc\build_all.bat" /O2 /DFRED_SUPER
|
||||
copy build\4ed.exe current_dist_super\4coder\*
|
||||
copy build\4ed_app.dll current_dist_super\4coder\*
|
||||
copy code\buildsuper.bat current_dist_super\4coder\*
|
||||
copy data\* current_dist_super\4coder\*
|
||||
del current_dist_super\4coder\basic.cpp
|
||||
copy code\4coder_*.h current_dist_super\4coder\*
|
||||
copy code\4coder_*.cpp current_dist_super\4coder\*
|
||||
copy current_dist\4coder\*.txt current_dist_super\4coder\*
|
||||
copy current_dist\4coder\3rdparty\* current_dist_super\4coder\3rdparty\*
|
||||
del current_dist_super\4coder\*.pdb
|
||||
del current_dist_super\4coder\*.lib
|
||||
del current_dist_super\4coder\*.obj
|
||||
del current_dist_super\4coder\4coder_custom.dll
|
||||
|
||||
del current_dist_power\power\* /F /Q
|
||||
copy code\power\* current_dist_power\power\*
|
||||
|
||||
popd
|
|
@ -0,0 +1,82 @@
|
|||
#!/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.zip"
|
||||
|
||||
mkdir -p "$TMP_DIR"
|
||||
|
||||
pushd "$CODE_DIR"
|
||||
|
||||
make clean
|
||||
make release32
|
||||
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/32"
|
||||
cp ./4ed ./4ed_app.so ./code/4coder_*.h ./code/4coder_*.cpp "$TMP_DIR/32/"
|
||||
|
||||
make clean
|
||||
make release
|
||||
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/64"
|
||||
cp ./4ed ./4ed_app.so ./code/4coder_*.h ./code/4coder_*.cpp "$TMP_DIR/64/"
|
||||
|
||||
make clean
|
||||
|
||||
cat << EOF > "$TMP_DIR/readme.txt"
|
||||
This is a linux 4coder release.
|
||||
Brought to you by Mr4thDimention and insofaras.
|
||||
|
||||
Enjoy!
|
||||
EOF
|
||||
|
||||
pushd "$TMP_DIR/.."
|
||||
zip -r "$OUT_ZIP" "$(basename $TMP_DIR)"
|
||||
popd
|
||||
|
||||
rm -rf "$TMP_DIR"
|
||||
|
||||
popd
|
||||
|
||||
echo "Created linux 4coder package: $OUT_ZIP"
|
||||
|
||||
exit
|
||||
|
||||
## The makefile, copy it into a file called "makefile" one dir above the code/ dir.
|
||||
|
||||
CPP_FILES := $(wildcard *.cpp) $(wildcard **/*.cpp)
|
||||
H_FILES := $(wildcard *.h) $(wildcard **/*.h)
|
||||
WARNINGS := -Wno-write-strings
|
||||
PLAT_LINKS := -L/usr/local/lib -lX11 -lpthread -lm -lrt -lGL -ldl
|
||||
FLAGS := -fPIC -fno-threadsafe-statics -pthread
|
||||
|
||||
all: 4ed_app.so 4ed
|
||||
|
||||
4ed_app.so: $(CPP_FILES) $(H_FILES)
|
||||
g++ $(WARNINGS) $(FLAGS) -std=gnu++0x -shared code/4ed_app_target.cpp -iquoteforeign -o 4ed_app.so
|
||||
|
||||
4ed: $(CPP_FILES) $(H_FILES)
|
||||
g++ $(WARNINGS) $(FLAGS) -std=gnu++0x code/linux_4ed.cpp -iquoteforeign $(PLAT_LINKS) -o $@
|
||||
|
||||
clean:
|
||||
$(RM) -f 4ed_app.so 4ed
|
||||
|
||||
release: FLAGS += -U_FORTIFY_SOURCE -fno-stack-protector -Wl,--wrap=memcpy code/linux_release_compat.c -Wl,-s
|
||||
release: 4ed_app.so 4ed
|
||||
strip -R .comment $^
|
||||
|
||||
release32: FLAGS += -U_FORTIFY_SOURCE -fno-stack-protector -Wl,-s -m32
|
||||
release32: 4ed_app.so 4ed
|
||||
strip -R .comment $^
|
||||
|
||||
.PHONY: clean release release32
|
||||
|
Loading…
Reference in New Issue