blob: 0230d4016022441ba09b7c64ae70beececc93696 (
plain)
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
stages:
- build
- deploy
- publish
cache:
key: ${CI_COMMIT_REF_SLUG}
variables:
DEBIAN_FRONTEND: noninteractive
before_script:
- echo Current working directory is $(pwd)
build linux x86_64:
image: ubuntu:18.04
stage: build
tags:
- docker
- linux
script:
# Install dependencies
- apt-get update
- >
apt-get install --no-install-recommends -y qt5-default qtmultimedia5-dev
clang make git sudo curl ca-certificates pkg-config upx unzip xz-utils
- git submodule init
- git submodule update
# Print versions
- qmake --version
- clang --version
# Extract BASS
- mkdir bass
- cd bass
- curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
- unzip bass.zip
- cp x64/libbass.so ../lib
- curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
- unzip bassopus.zip
- cp x64/libbassopus.so ../lib
- cd ..
# Extract Discord RPC
- mkdir discord-rpc
- cd discord-rpc
- curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-linux.zip -o discord_rpc_linux.zip
- unzip discord_rpc_linux.zip
- cp discord-rpc/linux-dynamic/lib/libdiscord-rpc.so ../lib
- cd ..
# Extract QtApng
#- mkdir qtapng
#- cd qtapng
#- curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.0-5/build_gcc_64_5.12.0.tar.xz -o apng.tar.xz
#- tar -xvf apng.tar.xz
#- cp gcc_64/plugins/imageformats/libqapng.so ../lib
#- cd ..
# Build QtApng
- git clone https://github.com/Skycoder42/QtApng
- cd QtApng
- qmake -spec linux-clang
# Don't make examples - they're not compatible with Qt 5.9
- make -j4 sub-src
#- make sub-src-install_subtargets
- cp plugins/imageformats/libqapng.so ../lib
- cd ..
# Build
- qmake -spec linux-clang "DEFINES += DISCORD"
- make -j4
# Post-processing
- upx --lzma -9 --force bin/Attorney_Online
artifacts:
paths:
- lib/
- bin/
build windows i686:
image: ${CI_REGISTRY_IMAGE}/builder-windows-i686
stage: build
tags:
- docker
- linux
script:
# Install dependencies
- apt-get update
- apt-get install --no-install-recommends -y make curl ca-certificates upx unzip
- git submodule init
- git submodule update
# Print versions
- /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake --version
# Extract BASS
- mkdir bass
- cd bass
- curl http://www.un4seen.com/files/bass24.zip -o bass.zip
- unzip bass.zip
- cp bass.dll ../lib
- curl http://www.un4seen.com/files/bassopus24.zip -o bassopus.zip
- unzip bassopus.zip
- cp bassopus.dll ../lib
- cd ..
# Extract QtApng
# - mkdir qtapng
# - cd qtapng
# - curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.2-2/qtapng_mingw73_32_5.13.0.zip -o apng.zip
# - unzip apng.zip
# - mkdir ../lib/imageformats
# - cp mingw73_32/plugins/imageformats/qapng.dll ../lib/imageformats/
# - cd ..
- ls lib
# Build
- /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake "DEFINES += DISCORD"
- make -j4
# Post-processing
- upx --lzma -9 --force bin/Attorney_Online.exe
artifacts:
paths:
- lib/
- bin/
# Base folder
.deploy_base: &deploy_base |
cp -a ../base/ base/
rm -rf base/themes/_Unadapted/
rm base/themes/.gitattributes base/themes/.git
# Miscellaneous files
.deploy_misc: &deploy_misc |
cp -a ../README.md README.md.txt
cp -a ../LICENSE.MIT LICENSE.txt
deploy linux x86_64:
stage: deploy
dependencies:
- build linux x86_64
tags:
- docker
- linux
script:
- mkdir artifact
- cd artifact
- *deploy_base
- *deploy_misc
# Platform-specific
- cp -a ../lib/* .
- cp -a ../bin/Attorney_Online .
- echo "#!/bin/sh" >> ./run.sh
- echo "LD_LIBRARY_PATH=.:\$LD_LIBRARY_PATH ./Attorney_Online" >> ./run.sh
- chmod +x ./run.sh
# Zipping
# zip -r -9 -l Attorney_Online_$(git describe --tags)_linux_x86_64.zip .
- mkdir ../zip
- tar cavf ../zip/Attorney_Online_$(git describe --tags)_linux_x64.tar.xz *
- sha1sum ../zip/*
artifacts:
paths:
- zip/
deploy windows i686:
image: ubuntu
stage: deploy
dependencies:
- build windows i686
tags:
- docker
- linux
script:
- apt-get update
- apt-get install --no-install-recommends -y zip git
- mkdir artifact
- cd artifact
- *deploy_base
- *deploy_misc
# Platform-specific
- cp -a ../lib/*.dll .
- mkdir imageformats
- 'cp -a ../lib/imageformats/*.dll imageformats/ || :'
- cp -a ../bin/Attorney_Online.exe .
# Zipping
# -r: recursive; -9: max compression; -l: convert to CR LF
- mkdir ../zip
- zip -r -9 -l ../zip/Attorney_Online_$(git describe --tags)_windows_x86.zip .
- sha1sum ../zip/*
artifacts:
paths:
- zip/
# How to publish to S3/Wasabi:
# - Ensure the following variables have been populated in the CI/CD settings:
# - S3_ACCESS_KEY, S3_SECRET_KEY
# - S3_MANIFESTS, S3_ARCHIVES
# - Select "Run Pipeline" on the Pipelines menu on GitLab.
# - Select the version you want to release.
# - Set the following variables:
# - MANIFEST: program_winnt_i386.json
# - ARCHIVE_FULL: ao-X.Y.Z-win32.zip
# - VERSION: X.Y.Z
# - EXECUTABLE: Attorney_Online_X.Y.Z.exe
# - Run the pipeline to completion.
# (See scripts/wasabi.sh)
publish linux x86_64:
image: ubuntu
stage: publish
dependencies:
- deploy linux x86_64
when: manual
script:
- apt-get update
- apt-get install --no-install-recommends -y git nodejs npm awscli
- cd scripts
- npm install
- cd ..
- cd zip
- ../scripts/wasabi_program.sh
variables:
MANIFEST: program_linux_x86_64.json
ARTIFACT_SUFFIX: linux_x64.tar.xz
publish windows i686:
image: ubuntu
stage: publish
dependencies:
- deploy windows i686
when: manual
script:
- apt-get update
- apt-get install --no-install-recommends -y git nodejs npm awscli
- cd scripts
- npm install
- cd ..
- cd zip
- ../scripts/wasabi_program.sh
variables:
MANIFEST: program_winnt_i386.json
ARTIFACT_SUFFIX: windows_x86.zip
|