diff --git a/.travis.yml b/.travis.yml
index 6b2e17a91b07..c1d6e026daca 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,7 +38,7 @@ script:
make check || travis_terminate 1;
make check-scripts || travis_terminate 1;
make test || travis_terminate 1;
- mono ~/.nuget/packages/nunit.consolerunner/3.11.1/tools/nunit3-console.exe --noresult OpenRA.Test.dll || travis_terminate 1;
+ mono ~/.nuget/packages/nunit.consolerunner/3.11.1/tools/nunit3-console.exe --noresult bin/OpenRA.Test.dll || travis_terminate 1;
fi
# Only watch the development branch and tagged release.
diff --git a/Makefile b/Makefile
index 20bb7c74eef9..d7ede7c95331 100644
--- a/Makefile
+++ b/Makefile
@@ -111,27 +111,27 @@ check:
@$(MSBUILD) -t:build -p:Configuration=Debug
@echo
@echo "Checking runtime assemblies..."
- @mono --debug OpenRA.Utility.exe all --check-runtime-assemblies $(WHITELISTED_OPENRA_ASSEMBLIES) $(WHITELISTED_THIRDPARTY_ASSEMBLIES) $(WHITELISTED_CORE_ASSEMBLIES)
+ @ENGINE_DIR=".." mono --debug bin/OpenRA.Utility.exe all --check-runtime-assemblies $(WHITELISTED_OPENRA_ASSEMBLIES) $(WHITELISTED_THIRDPARTY_ASSEMBLIES) $(WHITELISTED_CORE_ASSEMBLIES)
@echo
@echo "Checking for explicit interface violations..."
- @mono --debug OpenRA.Utility.exe all --check-explicit-interfaces
+ @ENGINE_DIR=".." mono --debug bin/OpenRA.Utility.exe all --check-explicit-interfaces
@echo
@echo "Checking for incorrect conditional trait interface overrides..."
- @mono --debug OpenRA.Utility.exe all --check-conditional-trait-interface-overrides
+ @ENGINE_DIR=".." mono --debug bin/OpenRA.Utility.exe all --check-conditional-trait-interface-overrides
test: core
@echo
@echo "Testing Tiberian Sun mod MiniYAML..."
- @mono --debug OpenRA.Utility.exe ts --check-yaml
+ @ENGINE_DIR=".." mono --debug bin/OpenRA.Utility.exe ts --check-yaml
@echo
@echo "Testing Dune 2000 mod MiniYAML..."
- @mono --debug OpenRA.Utility.exe d2k --check-yaml
+ @ENGINE_DIR=".." mono --debug bin/OpenRA.Utility.exe d2k --check-yaml
@echo
@echo "Testing Tiberian Dawn mod MiniYAML..."
- @mono --debug OpenRA.Utility.exe cnc --check-yaml
+ @ENGINE_DIR=".." mono --debug bin/OpenRA.Utility.exe cnc --check-yaml
@echo
@echo "Testing Red Alert mod MiniYAML..."
- @mono --debug OpenRA.Utility.exe ra --check-yaml
+ @ENGINE_DIR=".." mono --debug bin/OpenRA.Utility.exe ra --check-yaml
########################## MAKE/INSTALL RULES ##########################
#
@@ -147,8 +147,7 @@ endif
clean:
@-$(RM_F) *.config IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP
- @-$(RM_F) *.exe *.dll *.dll.config *.so *.dylib ./OpenRA*/*.dll *.pdb mods/**/*.dll mods/**/*.pdb *.resources
- @-$(RM_RF) ./*/bin ./*/obj
+ @-$(RM_RF) ./bin ./*/bin ./*/obj
@ $(MSBUILD) -t:clean
version: 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
@@ -167,39 +166,39 @@ install-linux-shortcuts: install-linux-scripts install-linux-icons install-linux
install-dependencies:
ifeq ($(TARGETPLATFORM), $(filter $(TARGETPLATFORM),win-x86 win-x64))
@-echo "Installing OpenRA dependencies to $(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) soft_oal.dll "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) SDL2.dll "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) freetype6.dll "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) lua51.dll "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) libEGL.dll "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) libGLESv2.dll "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/soft_oal.dll "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/SDL2.dll "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/freetype6.dll "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/lua51.dll "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/libEGL.dll "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/libGLESv2.dll "$(DATA_INSTALL_DIR)"
endif
ifeq ($(TARGETPLATFORM), linux-x64)
@-echo "Installing OpenRA dependencies to $(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) soft_oal.so "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) SDL2.so "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) freetype6.so "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) lua51.so "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/soft_oal.so "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/SDL2.so "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/freetype6.so "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/lua51.so "$(DATA_INSTALL_DIR)"
endif
ifeq ($(TARGETPLATFORM), osx-x64)
@-echo "Installing OpenRA dependencies to $(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) soft_oal.dylib "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) SDL2.dylib "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) freetype6.dylib "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) lua51.dylib "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/soft_oal.dylib "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/SDL2.dylib "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/freetype6.dylib "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/lua51.dylib "$(DATA_INSTALL_DIR)"
endif
install-engine:
@-echo "Installing OpenRA engine to $(DATA_INSTALL_DIR)"
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) OpenRA.Game.exe "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) OpenRA.Server.exe "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) OpenRA.Utility.exe "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) OpenRA.Platforms.Default.dll "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/OpenRA.Game.exe "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/OpenRA.Server.exe "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/OpenRA.Utility.exe "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/OpenRA.Platforms.Default.dll "$(DATA_INSTALL_DIR)"
ifneq ($(TARGETPLATFORM), $(filter $(TARGETPLATFORM),win-x86 win-x64))
- @$(INSTALL_DATA) OpenRA.Platforms.Default.dll.config "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_DATA) bin/OpenRA.Platforms.Default.dll.config "$(DATA_INSTALL_DIR)"
endif
@$(INSTALL_DATA) VERSION "$(DATA_INSTALL_DIR)/VERSION"
@$(INSTALL_DATA) AUTHORS "$(DATA_INSTALL_DIR)/AUTHORS"
@@ -208,22 +207,22 @@ endif
@$(CP_R) glsl "$(DATA_INSTALL_DIR)"
@$(CP_R) lua "$(DATA_INSTALL_DIR)"
- @$(CP) SDL2-CS* "$(DATA_INSTALL_DIR)"
- @$(CP) OpenAL-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) Open.Nat.dll "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) BeaconLib.dll "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) DiscordRPC.dll "$(DATA_INSTALL_DIR)"
- @$(INSTALL_PROGRAM) Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)"
+ @$(CP) bin/SDL2-CS* "$(DATA_INSTALL_DIR)"
+ @$(CP) bin/OpenAL-CS* "$(DATA_INSTALL_DIR)"
+ @$(CP) bin/Eluant* "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/ICSharpCode.SharpZipLib.dll "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/FuzzyLogicLibrary.dll "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/Open.Nat.dll "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/BeaconLib.dll "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/DiscordRPC.dll "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)"
install-common-mod-files:
@-echo "Installing OpenRA common mod files to $(DATA_INSTALL_DIR)"
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)/mods"
@$(CP_R) mods/common "$(DATA_INSTALL_DIR)/mods/"
- @$(INSTALL_PROGRAM) mods/common/OpenRA.Mods.Common.dll "$(DATA_INSTALL_DIR)/mods/common"
- @$(INSTALL_PROGRAM) mods/common/OpenRA.Mods.Cnc.dll "$(DATA_INSTALL_DIR)/mods/common"
+ @$(INSTALL_PROGRAM) bin/OpenRA.Mods.Common.dll "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) bin/OpenRA.Mods.Cnc.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_DATA) "global mix database.dat" "$(DATA_INSTALL_DIR)/global mix database.dat"
install-default-mods:
@@ -232,7 +231,7 @@ install-default-mods:
@$(CP_R) mods/cnc "$(DATA_INSTALL_DIR)/mods/"
@$(CP_R) mods/ra "$(DATA_INSTALL_DIR)/mods/"
@$(CP_R) mods/d2k "$(DATA_INSTALL_DIR)/mods/"
- @$(INSTALL_PROGRAM) mods/d2k/OpenRA.Mods.D2k.dll "$(DATA_INSTALL_DIR)/mods/d2k"
+ @$(INSTALL_PROGRAM) bin/OpenRA.Mods.D2k.dll "$(DATA_INSTALL_DIR)"
@$(CP_R) mods/modcontent "$(DATA_INSTALL_DIR)/mods/"
install-linux-icons:
@@ -277,7 +276,7 @@ install-linux-appdata:
install-man-page:
@$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man6/"
- @mono --debug OpenRA.Utility.exe all --man-page > openra.6
+ @ENGINE_DIR=".." mono --debug bin/OpenRA.Utility.exe all --man-page > openra.6
@$(INSTALL_DATA) openra.6 "$(DESTDIR)$(mandir)/man6/"
@-$(RM) openra.6
diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj
index c048102b3caa..c8e12ddab400 100644
--- a/OpenRA.Game/OpenRA.Game.csproj
+++ b/OpenRA.Game/OpenRA.Game.csproj
@@ -10,7 +10,7 @@
true
false
OpenRA
- ..
+ ../bin
false
AnyCPU
false
@@ -36,19 +36,19 @@
Project
- Game.Mod=ra
+ Engine.EngineDir=".." Game.Mod=ra
Project
- Game.Mod=d2k
+ Engine.EngineDir=".." Game.Mod=d2k
Project
- Game.Mod=cnc
+ Engine.EngineDir=".." Game.Mod=cnc
Project
- Game.Mod=ts
+ Engine.EngineDir=".." Game.Mod=ts
diff --git a/OpenRA.Game/Properties/launchSettings.json b/OpenRA.Game/Properties/launchSettings.json
index 9bc2c5d507c3..68b7c0649522 100644
--- a/OpenRA.Game/Properties/launchSettings.json
+++ b/OpenRA.Game/Properties/launchSettings.json
@@ -2,19 +2,19 @@
"profiles": {
"Tiberian Dawn": {
"commandName": "Project",
- "commandLineArgs": "Game.Mod=cnc"
+ "commandLineArgs": "Engine.EngineDir=\"..\" Game.Mod=cnc"
},
"Red Alert": {
"commandName": "Project",
- "commandLineArgs": "Game.Mod=ra"
+ "commandLineArgs": "Engine.EngineDir=\"..\" Game.Mod=ra"
},
"Dune 2000": {
"commandName": "Project",
- "commandLineArgs": "Game.Mod=d2k"
+ "commandLineArgs": "Engine.EngineDir=\"..\" Game.Mod=d2k"
},
"Tiberian Sun": {
"commandName": "Project",
- "commandLineArgs": "Game.Mod=ts"
+ "commandLineArgs": "Engine.EngineDir=\"..\" Game.Mod=ts"
}
}
-}
\ No newline at end of file
+}
diff --git a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj
index d05c8427422e..daf5f102149a 100644
--- a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj
+++ b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj
@@ -6,7 +6,7 @@
7.3
true
true
- ../mods/common
+ ../bin
false
AnyCPU
false
diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj
index 846f16856e76..31a1304f50d1 100644
--- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj
+++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj
@@ -6,7 +6,7 @@
7.3
true
true
- ../mods/common
+ ../bin
false
AnyCPU
false
diff --git a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
index d7db47d52465..daf5f102149a 100644
--- a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
+++ b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
@@ -6,7 +6,7 @@
7.3
true
true
- ../mods/d2k
+ ../bin
false
AnyCPU
false
diff --git a/OpenRA.Platforms.Default/OpenRA.Platforms.Default.csproj b/OpenRA.Platforms.Default/OpenRA.Platforms.Default.csproj
index 0d3a6f806dfa..79c16701ba27 100644
--- a/OpenRA.Platforms.Default/OpenRA.Platforms.Default.csproj
+++ b/OpenRA.Platforms.Default/OpenRA.Platforms.Default.csproj
@@ -6,7 +6,7 @@
7.3
true
true
- ..
+ ../bin
false
AnyCPU
false
diff --git a/OpenRA.Server/OpenRA.Server.csproj b/OpenRA.Server/OpenRA.Server.csproj
index 2459a23cc11c..31188b7ed748 100644
--- a/OpenRA.Server/OpenRA.Server.csproj
+++ b/OpenRA.Server/OpenRA.Server.csproj
@@ -5,7 +5,7 @@
true
true
false
- ..
+ ../bin
false
7.3
true
diff --git a/OpenRA.Test/OpenRA.Test.csproj b/OpenRA.Test/OpenRA.Test.csproj
index 12c2a542e527..e5a6a2a3f287 100644
--- a/OpenRA.Test/OpenRA.Test.csproj
+++ b/OpenRA.Test/OpenRA.Test.csproj
@@ -5,7 +5,7 @@
7.3
true
true
- ..
+ ../bin
false
AnyCPU
false
diff --git a/OpenRA.Utility/OpenRA.Utility.csproj b/OpenRA.Utility/OpenRA.Utility.csproj
index 2459a23cc11c..31188b7ed748 100644
--- a/OpenRA.Utility/OpenRA.Utility.csproj
+++ b/OpenRA.Utility/OpenRA.Utility.csproj
@@ -5,7 +5,7 @@
true
true
false
- ..
+ ../bin
false
7.3
true
diff --git a/appveyor.yml b/appveyor.yml
index 24c60aa77cf8..bee336318409 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -7,7 +7,7 @@ build_script:
- make all
test_script:
- - nunit3-console OpenRA.Test.dll --result=myresults.xml;format=AppVeyor
+ - nunit3-console bin/OpenRA.Test.dll --result=myresults.xml;format=AppVeyor
after_test:
- appveyor DownloadFile "https://github.com/OpenRA/GeoIP-Database/releases/download/monthly/IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP" -FileName IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP
@@ -15,6 +15,7 @@ after_test:
- python -c "from PIL import Image; i = Image.open('packaging/artwork/ra_256x256.png'); i.save('ra.ico')"
- python -c "from PIL import Image; i = Image.open('packaging/artwork/cnc_256x256.png'); i.save('cnc.ico')"
- python -c "from PIL import Image; i = Image.open('packaging/artwork/d2k_256x256.png'); i.save('d2k.ico')"
+ - move /Y %APPVEYOR_BUILD_FOLDER%\bin\* %APPVEYOR_BUILD_FOLDER%
- ps: (Get-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs.in").replace('DISPLAY_NAME', 'Red Alert').replace('MOD_ID', 'ra').replace('FAQ_URL', 'http://wiki.openra.net/FAQ') | Set-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs"
- ps: C:\"Program Files (x86)"\"Microsoft Visual Studio"\2017\Community\MSBuild\15.0\Bin\Roslyn\csc.exe /noconfig /platform:x64 /reference:System.dll /reference:System.Core.dll /reference:System.Drawing.dll /reference:System.Windows.Forms.dll /reference:"${env:APPVEYOR_BUILD_FOLDER}\OpenRA.Game.exe" /out:"${env:APPVEYOR_BUILD_FOLDER}\RedAlert.exe" /win32icon:"${env:APPVEYOR_BUILD_FOLDER}\ra.ico" /target:winexe ${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs
- ps: (Get-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs.in").replace('DISPLAY_NAME', 'Tiberian Dawn').replace('MOD_ID', 'cnc').replace('FAQ_URL', 'http://wiki.openra.net/FAQ') | Set-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs"
diff --git a/configure-system-libraries.sh b/configure-system-libraries.sh
index b101372ea829..34c0f5258360 100755
--- a/configure-system-libraries.sh
+++ b/configure-system-libraries.sh
@@ -38,14 +38,14 @@ patch_config()
if [ "$(uname -s)" = "Darwin" ]; then
SEARCHDIRS="/usr/local/lib /usr/local/opt/openal-soft/lib"
- patch_config "Lua 5.1" "${SEARCHDIRS}" Eluant.dll.config lua51.dylib liblua5.1.dylib
- patch_config SDL2 "${SEARCHDIRS}" SDL2-CS.dll.config SDL2.dylib libSDL2-2.0.0.dylib
- patch_config OpenAL "${SEARCHDIRS}" OpenAL-CS.Core.dll.config soft_oal.dylib libopenal.1.dylib
- patch_config FreeType "${SEARCHDIRS}" OpenRA.Platforms.Default.dll.config freetype6.dylib libfreetype.6.dylib
+ patch_config "Lua 5.1" "${SEARCHDIRS}" bin/Eluant.dll.config lua51.dylib liblua5.1.dylib
+ patch_config SDL2 "${SEARCHDIRS}" bin/SDL2-CS.dll.config SDL2.dylib libSDL2-2.0.0.dylib
+ patch_config OpenAL "${SEARCHDIRS}" bin/OpenAL-CS.Core.dll.config soft_oal.dylib libopenal.1.dylib
+ patch_config FreeType "${SEARCHDIRS}" bin/OpenRA.Platforms.Default.dll.config freetype6.dylib libfreetype.6.dylib
else
SEARCHDIRS="/lib /lib64 /usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu /usr/lib/arm-linux-gnueabihf /usr/lib/aarch64-linux-gnu /usr/lib/powerpc64le-linux-gnu /usr/lib/mipsel-linux-gnu /usr/local/lib /opt/lib /opt/local/lib /app/lib"
- patch_config "Lua 5.1" "${SEARCHDIRS}" Eluant.dll.config lua51.so "liblua.so.5.1.5 liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so"
- patch_config SDL2 "${SEARCHDIRS}" SDL2-CS.dll.config SDL2.so "libSDL2-2.0.so.0 libSDL2-2.0.so libSDL2.so"
- patch_config OpenAL "${SEARCHDIRS}" OpenAL-CS.Core.dll.config soft_oal.so "libopenal.so.1 libopenal.so"
- patch_config FreeType "${SEARCHDIRS}" OpenRA.Platforms.Default.dll.config freetype6.so "libfreetype.so.6 libfreetype.so"
+ patch_config "Lua 5.1" "${SEARCHDIRS}" bin/Eluant.dll.config lua51.so "liblua.so.5.1.5 liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so"
+ patch_config SDL2 "${SEARCHDIRS}" bin/SDL2-CS.dll.config SDL2.so "libSDL2-2.0.so.0 libSDL2-2.0.so libSDL2.so"
+ patch_config OpenAL "${SEARCHDIRS}" bin/OpenAL-CS.Core.dll.config soft_oal.so "libopenal.so.1 libopenal.so"
+ patch_config FreeType "${SEARCHDIRS}" bin/OpenRA.Platforms.Default.dll.config freetype6.so "libfreetype.so.6 libfreetype.so"
fi
diff --git a/launch-dedicated.cmd b/launch-dedicated.cmd
index 372b6b7bb533..0e0b5f551fdd 100644
--- a/launch-dedicated.cmd
+++ b/launch-dedicated.cmd
@@ -22,6 +22,6 @@ set SupportDir=""
:loop
-OpenRA.Server.exe Game.Mod=%Mod% Server.Name=%Name% Server.ListenPort=%ListenPort% Server.AdvertiseOnline=%AdvertiseOnline% Server.EnableSingleplayer=%EnableSingleplayer% Server.Password=%Password% Server.RecordReplays=%RecordReplays% Server.RequireAuthentication=%RequireAuthentication% Server.ProfileIDBlacklist=%ProfileIDBlacklist% Server.ProfileIDWhitelist=%ProfileIDWhitelist% Server.EnableSyncReports=%EnableSyncReports% Server.EnableGeoIP=%EnableGeoIP% Server.ShareAnonymizedIPs=%ShareAnonymizedIPs% Engine.SupportDir=%SupportDir%
+bin\OpenRA.Server.exe Engine.EngineDir=".." Game.Mod=%Mod% Server.Name=%Name% Server.ListenPort=%ListenPort% Server.AdvertiseOnline=%AdvertiseOnline% Server.EnableSingleplayer=%EnableSingleplayer% Server.Password=%Password% Server.RecordReplays=%RecordReplays% Server.RequireAuthentication=%RequireAuthentication% Server.ProfileIDBlacklist=%ProfileIDBlacklist% Server.ProfileIDWhitelist=%ProfileIDWhitelist% Server.EnableSyncReports=%EnableSyncReports% Server.EnableGeoIP=%EnableGeoIP% Server.ShareAnonymizedIPs=%ShareAnonymizedIPs% Engine.SupportDir=%SupportDir%
goto loop
diff --git a/launch-dedicated.sh b/launch-dedicated.sh
index 611ca6c8306e..b6cfa9e97458 100755
--- a/launch-dedicated.sh
+++ b/launch-dedicated.sh
@@ -25,7 +25,7 @@ ShareAnonymizedIPs="${ShareAnonymizedIPs:-"True"}"
SupportDir="${SupportDir:-""}"
while true; do
- mono --debug OpenRA.Server.exe Game.Mod="$Mod" \
+ mono --debug bin/OpenRA.Server.exe Engine.EngineDir=".." Game.Mod="$Mod" \
Server.Name="$Name" \
Server.ListenPort="$ListenPort" \
Server.AdvertiseOnline="$AdvertiseOnline" \
diff --git a/launch-game.cmd b/launch-game.cmd
index a96c58fe1574..8ee26bc93344 100644
--- a/launch-game.cmd
+++ b/launch-game.cmd
@@ -17,10 +17,10 @@ echo.
goto choosemod
:launchmod
-OpenRA.Game.exe Game.Mod=%mod% %*
+bin\OpenRA.Game.exe Engine.EngineDir=".." Game.Mod=%mod% %*
goto end
:launch
-OpenRA.Game.exe %*
+bin\OpenRA.Game.exe Engine.EngineDir=".." %*
:end
if %errorlevel% neq 0 goto crashdialog
diff --git a/launch-game.sh b/launch-game.sh
index 9974c72c6267..625fc48e3515 100755
--- a/launch-game.sh
+++ b/launch-game.sh
@@ -25,7 +25,7 @@ then
fi
# Launch the engine with the appropriate arguments
-mono OpenRA.Game.exe Engine.LaunchPath="$MODLAUNCHER" $MODARG "$@"
+mono bin/OpenRA.Game.exe Engine.EngineDir=".." Engine.LaunchPath="$MODLAUNCHER" $MODARG "$@"
# Show a crash dialog if something went wrong
if [ $? != 0 ] && [ $? != 1 ]; then
diff --git a/make.ps1 b/make.ps1
index 2c152f1643a1..cd66b2881a87 100644
--- a/make.ps1
+++ b/make.ps1
@@ -36,18 +36,9 @@ function Clean-Command
}
dotnet clean /nologo
- rm *.dll
- rm mods/*/*.dll
- rm *.config
- rm *.pdb
- rm mods/*/*.pdb
- rm *.exe
+ rm ./bin -r
rm ./*/bin -r
rm ./*/obj -r
- if (Test-Path thirdparty/download/)
- {
- rmdir thirdparty/download -Recurse -Force
- }
Write-Host "Clean complete." -ForegroundColor Green
}
@@ -108,13 +99,13 @@ function Test-Command
Write-Host "Testing mods..." -ForegroundColor Cyan
Write-Host "Testing Tiberian Sun mod MiniYAML..." -ForegroundColor Cyan
- ./OpenRA.Utility.exe ts --check-yaml
+ Invoke-Expression "$utilityPath ts --check-yaml"
Write-Host "Testing Dune 2000 mod MiniYAML..." -ForegroundColor Cyan
- ./OpenRA.Utility.exe d2k --check-yaml
+ Invoke-Expression "$utilityPath d2k --check-yaml"
Write-Host "Testing Tiberian Dawn mod MiniYAML..." -ForegroundColor Cyan
- ./OpenRA.Utility.exe cnc --check-yaml
+ Invoke-Expression "$utilityPath cnc --check-yaml"
Write-Host "Testing Red Alert mod MiniYAML..." -ForegroundColor Cyan
- ./OpenRA.Utility.exe ra --check-yaml
+ Invoke-Expression "$utilityPath ra --check-yaml"
}
function Check-Command
@@ -129,10 +120,10 @@ function Check-Command
if ((CheckForUtility) -eq 0)
{
Write-Host "Checking for explicit interface violations..." -ForegroundColor Cyan
- ./OpenRA.Utility.exe all --check-explicit-interfaces
+ Invoke-Expression "$utilityPath all --check-explicit-interfaces"
Write-Host "Checking for incorrect conditional trait interface overrides..." -ForegroundColor Cyan
- ./OpenRA.Utility.exe all --check-conditional-trait-interface-overrides
+ Invoke-Expression "$utilityPath all --check-conditional-trait-interface-overrides"
}
}
@@ -169,15 +160,15 @@ function Docs-Command
}
./make.ps1 version
- ./OpenRA.Utility.exe all --docs | Out-File -Encoding "UTF8" DOCUMENTATION.md
- ./OpenRA.Utility.exe all --weapon-docs | Out-File -Encoding "UTF8" WEAPONS.md
- ./OpenRA.Utility.exe all --lua-docs | Out-File -Encoding "UTF8" Lua-API.md
- ./OpenRA.Utility.exe all --settings-docs | Out-File -Encoding "UTF8" Settings.md
+ Invoke-Expression "$utilityPath all --docs" | Out-File -Encoding "UTF8" DOCUMENTATION.md
+ Invoke-Expression "$utilityPath all --weapon-docs" | Out-File -Encoding "UTF8" WEAPONS.md
+ Invoke-Expression "$utilityPath all --lua-docs" | Out-File -Encoding "UTF8" Lua-API.md
+ Invoke-Expression "$utilityPath all --settings-docs" | Out-File -Encoding "UTF8" Settings.md
}
function CheckForUtility
{
- if (Test-Path OpenRA.Utility.exe)
+ if (Test-Path $utilityPath)
{
return 0
}
@@ -241,6 +232,9 @@ else
$command = $args
}
+$env:ENGINE_DIR = ".."
+$utilityPath = "bin\OpenRA.Utility.exe"
+
$execute = $command
if ($command.Length -gt 1)
{
diff --git a/mods/all/mod.yaml b/mods/all/mod.yaml
index f18bb1e39249..aecd52761b8e 100644
--- a/mods/all/mod.yaml
+++ b/mods/all/mod.yaml
@@ -11,9 +11,9 @@ Cursors:
Chrome:
Assemblies:
- ^EngineDir|mods/common/OpenRA.Mods.Common.dll
- ^EngineDir|mods/common/OpenRA.Mods.Cnc.dll
- ^EngineDir|mods/d2k/OpenRA.Mods.D2k.dll
+ ^BinDir|OpenRA.Mods.Common.dll
+ ^BinDir|OpenRA.Mods.Cnc.dll
+ ^BinDir|OpenRA.Mods.D2k.dll
ChromeLayout:
diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml
index ed852e805b4d..a8af78fb9a99 100644
--- a/mods/cnc/mod.yaml
+++ b/mods/cnc/mod.yaml
@@ -87,8 +87,8 @@ Chrome:
cnc|chrome.yaml
Assemblies:
- common|OpenRA.Mods.Common.dll
- common|OpenRA.Mods.Cnc.dll
+ ^BinDir|OpenRA.Mods.Common.dll
+ ^BinDir|OpenRA.Mods.Cnc.dll
ChromeLayout:
cnc|chrome/mainmenu.yaml
diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml
index c597a37c6c0e..8cff5361d759 100644
--- a/mods/d2k/mod.yaml
+++ b/mods/d2k/mod.yaml
@@ -61,9 +61,9 @@ Chrome:
d2k|chrome.yaml
Assemblies:
- common|OpenRA.Mods.Common.dll
- common|OpenRA.Mods.Cnc.dll
- d2k|OpenRA.Mods.D2k.dll
+ ^BinDir|OpenRA.Mods.Common.dll
+ ^BinDir|OpenRA.Mods.Cnc.dll
+ ^BinDir|OpenRA.Mods.D2k.dll
ChromeLayout:
common|chrome/ingame.yaml
diff --git a/mods/modcontent/mod.yaml b/mods/modcontent/mod.yaml
index 0abc107c1d88..948dcf510bb6 100644
--- a/mods/modcontent/mod.yaml
+++ b/mods/modcontent/mod.yaml
@@ -18,7 +18,7 @@ Chrome:
modcontent|chrome.yaml
Assemblies:
- common|OpenRA.Mods.Common.dll
+ ^BinDir|OpenRA.Mods.Common.dll
ChromeLayout:
modcontent|content.yaml
diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml
index bb98c9bf8820..c7bf48e7d1a4 100644
--- a/mods/ra/mod.yaml
+++ b/mods/ra/mod.yaml
@@ -78,8 +78,8 @@ Chrome:
ra|chrome.yaml
Assemblies:
- common|OpenRA.Mods.Common.dll
- common|OpenRA.Mods.Cnc.dll
+ ^BinDir|OpenRA.Mods.Common.dll
+ ^BinDir|OpenRA.Mods.Cnc.dll
ChromeLayout:
common|chrome/ingame.yaml
diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml
index d8c7850db8db..6933dfce58bb 100644
--- a/mods/ts/mod.yaml
+++ b/mods/ts/mod.yaml
@@ -124,8 +124,8 @@ Chrome:
ts|chrome.yaml
Assemblies:
- common|OpenRA.Mods.Common.dll
- common|OpenRA.Mods.Cnc.dll
+ ^BinDir|OpenRA.Mods.Common.dll
+ ^BinDir|OpenRA.Mods.Cnc.dll
ChromeLayout:
common|chrome/ingame.yaml
diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh
index 829708a3877c..8da86a375ba5 100755
--- a/packaging/linux/buildpackage.sh
+++ b/packaging/linux/buildpackage.sh
@@ -103,6 +103,11 @@ build_appimage() {
# Add mod files
pushd "${SRCDIR}" > /dev/null || exit 1
cp -r "mods/${MOD_ID}" mods/modcontent "${APPDIR}/usr/lib/openra/mods"
+
+ # HACK: The D2k dll is not copied by install-common-mod-files so we must do this ourselves
+ if [ "${MOD_ID}" = "d2k" ]; then
+ cp "bin/OpenRA.Mods.D2k.dll" "${APPDIR}/usr/lib/openra"
+ fi
popd > /dev/null || exit 1
# Add launcher and icons
diff --git a/packaging/macos/buildpackage.sh b/packaging/macos/buildpackage.sh
index 7fd04b93cd5d..db7d40ffbcb1 100755
--- a/packaging/macos/buildpackage.sh
+++ b/packaging/macos/buildpackage.sh
@@ -62,6 +62,11 @@ populate_bundle() {
# Add mod files
pushd "${SRCDIR}" > /dev/null || exit 1
cp -r "mods/${MOD_ID}" mods/modcontent "${TEMPLATE_DIR}/Contents/Resources/mods"
+
+ # HACK: The D2k dll is not copied by install-common-mod-files so we must do this ourselves
+ if [ "${MOD_ID}" = "d2k" ]; then
+ cp "bin/OpenRA.Mods.D2k.dll" "${TEMPLATE_DIR}/Contents/Resources"
+ fi
popd > /dev/null || exit 1
# Assemble multi-resolution icon
diff --git a/packaging/windows/OpenRA.nsi b/packaging/windows/OpenRA.nsi
index 188f331193a2..1b6be01fc25b 100644
--- a/packaging/windows/OpenRA.nsi
+++ b/packaging/windows/OpenRA.nsi
@@ -126,37 +126,15 @@ Section "Game" GAME
File /r "${SRCDIR}\mods\modcontent"
SetOutPath "$INSTDIR"
- File "${SRCDIR}\RedAlert.exe"
- File "${SRCDIR}\TiberianDawn.exe"
- File "${SRCDIR}\Dune2000.exe"
- File "${SRCDIR}\OpenRA.Game.exe"
- File "${SRCDIR}\OpenRA.Game.exe.config"
- File "${SRCDIR}\OpenRA.Utility.exe"
- File "${SRCDIR}\OpenRA.Server.exe"
- File "${SRCDIR}\OpenRA.Platforms.Default.dll"
- File "${SRCDIR}\ICSharpCode.SharpZipLib.dll"
- File "${SRCDIR}\FuzzyLogicLibrary.dll"
- File "${SRCDIR}\Open.Nat.dll"
+ File "${SRCDIR}\*.exe"
+ File "${SRCDIR}\*.exe.config"
+ File "${SRCDIR}\*.dll"
+ File "${SRCDIR}\*.ico"
File "${SRCDIR}\VERSION"
File "${SRCDIR}\AUTHORS"
File "${SRCDIR}\COPYING"
- File "${SRCDIR}\ra.ico"
- File "${SRCDIR}\cnc.ico"
- File "${SRCDIR}\d2k.ico"
- File "${SRCDIR}\SDL2-CS.dll"
- File "${SRCDIR}\OpenAL-CS.Core.dll"
File "${SRCDIR}\global mix database.dat"
File "${SRCDIR}\IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP"
- File "${SRCDIR}\eluant.dll"
- File "${SRCDIR}\BeaconLib.dll"
- File "${SRCDIR}\soft_oal.dll"
- File "${SRCDIR}\DiscordRPC.dll"
- File "${SRCDIR}\Newtonsoft.Json.dll"
- File "${SRCDIR}\SDL2.dll"
- File "${SRCDIR}\libEGL.dll"
- File "${SRCDIR}\libGLESv2.dll"
- File "${SRCDIR}\freetype6.dll"
- File "${SRCDIR}\lua51.dll"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
@@ -244,37 +222,15 @@ Function ${UN}Clean
RMDir /r $INSTDIR\maps
RMDir /r $INSTDIR\glsl
RMDir /r $INSTDIR\lua
- Delete $INSTDIR\RedAlert.exe
- Delete $INSTDIR\TiberianDawn.exe
- Delete $INSTDIR\Dune2000.exe
- Delete $INSTDIR\OpenRA.Game.exe
- Delete $INSTDIR\OpenRA.Game.exe.config
- Delete $INSTDIR\OpenRA.Utility.exe
- Delete $INSTDIR\OpenRA.Server.exe
- Delete $INSTDIR\OpenRA.Platforms.Default.dll
- Delete $INSTDIR\ICSharpCode.SharpZipLib.dll
- Delete $INSTDIR\FuzzyLogicLibrary.dll
- Delete $INSTDIR\Open.Nat.dll
+ Delete $INSTDIR\*.exe
+ Delete $INSTDIR\*.exe.config
+ Delete $INSTDIR\*.dll
+ Delete $INSTDIR\*.ico
Delete $INSTDIR\VERSION
Delete $INSTDIR\AUTHORS
Delete $INSTDIR\COPYING
- Delete $INSTDIR\ra.ico
- Delete $INSTDIR\cnc.ico
- Delete $INSTDIR\d2k.ico
Delete "$INSTDIR\global mix database.dat"
Delete $INSTDIR\IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP
- Delete $INSTDIR\soft_oal.dll
- Delete $INSTDIR\SDL2.dll
- Delete $INSTDIR\libEGL.dll
- Delete $INSTDIR\libGLESv2.dll
- Delete $INSTDIR\lua51.dll
- Delete $INSTDIR\eluant.dll
- Delete $INSTDIR\freetype6.dll
- Delete $INSTDIR\DiscordRPC.dll
- Delete $INSTDIR\Newtonsoft.Json.dll
- Delete $INSTDIR\SDL2-CS.dll
- Delete $INSTDIR\OpenAL-CS.Core.dll
- Delete $INSTDIR\BeaconLib.dll
RMDir /r $INSTDIR\Support
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}"
diff --git a/packaging/windows/buildpackage.sh b/packaging/windows/buildpackage.sh
index 894b5bb9c40b..b1841a6ee6e6 100755
--- a/packaging/windows/buildpackage.sh
+++ b/packaging/windows/buildpackage.sh
@@ -80,7 +80,7 @@ function build_platform()
make install-dependencies "${TARGETPLATFORM}" gameinstalldir="" DESTDIR="${BUILTDIR}"
popd > /dev/null || exit 1
- cp "${SRCDIR}/OpenRA.Game.exe.config" "${BUILTDIR}"
+ cp "${SRCDIR}/bin/OpenRA.Game.exe.config" "${BUILTDIR}"
echo "Compiling Windows launchers (${PLATFORM})"
makelauncher "RedAlert.exe" "Red Alert" "ra" ${PLATFORM}
diff --git a/utility.cmd b/utility.cmd
index 67d0c9929789..09075cd9dd8f 100644
--- a/utility.cmd
+++ b/utility.cmd
@@ -1,9 +1,10 @@
@echo off
title OpenRA.Utility.exe
+set ENGINE_DIR=..
:choosemod
echo ----------------------------------------
echo.
-call OpenRA.Utility.exe
+call bin\OpenRA.Utility.exe
echo Enter --exit to exit
set /P mod="Please enter a modname: OpenRA.Utility.exe "
if /I "%mod%" EQU "--exit" (exit /b)
@@ -20,7 +21,7 @@ echo.
echo ----------------------------------------
echo.
echo OpenRA.Utility.exe %mod%
-call OpenRA.Utility.exe %mod%
+call bin\OpenRA.Utility.exe %mod%
:start
echo.
echo ----------------------------------------
@@ -38,5 +39,5 @@ echo.
echo ----------------------------------------
echo.
echo OpenRA.Utility.exe %mod% %command%
-call OpenRA.Utility.exe %mod% %command%
+call bin\OpenRA.Utility.exe %mod% %command%
goto start