Skip to content

Commit

Permalink
still searching for a unified build process
Browse files Browse the repository at this point in the history
  • Loading branch information
thumperward committed Oct 5, 2023
1 parent ac1b226 commit d11559a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 15 deletions.
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ else
@$(DOTNET) build -c ${CONFIGURATION} -nologo -p:TargetPlatform=$(TARGETPLATFORM)
endif
ifeq ($(TARGETPLATFORM), unix-generic)
@sh -c ./packaging/shared/configure-system-libraries.sh
@sh -c './packaging/shared/configure-system-libraries.sh'
endif
@sh -c ./packaging/shared/fetch-geoip.sh
@sh -c './packaging/shared/fetch-geoip.sh'

# dotnet clean and msbuild -t:Clean leave files that cause problems when switching between mono/dotnet
# Deleting the intermediate / output directories ensures the build directory is actually clean
Expand All @@ -118,14 +118,14 @@ else
@$(DOTNET) build -c Debug -nologo -warnaserror -p:TargetPlatform=$(TARGETPLATFORM)
endif
ifeq ($(TARGETPLATFORM), unix-generic)
@sh -c ./packaging/shared/configure-system-libraries.sh
@sh -c './packaging/shared/configure-system-libraries.sh'
endif
@echo
@echo "Checking for explicit interface violations..."
@sh -c ./packaging/shared/utility.sh all --check-explicit-interfaces
@sh -c './packaging/shared/utility.sh all --check-explicit-interfaces'
@echo
@echo "Checking for incorrect conditional trait interface overrides..."
@sh -c ./packaging/shared/utility.sh all --check-conditional-trait-interface-overrides
@sh -c './packaging/shared/utility.sh all --check-conditional-trait-interface-overrides'

check-scripts:
@echo
Expand All @@ -135,16 +135,16 @@ check-scripts:
test: all
@echo
@echo "Testing Tiberian Sun mod MiniYAML..."
@sh -c ./packaging/shared/utility.sh ts --check-yaml
@sh -c './packaging/shared/utility.sh ts --check-yaml'
@echo
@echo "Testing Dune 2000 mod MiniYAML..."
@sh -c ./packaging/shared/utility.sh d2k --check-yaml
@sh -c './packaging/shared/utility.sh d2k --check-yaml'
@echo
@echo "Testing Tiberian Dawn mod MiniYAML..."
@sh -c ./packaging/shared/utility.sh cnc --check-yaml
@sh -c './packaging/shared/utility.sh cnc --check-yaml'
@echo
@echo "Testing Red Alert mod MiniYAML..."
@sh -c ./packaging/shared/utility.sh ra --check-yaml
@sh -c './packaging/shared/utility.sh ra --check-yaml'

tests:
@dotnet build OpenRA.Test/OpenRA.Test.csproj -c Debug --nologo -p:TargetPlatform=$(TARGETPLATFORM)
Expand All @@ -161,18 +161,18 @@ endif
@sh -c ./packaging/shared/set-mod-version.sh "$(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'

install:
@sh -c ./packaging/shared/install-assemblies.sh $(CWD) $(DESTDIR)$(gameinstalldir) $(TARGETPLATFORM) $(RUNTIME) True True True'
@sh -c ./packaging/shared/install-data.sh $(CWD) $(DESTDIR)$(gameinstalldir) cnc d2k ra'
@sh -c './packaging/shared/install-assemblies.sh $(CWD) "$(DESTDIR)" "$(gameinstalldir)" $(TARGETPLATFORM) $(RUNTIME) True True True'
@sh -c './packaging/shared/install-data.sh $(CWD) "$(DESTDIR)" "$(gameinstalldir)" cnc d2k ra'

install-linux-shortcuts:
@sh -c '. ./packaging/linux/install-shortcuts.sh $(CWD) "$(DESTDIR)" "$(gameinstalldir)" "$(bindir)" "$(datadir)" "$(shell head -n1 VERSION)" cnc d2k ra'

install-linux-appdata:
@sh -c ./packaging/linux/install-appdata.sh $(CWD) "$(DESTDIR)" "$(datadir)" cnc d2k ra'
@sh -c './packaging/linux/install-appdata.sh $(CWD) "$(DESTDIR)" "$(datadir)" cnc d2k ra'

install-man: all
@mkdir -p $(DESTDIR)$(mandir)/man6/
@sh -c ./packaging/shared/utility.sh all --man-page > $(DESTDIR)$(mandir)/man6/openra.6
@sh -c './packaging/shared/utility.sh all --man-page > $(DESTDIR)$(mandir)/man6/openra.6'

help:
@echo 'to compile, run:'
Expand Down
10 changes: 10 additions & 0 deletions launch/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /bin/bash
set -euo pipefail

curl -SOL https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb &&
sudo dpkg -i packages-microsoft-prod.deb &&
rm packages-microsoft-prod.deb &&
sudo apt-get update &&
sudo apt-get install -y --no-install-recommends \
dotnet-sdk-6.0 \
make
2 changes: 1 addition & 1 deletion launch/launch-dedicated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Read the file to see which settings you can override
set -euo pipefail

ENGINEDIR=$(dirname "$0")/../packaging/windows_cross/build
ENGINEDIR=$(dirname "$0")/../src/bin
if command -v mono >/dev/null 2>&1 && [ "$(grep -c .NETCoreApp,Version= "${ENGINEDIR}/OpenRA.Server.dll")" = "0" ]; then
RUNTIME_LAUNCHER="mono --debug"
else
Expand Down
5 changes: 4 additions & 1 deletion launch/launch-game.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#! /bin/bash
set -euo pipefail

ENGINEDIR=$(dirname "$0")/../packaging/windows_cross/build
ENGINEDIR=$(dirname "$0")/../src/bin
# Copy resources to bin dir
cp -rp "${ENGINEDIR}/../../res/glsl" "${ENGINEDIR}"

if command -v mono >/dev/null 2>&1 && [ "$(grep -c .NETCoreApp,Version= "${ENGINEDIR}/OpenRA.dll")" = "0" ]; then
RUNTIME_LAUNCHER="mono --debug"
else
Expand Down

0 comments on commit d11559a

Please sign in to comment.