-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (48 loc) · 1.91 KB
/
Makefile
File metadata and controls
62 lines (48 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
RIMWORLD_DEPLOY_PATH=$(HOME)/.steam/steam/steamapps/common/RimWorld/Mods
export RIMWORLD_ASSEMBLIES_DIR=$(HOME)/.steam/steam/steamapps/common/RimWorld/RimWorldLinux_Data/Managed
export RIMWORLD_VERSION=1.6
ifdef DEBUG
export BUILD_CONFIGURATION=Debug
else
export BUILD_CONFIGURATION=Release
endif
all: cleanup deploy
copy-assemblies:
echo copying Rimworld assemblies...
cp -r $(RIMWORLD_ASSEMBLIES_DIR) ./Source/RimManaged
build: cleanup copy-assemblies
set -e;
echo selected $(BUILD_CONFIGURATION) configuration
echo compiling...
msbuild Source/AutoPriorities/AutoPriorities.sln -verbosity:quiet -p:Configuration=$(BUILD_CONFIGURATION)
# copy assemblies to correct places
mkdir -p "$(RIMWORLD_VERSION)/Assemblies/"
cp -Rf "Source/AutoPriorities/AutoPriorities/bin/$(BUILD_CONFIGURATION)/." "$(RIMWORLD_VERSION)/Assemblies/"
mkdir -p "ConditionalAssemblies/$(RIMWORLD_VERSION)/"
cp -Rf "Source/AutoPriorities/FluffyWorktabPatch/bin/$(BUILD_CONFIGURATION)/." "ConditionalAssemblies/$(RIMWORLD_VERSION)/"
cp -Rf "Source/AutoPriorities/BetterPawnControlPatch/bin/$(BUILD_CONFIGURATION)/." "ConditionalAssemblies/$(RIMWORLD_VERSION)/"
mkdir ./Build
echo building mod to $(realpath ./Build)
for dir in 1.* Textures About LICENSE ConditionalAssemblies; do \
cp -r ./$$dir "./Build/$$dir"; \
done
echo build complete.
cleanup:
echo 'removing old build...'
rm -f ./Build.zip
rm -rf ./Build
rm -rf ./$(RIMWORLD_VERSION)/
rm -rf ./ConditionalAssemblies/$(RIMWORLD_VERSION)/
echo 'removing deployed libs...'
rm -rf $(RIMWORLD_DEPLOY_PATH)/AutoPriorities
echo 'removing old Rimworld assemblies...'
rm -rf ./Source/RimManaged
echo 'cleanup complete'
deploy: build
echo deploying to $(RIMWORLD_DEPLOY_PATH)
cp -r ./Build $(RIMWORLD_DEPLOY_PATH)/AutoPriorities
echo deployed to $(RIMWORLD_DEPLOY_PATH)
compress-to-zip:
echo 'compressing the build to zip'
zip -r ./Build.zip ./Build
echo 'compressed the build to ./Build.zip'