Skip to content

Commit

Permalink
Packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
CombinE88 committed Oct 24, 2018
1 parent 57f407a commit a268e59
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 18 deletions.
Binary file added mods/mw/bits/Trees/Anim/tree1anim.tem
Binary file not shown.
Binary file added mods/mw/bits/Trees/Anim/tree1shop.tem
Binary file not shown.
Binary file added mods/mw/bits/Trees/Anim/tree2anim.tem
Binary file not shown.
Binary file added mods/mw/bits/Trees/Anim/tree2shop.tem
Binary file not shown.
Binary file added mods/mw/bits/Trees/Anim/tree3anim.tem
Binary file not shown.
Binary file added mods/mw/bits/Trees/Anim/tree3shop.tem
Binary file not shown.
Binary file added mods/mw/bits/Trees/Anim/tree4anim.tem
Binary file not shown.
Binary file added mods/mw/bits/Trees/Anim/tree4shop.tem
Binary file not shown.
Binary file removed mods/mw/bits/Trees/tree1a.tem
Binary file not shown.
Binary file removed mods/mw/bits/Trees/tree1fell.tem
Binary file not shown.
4 changes: 4 additions & 0 deletions packaging/linux/Eluant.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap os="linux" dll="lua51.dll" target="./liblua.so" />
</configuration>
4 changes: 4 additions & 0 deletions packaging/linux/OpenAL-CS.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap os="linux" dll="soft_oal.dll" target="./libopenal.so"/>
</configuration>
4 changes: 4 additions & 0 deletions packaging/linux/SDL2-CS.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap os="linux" dll="SDL2.dll" target="./libSDL2.so" />
</configuration>
14 changes: 9 additions & 5 deletions packaging/linux/buildpackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
command -v make >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires make."; exit 1; }
command -v python >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires python."; exit 1; }
command -v tar >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires tar."; exit 1; }
command -v curl >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires curl."; exit 1; }
command -v curl >/dev/null 2>&1 || command -v wget > /dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires curl or wget."; exit 1; }

require_variables() {
missing=""
Expand Down Expand Up @@ -70,7 +70,7 @@ MOD_VERSION=$(grep 'Version:' mods/${MOD_ID}/mod.yaml | awk '{print $2}')

if [ "${PACKAGING_OVERWRITE_MOD_VERSION}" == "True" ]; then
make version VERSION="${TAG}"
else
else
echo "Mod version ${MOD_VERSION} will remain unchanged.";
fi

Expand All @@ -90,10 +90,14 @@ popd > /dev/null

# Add native libraries
echo "Downloading dependencies"
curl -s -L -o "${PACKAGING_APPIMAGE_DEPENDENCIES_TEMP_ARCHIVE_NAME}" -O "${PACKAGING_APPIMAGE_DEPENDENCIES_SOURCE}" || exit 3
if command -v curl >/dev/null 2>&1; then
curl -s -L -o "${PACKAGING_APPIMAGE_DEPENDENCIES_TEMP_ARCHIVE_NAME}" -O "${PACKAGING_APPIMAGE_DEPENDENCIES_SOURCE}" || exit 3
curl -s -L -O https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage || exit 3
else
wget -cq "${PACKAGING_APPIMAGE_DEPENDENCIES_SOURCE}" -O "${PACKAGING_APPIMAGE_DEPENDENCIES_TEMP_ARCHIVE_NAME}" || exit 3
wget -cq https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage || exit 3
fi
tar xf "${PACKAGING_APPIMAGE_DEPENDENCIES_TEMP_ARCHIVE_NAME}"

curl -s -L -O https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod a+x appimagetool-x86_64.AppImage

echo "Building AppImage"
Expand Down
5 changes: 3 additions & 2 deletions packaging/linux/include/AppRun.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
MINIMUM_MONO_VERSION="4.2"

prompt_apt_install_mono_complete() {
command -v mono >/dev/null 2>&1 && return 1
command -v mono >/dev/null 2>&1 && command -v cert-sync >/dev/null 2>&1 && return 1
command -v apt-cache > /dev/null || return 1
command -v xdg-mime > /dev/null || return 1
command -v xdg-open > /dev/null || return 1
Expand All @@ -19,6 +19,7 @@ make_version() {

mono_missing_or_old() {
command -v mono >/dev/null 2>&1 || return 0
command -v cert-sync >/dev/null 2>&1 || return 0
MONO_VERSION=$(mono --version | head -n1 | cut -d' ' -f5)
[ "$(make_version "${MONO_VERSION}")" -lt "$(make_version "${MINIMUM_MONO_VERSION}")" ] && return 0
return 1
Expand All @@ -43,7 +44,7 @@ if prompt_apt_install_mono_complete; then
fi

if mono_missing_or_old; then
ERROR_MESSAGE="{MODNAME} requires Mono ${MINIMUM_MONO_VERSION} or greater.\nPlease install Mono using your system package manager."
ERROR_MESSAGE="{MODNAME} requires Mono ${MINIMUM_MONO_VERSION} or greater and the cert-sync utility.\nPlease install Mono using your system package manager."
if command -v zenity > /dev/null; then
zenity --no-wrap --error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
elif command -v kdialog > /dev/null; then
Expand Down
11 changes: 8 additions & 3 deletions packaging/osx/buildpackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

command -v make >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires make."; exit 1; }
command -v python >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires python."; exit 1; }
command -v curl >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires curl."; exit 1; }
command -v curl >/dev/null 2>&1 || command -v wget > /dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires curl or wget."; exit 1; }

require_variables() {
missing=""
Expand Down Expand Up @@ -56,7 +56,12 @@ modify_plist() {
}

echo "Building launcher"
curl -s -L -o "${PACKAGING_OSX_LAUNCHER_TEMP_ARCHIVE_NAME}" -O "${PACKAGING_OSX_LAUNCHER_SOURCE}" || exit 3

if command -v curl >/dev/null 2>&1; then
curl -s -L -o "${PACKAGING_OSX_LAUNCHER_TEMP_ARCHIVE_NAME}" -O "${PACKAGING_OSX_LAUNCHER_SOURCE}" || exit 3
else
wget -cq "${PACKAGING_OSX_LAUNCHER_SOURCE}" -O "${PACKAGING_OSX_LAUNCHER_TEMP_ARCHIVE_NAME}" || exit 3
fi

unzip -qq -d "${BUILTDIR}" "${PACKAGING_OSX_LAUNCHER_TEMP_ARCHIVE_NAME}"
rm "${PACKAGING_OSX_LAUNCHER_TEMP_ARCHIVE_NAME}"
Expand All @@ -82,7 +87,7 @@ MOD_VERSION=$(grep 'Version:' mods/${MOD_ID}/mod.yaml | awk '{print $2}')

if [ "${PACKAGING_OVERWRITE_MOD_VERSION}" == "True" ]; then
make version VERSION="${TAG}"
else
else
echo "Mod version ${MOD_VERSION} will remain unchanged.";
fi

Expand Down
2 changes: 1 addition & 1 deletion packaging/package-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fi

command -v python >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires python."; exit 1; }
command -v make >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires make."; exit 1; }
command -v curl >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires curl."; exit 1; }
command -v curl >/dev/null 2>&1 || command -v wget > /dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires curl or wget."; exit 1; }
command -v makensis >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires makensis."; exit 1; }

PACKAGING_DIR=$(python -c "import os; print(os.path.dirname(os.path.realpath('$0')))")
Expand Down
12 changes: 5 additions & 7 deletions packaging/windows/buildpackage.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash
set -e

command -v curl >/dev/null 2>&1 || { echo >&2 "Windows packaging requires curl."; exit 1; }
command -v makensis >/dev/null 2>&1 || { echo >&2 "Windows packaging requires makensis."; exit 1; }

require_variables() {
Expand Down Expand Up @@ -68,8 +66,8 @@ fi
MOD_VERSION=$(grep 'Version:' mods/${MOD_ID}/mod.yaml | awk '{print $2}')

if [ "${PACKAGING_OVERWRITE_MOD_VERSION}" == "True" ]; then
make version VERSION="${TAG}"
else
make version VERSION="${TAG}"
else
echo "Mod version ${MOD_VERSION} will remain unchanged.";
fi

Expand All @@ -81,8 +79,8 @@ make install-engine gameinstalldir="" DESTDIR="${BUILTDIR}"
make install-common-mod-files gameinstalldir="" DESTDIR="${BUILTDIR}"

for f in ${PACKAGING_COPY_ENGINE_FILES}; do
mkdir -p "${BUILTDIR}/$(dirname "${f}")"
cp -r "${f}" "${BUILTDIR}/${f}"
mkdir -p "${BUILTDIR}/$(dirname "${f}")"
cp -r "${f}" "${BUILTDIR}/${f}"
done

popd > /dev/null
Expand Down Expand Up @@ -114,7 +112,7 @@ popd > /dev/null
echo "Packaging zip archive"
pushd "${BUILTDIR}" > /dev/null
find "${SRC_DIR}/thirdparty/download/windows/" -name '*.dll' -exec cp '{}' '.' ';'
zip "${PACKAGING_INSTALLER_NAME}-${TAG}-winportable" -r -9 * --quiet
zip "${PACKAGING_INSTALLER_NAME}-${TAG}-winportable.zip" -r -9 * --quiet
mv "${PACKAGING_INSTALLER_NAME}-${TAG}-winportable.zip" "${OUTPUTDIR}"
popd > /dev/null

Expand Down

0 comments on commit a268e59

Please sign in to comment.