forked from punktniklas/NiKom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildall
executable file
·165 lines (128 loc) · 2.88 KB
/
buildall
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
.KEY mode
.DEF mode "dev"
IF <mode> EQ "dev"
SET DESTFILE "NiKomDev.lha"
ELSE
IF <mode> EQ "bin"
SET DESTFILE "NiKomBin.lha"
ELSE
IF <mode> EQ "full"
SET DESTFILE "NiKomFull.lha"
ELSE
Echo "Usage: buildall [dev|bin|full]"
QUIT
ENDIF
ENDIF
ENDIF
Failat 20
Delete Ram:$DESTFILE $DESTFILE
Delete Ram:NiKomDistr all
; Make the script abort if anything goes wrong during compilation
Failat 1
; Create temporary directories in Ram:
MakeDir Ram:NiKomDistr
MakeDir Ram:NiKomDistr/libs
MakeDir Ram:NiKomDistr/libs/68020
MakeDir Ram:NiKomDistr/bin
MakeDir Ram:NiKomDistr/bin/68020
IF NOT <mode> EQ "dev"
MakeDir Ram:NiKomDistr/libs/68000
MakeDir Ram:NiKomDistr/bin/68000
MakeDir Ram:NiKomDistr/Tools
ENDIF
IF NOT <mode> EQ "dev"
; Start of 68000 build
cd Catalogs
smake clean
smake
cd /UtilLib
smake clean
smake CPU=68000
cd /NiKomLib
smake clean
smake CPU=68000
cd /InitNiKom
smake clean
smake CPU=68000
cd /PreNode
smake clean
smake CPU=68000
cd /Server
smake clean
smake CPU=68000
cd /Nodes
smake clean
smake CPU=68000
cd /
Copy NiKomLib/NoDebug/68000/nikom.library Ram:NiKomDistr/libs/68000/
Copy InitNiKom/InitNiKom Ram:NiKomDistr/bin/68000/
Copy PreNode/NoDebug/68000/PreNode Ram:NiKomDistr/bin/68000/
Copy Server/NoDebug/68000/NiKServer Ram:NiKomDistr/bin/68000/
Copy Nodes/NoDebug/68000/NiKomCon Ram:NiKomDistr/bin/68000/
Copy Nodes/NoDebug/68000/NiKomSer Ram:NiKomDistr/bin/68000/
ENDIF
; Start of 68020-build
cd Catalogs
smake clean
smake
cd /UtilLib
smake clean
smake
cd /NiKomLib
smake clean
smake
cd /InitNiKom
smake clean
smake
cd /PreNode
smake clean
smake
cd /Server
smake clean
smake
cd /Nodes
smake clean
smake
cd /
Copy NiKomLib/NoDebug/68020/nikom.library Ram:NiKomDistr/libs/68020/
Copy InitNiKom/InitNiKom Ram:NiKomDistr/bin/68020/
Copy PreNode/NoDebug/68020/PreNode Ram:NiKomDistr/bin/68020/
Copy Server/NoDebug/68020/NiKServer Ram:NiKomDistr/bin/68020/
Copy Nodes/NoDebug/68020/NiKomCon Ram:NiKomDistr/bin/68020/
Copy Nodes/NoDebug/68020/NiKomSer Ram:NiKomDistr/bin/68020/
MakeDir Ram:NiKomDistr/Catalogs
MakeDir Ram:NiKomDistr/Catalogs/svenska
Copy Catalogs/svenska/NiKom.catalog Ram:NiKomDistr/Catalogs/svenska
IF NOT <mode> EQ "dev"
; Start of Tools build
cd Tools/CryptPasswords
smake clean
smake
cd /SetNodeState
smake clean
smake
cd /NiKomFido
smake clean
smake
cd //
Copy Tools/CryptPasswords/CryptPasswords Ram:NiKomDistr/Tools/
Copy Tools/SetNodeState/SetNodeState Ram:NiKomDistr/Tools
Copy Tools/NiKomFido/NiKomFido Ram:NiKomDistr/Tools/
ENDIF
IF <mode> EQ "full"
Copy DistrSkeleton/#? Ram:NiKomDistr/ all
ENDIF
IF NOT <mode> EQ "dev"
Copy ReleaseNotes.txt Ram:NiKomDistr/
Copy LICENSE.txt Ram:NiKomDistr/
ENDIF
; Store current working directory in $NIKDIR
Set NIKDIR `cd`
cd Ram:NiKomDistr
lha a -r Ram:$DESTFILE #?
Copy Ram:$DESTFILE "$NIKDIR"
cd "$NIKDIR"
UnSet NIKDIR
Delete Ram:$DESTFILE
Delete Ram:NiKomDistr all
Echo "Build complete!"