mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
"make official" for Mac now builds update image as well as pkg (update image is just PKG + SFX script)
This commit is contained in:
parent
87e3b5f076
commit
0e4d3244b2
2 changed files with 18 additions and 10 deletions
|
@ -12,7 +12,7 @@ scriptPath="`dirname "$0"`/`basename "$0"`"
|
||||||
if [ ! -s "$scriptPath" ]; then
|
if [ ! -s "$scriptPath" ]; then
|
||||||
scriptPath="$0"
|
scriptPath="$0"
|
||||||
if [ ! -s "$scriptPath" ]; then
|
if [ ! -s "$scriptPath" ]; then
|
||||||
echo "Installer cannot determine its own path; $scriptPath is not readable."
|
echo "*** Auto-updater cannot determine its own path; $scriptPath is not readable."
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
26
make-mac.mk
26
make-mac.mk
|
@ -9,8 +9,13 @@ PRODUCTSIGN=echo
|
||||||
CODESIGN_APP_CERT=
|
CODESIGN_APP_CERT=
|
||||||
CODESIGN_INSTALLER_CERT=
|
CODESIGN_INSTALLER_CERT=
|
||||||
|
|
||||||
# 3 == MacOS, 2 == X64 (the only arch for MacOS right now)
|
ZT_BUILD_PLATFORM=3
|
||||||
DEFS+=-DZT_BUILD_PLATFORM=3 -DZT_BUILD_ARCHITECTURE=2
|
ZT_BUILD_ARCHITECTURE=2
|
||||||
|
ZT_VERSION_MAJOR=$(shell cat version.h | grep -F VERSION_MAJOR | cut -d ' ' -f 3)
|
||||||
|
ZT_VERSION_MINOR=$(shell cat version.h | grep -F VERSION_MINOR | cut -d ' ' -f 3)
|
||||||
|
ZT_VERSION_REV=$(shell cat version.h | grep -F VERSION_REVISION | cut -d ' ' -f 3)
|
||||||
|
|
||||||
|
DEFS+=-DZT_BUILD_PLATFORM=$(ZT_BUILD_PLATFORM) -DZT_BUILD_ARCHITECTURE=$(ZT_BUILD_ARCHITECTURE)
|
||||||
|
|
||||||
include objects.mk
|
include objects.mk
|
||||||
OBJS+=osdep/OSXEthernetTap.o ext/lz4/lz4.o ext/http-parser/http_parser.o
|
OBJS+=osdep/OSXEthernetTap.o ext/lz4/lz4.o ext/http-parser/http_parser.o
|
||||||
|
@ -59,16 +64,14 @@ one: $(OBJS) service/OneService.o one.o
|
||||||
ln -sf zerotier-one zerotier-idtool
|
ln -sf zerotier-one zerotier-idtool
|
||||||
ln -sf zerotier-one zerotier-cli
|
ln -sf zerotier-one zerotier-cli
|
||||||
$(CODESIGN) -f -s $(CODESIGN_APP_CERT) zerotier-one
|
$(CODESIGN) -f -s $(CODESIGN_APP_CERT) zerotier-one
|
||||||
#$(CODESIGN) -vvv zerotier-one
|
|
||||||
|
|
||||||
macui: FORCE
|
macui: FORCE
|
||||||
cd macui && xcodebuild -target "ZeroTier One" -configuration Release
|
cd macui && xcodebuild -target "ZeroTier One" -configuration Release
|
||||||
$(CODESIGN) -f -s $(CODESIGN_APP_CERT) "macui/build/Release/ZeroTier One.app"
|
$(CODESIGN) -f -s $(CODESIGN_APP_CERT) "macui/build/Release/ZeroTier One.app"
|
||||||
#$(CODESIGN) -vvv "macui/build/Release/ZeroTier One.app"
|
|
||||||
|
|
||||||
cli: FORCE
|
#cli: FORCE
|
||||||
$(CXX) $(CXXFLAGS) -o zerotier cli/zerotier.cpp osdep/OSUtils.cpp node/InetAddress.cpp node/Utils.cpp node/Salsa20.cpp node/Identity.cpp node/SHA512.cpp node/C25519.cpp -lcurl
|
# $(CXX) $(CXXFLAGS) -o zerotier cli/zerotier.cpp osdep/OSUtils.cpp node/InetAddress.cpp node/Utils.cpp node/Salsa20.cpp node/Identity.cpp node/SHA512.cpp node/C25519.cpp -lcurl
|
||||||
$(STRIP) zerotier
|
# $(STRIP) zerotier
|
||||||
|
|
||||||
selftest: $(OBJS) selftest.o
|
selftest: $(OBJS) selftest.o
|
||||||
$(CXX) $(CXXFLAGS) -o zerotier-selftest selftest.o $(OBJS) $(LIBS)
|
$(CXX) $(CXXFLAGS) -o zerotier-selftest selftest.o $(OBJS) $(LIBS)
|
||||||
|
@ -80,18 +83,23 @@ mac-dist-pkg: FORCE
|
||||||
rm -f "ZeroTier One Signed.pkg"
|
rm -f "ZeroTier One Signed.pkg"
|
||||||
$(PRODUCTSIGN) --sign $(CODESIGN_INSTALLER_CERT) "ZeroTier One.pkg" "ZeroTier One Signed.pkg"
|
$(PRODUCTSIGN) --sign $(CODESIGN_INSTALLER_CERT) "ZeroTier One.pkg" "ZeroTier One Signed.pkg"
|
||||||
if [ -f "ZeroTier One Signed.pkg" ]; then mv -f "ZeroTier One Signed.pkg" "ZeroTier One.pkg"; fi
|
if [ -f "ZeroTier One Signed.pkg" ]; then mv -f "ZeroTier One Signed.pkg" "ZeroTier One.pkg"; fi
|
||||||
|
rm -f zt1_update_$(ZT_BUILD_PLATFORM)_$(ZT_BUILD_ARCHITECTURE)_*
|
||||||
|
cat ext/installfiles/mac-update/updater.tmpl.sh "ZeroTier One.pkg" >zt1_update_$(ZT_BUILD_PLATFORM)_$(ZT_BUILD_ARCHITECTURE)_$(ZT_VERSION_MAJOR).$(ZT_VERSION_MINOR).$(ZT_VERSION_REV)
|
||||||
|
|
||||||
# For ZeroTier, Inc. to build official signed packages
|
# For ZeroTier, Inc. to build official signed packages
|
||||||
official: FORCE
|
official: FORCE
|
||||||
make clean
|
make clean
|
||||||
make ZT_OFFICIAL_RELEASE=1 -j 4 one macui
|
make ZT_OFFICIAL_RELEASE=1 -j 4 one
|
||||||
|
make ZT_OFFICIAL_RELEASE=1 macui
|
||||||
make ZT_OFFICIAL_RELEASE=1 mac-dist-pkg
|
make ZT_OFFICIAL_RELEASE=1 mac-dist-pkg
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf *.dSYM build-* *.pkg *.dmg *.o node/*.o controller/*.o service/*.o osdep/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o $(OBJS) zerotier-one zerotier-idtool zerotier-selftest zerotier-cli zerotier ZeroTierOneInstaller-* mkworld doc/node_modules macui/build
|
rm -rf *.dSYM build-* *.pkg *.dmg *.o node/*.o controller/*.o service/*.o osdep/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o $(OBJS) zerotier-one zerotier-idtool zerotier-selftest zerotier-cli zerotier mkworld doc/node_modules macui/build zt1_update_$(ZT_BUILD_PLATFORM)_$(ZT_BUILD_ARCHITECTURE)_*
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
|
||||||
|
realclean: clean
|
||||||
|
|
||||||
# For those building from source -- installs signed binary tap driver in system ZT home
|
# For those building from source -- installs signed binary tap driver in system ZT home
|
||||||
install-mac-tap: FORCE
|
install-mac-tap: FORCE
|
||||||
mkdir -p /Library/Application\ Support/ZeroTier/One
|
mkdir -p /Library/Application\ Support/ZeroTier/One
|
||||||
|
|
Loading…
Add table
Reference in a new issue