From 6dfd89ce0d0e176e3e6054b0891246e96ac464dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 26 May 2014 11:59:32 +0200 Subject: [PATCH 01/16] add configure script to workaround library naming differences --- configure | 17 +++++++++++++++++ thirdparty/Eluant.dll.config.in | 4 ++++ thirdparty/SDL2-CS.dll.config | 3 +-- thirdparty/{ => linux}/Eluant.dll.config | 0 thirdparty/linux/SDL2-CS.dll.config | 21 +++++++++++++++++++++ 5 files changed, 43 insertions(+), 2 deletions(-) create mode 100755 configure create mode 100644 thirdparty/Eluant.dll.config.in rename thirdparty/{ => linux}/Eluant.dll.config (100%) create mode 100644 thirdparty/linux/SDL2-CS.dll.config diff --git a/configure b/configure new file mode 100755 index 0000000000..b04d2c786f --- /dev/null +++ b/configure @@ -0,0 +1,17 @@ +#!/bin/bash +# Use Linux system dependencies where possible, but take into account different .so names. + +os=`uname` +if [ $os == 'Linux' ]; then + locations=(/usr/lib /usr/lib64) + sonames=(liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so) + for location in "${locations[@]}" ; do + for soname in ${sonames[@]} ; do + if [ -f $location/$soname ]; then + liblua51=$soname + break + fi + done + done + sed "s/@LIBLUA51@/${liblua51}/" thirdparty/Eluant.dll.config.in > Eluant.dll.config +fi \ No newline at end of file diff --git a/thirdparty/Eluant.dll.config.in b/thirdparty/Eluant.dll.config.in new file mode 100644 index 0000000000..3cd706beec --- /dev/null +++ b/thirdparty/Eluant.dll.config.in @@ -0,0 +1,4 @@ + + + + diff --git a/thirdparty/SDL2-CS.dll.config b/thirdparty/SDL2-CS.dll.config index 85592006e0..dcc5417987 100644 --- a/thirdparty/SDL2-CS.dll.config +++ b/thirdparty/SDL2-CS.dll.config @@ -1,8 +1,7 @@ - - + diff --git a/thirdparty/Eluant.dll.config b/thirdparty/linux/Eluant.dll.config similarity index 100% rename from thirdparty/Eluant.dll.config rename to thirdparty/linux/Eluant.dll.config diff --git a/thirdparty/linux/SDL2-CS.dll.config b/thirdparty/linux/SDL2-CS.dll.config new file mode 100644 index 0000000000..85592006e0 --- /dev/null +++ b/thirdparty/linux/SDL2-CS.dll.config @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + From 6c762f9c552daf088216aaf4c686ced1950abc2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 22 May 2014 12:00:03 +0200 Subject: [PATCH 02/16] separate make dependencies into CLI and bundled native ones --- .travis.yml | 2 +- INSTALL.md | 4 ++-- Makefile | 40 ++++++++++++++++++--------------- packaging/linux/buildpackage.sh | 2 ++ 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 02949f0030..343cfb7dc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,8 @@ cache: apt # Run the build script # call RALint to check for YAML errors -# Test run the packaging scripts for all platforms script: + - make dependencies - make all - make test diff --git a/INSTALL.md b/INSTALL.md index e32f2633d5..ba01f4329d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -15,7 +15,7 @@ Windows To compile OpenRA, open the `OpenRA.sln` solution in the main folder, or build it from the command-line with MSBuild. -Copy both the native DLLs from `.\packaging\windows` +Copy both the native DLLs from `.\thirdparty\windows` and the CLI images from `.\thirdparty` to the main folder. Run the game with `OpenRA.Game.exe Game.Mod=ra` for Red Alert @@ -24,7 +24,7 @@ or `OpenRA.Game.exe Game.Mod=cnc` for Tiberian Dawn. Linux ===== -To grab the bundled CLI DLLs type `make dependencies`. +Run `./configure` to map the native libraries to your system. To compile OpenRA, run `make all` from the command line. Run with either `launch-game.sh' or `mono --debug OpenRA.Game.exe'. diff --git a/Makefile b/Makefile index b1a07b2c03..a69c456d09 100644 --- a/Makefile +++ b/Makefile @@ -251,7 +251,7 @@ $(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog)))) ########################## MAKE/INSTALL RULES ########################## # -default: dependencies core +default: cli-dependencies core core: game renderers mods utility ralint @@ -261,7 +261,7 @@ package: dependencies core editor crashdialog docs version mods: mod_ra mod_cnc mod_d2k mod_ts -all: dependencies core tools +all: cli-dependencies core tools clean: @-$(RM_F) *.exe *.dll ./OpenRA*/*.dll ./OpenRA*/*.mdb *.mdb mods/**/*.dll mods/**/*.mdb *.resources @@ -274,8 +274,13 @@ ifeq ($(shell uname),Darwin) platformdeps = "osx" endif -dependencies: - @ $(CP_R) thirdparty/*.dl* . +dependencies: cli-dependencies native-dependencies + +cli-dependencies: + @ $(CP_R) thirdparty/*.dll . + @ $(CP_R) thirdparty/*.dll.config . + +native-dependencies: @ $(CP_R) thirdparty/${platformdeps}/* . version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/modchooser/mod.yaml @@ -314,20 +319,19 @@ install-core: default @$(CP_R) glsl "$(DATA_INSTALL_DIR)" @$(CP_R) lua "$(DATA_INSTALL_DIR)" @$(CP) *.ttf "$(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)" - @$(CP) thirdparty/SharpFont.dll.config "$(DATA_INSTALL_DIR)" - @$(INSTALL_PROGRAM) thirdparty/Mono.Nat.dll "$(DATA_INSTALL_DIR)" - @$(INSTALL_PROGRAM) thirdparty/KopiLua.dll "$(DATA_INSTALL_DIR)" - @$(INSTALL_PROGRAM) thirdparty/NLua.dll "$(DATA_INSTALL_DIR)" - @$(INSTALL_PROGRAM) thirdparty/MaxMind.Db.dll "$(DATA_INSTALL_DIR)" - @$(INSTALL_PROGRAM) thirdparty/MaxMind.GeoIP2.dll "$(DATA_INSTALL_DIR)" - @$(INSTALL_PROGRAM) thirdparty/Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)" - @$(INSTALL_PROGRAM) thirdparty/RestSharp.dll "$(DATA_INSTALL_DIR)" - @$(CP) thirdparty/${platformdeps}/* "$(DATA_INSTALL_DIR)" + @$(CP) SDL2-CS* "$(DATA_INSTALL_DIR)" + @$(CP) Eluant* "$(DATA_INSTALL_DIR)" + @$(INSTALL_PROGRAM) ICSharpCode.SharpZipLib.dll "$(DATA_INSTALL_DIR)" + @$(INSTALL_PROGRAM) FuzzyLogicLibrary.dll "$(DATA_INSTALL_DIR)" + @$(INSTALL_PROGRAM) SharpFont.dll "$(DATA_INSTALL_DIR)" + @$(CP) SharpFont.dll.config "$(DATA_INSTALL_DIR)" + @$(INSTALL_PROGRAM) Mono.Nat.dll "$(DATA_INSTALL_DIR)" + @$(INSTALL_PROGRAM) KopiLua.dll "$(DATA_INSTALL_DIR)" + @$(INSTALL_PROGRAM) NLua.dll "$(DATA_INSTALL_DIR)" + @$(INSTALL_PROGRAM) MaxMind.Db.dll "$(DATA_INSTALL_DIR)" + @$(INSTALL_PROGRAM) MaxMind.GeoIP2.dll "$(DATA_INSTALL_DIR)" + @$(INSTALL_PROGRAM) Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)" + @$(INSTALL_PROGRAM) RestSharp.dll "$(DATA_INSTALL_DIR)" ifeq ($(shell uname),Linux) @$(CP) *.sh "$(DATA_INSTALL_DIR)" diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index cc38f3f577..870949f36f 100755 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -21,6 +21,8 @@ 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" +cp $DEPSDIR/* $PWD/packaging/linux/$ROOTDIR/usr/lib/openra/ + # Icons and .desktop files make install-shortcuts prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR" From 99f6fce5267b95751a806550f8f1f3fc992d268b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 26 May 2014 12:16:09 +0200 Subject: [PATCH 03/16] ralint is core and crashdialog (winform) tools --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a69c456d09..49e532f5ee 100644 --- a/Makefile +++ b/Makefile @@ -66,8 +66,8 @@ INSTALL_PROGRAM = $(INSTALL) -m755 INSTALL_DATA = $(INSTALL) -m644 # program targets -CORE = rsdl2 rnull game utility irc -TOOLS = editor tsbuild ralint +CORE = rsdl2 rnull game utility irc ralint +TOOLS = editor tsbuild crashdialog VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`) From dedafd1c22f7bc31f04232fa76679d77709dbad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 26 May 2014 12:22:39 +0200 Subject: [PATCH 04/16] also search /usr/local/lib and /opt/lib --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index b04d2c786f..98df37f68e 100755 --- a/configure +++ b/configure @@ -3,7 +3,7 @@ os=`uname` if [ $os == 'Linux' ]; then - locations=(/usr/lib /usr/lib64) + locations=(/usr/lib /usr/lib64 /usr/local/lib /opt/lib) sonames=(liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so) for location in "${locations[@]}" ; do for soname in ${sonames[@]} ; do From 14429f6c1175cbac4904cf191ef0e5718cf9a733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 26 May 2014 14:03:32 +0200 Subject: [PATCH 05/16] be more verbose about success and handle failure with an error --- configure | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 98df37f68e..1ae9b32871 100755 --- a/configure +++ b/configure @@ -9,9 +9,16 @@ if [ $os == 'Linux' ]; then for soname in ${sonames[@]} ; do if [ -f $location/$soname ]; then liblua51=$soname + echo "Detected Lua 5.1 library at "$location/$soname break fi done done - sed "s/@LIBLUA51@/${liblua51}/" thirdparty/Eluant.dll.config.in > Eluant.dll.config + if [ -z $liblua51 ]; then + echo "Lua 5.1 library detection failed." + exit 1 + else + sed "s/@LIBLUA51@/${liblua51}/" thirdparty/Eluant.dll.config.in > Eluant.dll.config + echo "Eluant.dll.config has been created successfully." + fi fi \ No newline at end of file From 3e53e84c1aa150e0770033950b5e01239e3b2896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 26 May 2014 15:19:37 +0200 Subject: [PATCH 06/16] abort earlier and harden against syntax errors --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 1ae9b32871..215097fd30 100755 --- a/configure +++ b/configure @@ -2,7 +2,7 @@ # Use Linux system dependencies where possible, but take into account different .so names. os=`uname` -if [ $os == 'Linux' ]; then +if [ "$os" == 'Linux' ]; then locations=(/usr/lib /usr/lib64 /usr/local/lib /opt/lib) sonames=(liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so) for location in "${locations[@]}" ; do @@ -10,11 +10,11 @@ if [ $os == 'Linux' ]; then if [ -f $location/$soname ]; then liblua51=$soname echo "Detected Lua 5.1 library at "$location/$soname - break + break 2 fi done done - if [ -z $liblua51 ]; then + if [ -z "$liblua51" ]; then echo "Lua 5.1 library detection failed." exit 1 else From 25933b012e8114ef624701c56113ac5e62cc022d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 28 May 2014 07:49:02 +0200 Subject: [PATCH 07/16] add a hard-coded bundled library dllmap config to osx --- thirdparty/osx/Eluant.dll.config | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 thirdparty/osx/Eluant.dll.config diff --git a/thirdparty/osx/Eluant.dll.config b/thirdparty/osx/Eluant.dll.config new file mode 100644 index 0000000000..2795a21468 --- /dev/null +++ b/thirdparty/osx/Eluant.dll.config @@ -0,0 +1,5 @@ + + + + + From 77ed2ca331bf5a50abcbc5f66ad1ee64329b7e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 28 May 2014 07:50:25 +0200 Subject: [PATCH 08/16] add support for Debian multiarch --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 215097fd30..4490455b63 100755 --- a/configure +++ b/configure @@ -3,7 +3,7 @@ os=`uname` if [ "$os" == 'Linux' ]; then - locations=(/usr/lib /usr/lib64 /usr/local/lib /opt/lib) + locations=(/usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu /usr/local/lib /opt/lib) sonames=(liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so) for location in "${locations[@]}" ; do for soname in ${sonames[@]} ; do From 7c6cba889fa9981294673a64d2318e697f8682c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 28 May 2014 08:21:22 +0200 Subject: [PATCH 09/16] strip unused dll map entries --- thirdparty/Eluant.dll.config.in | 1 - thirdparty/SDL2-CS.dll.config | 2 -- thirdparty/linux/Eluant.dll.config | 1 - thirdparty/linux/SDL2-CS.dll.config | 6 ------ thirdparty/osx/Eluant.dll.config | 2 -- 5 files changed, 12 deletions(-) diff --git a/thirdparty/Eluant.dll.config.in b/thirdparty/Eluant.dll.config.in index 3cd706beec..6c00f329f4 100644 --- a/thirdparty/Eluant.dll.config.in +++ b/thirdparty/Eluant.dll.config.in @@ -1,4 +1,3 @@ - diff --git a/thirdparty/SDL2-CS.dll.config b/thirdparty/SDL2-CS.dll.config index dcc5417987..9637cfe6b5 100644 --- a/thirdparty/SDL2-CS.dll.config +++ b/thirdparty/SDL2-CS.dll.config @@ -8,13 +8,11 @@ - - diff --git a/thirdparty/linux/Eluant.dll.config b/thirdparty/linux/Eluant.dll.config index 2795a21468..5e2566f319 100644 --- a/thirdparty/linux/Eluant.dll.config +++ b/thirdparty/linux/Eluant.dll.config @@ -1,5 +1,4 @@ - diff --git a/thirdparty/linux/SDL2-CS.dll.config b/thirdparty/linux/SDL2-CS.dll.config index 85592006e0..85bfbbec94 100644 --- a/thirdparty/linux/SDL2-CS.dll.config +++ b/thirdparty/linux/SDL2-CS.dll.config @@ -1,21 +1,15 @@ - - - - - - diff --git a/thirdparty/osx/Eluant.dll.config b/thirdparty/osx/Eluant.dll.config index 2795a21468..43be429756 100644 --- a/thirdparty/osx/Eluant.dll.config +++ b/thirdparty/osx/Eluant.dll.config @@ -1,5 +1,3 @@ - - From 8e05243097128a9b9cfe1c348014a0241dd4fbb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 28 May 2014 16:22:43 +0200 Subject: [PATCH 10/16] separate into icons and desktop from install-shortcuts --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 49e532f5ee..46fc16214c 100644 --- a/Makefile +++ b/Makefile @@ -295,7 +295,7 @@ docs: utility install: install-core -install-all: install-core install-tools +install-all: install-core install-tools install-icons install-desktop install-shortcuts install-core: default @-echo "Installing OpenRA to $(DATA_INSTALL_DIR)" @@ -342,10 +342,16 @@ install-tools: tools @$(INSTALL_DIR) "$(DATA_INSTALL_DIR)" @$(INSTALL_PROGRAM) $(foreach prog,$(TOOLS),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)" -install-shortcuts: +install-icons: @$(INSTALL_DIR) "$(DESTDIR)$(datadir)/icons/" @$(CP_R) packaging/linux/hicolor/ "$(DESTDIR)$(datadir)/icons" +install-desktop: + @$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications" + @$(INSTALL_DATA) packaging/linux/openra.desktop "$(DESTDIR)$(datadir)/applications" + @$(INSTALL_DATA) packaging/linux/openra-editor.desktop "$(DESTDIR)$(datadir)/applications" + +install-shortcuts: @echo "#!/bin/sh" > openra @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra @echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra @@ -356,9 +362,6 @@ install-shortcuts: @$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)" @-$(RM) openra - @$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications" - @$(INSTALL_DATA) packaging/linux/openra.desktop "$(DESTDIR)$(datadir)/applications" - @echo "#!/bin/sh" > openra-editor @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra-editor @echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra-editor @@ -369,9 +372,6 @@ install-shortcuts: @$(INSTALL_PROGRAM) -m +rx openra-editor "$(BIN_INSTALL_DIR)" @-$(RM) openra-editor - @$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications" - @$(INSTALL_DATA) packaging/linux/openra-editor.desktop "$(DESTDIR)$(datadir)/applications" - uninstall: @-$(RM_R) "$(DATA_INSTALL_DIR)" @-$(RM_F) "$(BIN_INSTALL_DIR)/openra" From b85610fcdd1b7e2ff99dd6b00901cc70aba8f046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Fri, 30 May 2014 22:40:05 +0200 Subject: [PATCH 11/16] rename libexecdir to libdir --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 46fc16214c..e26d837c75 100644 --- a/Makefile +++ b/Makefile @@ -48,10 +48,9 @@ prefix ?= /usr/local datarootdir ?= $(prefix)/share datadir ?= $(datarootdir) bindir ?= $(prefix)/bin -libexecdir ?= $(prefix)/lib +libdir ?= $(prefix)/lib BIN_INSTALL_DIR = $(DESTDIR)$(bindir) -# TODO: separate data and binaries properly -DATA_INSTALL_DIR = $(DESTDIR)$(libexecdir)/openra +DATA_INSTALL_DIR = $(DESTDIR)$(libdir)/openra # install tools RM = rm @@ -355,7 +354,7 @@ install-shortcuts: @echo "#!/bin/sh" > openra @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra @echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra - @echo 'EXECDIR="$${ROOTDIR}'"$(libexecdir)"'"' >> openra + @echo 'EXECDIR="$${ROOTDIR}'"$(libdir)"'"' >> openra @echo 'cd "$${EXECDIR}/openra"' >> openra @echo 'exec mono OpenRA.Game.exe "$$@"' >> openra @$(INSTALL_DIR) "$(BIN_INSTALL_DIR)" @@ -365,7 +364,7 @@ install-shortcuts: @echo "#!/bin/sh" > openra-editor @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra-editor @echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra-editor - @echo 'EXECDIR="$${ROOTDIR}'"$(libexecdir)"'"' >> openra-editor + @echo 'EXECDIR="$${ROOTDIR}'"$(libdir)"'"' >> openra-editor @echo 'cd "$${EXECDIR}/openra"' >> openra-editor @echo 'exec mono OpenRA.Editor.exe "$$@"' >> openra-editor @$(INSTALL_DIR) "$(BIN_INSTALL_DIR)" From ff5ac155eb4ca7b928ee177c67380bfec4b61a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Fri, 30 May 2014 22:42:15 +0200 Subject: [PATCH 12/16] bring back install-shortcuts and add install-startup-scripts --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e26d837c75..005fafe7ec 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ # make [prefix=/foo] [bindir=/bar/bin] install-all # # to install Linux desktop files and icons: -# make install-shortcuts +# make install-startup-scripts # # to uninstall, run: # make uninstall @@ -294,7 +294,9 @@ docs: utility install: install-core -install-all: install-core install-tools install-icons install-desktop install-shortcuts +install-all: install-core install-tools install-startup-scripts + +install-shortcuts: install-icons install-desktop install-core: default @-echo "Installing OpenRA to $(DATA_INSTALL_DIR)" @@ -350,7 +352,7 @@ install-desktop: @$(INSTALL_DATA) packaging/linux/openra.desktop "$(DESTDIR)$(datadir)/applications" @$(INSTALL_DATA) packaging/linux/openra-editor.desktop "$(DESTDIR)$(datadir)/applications" -install-shortcuts: +install-startup-scripts: @echo "#!/bin/sh" > openra @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra @echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra @@ -405,7 +407,7 @@ help: @echo \ \ make \[prefix=/foo\] \[bindir=/bar/bin\] install-all @echo @echo to install Linux desktop files and icons - @echo \ \ make install-shortcuts + @echo \ \ make install-startup-scripts @echo @echo to uninstall, run: @echo \ \ make uninstall From 9e4713dc0a3385b798168a3d2d46fefe5b051846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Fri, 30 May 2014 22:47:38 +0200 Subject: [PATCH 13/16] simplify startup scripts and configurable install directory --- Makefile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 005fafe7ec..461f968fbf 100644 --- a/Makefile +++ b/Makefile @@ -49,8 +49,10 @@ datarootdir ?= $(prefix)/share datadir ?= $(datarootdir) bindir ?= $(prefix)/bin libdir ?= $(prefix)/lib +gameinstalldir ?= $(libdir)/openra + BIN_INSTALL_DIR = $(DESTDIR)$(bindir) -DATA_INSTALL_DIR = $(DESTDIR)$(libdir)/openra +DATA_INSTALL_DIR = $(DESTDIR)$(gameinstalldir) # install tools RM = rm @@ -354,20 +356,14 @@ install-desktop: install-startup-scripts: @echo "#!/bin/sh" > openra - @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra - @echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra - @echo 'EXECDIR="$${ROOTDIR}'"$(libdir)"'"' >> openra - @echo 'cd "$${EXECDIR}/openra"' >> openra + @echo 'cd "$(gameinstalldir)"' >> openra @echo 'exec mono OpenRA.Game.exe "$$@"' >> openra @$(INSTALL_DIR) "$(BIN_INSTALL_DIR)" @$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)" @-$(RM) openra @echo "#!/bin/sh" > openra-editor - @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra-editor - @echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra-editor - @echo 'EXECDIR="$${ROOTDIR}'"$(libdir)"'"' >> openra-editor - @echo 'cd "$${EXECDIR}/openra"' >> openra-editor + @echo 'cd "$(gameinstalldir)"' >> openra-editor @echo 'exec mono OpenRA.Editor.exe "$$@"' >> openra-editor @$(INSTALL_DIR) "$(BIN_INSTALL_DIR)" @$(INSTALL_PROGRAM) -m +rx openra-editor "$(BIN_INSTALL_DIR)" From fe859c6fef0dce23c9546c489cd1c30c7d6aacf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 31 May 2014 09:51:44 +0200 Subject: [PATCH 14/16] rename everything freedesktop.org related install-linux-* --- Makefile | 18 +++++++++--------- packaging/linux/buildpackage.sh | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 461f968fbf..be6e20e23f 100644 --- a/Makefile +++ b/Makefile @@ -18,8 +18,8 @@ # to install with development tools, run: # make [prefix=/foo] [bindir=/bar/bin] install-all # -# to install Linux desktop files and icons: -# make install-startup-scripts +# to install Linux startup scripts, desktop files and icons: +# make install-linux-shortcuts # # to uninstall, run: # make uninstall @@ -296,9 +296,9 @@ docs: utility install: install-core -install-all: install-core install-tools install-startup-scripts +install-all: install-core install-tools -install-shortcuts: install-icons install-desktop +install-linux-shortcuts: install-linux-scripts install-linux-icons install-linux-desktop install-core: default @-echo "Installing OpenRA to $(DATA_INSTALL_DIR)" @@ -345,16 +345,16 @@ install-tools: tools @$(INSTALL_DIR) "$(DATA_INSTALL_DIR)" @$(INSTALL_PROGRAM) $(foreach prog,$(TOOLS),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)" -install-icons: +install-linux-icons: @$(INSTALL_DIR) "$(DESTDIR)$(datadir)/icons/" @$(CP_R) packaging/linux/hicolor/ "$(DESTDIR)$(datadir)/icons" -install-desktop: +install-linux-desktop: @$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications" @$(INSTALL_DATA) packaging/linux/openra.desktop "$(DESTDIR)$(datadir)/applications" @$(INSTALL_DATA) packaging/linux/openra-editor.desktop "$(DESTDIR)$(datadir)/applications" -install-startup-scripts: +install-linux-scripts: @echo "#!/bin/sh" > openra @echo 'cd "$(gameinstalldir)"' >> openra @echo 'exec mono OpenRA.Game.exe "$$@"' >> openra @@ -402,8 +402,8 @@ help: @echo to install with development tools, run: @echo \ \ make \[prefix=/foo\] \[bindir=/bar/bin\] install-all @echo - @echo to install Linux desktop files and icons - @echo \ \ make install-startup-scripts + @echo to install Linux startup scripts, desktop files and icons + @echo \ \ make install-linux-shortcuts @echo @echo to uninstall, run: @echo \ \ make uninstall diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index 870949f36f..90d910bd0b 100755 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -23,8 +23,8 @@ make install-all prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR" cp $DEPSDIR/* $PWD/packaging/linux/$ROOTDIR/usr/lib/openra/ -# Icons and .desktop files -make install-shortcuts prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR" +# Install startup scripts, desktop files and icons +make install-linux-shortcuts prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR" # Remove the WinForms dialog which is replaced with a native one provided by zenity rm $PWD/packaging/linux/$ROOTDIR/usr/lib/openra/OpenRA.CrashDialog.exe From e5c746df157ab5f6f90116d3cb2bef6160e63bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 1 Jun 2014 05:16:53 +0200 Subject: [PATCH 15/16] remove OpenRA.TilesetBuilder.exe from Linux packages --- packaging/linux/buildpackage.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index 90d910bd0b..111bd660ea 100755 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -29,6 +29,9 @@ make install-linux-shortcuts prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDI # Remove the WinForms dialog which is replaced with a native one provided by zenity rm $PWD/packaging/linux/$ROOTDIR/usr/lib/openra/OpenRA.CrashDialog.exe +# Remove the WinForms tileset builder which does not work outside the source tree +rm $PWD/packaging/linux/$ROOTDIR/usr/lib/openra/OpenRA.TilesetBuilder.exe + # Documentation mkdir -p $PWD/packaging/linux/$ROOTDIR/usr/share/doc/openra/ cp *.html $PWD/packaging/linux/$ROOTDIR/usr/share/doc/openra/ From 778f03baea98f2983a3a37ea93ad9cb96b46776a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 31 May 2014 09:56:17 +0200 Subject: [PATCH 16/16] add the new Lua API to make docs --- .gitignore | 1 + Makefile | 1 + packaging/package-all.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 24244cd849..5cfee6b657 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.mode1v3 # auto-generated documentation DOCUMENTATION.md +Lua-API.md *.html # StyleCop diff --git a/Makefile b/Makefile index be6e20e23f..55cdbfb537 100644 --- a/Makefile +++ b/Makefile @@ -293,6 +293,7 @@ version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/modchooser/mo # Documentation (d2k depends on all mod libraries) docs: utility @mono --debug OpenRA.Utility.exe --docs d2k > DOCUMENTATION.md + @mono --debug OpenRA.Utility.exe --lua-docs ra > Lua-API.md install: install-core diff --git a/packaging/package-all.sh b/packaging/package-all.sh index 5feda0b25a..9a96eaa58d 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -27,6 +27,7 @@ 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.Editor.exe' 'OpenRA.Utility.exe' 'OpenRA.CrashDialog.exe' \