Merge pull request #13215 from pchote/packaging-simplification
Overhaul packaging scripts
This commit is contained in:
25
Makefile
25
Makefile
@@ -276,8 +276,6 @@ default: core
|
|||||||
|
|
||||||
core: dependencies game platforms mods utility server
|
core: dependencies game platforms mods utility server
|
||||||
|
|
||||||
package: all-dependencies core docs version
|
|
||||||
|
|
||||||
mods: mod_common mod_cnc mod_d2k
|
mods: mod_common mod_cnc mod_d2k
|
||||||
|
|
||||||
all: dependencies core
|
all: dependencies core
|
||||||
@@ -294,24 +292,26 @@ cli-dependencies:
|
|||||||
@ $(CP_R) thirdparty/download/*.dll .
|
@ $(CP_R) thirdparty/download/*.dll .
|
||||||
@ $(CP_R) thirdparty/download/*.dll.config .
|
@ $(CP_R) thirdparty/download/*.dll.config .
|
||||||
|
|
||||||
linux-dependencies: cli-dependencies linux-native-dependencies
|
linux-dependencies: cli-dependencies geoip-dependencies linux-native-dependencies
|
||||||
|
|
||||||
linux-native-dependencies:
|
linux-native-dependencies:
|
||||||
@./thirdparty/configure-native-deps.sh
|
@./thirdparty/configure-native-deps.sh
|
||||||
|
|
||||||
windows-dependencies:
|
windows-dependencies: cli-dependencies geoip-dependencies
|
||||||
@./thirdparty/fetch-thirdparty-deps-windows.sh
|
@./thirdparty/fetch-thirdparty-deps-windows.sh
|
||||||
|
|
||||||
osx-dependencies: cli-dependencies
|
osx-dependencies: cli-dependencies geoip-dependencies
|
||||||
@./thirdparty/fetch-thirdparty-deps-osx.sh
|
@./thirdparty/fetch-thirdparty-deps-osx.sh
|
||||||
@ $(CP_R) thirdparty/download/osx/*.dylib .
|
@ $(CP_R) thirdparty/download/osx/*.dylib .
|
||||||
@ $(CP_R) thirdparty/download/osx/*.dll.config .
|
@ $(CP_R) thirdparty/download/osx/*.dll.config .
|
||||||
|
|
||||||
dependencies: $(os-dependencies)
|
geoip-dependencies:
|
||||||
@./thirdparty/fetch-geoip-db.sh
|
@./thirdparty/fetch-geoip-db.sh
|
||||||
@ $(CP) thirdparty/download/GeoLite2-Country.mmdb.gz .
|
@ $(CP) thirdparty/download/GeoLite2-Country.mmdb.gz .
|
||||||
|
|
||||||
all-dependencies: cli-dependencies windows-dependencies osx-dependencies
|
dependencies: $(os-dependencies)
|
||||||
|
|
||||||
|
all-dependencies: cli-dependencies windows-dependencies osx-dependencies geoip-dependencies
|
||||||
|
|
||||||
version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modcontent/mod.yaml mods/all/mod.yaml
|
version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modcontent/mod.yaml mods/all/mod.yaml
|
||||||
@for i in $? ; do \
|
@for i in $? ; do \
|
||||||
@@ -320,18 +320,14 @@ version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml m
|
|||||||
rm $${i}.tmp; \
|
rm $${i}.tmp; \
|
||||||
done
|
done
|
||||||
|
|
||||||
docs: utility mods version
|
|
||||||
@mono --debug OpenRA.Utility.exe all --docs > DOCUMENTATION.md
|
|
||||||
@mono --debug OpenRA.Utility.exe all --lua-docs > Lua-API.md
|
|
||||||
|
|
||||||
man-page: utility mods
|
man-page: utility mods
|
||||||
@mono --debug OpenRA.Utility.exe all --man-page > openra.6
|
@mono --debug OpenRA.Utility.exe all --man-page > openra.6
|
||||||
|
|
||||||
install: install-core
|
install: default install-core
|
||||||
|
|
||||||
install-linux-shortcuts: install-linux-scripts install-linux-icons install-linux-desktop
|
install-linux-shortcuts: install-linux-scripts install-linux-icons install-linux-desktop
|
||||||
|
|
||||||
install-core: default
|
install-core:
|
||||||
@-echo "Installing OpenRA to $(DATA_INSTALL_DIR)"
|
@-echo "Installing OpenRA to $(DATA_INSTALL_DIR)"
|
||||||
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
|
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
|
||||||
@$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)"
|
@$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)"
|
||||||
@@ -362,10 +358,7 @@ install-core: default
|
|||||||
@$(INSTALL_PROGRAM) Open.Nat.dll "$(DATA_INSTALL_DIR)"
|
@$(INSTALL_PROGRAM) Open.Nat.dll "$(DATA_INSTALL_DIR)"
|
||||||
@$(INSTALL_PROGRAM) MaxMind.Db.dll "$(DATA_INSTALL_DIR)"
|
@$(INSTALL_PROGRAM) MaxMind.Db.dll "$(DATA_INSTALL_DIR)"
|
||||||
@$(INSTALL_PROGRAM) SmarIrc4net.dll "$(DATA_INSTALL_DIR)"
|
@$(INSTALL_PROGRAM) SmarIrc4net.dll "$(DATA_INSTALL_DIR)"
|
||||||
|
|
||||||
ifneq ($(UNAME_S),Darwin)
|
|
||||||
@$(CP) *.sh "$(DATA_INSTALL_DIR)"
|
@$(CP) *.sh "$(DATA_INSTALL_DIR)"
|
||||||
endif
|
|
||||||
|
|
||||||
install-linux-icons:
|
install-linux-icons:
|
||||||
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/icons/"
|
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/icons/"
|
||||||
|
|||||||
@@ -1,76 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
ARGS=1
|
|
||||||
E_BADARGS=85
|
|
||||||
|
|
||||||
if [ $# -ne "$ARGS" ]; then
|
|
||||||
echo "Usage: `basename $0` tag"
|
|
||||||
exit $E_BADARGS
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg () {
|
|
||||||
echo -ne $1
|
|
||||||
echo $2
|
|
||||||
echo -ne "\E[0m"
|
|
||||||
}
|
|
||||||
|
|
||||||
TAG=$1
|
|
||||||
VERSION=`echo $TAG | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
|
||||||
|
|
||||||
_gitroot="git://github.com/OpenRA/OpenRA.git"
|
|
||||||
_gitname="OpenRA"
|
|
||||||
|
|
||||||
if [ -z $VERSION ]; then
|
|
||||||
msg "\E[31m" "Malformed tag $TAG"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d ~/openra-package/ ]; then
|
|
||||||
mkdir ~/openra-package/
|
|
||||||
fi
|
|
||||||
pushd ~/openra-package/ &> /dev/null
|
|
||||||
|
|
||||||
msg "\E[32m" "Connecting to GIT server...."
|
|
||||||
|
|
||||||
if [ -d $_gitname ] ; then
|
|
||||||
pushd $_gitname &> /dev/null && git pull origin
|
|
||||||
msg "\E[32m" "The local files are updated."
|
|
||||||
popd &> /dev/null # $_gitname
|
|
||||||
else
|
|
||||||
git clone $_gitroot $_gitname
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg "\E[32m" "GIT checkout done or server timeout"
|
|
||||||
|
|
||||||
rm -rf "$_gitname-build"
|
|
||||||
git clone "$_gitname" "$_gitname-build"
|
|
||||||
pushd "$_gitname-build" &> /dev/null
|
|
||||||
|
|
||||||
msg "\E[32m" "Checking out $TAG"
|
|
||||||
git checkout $TAG &> /dev/null
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
msg "\E[31m" "Checkout of $TAG failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
pushd packaging &> /dev/null
|
|
||||||
|
|
||||||
if [ ! -d ~/openra-package/packages/ ] ; then
|
|
||||||
mkdir ~/openra-package/packages/
|
|
||||||
fi
|
|
||||||
|
|
||||||
./package-all.sh $TAG ~/openra-package/packages/
|
|
||||||
|
|
||||||
echo "Downloading source code packages from GitHub..."
|
|
||||||
curl -s -L -o "$HOME/openra-package/packages/$TAG.tar.gz" "https://github.com/OpenRA/OpenRA/archive/$TAG.tar.gz"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Source code package download failed."
|
|
||||||
fi
|
|
||||||
|
|
||||||
./upload-all.sh $TAG ~/openra-package/packages
|
|
||||||
|
|
||||||
./update-wiki.sh
|
|
||||||
|
|
||||||
popd &> /dev/null # packaging
|
|
||||||
popd &> /dev/null # $_gitname-build
|
|
||||||
popd &> /dev/null # ~/openra-package/
|
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
rm -rf packaging/linux/root
|
|
||||||
rm -rf packaging/built
|
|
||||||
rm packaging/linux/package.log
|
|
||||||
rm packaging/linux/deb/package.log
|
|
||||||
rm packaging/linux/rpm/package.log
|
|
||||||
rm packaging/linux/pkgbuild/package.log
|
|
||||||
rm packaging/osx/package.log
|
|
||||||
rm packaging/windows/package.log
|
|
||||||
@@ -1,41 +1,60 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# OpenRA packaging master script for linux packages
|
# OpenRA packaging master script for linux packages
|
||||||
|
|
||||||
if [ $# -ne "3" ]; then
|
command -v curl >/dev/null 2>&1 || { echo >&2 "Linux packaging requires curl."; exit 1; }
|
||||||
echo "Usage: `basename $0` tag files-dir outputdir"
|
command -v markdown >/dev/null 2>&1 || { echo >&2 "Linux packaging requires markdown."; exit 1; }
|
||||||
|
|
||||||
|
if [ $# -ne "2" ]; then
|
||||||
|
echo "Usage: `basename $0` tag outputdir"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TAG=$1
|
# Set the working dir to the location of this script
|
||||||
VERSION=`echo $TAG | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
cd $(dirname $0)
|
||||||
BUILTDIR=$2
|
|
||||||
PACKAGEDIR=$3
|
TAG="${1}"
|
||||||
ROOTDIR=root
|
VERSION=`echo ${TAG} | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
||||||
|
OUTPUTDIR="${2}"
|
||||||
|
|
||||||
|
SRCDIR="$(pwd)/../.."
|
||||||
|
BUILTDIR="$(pwd)/build"
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
rm -rf $ROOTDIR
|
rm -rf ${BUILTDIR}
|
||||||
|
|
||||||
cd ../..
|
echo "Building core files"
|
||||||
|
|
||||||
# Copy files for OpenRA.Game.exe and OpenRA.Editor.exe as well as all dependencies.
|
pushd ${SRCDIR} > /dev/null
|
||||||
make install prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR"
|
make linux-dependencies
|
||||||
|
make core SDK="-sdk:4.5"
|
||||||
|
make version VERSION="${TAG}"
|
||||||
|
|
||||||
# Install startup scripts, desktop files and icons
|
make install-core prefix="/usr" DESTDIR="${BUILTDIR}"
|
||||||
make install-linux-shortcuts prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR"
|
make install-linux-shortcuts prefix="/usr" DESTDIR="${BUILTDIR}"
|
||||||
make install-linux-mime prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR"
|
make install-linux-mime prefix="/usr" DESTDIR="${BUILTDIR}"
|
||||||
make install-linux-appdata prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR"
|
make install-linux-appdata prefix="/usr" DESTDIR="${BUILTDIR}"
|
||||||
make install-man-page prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR"
|
make install-man-page prefix="/usr" DESTDIR="${BUILTDIR}"
|
||||||
|
|
||||||
|
popd > /dev/null
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
mkdir -p $PWD/packaging/linux/$ROOTDIR/usr/share/doc/openra/
|
DOCSDIR="${BUILTDIR}/usr/share/doc/openra/"
|
||||||
cp *.html $PWD/packaging/linux/$ROOTDIR/usr/share/doc/openra/
|
|
||||||
|
|
||||||
pushd packaging/linux/deb >/dev/null
|
mkdir -p "${DOCSDIR}"
|
||||||
echo "Building Debian package."
|
|
||||||
./buildpackage.sh "$TAG" ../$ROOTDIR "$PACKAGEDIR"
|
curl -s -L -O https://raw.githubusercontent.com/wiki/OpenRA/OpenRA/Changelog.md
|
||||||
|
markdown Changelog.md > "${DOCSDIR}/Changelog.html"
|
||||||
|
rm Changelog.md
|
||||||
|
|
||||||
|
markdown ${SRCDIR}/README.md > "${DOCSDIR}/README.html"
|
||||||
|
markdown ${SRCDIR}/CONTRIBUTING.md > "${DOCSDIR}/CONTRIBUTING.html"
|
||||||
|
|
||||||
|
pushd deb >/dev/null
|
||||||
|
echo "Building Debian package"
|
||||||
|
./buildpackage.sh "${TAG}" "${BUILTDIR}" "${OUTPUTDIR}"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Debian package build failed."
|
echo "Debian package build failed."
|
||||||
fi
|
fi
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
rm -rf $PWD/packaging/linux/$ROOTDIR/
|
rm -rf "${BUILTDIR}"
|
||||||
|
|||||||
@@ -1,22 +1,32 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# OpenRA packaging script for Debian based distributions
|
# OpenRA packaging script for Debian based distributions
|
||||||
|
|
||||||
LINUX_BUILD_ROOT="$(readlink -f "$2")"
|
command -v fakeroot >/dev/null 2>&1 || { echo >&2 "Debian packaging requires fakeroot."; exit 1; }
|
||||||
DEB_BUILD_ROOT=./root
|
command -v dpkg-deb >/dev/null 2>&1 || { echo >&2 "Debian packaging requires dpkg-deb."; exit 1; }
|
||||||
|
|
||||||
LIBDIR=/usr/lib/openra
|
|
||||||
DOCDIR=/usr/share/doc/openra
|
|
||||||
LINTIANORDIR=/usr/share/lintian/overrides
|
|
||||||
|
|
||||||
E_BADARGS=85
|
|
||||||
if [ $# -ne "3" ]
|
if [ $# -ne "3" ]
|
||||||
then
|
then
|
||||||
echo "Usage: `basename $0` version root-dir outputdir"
|
echo "Usage: `basename $0` version root-dir outputdir"
|
||||||
exit $E_BADARGS
|
exit $E_BADARGS
|
||||||
fi
|
fi
|
||||||
DATE=`echo $1 | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
|
||||||
|
# Set the working dir to the location of this script
|
||||||
|
cd $(dirname $0)
|
||||||
|
|
||||||
|
TAG="${1}"
|
||||||
|
LINUX_BUILD_ROOT="${2}"
|
||||||
|
OUTPUTDIR="${3}"
|
||||||
|
|
||||||
|
DEB_BUILD_ROOT="$(pwd)/build"
|
||||||
|
|
||||||
|
LIBDIR=/usr/lib/openra
|
||||||
|
DOCDIR=/usr/share/doc/openra
|
||||||
|
LINTIANORDIR=/usr/share/lintian/overrides
|
||||||
|
E_BADARGS=85
|
||||||
|
|
||||||
|
DATE=`echo ${TAG} | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
||||||
TYPE=`echo $1 | grep -o "^[a-z]*"`
|
TYPE=`echo $1 | grep -o "^[a-z]*"`
|
||||||
VERSION="$DATE.$TYPE"
|
VERSION="${DATE}.${TYPE}"
|
||||||
|
|
||||||
# Copy template files into a clean build directory (required)
|
# Copy template files into a clean build directory (required)
|
||||||
mkdir "${DEB_BUILD_ROOT}"
|
mkdir "${DEB_BUILD_ROOT}"
|
||||||
@@ -62,21 +72,32 @@ rm "${DEB_BUILD_ROOT}/${LIBDIR}/COPYING"
|
|||||||
chmod -R g-w "${DEB_BUILD_ROOT}"
|
chmod -R g-w "${DEB_BUILD_ROOT}"
|
||||||
|
|
||||||
# Create the control file
|
# Create the control file
|
||||||
PACKAGE_SIZE=`du --apparent-size -c "${DEB_BUILD_ROOT}/usr" | grep "total" | awk '{print $1}'`
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
sed "s/{VERSION}/$VERSION/" DEBIAN/control | sed "s/{SIZE}/$PACKAGE_SIZE/" > "${DEB_BUILD_ROOT}/DEBIAN/control"
|
# BSD du doesn't have an --apparent-size flag, so we must accept a different result
|
||||||
|
PACKAGE_SIZE=`du -c "${DEB_BUILD_ROOT}/usr" | grep "total" | awk '{print $1}'`
|
||||||
|
else
|
||||||
|
PACKAGE_SIZE=`du --apparent-size -c "${DEB_BUILD_ROOT}/usr" | grep "total" | awk '{print $1}'`
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed "s/{VERSION}/${VERSION}/" DEBIAN/control | sed "s/{SIZE}/${PACKAGE_SIZE}/" > "${DEB_BUILD_ROOT}/DEBIAN/control"
|
||||||
|
|
||||||
# Build it in the temp directory, but place the finished deb in our starting directory
|
# Build it in the temp directory, but place the finished deb in our starting directory
|
||||||
pushd "${DEB_BUILD_ROOT}" >/dev/null
|
pushd "${DEB_BUILD_ROOT}" >/dev/null
|
||||||
|
|
||||||
# Calculate md5sums and clean up the ./usr/ part of them
|
# Calculate md5sums and clean up the ./usr/ part of them
|
||||||
find . -type f -not -path "./DEBIAN/*" -print0 | xargs -0 -n1 md5sum | sed 's|\./usr/|usr/|' > DEBIAN/md5sums
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
find . -type f -not -path "./DEBIAN/*" -print0 | xargs -0 -n1 openssl md5 | awk '{ print $2, substr($1, 7, length($1)-8) }' > DEBIAN/md5sums
|
||||||
|
else
|
||||||
|
find . -type f -not -path "./DEBIAN/*" -print0 | xargs -0 -n1 md5sum | sed 's|\./usr/|usr/|' > DEBIAN/md5sums
|
||||||
|
fi
|
||||||
|
|
||||||
chmod 0644 DEBIAN/md5sums
|
chmod 0644 DEBIAN/md5sums
|
||||||
|
|
||||||
# Replace any dashes in the version string with periods
|
# Replace any dashes in the version string with periods
|
||||||
PKGVERSION=`echo $1 | sed "s/-/\\./g"`
|
PKGVERSION=`echo ${TAG} | sed "s/-/\\./g"`
|
||||||
|
|
||||||
# Start building, the file should appear in the output directory
|
# Start building, the file should appear in the output directory
|
||||||
fakeroot dpkg-deb -b . "$3/openra_${PKGVERSION}_all.deb"
|
fakeroot dpkg-deb -b . "${OUTPUTDIR}/openra_${PKGVERSION}_all.deb"
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|||||||
@@ -1,22 +1,28 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# OpenRA packaging script for Mac OSX
|
# OpenRA packaging script for macOS
|
||||||
|
|
||||||
|
command -v curl >/dev/null 2>&1 || { echo >&2 "macOS packaging requires curl."; exit 1; }
|
||||||
|
command -v markdown >/dev/null 2>&1 || { echo >&2 "macOS packaging requires markdown."; exit 1; }
|
||||||
|
|
||||||
|
if [[ "$OSTYPE" != "darwin"* ]]; then
|
||||||
|
command -v cmake >/dev/null 2>&1 || { echo >&2 "macOS packaging requires cmake."; exit 1; }
|
||||||
|
command -v genisoimage >/dev/null 2>&1 || { echo >&2 "macOS packaging requires genisoimage."; exit 1; }
|
||||||
|
fi
|
||||||
|
|
||||||
LAUNCHER_TAG="osx-launcher-20170414"
|
LAUNCHER_TAG="osx-launcher-20170414"
|
||||||
|
|
||||||
if [ $# -ne "3" ]; then
|
if [ $# -ne "2" ]; then
|
||||||
echo "Usage: `basename $0` tag files-dir outputdir"
|
echo "Usage: `basename $0` tag outputdir"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Dirty build dir; last build failed?
|
# Set the working dir to the location of this script
|
||||||
if [ -e "OpenRA.app" ]; then
|
cd $(dirname $0)
|
||||||
echo "Error: OpenRA.app already exists"
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
TAG="$1"
|
TAG="$1"
|
||||||
BUILTDIR="$2"
|
OUTPUTDIR="$2"
|
||||||
OUTPUTDIR="$3"
|
SRCDIR="$(pwd)/../.."
|
||||||
|
BUILTDIR="$(pwd)/build"
|
||||||
|
|
||||||
modify_plist() {
|
modify_plist() {
|
||||||
sed "s|$1|$2|g" "$3" > "$3.tmp" && mv "$3.tmp" "$3"
|
sed "s|$1|$2|g" "$3" > "$3.tmp" && mv "$3.tmp" "$3"
|
||||||
@@ -24,50 +30,59 @@ modify_plist() {
|
|||||||
|
|
||||||
# Copies the game files and sets metadata
|
# Copies the game files and sets metadata
|
||||||
populate_template() {
|
populate_template() {
|
||||||
cp -r OpenRA.app "build/$1"
|
TEMPLATE_DIR="${BUILTDIR}/${1}"
|
||||||
cp -r $BUILTDIR/* "build/$1/Contents/Resources/" || exit 3
|
MOD_ID=${2}
|
||||||
cp "$2.icns" "build/$1/Contents/Resources/OpenRA.icns"
|
MOD_NAME=${3}
|
||||||
modify_plist "{MOD_ID}" "$2" "build/$1/Contents/Info.plist"
|
cp -r "${BUILTDIR}/OpenRA.app" "${TEMPLATE_DIR}"
|
||||||
modify_plist "{MOD_NAME}" "$3" "build/$1/Contents/Info.plist"
|
|
||||||
modify_plist "{JOIN_SERVER_URL_SCHEME}" "openra-$2-$TAG" "build/$1/Contents/Info.plist"
|
# Copy macOS specific files
|
||||||
|
cp "${MOD_ID}.icns" "${TEMPLATE_DIR}/Contents/Resources/OpenRA.icns"
|
||||||
|
modify_plist "{MOD_ID}" "${MOD_ID}" "${TEMPLATE_DIR}/Contents/Info.plist"
|
||||||
|
modify_plist "{MOD_NAME}" "${MOD_NAME}" "${TEMPLATE_DIR}/Contents/Info.plist"
|
||||||
|
modify_plist "{JOIN_SERVER_URL_SCHEME}" "openra-${MOD_ID}-${TAG}" "${TEMPLATE_DIR}/Contents/Info.plist"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Deletes from the first argument's mod dirs all the later arguments
|
# Deletes from the first argument's mod dirs all the later arguments
|
||||||
delete_mods() {
|
delete_mods() {
|
||||||
pushd "build/$1/Contents/Resources/mods" > /dev/null
|
pushd "${BUILTDIR}/${1}/Contents/Resources/mods" > /dev/null
|
||||||
shift
|
shift
|
||||||
rm -rf $@
|
rm -rf $@
|
||||||
pushd > /dev/null
|
pushd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Building libdmg-hfsplus"
|
|
||||||
# Cloning is very slow, so fetch zip instead
|
|
||||||
curl -s -L -O https://github.com/OpenRA/libdmg-hfsplus/archive/master.zip || exit 3
|
|
||||||
unzip -qq master.zip
|
|
||||||
rm master.zip
|
|
||||||
pushd libdmg-hfsplus-master > /dev/null
|
|
||||||
cmake . > /dev/null
|
|
||||||
make > /dev/null
|
|
||||||
popd > /dev/null
|
|
||||||
|
|
||||||
echo "Building launchers"
|
echo "Building launchers"
|
||||||
curl -s -L -O https://github.com/OpenRA/OpenRALauncherOSX/releases/download/${LAUNCHER_TAG}/launcher.zip || exit 3
|
curl -s -L -O https://github.com/OpenRA/OpenRALauncherOSX/releases/download/${LAUNCHER_TAG}/launcher.zip || exit 3
|
||||||
unzip -qq launcher.zip
|
unzip -qq -d "${BUILTDIR}" launcher.zip
|
||||||
rm launcher.zip
|
rm launcher.zip
|
||||||
mkdir -p build/.DropDMGBackground
|
mkdir -p "${BUILTDIR}/.DropDMGBackground"
|
||||||
|
|
||||||
# Background image is created from source svg in artsrc repository
|
# Background image is created from source svg in artsrc repository
|
||||||
# exported to tiff at 72 + 144 DPI, then combined using
|
# exported to tiff at 72 + 144 DPI, then combined using
|
||||||
# tiffutil -cathidpicheck bg.tiff bg2x.tiff -out background.tiff
|
# tiffutil -cathidpicheck bg.tiff bg2x.tiff -out background.tiff
|
||||||
cp background.tiff build/.DropDMGBackground
|
cp background.tiff "${BUILTDIR}/.DropDMGBackground"
|
||||||
|
|
||||||
# Finder metadata created using free trial of DropDMG
|
# Finder metadata created using free trial of DropDMG
|
||||||
cp DS_Store build/.DS_Store
|
cp DS_Store "${BUILTDIR}/.DS_Store"
|
||||||
|
|
||||||
ln -s /Applications/ build/Applications
|
ln -s /Applications/ "${BUILTDIR}/Applications"
|
||||||
|
|
||||||
modify_plist "{DEV_VERSION}" "${1}" "OpenRA.app/Contents/Info.plist"
|
modify_plist "{DEV_VERSION}" "${TAG}" "${BUILTDIR}/OpenRA.app/Contents/Info.plist"
|
||||||
modify_plist "{FAQ_URL}" "http://wiki.openra.net/FAQ" "OpenRA.app/Contents/Info.plist"
|
modify_plist "{FAQ_URL}" "http://wiki.openra.net/FAQ" "${BUILTDIR}/OpenRA.app/Contents/Info.plist"
|
||||||
|
echo "Building core files"
|
||||||
|
|
||||||
|
pushd ${SRCDIR} > /dev/null
|
||||||
|
make osx-dependencies
|
||||||
|
make core SDK="-sdk:4.5"
|
||||||
|
make version VERSION="${TAG}"
|
||||||
|
make install-core gameinstalldir="/Contents/Resources/" DESTDIR="${BUILTDIR}/OpenRA.app"
|
||||||
|
popd > /dev/null
|
||||||
|
|
||||||
|
curl -s -L -O https://raw.githubusercontent.com/wiki/OpenRA/OpenRA/Changelog.md
|
||||||
|
markdown Changelog.md > "${BUILTDIR}/OpenRA.app/Contents/Resources/CHANGELOG.html"
|
||||||
|
rm Changelog.md
|
||||||
|
|
||||||
|
markdown "${SRCDIR}/README.md" > "${BUILTDIR}/OpenRA.app/Contents/Resources/README.html"
|
||||||
|
markdown "${SRCDIR}/CONTRIBUTING.md" > "${BUILTDIR}/OpenRA.app/Contents/Resources/CONTRIBUTING.html"
|
||||||
|
|
||||||
populate_template "OpenRA - Red Alert.app" "ra" "Red Alert"
|
populate_template "OpenRA - Red Alert.app" "ra" "Red Alert"
|
||||||
delete_mods "OpenRA - Red Alert.app" "cnc" "d2k"
|
delete_mods "OpenRA - Red Alert.app" "cnc" "d2k"
|
||||||
@@ -78,9 +93,33 @@ delete_mods "OpenRA - Tiberian Dawn.app" "ra" "d2k"
|
|||||||
populate_template "OpenRA - Dune 2000.app" "d2k" "Dune 2000"
|
populate_template "OpenRA - Dune 2000.app" "d2k" "Dune 2000"
|
||||||
delete_mods "OpenRA - Dune 2000.app" "ra" "cnc"
|
delete_mods "OpenRA - Dune 2000.app" "ra" "cnc"
|
||||||
|
|
||||||
|
rm -rf "${BUILTDIR}/OpenRA.app"
|
||||||
|
|
||||||
echo "Packaging disk image"
|
echo "Packaging disk image"
|
||||||
genisoimage -V OpenRA -D -R -apple -no-pad -o build.dmg build
|
|
||||||
libdmg-hfsplus-master/dmg/dmg dmg ./build.dmg "$3/OpenRA-$1.dmg"
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
hdiutil create -volname OpenRA -srcfolder build -ov -format UDZO "${OUTPUTDIR}/OpenRA-${TAG}.dmg"
|
||||||
|
else
|
||||||
|
echo "Building libdmg-hfsplus"
|
||||||
|
|
||||||
|
# Cloning is very slow, so fetch zip instead
|
||||||
|
curl -s -L -O https://github.com/OpenRA/libdmg-hfsplus/archive/master.zip || exit 3
|
||||||
|
unzip -qq master.zip
|
||||||
|
rm master.zip
|
||||||
|
pushd libdmg-hfsplus-master > /dev/null
|
||||||
|
cmake . > /dev/null
|
||||||
|
make > /dev/null
|
||||||
|
popd > /dev/null
|
||||||
|
|
||||||
|
if [[ ! -f libdmg-hfsplus-master/dmg/dmg ]] ; then
|
||||||
|
echo "libdmg-hfsplus compilation failed"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
|
||||||
|
genisoimage -V OpenRA -D -R -apple -no-pad -o build.dmg build
|
||||||
|
libdmg-hfsplus-master/dmg/dmg dmg ./build.dmg "${OUTPUTDIR}/OpenRA-${TAG}.dmg"
|
||||||
|
rm build.dmg
|
||||||
|
fi
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
rm -rf OpenRA.app build.dmg libdmg-hfsplus-master build
|
rm -rf libdmg-hfsplus-master "${BUILTDIR}"
|
||||||
|
|||||||
@@ -6,95 +6,31 @@ if [ $# -ne "2" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Resolve the absolute source path from the location of this script
|
# Set the working dir to the location of this script
|
||||||
SRCDIR=$(readlink -f $(dirname $0)/../)
|
cd $(dirname $0)
|
||||||
BUILTDIR="${SRCDIR}/packaging/built"
|
|
||||||
TAG=$1
|
|
||||||
OUTPUTDIR=$(readlink -f $2)
|
|
||||||
|
|
||||||
# Build the code and push the files into a clean dir
|
|
||||||
cd "$SRCDIR"
|
|
||||||
mkdir packaging/built
|
|
||||||
mkdir packaging/built/mods
|
|
||||||
make package
|
|
||||||
|
|
||||||
# Remove the mdb files that are created during `make`
|
|
||||||
find . -path "*.mdb" -delete
|
|
||||||
|
|
||||||
test -e Changelog.md && rm Changelog.md
|
|
||||||
curl -s -L -O https://raw.githubusercontent.com/wiki/OpenRA/OpenRA/Changelog.md
|
|
||||||
|
|
||||||
markdown Changelog.md > CHANGELOG.html
|
|
||||||
markdown README.md > README.html
|
|
||||||
markdown CONTRIBUTING.md > CONTRIBUTING.html
|
|
||||||
markdown DOCUMENTATION.md > DOCUMENTATION.html
|
|
||||||
markdown Lua-API.md > Lua-API.html
|
|
||||||
|
|
||||||
# List of files that are packaged on all platforms
|
|
||||||
FILES=('OpenRA.Game.exe' 'OpenRA.Game.exe.config' 'OpenRA.Utility.exe' 'OpenRA.Server.exe'
|
|
||||||
'OpenRA.Platforms.Default.dll' \
|
|
||||||
'lua' 'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modcontent' \
|
|
||||||
'AUTHORS' 'COPYING' 'README.html' 'CONTRIBUTING.html' 'DOCUMENTATION.html' 'CHANGELOG.html' \
|
|
||||||
'global mix database.dat' 'GeoLite2-Country.mmdb.gz')
|
|
||||||
|
|
||||||
echo "Copying files..."
|
|
||||||
for i in "${FILES[@]}"; do
|
|
||||||
cp -R "${i}" "packaging/built/${i}" || exit 3
|
|
||||||
done
|
|
||||||
|
|
||||||
# SharpZipLib for zip file support
|
|
||||||
cp thirdparty/download/ICSharpCode.SharpZipLib.dll packaging/built
|
|
||||||
|
|
||||||
# FuzzyLogicLibrary for improved AI
|
|
||||||
cp thirdparty/download/FuzzyLogicLibrary.dll packaging/built
|
|
||||||
|
|
||||||
# SharpFont for FreeType support
|
|
||||||
cp thirdparty/download/SharpFont* packaging/built
|
|
||||||
|
|
||||||
# SDL2-CS
|
|
||||||
cp thirdparty/download/SDL2-CS* packaging/built
|
|
||||||
|
|
||||||
# OpenAL-CS
|
|
||||||
cp thirdparty/download/OpenAL-CS* packaging/built
|
|
||||||
|
|
||||||
# Open.NAT for UPnP support
|
|
||||||
cp thirdparty/download/Open.Nat.dll packaging/built
|
|
||||||
|
|
||||||
# Eluant (Lua integration)
|
|
||||||
cp thirdparty/download/Eluant* packaging/built
|
|
||||||
|
|
||||||
# GeoIP database access
|
|
||||||
cp thirdparty/download/MaxMind.Db.dll packaging/built
|
|
||||||
|
|
||||||
# global chat
|
|
||||||
cp thirdparty/download/SmarIrc4net.dll packaging/built
|
|
||||||
|
|
||||||
cd packaging
|
|
||||||
echo "Creating packages..."
|
|
||||||
|
|
||||||
pushd windows >/dev/null
|
pushd windows >/dev/null
|
||||||
./buildpackage.sh "$TAG" "$BUILTDIR" "$SRCDIR" "$OUTPUTDIR"
|
echo "Building Windows package"
|
||||||
|
./buildpackage.sh "$1" "$2"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Windows package build failed."
|
echo "Windows package build failed."
|
||||||
fi
|
fi
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
pushd osx >/dev/null
|
pushd osx >/dev/null
|
||||||
echo "Building OS X package"
|
echo "Building macOS package"
|
||||||
./buildpackage.sh "$TAG" "$BUILTDIR" "$OUTPUTDIR"
|
./buildpackage.sh "$1" "$2"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "OS X package build failed."
|
echo "macOS package build failed."
|
||||||
fi
|
fi
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
pushd linux >/dev/null
|
pushd linux >/dev/null
|
||||||
echo "Building Linux packages"
|
echo "Building Linux packages"
|
||||||
./buildpackage.sh "$TAG" "$BUILTDIR" "$OUTPUTDIR"
|
./buildpackage.sh "$1" "$2"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Linux package build failed."
|
echo "Linux package build failed."
|
||||||
fi
|
fi
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
echo "Package build done."
|
echo "Package build done."
|
||||||
|
|
||||||
rm -rf $BUILTDIR
|
|
||||||
|
|||||||
@@ -26,8 +26,9 @@ chmod 0600 "$SSH_KEY"
|
|||||||
|
|
||||||
rm -rf $HOME/openra-wiki
|
rm -rf $HOME/openra-wiki
|
||||||
git clone git@github.com:OpenRA/OpenRA.wiki.git $HOME/openra-wiki
|
git clone git@github.com:OpenRA/OpenRA.wiki.git $HOME/openra-wiki
|
||||||
cp -fr ../DOCUMENTATION.md "${HOME}/openra-wiki/Traits${TAG}.md"
|
|
||||||
cp -fr ../Lua-API.md "${HOME}/openra-wiki/Lua API${TAG}.md"
|
mono --debug ../OpenRA.Utility.exe all --docs > "${HOME}/openra-wiki/Traits${TAG}.md"
|
||||||
|
mono --debug ../OpenRA.Utility.exe all --lua-docs > "${HOME}/openra-wiki/Lua API${TAG}.md"
|
||||||
|
|
||||||
pushd $HOME/openra-wiki
|
pushd $HOME/openra-wiki
|
||||||
git config --local user.email "orabot@users.noreply.github.com"
|
git config --local user.email "orabot@users.noreply.github.com"
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
UPLOADUSER=openra
|
|
||||||
SERVER=openra.res0l.net
|
|
||||||
PATHBASE="openra.res0l.net/assets/downloads"
|
|
||||||
|
|
||||||
upload () {
|
|
||||||
PLATFORM=$1
|
|
||||||
FILENAME=$2
|
|
||||||
scp "${FILENAME}" ${UPLOADUSER}@${SERVER}:${PATHBASE}/${PLATFORM}/
|
|
||||||
}
|
|
||||||
|
|
||||||
TAG=$1
|
|
||||||
PKGDIR=$2
|
|
||||||
LINUXVERSION=`echo ${TAG} | sed "s/-/\\./g"`
|
|
||||||
|
|
||||||
cd ${PKGDIR}
|
|
||||||
upload windows OpenRA-${TAG}.exe
|
|
||||||
upload mac OpenRA-${TAG}.zip
|
|
||||||
upload linux/deb openra_${LINUXVERSION}_all.deb
|
|
||||||
upload linux/rpm openra-${LINUXVERSION}-1.noarch.rpm
|
|
||||||
upload linux/arch openra-${LINUXVERSION}-1-any.pkg.tar.xz
|
|
||||||
upload source ${TAG}.tar.gz
|
|
||||||
@@ -110,7 +110,6 @@ Section "Game" GAME
|
|||||||
File "${SRCDIR}\README.html"
|
File "${SRCDIR}\README.html"
|
||||||
File "${SRCDIR}\CHANGELOG.html"
|
File "${SRCDIR}\CHANGELOG.html"
|
||||||
File "${SRCDIR}\CONTRIBUTING.html"
|
File "${SRCDIR}\CONTRIBUTING.html"
|
||||||
File "${SRCDIR}\DOCUMENTATION.html"
|
|
||||||
File "${SRCDIR}\OpenRA.ico"
|
File "${SRCDIR}\OpenRA.ico"
|
||||||
File "${SRCDIR}\RedAlert.ico"
|
File "${SRCDIR}\RedAlert.ico"
|
||||||
File "${SRCDIR}\TiberianDawn.ico"
|
File "${SRCDIR}\TiberianDawn.ico"
|
||||||
@@ -220,7 +219,6 @@ Function ${UN}Clean
|
|||||||
Delete $INSTDIR\README.html
|
Delete $INSTDIR\README.html
|
||||||
Delete $INSTDIR\CHANGELOG.html
|
Delete $INSTDIR\CHANGELOG.html
|
||||||
Delete $INSTDIR\CONTRIBUTING.html
|
Delete $INSTDIR\CONTRIBUTING.html
|
||||||
Delete $INSTDIR\DOCUMENTATION.html
|
|
||||||
Delete $INSTDIR\OpenRA.ico
|
Delete $INSTDIR\OpenRA.ico
|
||||||
Delete $INSTDIR\RedAlert.ico
|
Delete $INSTDIR\RedAlert.ico
|
||||||
Delete $INSTDIR\TiberianDawn.ico
|
Delete $INSTDIR\TiberianDawn.ico
|
||||||
|
|||||||
@@ -1,17 +1,29 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
command -v curl >/dev/null 2>&1 || { echo >&2 "Windows packaging requires curl."; exit 1; }
|
||||||
|
command -v markdown >/dev/null 2>&1 || { echo >&2 "Windows packaging requires markdown."; exit 1; }
|
||||||
|
command -v makensis >/dev/null 2>&1 || { echo >&2 "Windows packaging requires makensis."; exit 1; }
|
||||||
|
|
||||||
|
if [ $# -ne "2" ]; then
|
||||||
|
echo "Usage: `basename $0` tag outputdir"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set the working dir to the location of this script
|
||||||
|
cd $(dirname $0)
|
||||||
|
|
||||||
TAG="$1"
|
TAG="$1"
|
||||||
BUILTDIR="$2"
|
OUTPUTDIR="$2"
|
||||||
SRCDIR="$3"
|
SRCDIR="$(pwd)/../.."
|
||||||
OUTPUTDIR="$4"
|
BUILTDIR="$(pwd)/build"
|
||||||
|
|
||||||
LAUNCHER_LIBS="-r:System.dll -r:System.Drawing.dll -r:System.Windows.Forms.dll -r:${BUILTDIR}/OpenRA.Game.exe"
|
LAUNCHER_LIBS="-r:System.dll -r:System.Drawing.dll -r:System.Windows.Forms.dll -r:${BUILTDIR}/OpenRA.Game.exe"
|
||||||
FAQ_URL="http://wiki.openra.net/FAQ"
|
FAQ_URL="http://wiki.openra.net/FAQ"
|
||||||
|
|
||||||
SUFFIX=" (dev)"
|
SUFFIX=" (dev)"
|
||||||
if [[ $TAG == release* ]]; then
|
if [[ ${TAG} == release* ]]; then
|
||||||
SUFFIX=""
|
SUFFIX=""
|
||||||
elif [[ $TAG == playtest* ]]; then
|
elif [[ ${TAG} == playtest* ]]; then
|
||||||
SUFFIX=" (playtest)"
|
SUFFIX=" (playtest)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -20,29 +32,41 @@ function makelauncher()
|
|||||||
sed "s|DISPLAY_NAME|$2|" WindowsLauncher.cs.in | sed "s|MOD_ID|$3|" | sed "s|FAQ_URL|${FAQ_URL}|" > WindowsLauncher.cs
|
sed "s|DISPLAY_NAME|$2|" WindowsLauncher.cs.in | sed "s|MOD_ID|$3|" | sed "s|FAQ_URL|${FAQ_URL}|" > WindowsLauncher.cs
|
||||||
mcs -sdk:4.5 WindowsLauncher.cs -warn:4 -codepage:utf8 -warnaserror -out:"$1" -t:winexe ${LAUNCHER_LIBS} -win32icon:"$4"
|
mcs -sdk:4.5 WindowsLauncher.cs -warn:4 -codepage:utf8 -warnaserror -out:"$1" -t:winexe ${LAUNCHER_LIBS} -win32icon:"$4"
|
||||||
rm WindowsLauncher.cs
|
rm WindowsLauncher.cs
|
||||||
mono ${SRCDIR}/fixheader.exe $1 > /dev/null
|
mono "${SRCDIR}/fixheader.exe" $1 > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "Building core files"
|
||||||
|
|
||||||
|
pushd ${SRCDIR} > /dev/null
|
||||||
|
make windows-dependencies
|
||||||
|
make core SDK="-sdk:4.5"
|
||||||
|
make version VERSION="${TAG}"
|
||||||
|
make install-core gameinstalldir="" DESTDIR="${BUILTDIR}"
|
||||||
|
popd > /dev/null
|
||||||
|
|
||||||
echo "Compiling Windows launchers"
|
echo "Compiling Windows launchers"
|
||||||
makelauncher ${BUILTDIR}/RedAlert.exe "Red Alert" "ra" RedAlert.ico
|
makelauncher "${BUILTDIR}/RedAlert.exe" "Red Alert" "ra" RedAlert.ico
|
||||||
makelauncher ${BUILTDIR}/TiberianDawn.exe "Tiberian Dawn" "cnc" TiberianDawn.ico
|
makelauncher "${BUILTDIR}/TiberianDawn.exe" "Tiberian Dawn" "cnc" TiberianDawn.ico
|
||||||
makelauncher ${BUILTDIR}/Dune2000.exe "Dune 2000" "d2k" Dune2000.ico
|
makelauncher "${BUILTDIR}/Dune2000.exe" "Dune 2000" "d2k" Dune2000.ico
|
||||||
|
|
||||||
# Windows specific icons
|
# Windows specific files
|
||||||
cp OpenRA.ico RedAlert.ico TiberianDawn.ico Dune2000.ico ${BUILTDIR}
|
cp OpenRA.ico RedAlert.ico TiberianDawn.ico Dune2000.ico "${BUILTDIR}"
|
||||||
|
cp "${SRCDIR}/OpenRA.Game.exe.config" "${BUILTDIR}"
|
||||||
|
|
||||||
if [ -x /usr/bin/makensis ]; then
|
curl -s -L -O https://raw.githubusercontent.com/wiki/OpenRA/OpenRA/Changelog.md
|
||||||
echo "Building Windows setup.exe"
|
markdown Changelog.md > "${BUILTDIR}/CHANGELOG.html"
|
||||||
makensis -V2 -DSRCDIR="$BUILTDIR" -DDEPSDIR="${SRCDIR}/thirdparty/download/windows" -DTAG="${TAG}" -DSUFFIX="${SUFFIX}" OpenRA.nsi
|
rm Changelog.md
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
mv OpenRA.Setup.exe "$OUTPUTDIR"/OpenRA-$TAG.exe
|
markdown "${SRCDIR}/README.md" > "${BUILTDIR}/README.html"
|
||||||
else
|
markdown "${SRCDIR}/CONTRIBUTING.md" > "${BUILTDIR}/CONTRIBUTING.html"
|
||||||
exit 1
|
|
||||||
fi
|
echo "Building Windows setup.exe"
|
||||||
|
makensis -V2 -DSRCDIR="${BUILTDIR}" -DDEPSDIR="${SRCDIR}/thirdparty/download/windows" -DTAG="${TAG}" -DSUFFIX="${SUFFIX}" OpenRA.nsi
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
mv OpenRA.Setup.exe "${OUTPUTDIR}/OpenRA-$TAG.exe"
|
||||||
else
|
else
|
||||||
echo "Skipping Windows setup.exe build due to missing NSIS"
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
rm ${BUILTDIR}/OpenRA.ico ${BUILTDIR}/RedAlert.ico ${BUILTDIR}/TiberianDawn.ico ${BUILTDIR}/Dune2000.ico
|
rm -rf "${BUILTDIR}"
|
||||||
rm ${BUILTDIR}/RedAlert.exe ${BUILTDIR}/TiberianDawn.exe ${BUILTDIR}/Dune2000.exe
|
|
||||||
|
|||||||
Reference in New Issue
Block a user