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 454
/
build.sh
executable file
·59 lines (50 loc) · 1.91 KB
/
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
#!/usr/bin/env bash
#set -x
# Read current version
VERSION=$(<VERSION)
echo package vmwpatch > ./vmwpatch/version.go
echo const VERSION = \"$VERSION\" >> ./vmwpatch/version.go
echo Building release executables - $VERSION
mkdir -p ./build/iso
mkdir -p ./build/linux
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
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
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
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
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
rm rsrc_windows_amd64.syso
popd
cp -v LICENSE ./build
cp -v *.md ./build
cp -v ./cpuid/linux/cpuid ./build/linux/cpuid
cp -v ./cpuid/windows/cpuid.exe ./build/windows/cpuid.exe
cp -vr ./iso ./build