This repository has been archived by the owner on Nov 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 444
/
debug-build.sh
executable file
·90 lines (79 loc) · 3.28 KB
/
debug-build.sh
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
#!/usr/bin/env bash
#set -x
# Read current version
VERSION=$(<VERSION)
echo Building debug executables - $VERSION
echo package vmwpatch > ./vmwpatch/version.go
echo const VERSION = \"$VERSION\" >> ./vmwpatch/version.go
mkdir -p ./build/iso
mkdir -p ./build/linux
mkdir -p ./build/macos
mkdir -p ./build/windows
pushd ./commands/check
echo "Building check"
go-winres make --arch amd64 --product-version $VERSION --file-version $VERSION
env GOOS=windows GOARCH=amd64 go build -o ../../build/windows/check.exe
env GOOS=linux GOARCH=amd64 go build -o ../../build/linux/check
env GOOS=darwin GOARCH=amd64 go build -o ../../build/macos/check
rm rsrc_windows_amd64.syso
popd
pushd ./commands/relock
echo "Building relock"
go-winres make --arch amd64 --product-version $VERSION --file-version $VERSION
env GOOS=windows GOARCH=amd64 go build -o ../../build/windows/relock.exe
env GOOS=linux GOARCH=amd64 go build -o ../../build/linux/relock
env GOOS=darwin GOARCH=amd64 go build -o ../../build/macos/relock
rm rsrc_windows_amd64.syso
popd
pushd ./commands/unlock
echo "Building unlock"
go-winres make --arch amd64 --product-version $VERSION --file-version $VERSION
env GOOS=windows GOARCH=amd64 go build -o ../../build/windows/unlock.exe
env GOOS=linux GOARCH=amd64 go build -o ../../build/linux/unlock
env GOOS=darwin GOARCH=amd64 go build -o ../../build/macos/unlock
rm rsrc_windows_amd64.syso
popd
pushd ./commands/dumpsmc
echo "Building dumpsmc"
go-winres make --arch amd64 --product-version $VERSION --file-version $VERSION
env GOOS=windows GOARCH=amd64 go build -o ../../build/windows/dumpsmc.exe
env GOOS=linux GOARCH=amd64 go build -o ../../build/linux/dumpsmc
env GOOS=darwin GOARCH=amd64 go build -o ../../build/macos/dumpsmc
rm rsrc_windows_amd64.syso
popd
pushd ./commands/patchgos
echo "Building patchgos"
go-winres make --arch amd64 --product-version $VERSION --file-version $VERSION
env GOOS=windows GOARCH=amd64 go build -o ../../build/windows/patchgos.exe
env GOOS=linux GOARCH=amd64 go build -o ../../build/linux/patchgos
env GOOS=darwin GOARCH=amd64 go build -o ../../build/macos/patchgos
rm rsrc_windows_amd64.syso
popd
pushd ./commands/patchsmc
echo "Building patchsmc"
go-winres make --arch amd64 --product-version $VERSION --file-version $VERSION
env GOOS=windows GOARCH=amd64 go build -o ../../build/windows/patchsmc.exe
env GOOS=linux GOARCH=amd64 go build -o ../../build/linux/patchsmc
env GOOS=darwin GOARCH=amd64 go build -o ../../build/macos/patchsmc
rm rsrc_windows_amd64.syso
popd
pushd ./commands/patchvmkctl
echo "Building patchvmkctl"
go-winres make --arch amd64 --product-version $VERSION --file-version $VERSION
env GOOS=windows GOARCH=amd64 go build -o ../../build/windows/patchvmkctl.exe
env GOOS=linux GOARCH=amd64 go build -o ../../build/linux/patchvmkctl
env GOOS=darwin GOARCH=amd64 go build -o ../../build/macos/patchvmkctl
rm rsrc_windows_amd64.syso
popd
pushd ./commands/hostcaps
echo "Building hostcaps"
go-winres make --arch amd64 --product-version $VERSION --file-version $VERSION
env GOOS=windows GOARCH=amd64 go build -o ../../build/windows/hostcaps.exe
env GOOS=linux GOARCH=amd64 go build -o ../../build/linux/hostcaps
env GOOS=darwin GOARCH=amd64 go build -o ../../build/macos/hostcaps
rm rsrc_windows_amd64.syso
popd
cp -v LICENSE ./build
cp -v *.md ./build
cp -vr ./cpuid/* ./build
cp -vr ./iso ./build