diff --git a/Makefile b/Makefile index db3d43c0e5..568e464782 100644 --- a/Makefile +++ b/Makefile @@ -318,9 +318,11 @@ install-core: default @$(CP_R) glsl "$(DATA_INSTALL_DIR)" @$(CP_R) cg "$(DATA_INSTALL_DIR)" + @$(CP_R) lua "$(DATA_INSTALL_DIR)" @$(CP) *.ttf "$(DATA_INSTALL_DIR)" @$(CP) thirdparty/Tao/* "$(DATA_INSTALL_DIR)" @$(CP) thirdparty/SDL2-CS* "$(DATA_INSTALL_DIR)" + @$(CP) thirdparty/Eluant* "$(DATA_INSTALL_DIR)" @$(INSTALL_PROGRAM) thirdparty/ICSharpCode.SharpZipLib.dll "$(DATA_INSTALL_DIR)" @$(INSTALL_PROGRAM) thirdparty/FuzzyLogicLibrary.dll "$(DATA_INSTALL_DIR)" @$(INSTALL_PROGRAM) thirdparty/SharpFont.dll "$(DATA_INSTALL_DIR)" diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh old mode 100644 new mode 100755 index bac497d852..7498cccf26 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -1,24 +1,29 @@ #!/bin/bash # OpenRA packaging master script for linux packages -if [ $# -ne "3" ]; then - echo "Usage: `basename $0` version files-dir outputdir" +if [ $# -ne "4" ]; then + echo "Usage: `basename $0` tag files-dir platform-files-dir outputdir" exit 1 fi TAG=$1 VERSION=`echo $TAG | grep -o "[0-9]\\+-\\?[0-9]\\?"` BUILTDIR=$2 -PACKAGEDIR=$3 +DEPSDIR=$3 +PACKAGEDIR=$4 ROOTDIR=root # Clean up rm -rf $ROOTDIR cd ../.. + # Copy files for OpenRA.Game.exe and OpenRA.Editor.exe as well as all dependencies. make install-all prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR" +# Native library dependencies +cp "$DEPSDIR"/* "$PWD/packaging/linux/$ROOTDIR/usr/lib/openra/" || exit 3 + # Launch scripts (executed by Desura) cp *.sh "$PWD/packaging/linux/$ROOTDIR/usr/lib/openra/" || exit 3 diff --git a/packaging/osx/buildpackage.sh b/packaging/osx/buildpackage.sh index 95d9db5776..943b5747a2 100755 --- a/packaging/osx/buildpackage.sh +++ b/packaging/osx/buildpackage.sh @@ -1,8 +1,8 @@ #!/bin/bash # OpenRA packaging script for Mac OSX -if [ $# -ne "3" ]; then - echo "Usage: `basename $0` tag files-dir outputdir" +if [ $# -ne "4" ]; then + echo "Usage: `basename $0` tag files-dir platform-files-dir outputdir" exit 1 fi @@ -13,9 +13,8 @@ if [ -e "OpenRA.app" ]; then fi # Copy the template to build the game package -# Assumes it is layed out with the correct directory structure cp -rv template.app OpenRA.app -cp -rv $2/* "OpenRA.app/Contents/Resources/" || exit 3 +cp -rv $2/* $3/* "OpenRA.app/Contents/Resources/" || exit 3 # Icon isn't used, and editor doesn't work. rm OpenRA.app/Contents/Resources/OpenRA.ico @@ -34,5 +33,5 @@ rm temp # Package app bundle into a zip and clean up zip OpenRA-$1 -r -9 OpenRA.app -mv OpenRA-$1.zip $3 +mv OpenRA-$1.zip $4 rm -rf OpenRA.app diff --git a/packaging/package-all.sh b/packaging/package-all.sh index ca5c820805..c83d7cfebe 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -30,7 +30,7 @@ markdown DOCUMENTATION.md > DOCUMENTATION.html # List of files that are packaged on all platforms FILES=('OpenRA.Game.exe' 'OpenRA.Editor.exe' 'OpenRA.Utility.exe' \ 'OpenRA.Renderer.SdlCommon.dll' 'OpenRA.Renderer.Sdl2.dll' 'OpenRA.Renderer.Cg.dll' 'OpenRA.Renderer.Gl.dll' 'OpenRA.Renderer.Null.dll' 'OpenRA.Irc.dll' \ -'FreeSans.ttf' 'FreeSansBold.ttf' \ +'FreeSans.ttf' 'FreeSansBold.ttf' 'lua' \ 'cg' 'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modchooser' \ 'AUTHORS' 'COPYING' \ 'README.html' 'CONTRIBUTING.html' 'DOCUMENTATION.html' 'CHANGELOG.html' \ @@ -59,10 +59,13 @@ cp thirdparty/SDL2-CS* packaging/built # Mono.NAT for UPnP support cp thirdparty/Mono.Nat.dll packaging/built -# Lua +# (legacy) Lua cp thirdparty/KopiLua.dll packaging/built cp thirdparty/NLua.dll packaging/built +# Eluant (new lua) +cp thirdparty/Eluant* packaging/built + # GeoIP database access cp thirdparty/MaxMind.Db.dll packaging/built cp thirdparty/MaxMind.GeoIP2.dll packaging/built @@ -81,7 +84,7 @@ echo "Creating packages..." ( cd windows - makensis -DSRCDIR="$BUILTDIR" OpenRA.nsi &> package.log + makensis -DSRCDIR="$BUILTDIR" -DDEPSDIR="${SRCDIR}/thirdparty/windows" OpenRA.nsi &> package.log if [ $? -eq 0 ]; then mv OpenRA.exe "$OUTPUTDIR"/OpenRA-$TAG.exe else @@ -91,7 +94,7 @@ echo "Creating packages..." ( cd osx - sh buildpackage.sh "$TAG" "$BUILTDIR" "$OUTPUTDIR" &> package.log + sh buildpackage.sh "$TAG" "$BUILTDIR" "${SRCDIR}/thirdparty/osx" "$OUTPUTDIR" &> package.log if [ $? -ne 0 ]; then echo "OS X package build failed, refer to osx/package.log." fi @@ -99,7 +102,7 @@ echo "Creating packages..." ( cd linux - sh buildpackage.sh "$TAG" "$BUILTDIR" "$OUTPUTDIR" &> package.log + sh buildpackage.sh "$TAG" "$BUILTDIR" "${SRCDIR}/thirdparty/linux" "$OUTPUTDIR" &> package.log if [ $? -ne 0 ]; then echo "Linux package build failed, refer to linux/package.log." fi diff --git a/packaging/windows/OpenRA.nsi b/packaging/windows/OpenRA.nsi index a848ad66bf..b3632743b1 100644 --- a/packaging/windows/OpenRA.nsi +++ b/packaging/windows/OpenRA.nsi @@ -92,11 +92,16 @@ Section "Game" GAME File "${SRCDIR}\GeoLite2-Country.mmdb" File "${SRCDIR}\KopiLua.dll" File "${SRCDIR}\NLua.dll" + File "${SRCDIR}\eluant.dll" File OpenAL32.dll File SDL.dll File freetype6.dll File zlib1.dll + File "${DEPSDIR}\lua51.dll" + SetOutPath "$INSTDIR\lua" + File "${SRCDIR}\lua\*.lua" + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\OpenRA.lnk" $OUTDIR\OpenRA.Game.exe "" \ @@ -182,6 +187,7 @@ Function ${UN}Clean RMDir /r $INSTDIR\maps RMDir /r $INSTDIR\cg RMDir /r $INSTDIR\glsl + RMDir /r $INSTDIR\lua Delete $INSTDIR\OpenRA.Launcher.exe Delete $INSTDIR\OpenRA.Game.exe Delete $INSTDIR\OpenRA.Utility.exe @@ -214,6 +220,8 @@ Function ${UN}Clean Delete $INSTDIR\NLua.dll Delete $INSTDIR\OpenAL32.dll Delete $INSTDIR\SDL.dll + Delete $INSTDIR\lua51.dll + Delete $INSTDIR\eluant.dll Delete $INSTDIR\freetype6.dll Delete $INSTDIR\zlib1.dll RMDir /r $INSTDIR\Support diff --git a/thirdparty/Eluant.dll.config b/thirdparty/Eluant.dll.config index 5a54723682..2795a21468 100644 --- a/thirdparty/Eluant.dll.config +++ b/thirdparty/Eluant.dll.config @@ -1,4 +1,5 @@ - + + diff --git a/thirdparty/linux/liblua32.5.1.5.so b/thirdparty/linux/liblua32.5.1.5.so new file mode 100644 index 0000000000..f48b367e45 Binary files /dev/null and b/thirdparty/linux/liblua32.5.1.5.so differ diff --git a/thirdparty/linux/liblua64.5.1.5.so b/thirdparty/linux/liblua64.5.1.5.so new file mode 100644 index 0000000000..123bdfc48f Binary files /dev/null and b/thirdparty/linux/liblua64.5.1.5.so differ diff --git a/thirdparty/osx/liblua.5.1.dylib b/thirdparty/osx/liblua.5.1.dylib new file mode 100644 index 0000000000..e213cc5cea Binary files /dev/null and b/thirdparty/osx/liblua.5.1.dylib differ diff --git a/thirdparty/windows/lua51.dll b/thirdparty/windows/lua51.dll new file mode 100644 index 0000000000..9eb7113dff Binary files /dev/null and b/thirdparty/windows/lua51.dll differ