aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2023-02-06 18:31:02 -0800
committerMicah Lee <micah@micahflee.com>2023-02-06 18:31:02 -0800
commitb26e7cb0df127e1f98880a90cdb722db0f6b6b25 (patch)
tree2f97a54ae0d0842657644c7c46326a9926797d49
parent8689cd87d711e5f2a002d8f8b07160177db08af3 (diff)
downloadonionshare-b26e7cb0df127e1f98880a90cdb722db0f6b6b25.tar.gz
onionshare-b26e7cb0df127e1f98880a90cdb722db0f6b6b25.zip
Update PT build scripts to work on Intel Macs too
-rwxr-xr-xdesktop/scripts/build-pt-meek.sh12
-rwxr-xr-xdesktop/scripts/build-pt-obfs4proxy.sh12
-rwxr-xr-xdesktop/scripts/build-pt-snowflake.sh12
3 files changed, 24 insertions, 12 deletions
diff --git a/desktop/scripts/build-pt-meek.sh b/desktop/scripts/build-pt-meek.sh
index df3a05ae..30b583cc 100755
--- a/desktop/scripts/build-pt-meek.sh
+++ b/desktop/scripts/build-pt-meek.sh
@@ -10,10 +10,14 @@ cd meek
git checkout $MEEK_TAG
if [ "$OS" == "Darwin" ]; then
- go build -o ../../../onionshare/resources/tor/meek-client-arm64 ./meek-client
- GOOS=darwin GOARCH=amd64 go build -o ../../../onionshare/resources/tor/meek-client-amd64 ./meek-client
- lipo -create -output ../../../onionshare/resources/tor/meek-client ../../../onionshare/resources/tor/meek-client-arm64 ../../../onionshare/resources/tor/meek-client-amd64
- rm ../../../onionshare/resources/tor/meek-client-arm64 ../../../onionshare/resources/tor/meek-client-amd64
+ if [[ $(uname -m) == 'arm64' ]]; then
+ go build -o ../../../onionshare/resources/tor/meek-client-arm64 ./meek-client
+ GOOS=darwin GOARCH=amd64 go build -o ../../../onionshare/resources/tor/meek-client-amd64 ./meek-client
+ lipo -create -output ../../../onionshare/resources/tor/meek-client ../../../onionshare/resources/tor/meek-client-arm64 ../../../onionshare/resources/tor/meek-client-amd64
+ rm ../../../onionshare/resources/tor/meek-client-arm64 ../../../onionshare/resources/tor/meek-client-amd64
+ elif [[ $(uname -m) == 'x86_64' ]]; then
+ go build -o ../../../onionshare/resources/tor/meek-client ./meek-client
+ fi
else
go build -o ../../../onionshare/resources/tor/meek-client ./meek-client
fi
diff --git a/desktop/scripts/build-pt-obfs4proxy.sh b/desktop/scripts/build-pt-obfs4proxy.sh
index cfdd3fc3..46bfe2e4 100755
--- a/desktop/scripts/build-pt-obfs4proxy.sh
+++ b/desktop/scripts/build-pt-obfs4proxy.sh
@@ -9,10 +9,14 @@ git clone https://gitlab.com/yawning/obfs4 || echo "already cloned"
cd obfs4
git checkout $OBFS4PROXY_TAG
if [ "$OS" == "Darwin" ]; then
- go build -o ../../../onionshare/resources/tor/obfs4proxy-arm64 ./obfs4proxy
- GOOS=darwin GOARCH=amd64 go build -o ../../../onionshare/resources/tor/obfs4proxy-amd64 ./obfs4proxy
- lipo -create -output ../../../onionshare/resources/tor/obfs4proxy ../../../onionshare/resources/tor/obfs4proxy-arm64 ../../../onionshare/resources/tor/obfs4proxy-amd64
- rm ../../../onionshare/resources/tor/obfs4proxy-arm64 ../../../onionshare/resources/tor/obfs4proxy-amd64
+ if [[ $(uname -m) == 'arm64' ]]; then
+ go build -o ../../../onionshare/resources/tor/obfs4proxy-arm64 ./obfs4proxy
+ GOOS=darwin GOARCH=amd64 go build -o ../../../onionshare/resources/tor/obfs4proxy-amd64 ./obfs4proxy
+ lipo -create -output ../../../onionshare/resources/tor/obfs4proxy ../../../onionshare/resources/tor/obfs4proxy-arm64 ../../../onionshare/resources/tor/obfs4proxy-amd64
+ rm ../../../onionshare/resources/tor/obfs4proxy-arm64 ../../../onionshare/resources/tor/obfs4proxy-amd64
+ elif [[ $(uname -m) == 'x86_64' ]]; then
+ go build -o ../../../onionshare/resources/tor/obfs4proxy ./obfs4proxy
+ fi
else
go build -o ../../../onionshare/resources/tor/obfs4proxy ./obfs4proxy
fi
diff --git a/desktop/scripts/build-pt-snowflake.sh b/desktop/scripts/build-pt-snowflake.sh
index 8f0322de..96a62565 100755
--- a/desktop/scripts/build-pt-snowflake.sh
+++ b/desktop/scripts/build-pt-snowflake.sh
@@ -9,10 +9,14 @@ git clone https://git.torproject.org/pluggable-transports/snowflake.git || echo
cd snowflake
git checkout $SNOWFLAKE_TAG
if [ "$OS" == "Darwin" ]; then
- go build -o ../../../onionshare/resources/tor/snowflake-client-arm64 ./client
- GOOS=darwin GOARCH=amd64 go build -o ../../../onionshare/resources/tor/snowflake-client-amd64 ./client
- lipo -create -output ../../../onionshare/resources/tor/snowflake-client ../../../onionshare/resources/tor/snowflake-client-arm64 ../../../onionshare/resources/tor/snowflake-client-amd64
- rm ../../../onionshare/resources/tor/snowflake-client-arm64 ../../../onionshare/resources/tor/snowflake-client-amd64
+ if [[ $(uname -m) == 'arm64' ]]; then
+ go build -o ../../../onionshare/resources/tor/snowflake-client-arm64 ./client
+ GOOS=darwin GOARCH=amd64 go build -o ../../../onionshare/resources/tor/snowflake-client-amd64 ./client
+ lipo -create -output ../../../onionshare/resources/tor/snowflake-client ../../../onionshare/resources/tor/snowflake-client-arm64 ../../../onionshare/resources/tor/snowflake-client-amd64
+ rm ../../../onionshare/resources/tor/snowflake-client-arm64 ../../../onionshare/resources/tor/snowflake-client-amd64
+ elif [[ $(uname -m) == 'x86_64' ]]; then
+ go build -o ../../../onionshare/resources/tor/snowflake-client ./client
+ fi
else
go build -o ../../../onionshare/resources/tor/snowflake-client ./client
fi \ No newline at end of file