-
Notifications
You must be signed in to change notification settings - Fork 1.1k
143 lines (136 loc) · 5.87 KB
/
build-windows.yml
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
name: build-shotcut-windows
on:
workflow_dispatch:
schedule:
# nightly
- cron: '0 8 * * *'
jobs:
build:
if: ${{ github.repository_owner == 'mltframework' }}
runs-on: windows-latest
steps:
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
autotools base-devel bzip2 coreutils git gzip tar xz zip
perl-List-MoreUtils perl-XML-Parser
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-cmake
mingw-w64-x86_64-meson
mingw-w64-x86_64-nasm
mingw-w64-x86_64-ninja
mingw-w64-x86_64-osslsigncode
mingw-w64-x86_64-yasm
mingw-w64-x86_64-cairo
mingw-w64-x86_64-eigen3
mingw-w64-x86_64-dlfcn
mingw-w64-x86_64-fftw
mingw-w64-x86_64-gettext-tools
mingw-w64-x86_64-harfbuzz
mingw-w64-x86_64-lame
mingw-w64-x86_64-libarchive
mingw-w64-x86_64-libepoxy
mingw-w64-x86_64-libexif
mingw-w64-x86_64-libimagequant
mingw-w64-x86_64-libsamplerate
mingw-w64-x86_64-libtheora
mingw-w64-x86_64-libvorbis
mingw-w64-x86_64-libvpx
mingw-w64-x86_64-libwebp
mingw-w64-x86_64-libxml2
mingw-w64-x86_64-onevpl
mingw-w64-x86_64-openssl
mingw-w64-x86_64-opus
mingw-w64-x86_64-potrace
mingw-w64-x86_64-python-pip
mingw-w64-x86_64-rubberband
mingw-w64-x86_64-sox
mingw-w64-x86_64-svt-av1
mingw-w64-x86_64-vid.stab
mingw-w64-x86_64-x264
mingw-w64-x86_64-x265
mingw-w64-x86_64-zimg
- uses: actions/checkout@v4
- name: Build
shell: msys2 {0}
run: |
pacman --noconfirm -Rdd mingw-w64-x86_64-aom
echo Preparing version
echo $(date +"%y.%m.%d") > VERSION
VERSION=$(cat VERSION)
echo VERSION=$VERSION
FILENAME_VERSION=$(echo $VERSION | tr -d .)
pushd "$HOME"
mkdir Qt
cd Qt
echo Downloading Qt
curl -kLO --no-progress-meter https://s3.amazonaws.com/misc.meltymedia/shotcut-build/qt-6.7.2-x64-mingw.txz
echo Extracting Qt
tar -xJf qt-6.7.2-x64-mingw.txz
rm qt-6.7.2-x64-mingw.txz
cd ..
echo Downloading a few prebuilt dependencies
curl -kLO --no-progress-meter https://s3.amazonaws.com/misc.meltymedia/shotcut-build/mlt-prebuilt-mingw64-v6.txz
echo Extracting prebuilt dependencies
tar -xJf mlt-prebuilt-mingw64-v6.txz
rm mlt-prebuilt-mingw64-v6.txz
CHECKOUT_DIR=$(popd)
popd
echo Running the build script
echo INSTALL_DIR=\"$CHECKOUT_DIR/build\"
echo INSTALL_DIR=\"$CHECKOUT_DIR/build\" > build-shotcut.conf
echo SHOTCUT_VERSION=\"$VERSION\" >> build-shotcut.conf
bash scripts/build-shotcut-msys2.sh
pushd build
echo Installing awscli
pip install awscli
export AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY }}
export AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_KEY }}
export AWS_DEFAULT_REGION=us-east-1
echo Downloading code-signing certificates
aws s3 cp s3://misc.meltymedia/shotcut-build/CodeSignCertificates2023.p12 ./ --no-progress
aws s3 cp s3://misc.meltymedia/shotcut-build/CodeSignCertificates.pass ./ --no-progress
echo Signing shotcut.exe
osslsigncode sign -pkcs12 CodeSignCertificates2023.p12 -readpass CodeSignCertificates.pass -n "Shotcut" -i "https://www.meltytech.com" -t "http://timestamp.digicert.com" -in Shotcut/shotcut.exe -out Shotcut/shotcut-signed.exe
mv Shotcut/shotcut-signed.exe Shotcut/shotcut.exe
echo Signing glaxnimate.exe
osslsigncode sign -pkcs12 CodeSignCertificates2023.p12 -readpass CodeSignCertificates.pass -n "Shotcut" -i "https://www.meltytech.com" -t "http://timestamp.digicert.com" -in Shotcut/glaxnimate.exe -out Shotcut/glaxnimate-signed.exe
mv Shotcut/glaxnimate-signed.exe Shotcut/glaxnimate.exe
echo Packaging the portable zip
zip -gr shotcut-win64-$FILENAME_VERSION.zip Shotcut
echo Packaging the installer
PATH="$HOME/bin:$PATH"
pushd $HOME/bin
curl -kLO --no-progress-meter https://s3.amazonaws.com/misc.meltymedia/shotcut-build/iscc632.txz
tar -xJf iscc632.txz
popd
echo Extracting installer dependencies
curl -kLO --no-progress-meter https://s3.amazonaws.com/misc.meltymedia/shotcut-build/innosetup-opera-1.txz
tar -xJf innosetup-opera-1.txz
rm innosetup-opera-1.txz
echo Running Inno Setup Compiler
ISCC -Q -O. shotcut.iss
echo Signing the installer
osslsigncode sign -pkcs12 CodeSignCertificates2023.p12 -readpass CodeSignCertificates.pass -n "Shotcut Installer" -i "https://www.meltytech.com" -t "http://timestamp.digicert.com" -in shotcut-setup.exe -out shotcut-setup-signed.exe
mv shotcut-setup-signed.exe shotcut-win64-$FILENAME_VERSION.exe
rm shotcut-setup.exe
popd
echo Done
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: windows-portable
path: ./build/shotcut-win64-*.zip
- name: Upload packages to S3
shell: msys2 {0}
run: |
export AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY }}
export AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_KEY }}
export AWS_DEFAULT_REGION=us-east-1
for file in build/*.{exe,zip}; do
echo Uploading "$file" to S3
aws s3 cp "$file" s3://builds.us.meltytech/shotcut/ --no-progress
done