-
Notifications
You must be signed in to change notification settings - Fork 0
/
VE packager.bat
149 lines (126 loc) · 3.67 KB
/
VE packager.bat
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
@echo off
::define pack version
FOR /F %%i IN (pack.mcmeta) DO @echo #Old JSON %%i
set /p input=^>Enter pack version:
echo {"pack":{"pack_format":%input%,"description":"Vanilla-Expansion-Collection"}} > pack.mcmeta
TIMEOUT /NOBREAK /T 1 > nul
FOR /F %%i IN (pack.mcmeta) DO @echo Result ^-^> %%i
::create directory
echo #creating directories
TIMEOUT /NOBREAK /T 1 > nul
echo ^> temp
mkdir temp\assets
TIMEOUT /NOBREAK /T 0 > nul
echo #robocopy pack.mcmeta on all modules
TIMEOUT /NOBREAK /T 1 > nul
::copy pack.mcmeta on directories
::better-nature
robocopy . better-nature /is pack.mcmeta > nul
echo ^> better-nature
TIMEOUT /NOBREAK /T 0 > nul
::player-utilities
robocopy . player-utilities /is pack.mcmeta > nul
echo ^> player-utilities
TIMEOUT /NOBREAK /T 0 > nul
::radiant-redstone
robocopy . radiant-redstone /is pack.mcmeta > nul
echo ^> radiant-redstone
TIMEOUT /NOBREAK /T 0 > nul
::font-trim
robocopy . font-trim /is pack.mcmeta > nul
echo ^> font-trim
TIMEOUT /NOBREAK /T 0 > nul
::scaffolding-delta
robocopy . scaffolding-delta /is pack.mcmeta > nul
echo ^> scaffolding-delta
TIMEOUT /NOBREAK /T 0 > nul
::vanilla-expansion
robocopy . vanilla-expansion /is pack.mcmeta > nul
echo ^> vanilla-expansion
TIMEOUT /NOBREAK /T 0 > nul
echo #robocopy files on directories
TIMEOUT /NOBREAK /T 1 > nul
::copy all assets from other modules
::player-utilities
robocopy /E player-utilities\assets temp\assets > nul
echo ^> player-utilities
::radiant-redstone
TIMEOUT /NOBREAK /T 0 > nul
robocopy /E radiant-redstone\assets temp\assets > nul
echo ^> radiant-redstone
::better-nature
TIMEOUT /NOBREAK /T 0 > nul
robocopy /E better-nature\assets temp\assets > nul
echo ^> better-nature
::font-trim
TIMEOUT /NOBREAK /T 0 > nul
robocopy /E font-trim\assets temp\assets > nul
echo ^> font-trim
::scaffolding-delta
TIMEOUT /NOBREAK /T 0 > nul
robocopy /E scaffolding-delta\assets temp\assets > nul
echo ^> scaffolding-delta
TIMEOUT /NOBREAK /T 0 > nul
::vanilla-expansion
robocopy /E vanilla-expansion temp > nul
echo ^> vanilla-expansion
TIMEOUT /NOBREAK /T 0 > nul
echo #compressing resource to .zip files and move out TEMP folder
mkdir ZIP
::better-nature
cd better-nature
tar.exe -a -cf better-nature.zip assets pack.png pack.mcmeta
del pack.mcmeta
robocopy . .. better-nature.zip /MOVE > nul
cd ..
robocopy . ZIP better-nature.zip /MOVE > nul
echo ^> better-nature
::player-utilities
cd player-utilities
tar.exe -a -cf player-utilities.zip assets pack.png pack.mcmeta
del pack.mcmeta
robocopy . .. player-utilities.zip /MOVE > nul
cd ..
robocopy . ZIP player-utilities.zip /MOVE > nul
echo ^> player-utilities
::radiant-redstone
cd radiant-redstone
tar.exe -a -cf radiant-redstone.zip assets pack.png pack.mcmeta
del pack.mcmeta
robocopy . .. radiant-redstone.zip /MOVE > nul
cd ..
robocopy . ZIP radiant-redstone.zip /MOVE > nul
echo ^> radiant-redstone
::font-trim
cd font-trim
tar.exe -a -cf font-trim.zip assets pack.png pack.mcmeta
del pack.mcmeta
robocopy . .. font-trim.zip /MOVE > nul
cd ..
robocopy . ZIP font-trim.zip /MOVE > nul
echo ^> font-trim
scaffolding-delta
::scaffolding-delta
cd scaffolding-delta
tar.exe -a -cf scaffolding-delta.zip assets pack.png pack.mcmeta
del pack.mcmeta
robocopy . .. scaffolding-delta.zip /MOVE > nul
cd ..
robocopy . ZIP scaffolding-delta.zip /MOVE > nul
echo ^> scaffolding-delta
::vanilla-expansion
cd temp
tar.exe -a -cf vanilla-expansion.zip assets pack.png pack.mcmeta
robocopy . .. vanilla-expansion.zip /MOVE > nul
cd ..
robocopy . ZIP vanilla-expansion.zip /MOVE > nul
echo ^> vanilla-expansion
echo #removing ZIP/temp directory
TIMEOUT /NOBREAK /T 1 > nul
rmdir /s /q temp
cd vanilla-expansion
del pack.mcmeta
cd ..
echo:
echo Packaged all files on ZIP/
TIMEOUT /NOBREAK /T 3 > nul