forked from einsiedler90/Whonix-Starter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_on_linux_for_win64
executable file
·57 lines (41 loc) · 1.59 KB
/
build_on_linux_for_win64
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
#!/bin/bash
## Copyright (C) 2023 - 2023 ENCRYPTED SUPPORT LP <[email protected]>
## See the file COPYING for copying conditions.
set -x
set -e
set -o pipefail
set -o nounset
true "$0: START"
## 1) sanity tests
command -v wixl >/dev/null
command -v xmllint >/dev/null
command -v lazbuild >/dev/null
## from package libfile-mimeinfo-perl
command -v mimetype >/dev/null
## 2) build Whonix-Starter (WhonixStarter.exe)
## Was functional without build dependency packages from Debian trixie.
#lazbuild -B WhonixStarter.lpr --cpu=x86_64 --os=win64 --compiler=/usr/bin/ppcrossx64
## lazbuild requires build dependency packages from Debian trixie.
dpkg -l | grep fp-units-win-base >/dev/null
dpkg -l | grep fp-units-win-rtl >/dev/null
dpkg -l | grep fp-units-win-fcl >/dev/null
dpkg -l | grep fp-units-win-misc >/dev/null
lazbuild -B WhonixStarter.lpr --cpu=x86_64 --os=win64
## 3) read values from xml file WhonixStarter.lpi
VERSION=$(xmllint --xpath 'string(//StringTable/@ProductVersion)' WhonixStarter.lpi)
MANUFACTURE=$(xmllint --xpath 'string(//StringTable/@CompanyName)' WhonixStarter.lpi)
DESCRIPTION=$(xmllint --xpath 'string(//StringTable/@Comments)' WhonixStarter.lpi)
## 4) build msi package for Whonix-Starter
wixl \
--verbose \
--arch x64 \
--define whonixStarterVersion="$VERSION" \
--define whonixStarterManufacturer="$MANUFACTURE" \
--define whonixStarterDescription="$DESCRIPTION" \
--output WhonixStarterInstaller.msi \
WhonixStarterInstaller.wxs
## Debugging.
ls -la WhonixStarterInstaller.msi
du -sh WhonixStarterInstaller.msi
mimetype WhonixStarterInstaller.msi
true "$0: SUCCESS"