-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.helpers
114 lines (107 loc) · 5.64 KB
/
Makefile.helpers
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
MAKEFLAGS += --no-print-directory
gamepath = /mnt/c/Program\ Files\ \(x86\)/Steam/steamapps/common/Outward/Outward_Defed
pluginpath = BepInEx/plugins
sideloaderpath = $(pluginpath)/$(modname)/SideLoader
dllsinto:
@mkdir -p ../$(TARGET)/public/$(pluginpath)/$(TARGET)
cp -u bin/$(modname).dll ../$(TARGET)/public/$(pluginpath)/$(TARGET)/
@for dependency in $(dependencies) ; do \
(cd ../$${dependency} && make dllsinto TARGET=$(TARGET) --no-print-directory) ; \
done
clean:
rm -f -r public
rm -f -r thunderstore
rm -f $(modname).rar
rm -f $(modname)_thunderstore.zip
rm -f resources/manifest.json
rm -f README.md
info:
@echo Modname: $(modname)
edit:
nvim ../Descriptions/$(modname).py
readme:
(cd ../Descriptions/ && python3 $(modname).py)
item:
mkdir -p public/$(sideloaderpath)/Items/$(NAME)/Textures
cp -u $(PREPATH)resources/icons/$(FILENAME).png public/$(sideloaderpath)/Items/$(NAME)/Textures/icon.png
skill:
mkdir -p public/$(sideloaderpath)/Items/$(NAME)/Textures
cp -u $(PREPATH)resources/icons/$(FILENAME).png public/$(sideloaderpath)/Items/$(NAME)/Textures/icon.png
cp -u $(PREPATH)resources/icons/$(FILENAME)_small.png public/$(sideloaderpath)/Items/$(NAME)/Textures/skillicon.png
itemtextured: MAINTEX ?= $(FILENAME)_main
itemtextured: GENTEX ?= $(FILENAME)_gen
itemtextured: NORMTEX ?= $(FILENAME)_norm
itemtextured: EMISSIONTEX ?= $(FILENAME)_glow
itemtextured: DETNORMTEX ?= $(FILENAME)_det_norm
itemtextured: DETMASKTEX ?= $(FILENAME)_det_mask
itemtextured: SPECCOLORTEX ?= $(FILENAME)_spec_color
itemtextured: PROPERTIES ?= $(FILENAME)
itemtextured: GLOWPROPERTIES ?= $(FILENAME)_glow
itemtextured: FILEPATH ?= resources/textures/
itemtextured: ICONNAME ?= $(FILENAME)
itemtextured:
@make item NAME="$(NAME)" FILENAME="$(ICONNAME)"
mkdir -p public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)
@if [ -f $(FILEPATH)$(MAINTEX).png ]; then \
echo "cp -u $(FILEPATH)$(MAINTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_MainTex.png" ; \
cp -u $(FILEPATH)$(MAINTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_MainTex.png; \
fi
@if [ -f $(FILEPATH)$(GENTEX).png ]; then \
echo "cp -u $(FILEPATH)$(GENTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_GenTex.png" ; \
cp -u $(FILEPATH)$(GENTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_GenTex.png; \
fi
@if [ -f $(FILEPATH)$(NORMTEX).png ]; then \
echo "cp -u $(FILEPATH)$(NORMTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_NormTex.png" ; \
cp -u $(FILEPATH)$(NORMTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_NormTex.png; \
fi
@if [ -f $(FILEPATH)$(EMISSIONTEX).png ]; then \
echo "cp -u $(FILEPATH)$(EMISSIONTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_EmissionTex.png" ; \
cp -u $(FILEPATH)$(EMISSIONTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_EmissionTex.png; \
fi
@if [ -f $(FILEPATH)$(DETNORMTEX).png ]; then \
echo "cp -u $(FILEPATH)$(DETNORMTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_DetNormTex.png" ; \
cp -u $(FILEPATH)$(DETNORMTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_DetNormTex.png; \
fi
@if [ -f $(FILEPATH)$(DETMASKTEX).png ]; then \
echo "cp -u $(FILEPATH)$(DETMASKTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_DetMaskTex.png" ; \
cp -u $(FILEPATH)$(DETMASKTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_DetMaskTex.png; \
fi
@if [ -f $(FILEPATH)$(SPECCOLORTEX).png ]; then \
echo "cp -u $(FILEPATH)$(SPECCOLORTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_SpecColorTex.png" ; \
cp -u $(FILEPATH)$(SPECCOLORTEX).png public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/_SpecColorTex.png; \
fi
@if [ -f $(FILEPATH)$(PROPERTIES).xml ]; then \
echo "cp -u $(FILEPATH)$(PROPERTIES).xml public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/properties.xml" ; \
cp -u $(FILEPATH)$(PROPERTIES).xml public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/properties.xml; \
fi
@if [ -f $(FILEPATH)$(GLOWPROPERTIES).xml ]; then \
echo "cp -u $(FILEPATH)$(GLOWPROPERTIES).xml public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/properties.xml" ; \
cp -u $(FILEPATH)$(GLOWPROPERTIES).xml public/$(sideloaderpath)/Items/$(NAME)/Textures/$(MATERIALNAME)/properties\ -\ Glow.xml; \
fi
texture:
cp -u $(PREPATH)resources/textures/$(FILENAME).png public/$(sideloaderpath)/Texture2D/
basefolders:
mkdir -p public/$(sideloaderpath)/Items
mkdir -p public/$(sideloaderpath)/Texture2D
mkdir -p public/$(sideloaderpath)/AssetBundles
assetbundle:
cp -u $(unityassetbundles)/$(FILENAME) public/$(sideloaderpath)/AssetBundles/
publish:
make clean
make assemble
rar a $(modname).rar -ep1 public/*
cp -r public/BepInEx thunderstore
mv thunderstore/plugins/$(modname)/* thunderstore/plugins
rmdir thunderstore/plugins/$(modname)
(cd ../Descriptions && python3 $(modname).py)
cp -u resources/manifest.json thunderstore/
cp -u README.md thunderstore/
cp -u resources/icon.png thunderstore/
(cd thunderstore && zip -r $(modname)_thunderstore.zip *)
cp -u ../tcli/thunderstore.toml thunderstore
(cd thunderstore && tcli publish --file $(modname)_thunderstore.zip) || true
mv thunderstore/$(modname)_thunderstore.zip .
install:
if [ ! -f omit.txt ]; then make forceinstall; fi
web:
/mnt/c/Program\ Files/Google/Chrome/Application/chrome.exe "https://thunderstore.io/c/outward/p/ehaugw/$(modname)/" > /dev/null 2>&1 &