linux packaging almost ready
This commit is contained in:
parent
f39bbd880e
commit
369af51feb
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
g++ -Wno-write-strings -std=gnu++0x 4coder_custom.cpp -shared -o 4coder_custom.so -fPIC
|
||||||
|
|
|
@ -1824,8 +1824,24 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (linuxvars.custom){
|
if (linuxvars.custom){
|
||||||
|
linuxvars.custom_api.get_alpha_4coder_version = (_Get_Version_Function*)
|
||||||
|
dlsym(linuxvars.custom, "get_alpha_4coder_version");
|
||||||
|
|
||||||
|
if (linuxvars.custom_api.get_alpha_4coder_version == 0 ||
|
||||||
|
linuxvars.custom_api.get_alpha_4coder_version(MAJOR, MINOR, PATCH) == 0){
|
||||||
|
printf("failed to use 4coder_custom.so: version mismatch\n");
|
||||||
|
}
|
||||||
|
else{
|
||||||
linuxvars.custom_api.get_bindings = (Get_Binding_Data_Function*)
|
linuxvars.custom_api.get_bindings = (Get_Binding_Data_Function*)
|
||||||
dlsym(linuxvars.custom, "get_bindings");
|
dlsym(linuxvars.custom, "get_bindings");
|
||||||
|
|
||||||
|
if (linuxvars.custom_api.get_bindings == 0){
|
||||||
|
printf("failed to use 4coder_custom.so: get_bindings not exported\n");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
printf("successfully loaded 4coder_custom.so\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
64
package.sh
64
package.sh
|
@ -15,8 +15,10 @@
|
||||||
TEMPLATE_DIR="$HOME/Desktop/4coder/release_template/"
|
TEMPLATE_DIR="$HOME/Desktop/4coder/release_template/"
|
||||||
CODE_DIR="$HOME/Desktop/4coder"
|
CODE_DIR="$HOME/Desktop/4coder"
|
||||||
TMP_DIR="/tmp/4coder"
|
TMP_DIR="/tmp/4coder"
|
||||||
OUT_ZIP="$HOME/Desktop/4coder-linux.zip"
|
OUT_ZIP="$HOME/Desktop/4coder-linux-64.zip"
|
||||||
OUT_ZIP_SUPER="$HOME/Desktop/4coder-linux-super.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 "template: $TEMPLATE_DIR"
|
||||||
echo "base: $CODE_DIR"
|
echo "base: $CODE_DIR"
|
||||||
|
@ -25,40 +27,42 @@ echo "out: $OUT_ZIP"
|
||||||
|
|
||||||
rm -rf "$OUT_ZIP"
|
rm -rf "$OUT_ZIP"
|
||||||
rm -rf "$OUT_ZIP_SUPER"
|
rm -rf "$OUT_ZIP_SUPER"
|
||||||
|
rm -rf "$OUT_ZIP_32"
|
||||||
|
rm -rf "$OUT_ZIP_SUPER_32"
|
||||||
|
|
||||||
mkdir -p "$TMP_DIR"
|
mkdir -p "$TMP_DIR"
|
||||||
mkdir -p "$TMP_DIR/alpha"
|
|
||||||
mkdir -p "$TMP_DIR/super"
|
|
||||||
|
|
||||||
cat << EOF > "$TMP_DIR/readme.txt"
|
|
||||||
This is a linux 4coder release.
|
|
||||||
Brought to you by Mr4thDimention and insofaras.
|
|
||||||
|
|
||||||
Enjoy!
|
|
||||||
EOF
|
|
||||||
|
|
||||||
pushd "$CODE_DIR"
|
pushd "$CODE_DIR"
|
||||||
|
|
||||||
echo "Alpha User"
|
echo "Alpha User"
|
||||||
|
|
||||||
|
# ALPHA-32
|
||||||
make clean
|
make clean
|
||||||
make release32
|
make release32
|
||||||
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/alpha/32"
|
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/alpha"
|
||||||
cp ./4ed ./4ed_app.so "$TMP_DIR/alpha/32/"
|
cp ./4ed ./4ed_app.so "$TMP_DIR/alpha/"
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
pushd "$TMP_DIR"
|
||||||
|
zip -r "$OUT_ZIP_32" "$(basename alpha)"
|
||||||
|
popd
|
||||||
|
rm -rf "$TMP_DIR/alpha"
|
||||||
|
|
||||||
|
echo " "
|
||||||
|
|
||||||
|
# ALPHA-64
|
||||||
make clean
|
make clean
|
||||||
make release
|
make release
|
||||||
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/alpha/64"
|
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/alpha"
|
||||||
cp ./4ed ./4ed_app.so "$TMP_DIR/alpha/64/"
|
cp ./4ed ./4ed_app.so "$TMP_DIR/alpha/"
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
cp "$TMP_DIR/readme.txt" "$TMP_DIR/alpha/readme.txt"
|
|
||||||
pushd "$TMP_DIR"
|
pushd "$TMP_DIR"
|
||||||
zip -r "$OUT_ZIP" "$(basename alpha)"
|
zip -r "$OUT_ZIP" "$(basename alpha)"
|
||||||
popd
|
popd
|
||||||
|
rm -rf "$TMP_DIR/alpha"
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
@ -66,24 +70,34 @@ echo " "
|
||||||
|
|
||||||
echo "Super User"
|
echo "Super User"
|
||||||
|
|
||||||
|
# SUPER-32
|
||||||
make clean
|
make clean
|
||||||
make release32
|
make release32_super
|
||||||
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/super/32"
|
cp ./4ed ./4ed_app.so ./code/4coder_*.h ./code/4coder_*.cpp "$TMP_DIR/super/"
|
||||||
cp ./4ed ./4ed_app.so ./code/4coder_*.h ./code/4coder_*.cpp "$TMP_DIR/super/32/"
|
cp ./code/buildsuper.sh "$TMP_DIR/super/"
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
make clean
|
pushd "$TMP_DIR"
|
||||||
make release
|
zip -r "$OUT_ZIP_SUPER_32" "$(basename super)"
|
||||||
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/super/64"
|
popd
|
||||||
cp ./4ed ./4ed_app.so ./code/4coder_*.h ./code/4coder_*.cpp "$TMP_DIR/super/64/"
|
rm -rf "$TMP_DIR/super"
|
||||||
|
|
||||||
|
echo " "
|
||||||
|
|
||||||
|
# SUPER-64
|
||||||
|
make clean
|
||||||
|
make release_super
|
||||||
|
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/"
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
cp "$TMP_DIR/readme.txt" "$TMP_DIR/super/readme.txt"
|
|
||||||
pushd "$TMP_DIR"
|
pushd "$TMP_DIR"
|
||||||
zip -r "$OUT_ZIP_SUPER" "$(basename super)"
|
zip -r "$OUT_ZIP_SUPER" "$(basename super)"
|
||||||
popd
|
popd
|
||||||
|
rm -rf "$TMP_DIR/super"
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
@ -95,7 +109,7 @@ rm -rf "$TMP_DIR"
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
echo "Created linux 4coder package: $OUT_ZIP"
|
echo "Created linux 4coder packages"
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue