From 66ffbaf9846a6b6e39ba0956573bc460e450207f Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <vital.had@gmail.com>
Date: Tue, 20 Jan 2026 10:30:26 +0800
Subject: [PATCH 2/2] Adjust build system

---
 third_party/Makefile                          |   8 +-
 third_party/Makefile-Xcode3                   |   9 +-
 third_party/Makefile-Xcode4andUp              |   5 +-
 third_party/Makefile-common                   | 139 ++++++++----------
 .../Tunnelblick.xcodeproj/project.pbxproj     |  46 ++----
 tunnelblick/tunnelblick-helper.m              |  12 +-
 6 files changed, 81 insertions(+), 138 deletions(-)

diff --git a/third_party/Makefile b/third_party/Makefile
index 78d1cc41..7cb0ee2b 100644
--- a/third_party/Makefile
+++ b/third_party/Makefile
@@ -3,12 +3,8 @@
 #
 # Created 2015-01-18 by Jonathan K. Bullard
 
-ifeq "$(XCODE_VERSION_MAJOR)" "0300"
-	ifeq "$(XCODE_VERSION_ACTUAL)" "0322"
-		include Makefile-Xcode3
-	else
-		@echo "error: Tunnelblick must be built with Xcode 3.2.2 or with Xcode 4 or higher"
-	endif
+ifeq "$(XCODE_BRANCH)" "0300"
+	include Makefile-Xcode3
 else
     include Makefile-Xcode4andUp
 endif
diff --git a/third_party/Makefile-Xcode3 b/third_party/Makefile-Xcode3
index 8bb049d7..d365669b 100644
--- a/third_party/Makefile-Xcode3
+++ b/third_party/Makefile-Xcode3
@@ -7,10 +7,9 @@
 #
 # Created 2015-01-18 by Jonathan K. Bullard
 
-MACOSX_DEPLOYMENT_TARGET=10.4
-TARGET_ARCHS=ppc i386 x86_64
-TARGET_ARCHS_2_2=ppc i386
-OPENSSL_TARGET_ARCHS=darwin-ppc-cc darwin-i386-cc darwin64-x86_64-cc
-CC=gcc-4.0
+MACOSX_DEPLOYMENT_TARGET=@TARGET@
+TARGET_ARCHS=ppc
+TARGET_ARCHS_2_2=ppc
+CC=gcc
 
 include Makefile-common
diff --git a/third_party/Makefile-Xcode4andUp b/third_party/Makefile-Xcode4andUp
index f0666e10..4cdcb9db 100644
--- a/third_party/Makefile-Xcode4andUp
+++ b/third_party/Makefile-Xcode4andUp
@@ -7,9 +7,8 @@
 #
 # Created 2015-01-18 by Jonathan K. Bullard
 
-TARGET_ARCHS=x86_64
-TARGET_ARCHS_2_2=x86_64
-OPENSSL_TARGET_ARCHS=darwin64-x86_64-cc
+TARGET_ARCHS=ppc
+TARGET_ARCHS_2_2=ppc
 CC=gcc
 TB_USE_RFC_3542=-D __APPLE_USE_RFC_3542
 
diff --git a/third_party/Makefile-common b/third_party/Makefile-common
index 823eb41e..08045209 100644
--- a/third_party/Makefile-common
+++ b/third_party/Makefile-common
@@ -8,21 +8,21 @@ TOPDIR = $(PWD)
 
 LZO_NAME         = lzo-2.10
 
-OPENSSL_NAME     = openssl-1.0.2p
+OPENSSL_NAME     = openssl3
 
-PKCS11_NAME      = pkcs11-helper-1.11
+PKCS11_NAME      = pkcs11-helper-1.29
 
-EASY_RSA_3_NAME  = easy-rsa-3.0.0-rc2
+EASY_RSA_3_NAME  = easy-rsa-3.0.1
 
 SPARKLE_NAME     = sparkle-1.5b6
 SPARKLE_ZIP_NAME = Sparkle 1.5b6.zip
 
-TUNTAP_20090913_NAME  = tuntap-20090913
-TUNTAP_20111101_NAME  = tuntap-20111101
-TUNTAP_CURRENT_NAME   = tuntap-20141104
-TUNTAP_20090913_TARGZ = tuntap_20090913_src.tar.gz
-TUNTAP_20111101_TARGZ = tuntap_20111101_src.tar.gz
-TUNTAP_CURRENT_TARGZ  = tuntap_20141104_src.tar.gz
+TUNTAP_LEGACY_V       = 20090913
+TUNTAP_V              = 20111101
+TUNTAP_20090913_NAME  = tuntap-$(TUNTAP_LEGACY_V)
+TUNTAP_CURRENT_NAME   = tuntap-$(TUNTAP_V)
+TUNTAP_20090913_TARGZ = tuntap_$(TUNTAP_LEGACY_V)_src.tar.gz
+TUNTAP_CURRENT_TARGZ  = tuntap_$(TUNTAP_V)_src.tar.gz
 
 # Names of OpenVPN folders are determined by examining third_party/sources/openvpn
 
@@ -37,20 +37,21 @@ OPENVPN_DEPRECATED_GCC_MAKE_OPTION = GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS=NO
 #######################################################################################
 # Define other make variables:
 
-SDKROOT=$(SDK_DIR)
+PREFIX ?= /opt/local
+SDKROOT = $(SDK_DIR)
+PROCESSOR ?= powerpc
 
-CFLAGS=-isysroot $(SDKROOT) -Os -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
+CFLAGS += -isysroot $(SDKROOT) -Os -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
 
-BUILD_NAME   = build
+BUILD_NAME = build
 SOURCES_NAME = sources
 PRODUCTS_NAME = products
 PATCHES_NAME = patches
 
 STAGING_DIR = $(TOPDIR)/$(BUILD_NAME)/staging
 
-OPENSSL_BUILD_DIR = $(TOPDIR)/$(BUILD_NAME)/$(OPENSSL_NAME)
-OPENSSL_STAGING_DIR = $(STAGING_DIR)/$(OPENSSL_NAME)
-OPENSSL_TARGET_FILES = $(foreach f, libcrypto.a libssl.a, $(OPENSSL_STAGING_DIR)/lib/$(f))
+OPENSSL_ROOT = $(PREFIX)/libexec/$(OPENSSL_NAME)
+OPENSSL_TARGET_FILES = $(foreach f, libcrypto.a libssl.a, $(OPENSSL_ROOT)/lib/$(f))
 
 LZO_BUILD_DIR = $(TOPDIR)/$(BUILD_NAME)/$(LZO_NAME)
 LZO_STAGING_DIR = $(STAGING_DIR)/$(LZO_NAME)
@@ -139,7 +140,7 @@ built-openssl: built-openssl-prepare
 		cd -; \
 	done
 	ditto -v $(OPENSSL_STAGING_DIR)/darwin64-x86_64-cc/include $(OPENSSL_STAGING_DIR)/include/x86_64
-	if [ $(XCODE_VERSION_MAJOR) = 0300 ] ; then \
+	if [ $(XCODE_BRANCH) = 0300 ] ; then \
 		ditto -v $(OPENSSL_STAGING_DIR)/darwin-i386-cc/include $(OPENSSL_STAGING_DIR)/include/i386 ; \
 		ditto -v $(OPENSSL_STAGING_DIR)/darwin-ppc-cc/include $(OPENSSL_STAGING_DIR)/include/ppc   ; \
 	fi
@@ -263,7 +264,7 @@ built-openvpn-prepare:
 			for patch_file in `ls $(OPENVPN_SOURCE_DIR)/$$version_name/patches/*.diff`; do \
 				patch_name=$$(basename "$${patch_file}") ; \
 				if [  $$patch_name != 01-enable-utun.diff \
-				   -o $(XCODE_VERSION_MAJOR) = 0300 ] ; then \
+				   -o $(XCODE_BRANCH) = 0300 ] ; then \
 					patch -p1 -N --dry-run -i $$patch_file > /dev/null; \
 					if [ $$? == 0 ]; then \
 						patch -p1 -N -i $$patch_file; \
@@ -286,7 +287,7 @@ built-openvpn-prepare:
 	touch built-openvpn-prepare
 	@echo "THIRD_PARTY: Expanded and Patched OpenVPN"
 
-built-openvpn: built-openvpn-prepare built-lzo built-pkcs11-helper built-openssl
+built-openvpn: built-openvpn-prepare
 	@echo "THIRD_PARTY: Building OpenVPN..."
 	cd $(OPENVPN_BUILD_DIR) ; \
 	cd ../ ; \
@@ -300,59 +301,38 @@ built-openvpn: built-openvpn-prepare built-lzo built-pkcs11-helper built-openssl
 						 		--enable-pkcs11 \
 						 		--disable-debug \
 						 		--disable-plugin-auth-pam \
-						 		--disable-dependency-tracking \
-						 		--enable-crypto \
-						 		--enable-ssl" ; \
+						 		--disable-dependency-tracking" ; \
 		fi ; \
 		if [ -d src ]; then \
-			echo "Making $$openvpn_name from post-2.3-alpha1 build system"; \
+			echo "Making $$openvpn_name"; \
 			for a in $(TARGET_ARCHS); do \
-				$(MAKE) clean; \
-				CC="$(CC)" \
-				CFLAGS="$(CFLAGS) \
-				        -arch $$a \
-				        $(OPENVPN_DEPRECATED_LLVN_OPTION) \
-				        $(TB_USE_RFC_3542)" \
-				LZO_CFLAGS="-I$(LZO_STAGING_DIR)/include" \
-				LZO_LIBS="-L$(LZO_STAGING_DIR)/lib \
-				          -llzo2" \
-				OPENSSL_SSL_CFLAGS="-I$(OPENSSL_STAGING_DIR)/include/$$a" \
-				OPENSSL_SSL_LIBS="$(OPENSSL_STAGING_DIR)/lib/libssl.a" \
-				OPENSSL_CRYPTO_CFLAGS="-I$(OPENSSL_STAGING_DIR)/include/$$a" \
-				OPENSSL_CRYPTO_LIBS="$(OPENSSL_STAGING_DIR)/lib/libcrypto.a \
-				                     -lz" \
-				PKCS11_HELPER_CFLAGS="-I$(PKCS11_STAGING_DIR)/include/" \
-				PKCS11_HELPER_LIBS="-L$(PKCS11_STAGING_DIR)/lib \
-				                    -lpkcs11-helper" \
-				OS_VERSION=`uname -r` \
-					autoreconf -i -v; \
-				\
 				CC="$(CC)" \
 				CFLAGS="$(CFLAGS) \
+				        -isystem $(PREFIX)/include/LegacySupport \
 				        -arch $$a \
 				        $(OPENVPN_DEPRECATED_LLVN_OPTION) \
 				        $(TB_USE_RFC_3542)" \
-				LZO_CFLAGS="-I$(LZO_STAGING_DIR)/include" \
-				LZO_LIBS="-L$(LZO_STAGING_DIR)/lib \
+				LZO_CFLAGS="-I$(PREFIX)/include" \
+				LZO_LIBS="-L$(PREFIX)/lib \
 				          -llzo2" \
-				OPENSSL_SSL_CFLAGS="-I$(OPENSSL_STAGING_DIR)/include/$$a" \
-				OPENSSL_SSL_LIBS="$(OPENSSL_STAGING_DIR)/lib/libssl.a" \
-				OPENSSL_CRYPTO_CFLAGS="-I$(OPENSSL_STAGING_DIR)/include/$$a" \
-				OPENSSL_CRYPTO_LIBS="$(OPENSSL_STAGING_DIR)/lib/libcrypto.a \
+				OPENSSL_SSL_CFLAGS="-I$(OPENSSL_ROOT)/include" \
+				OPENSSL_SSL_LIBS="$(OPENSSL_ROOT)/lib/libssl.a" \
+				OPENSSL_CRYPTO_CFLAGS="-I$(OPENSSL_ROOT)/include" \
+				OPENSSL_CRYPTO_LIBS="$(OPENSSL_ROOT)/lib/libcrypto.a \
 				                     -lz" \
-				PKCS11_HELPER_CFLAGS="-I$(PKCS11_STAGING_DIR)/include/" \
-				PKCS11_HELPER_LIBS="-L$(PKCS11_STAGING_DIR)/lib \
+				PKCS11_HELPER_CFLAGS="-I$(PREFIX)/include/" \
+				PKCS11_HELPER_LIBS="-L$(PREFIX)/lib \
 				                    -lpkcs11-helper" \
 				OS_VERSION=`uname -r` \
 				./configure \
-					 --build=$$a-apple-darwin \
+					 --build=$(PROCESSOR)-apple-darwin \
 					 $$configure_options ; \
 				\
 				$(MAKE) LIBS="$(OPENSSL_TARGET_FILES) \
-							  -L$(PKCS11_STAGING_DIR)/lib \
-							  -L$(LZO_STAGING_DIR)/lib \
+							  -L$(PREFIX)/lib \
 							  -lpkcs11-helper \
-							  -llzo2" \
+							  -llzo2 \
+							  $(PREFIX)/lib/libMacportsLegacySupport.a" \
 							  $(OPENVPN_DEPRECATED_GCC_MAKE_OPTION) ; \
 				\
 				echo "Making down-root plugin" ; \
@@ -372,20 +352,20 @@ built-openvpn: built-openvpn-prepare built-lzo built-pkcs11-helper built-openssl
 				$(MAKE) clean; \
 				autoreconf -i -v; \
 				CC=$(CC) \
-				CFLAGS="$(CFLAGS) -arch $$a" \
+				CFLAGS="$(CFLAGS) -isystem $(PREFIX)/include/LegacySupport -arch $$a" \
 				OS_VERSION=`uname -r` \
-				./configure --build=$$a-apple-darwin \
-				            --with-lzo-headers=$(LZO_STAGING_DIR)/include \
-				            --with-lzo-lib=$(LZO_STAGING_DIR)/lib \
-				            --with-pkcs11-helper-headers=$(PKCS11_STAGING_DIR)/include \
-				            --with-pkcs11-helper-lib=$(PKCS11_STAGING_DIR)/lib \
-				            --with-ssl-headers=$(OPENSSL_STAGING_DIR)/include/$$a \
-				            --with-ssl-lib=$(OPENSSL_STAGING_DIR)/lib \
+				./configure --build=$(PROCESSOR)-apple-darwin \
+				            --with-lzo-headers=$(PREFIX)/include \
+				            --with-lzo-lib=$(PREFIX)/lib \
+				            --with-pkcs11-helper-headers=$(PREFIX)/include \
+				            --with-pkcs11-helper-lib=$(PREFIX)/lib \
+				            --with-ssl-headers=$(OPENSSL_ROOT)/include \
+				            --with-ssl-lib=$(OPENSSL_ROOT)/lib \
 				            --disable-dependency-tracking; \
-				$(MAKE) LIBS="$(OPENSSL_TARGET_FILES) -lpkcs11-helper -llzo2 -lz"; \
+				$(MAKE) LIBS="$(OPENSSL_TARGET_FILES) -lpkcs11-helper -llzo2 -lz $(PREFIX)/lib/libMacportsLegacySupport.a"; \
 				cp -f -p -R openvpn ../openvpn_tblk_$$a; \
 			done; \
-			$(MAKE) CC_FLAGS="-Wall -isysroot $(SDKROOT) -Os -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET) $(DOWN_ROOT_ARCH_2_2)" -C plugin/down-root; \
+			$(MAKE) CC_FLAGS="-Wall -isystem $(PREFIX)/include/LegacySupport -isysroot $(SDKROOT) -Os -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET) $(DOWN_ROOT_ARCH_2_2)" -C plugin/down-root; \
 			cp -f -p -R plugin/down-root/openvpn-down-root.so $(OPENVPN_PRODUCTS_DIR)/$$openvpn_name/openvpn-down-root.so; \
 		fi; \
 		cd ../; \
@@ -409,19 +389,16 @@ built-openvpn-clean:
 
 built-tuntap-prepare:
 	@echo "THIRD_PARTY: Expanding Tun/Tap ..."
-	if [ $(XCODE_VERSION_MAJOR) = 0300 ] ; then \
+	if [ $(XCODE_BRANCH) = 0300 ] ; then \
 		cd $(TUNTAP_SOURCE_DIR)/$(TUNTAP_20090913_NAME) ; \
 		mkdir -p $(TUNTAP_BUILD_DIR)/$(TUNTAP_20090913_NAME) ; \
 		tar -x -f $(TUNTAP_20090913_TARGZ) -C $(TUNTAP_BUILD_DIR)/$(TUNTAP_20090913_NAME) ; \
 	fi ; \
-	cd $(TUNTAP_SOURCE_DIR)/$(TUNTAP_20111101_NAME) ; \
-    mkdir -p $(TUNTAP_BUILD_DIR)/$(TUNTAP_20111101_NAME) ; \
-	tar -x -f $(TUNTAP_20111101_TARGZ) -C $(TUNTAP_BUILD_DIR)/$(TUNTAP_20111101_NAME) ; \
 	cd $(TUNTAP_SOURCE_DIR)/$(TUNTAP_CURRENT_NAME) ; \
     mkdir -p $(TUNTAP_BUILD_DIR)/$(TUNTAP_CURRENT_NAME) ; \
 	tar -x -f $(TUNTAP_CURRENT_TARGZ) -C $(TUNTAP_BUILD_DIR)/$(TUNTAP_CURRENT_NAME) ;
 	@echo "THIRD_PARTY: Patching Tun/Tap..."
-	for tuntapdir in $(TUNTAP_20090913_NAME) $(TUNTAP_20111101_NAME) $(TUNTAP_CURRENT_NAME) ; do \
+	for tuntapdir in $(TUNTAP_20090913_NAME) $(TUNTAP_CURRENT_NAME) ; do \
 		if [ -d $(TUNTAP_BUILD_DIR)/$$tuntapdir/tuntap ] ; then \
 			cd $(TUNTAP_BUILD_DIR)/$$tuntapdir/tuntap ; \
 			for patch_file in $(TUNTAP_SOURCE_DIR)/$$tuntapdir/patches/*.diff; do \
@@ -448,17 +425,14 @@ built-tuntap: built-tuntap-prepare
 	export TUNTAP_ARCHS="$(foreach f, $(TARGET_ARCHS), -arch $f)" ; \
 	cd $(TUNTAP_BUILD_DIR) ; \
 	mkdir -p $(TUNTAP_PRODUCTS_DIR) ; \
-	if [ $(XCODE_VERSION_MAJOR) = 0300 ] ; then \
+	if [ $(XCODE_BRANCH) = 0300 ] ; then \
 		$(MAKE) -C $(TUNTAP_20090913_NAME)/tuntap/ ; \
-		cp -f -p -R $(TUNTAP_20090913_NAME)/tuntap/tap.kext $(TUNTAP_PRODUCTS_DIR)/tap-20090913.kext ; \
-		cp -f -p -R $(TUNTAP_20090913_NAME)/tuntap/tun.kext $(TUNTAP_PRODUCTS_DIR)/tun-20090913.kext ; \
+		cp -f -p -R $(TUNTAP_20090913_NAME)/tuntap/tap.kext $(TUNTAP_PRODUCTS_DIR)/tap-$(TUNTAP_LEGACY_V).kext ; \
+		cp -f -p -R $(TUNTAP_20090913_NAME)/tuntap/tun.kext $(TUNTAP_PRODUCTS_DIR)/tun-$(TUNTAP_LEGACY_V).kext ; \
 	fi ; \
-	$(MAKE) -C $(TUNTAP_20111101_NAME)/tuntap/ ; \
-	cp -f -p -R $(TUNTAP_20111101_NAME)/tuntap/tap.kext $(TUNTAP_PRODUCTS_DIR)/tap-20111101.kext ; \
-	cp -f -p -R $(TUNTAP_20111101_NAME)/tuntap/tun.kext $(TUNTAP_PRODUCTS_DIR)/tun-20111101.kext ; \
 	$(MAKE) -C $(TUNTAP_CURRENT_NAME)/tuntap/ ; \
-	cp -f -p -R $(TUNTAP_CURRENT_NAME)/tuntap/tap.kext $(TUNTAP_PRODUCTS_DIR)/tap.kext ; \
-	cp -f -p -R $(TUNTAP_CURRENT_NAME)/tuntap/tun.kext $(TUNTAP_PRODUCTS_DIR)/tun.kext
+	cp -f -p -R $(TUNTAP_CURRENT_NAME)/tuntap/tap.kext $(TUNTAP_PRODUCTS_DIR)/tap-$(TUNTAP_V).kext ; \
+	cp -f -p -R $(TUNTAP_CURRENT_NAME)/tuntap/tun.kext $(TUNTAP_PRODUCTS_DIR)/tun-$(TUNTAP_V).kext
 	touch built-tuntap
 	@echo "THIRD_PARTY: Built Tun/Tap"
 
@@ -511,7 +485,7 @@ built-sparkle-prepare:
 
 built-sparkle: built-sparkle-prepare
 	@echo "THIRD_PARTY: Building Sparkle.framework for '$(ARCHS)' with deploy-target '$(MACOSX_DEPLOYMENT_TARGET)' and SDK path '$(SDK_DIR)'" ;
-	if [ $(XCODE_VERSION_MAJOR) = 0300 ] ; then \
+	if [ $(XCODE_BRANCH) = 0300 ] ; then \
 		SPARKLE_FLAGS="$(TB_SPARKLE_DEPRECATED_HANDLING)" ; \
 	else \
 		SPARKLE_FLAGS="$(TB_SPARKLE_DEPRECATED_HANDLING) \
@@ -551,12 +525,17 @@ built-sparkle-clean:
 # EASY-RSA
 #######################################################################################
 
+# Below we avoid using rsync since it may create a trouble in Rosetta env, and use tar instead.
+
 built-easy-rsa-tunnelblick:
 	@echo "THIRD_PARTY: Building easy-rsa-tunnelblick..."
 	rm -f -r "$(EASY_RSA_PRODUCTS_DIR)"
 	mkdir -p "$(EASY_RSA_PRODUCTS_DIR)"
-	rsync -aq --exclude=".*"    "$(EASY_RSA_SOURCE_DIR)/easy-rsa-2-tunnelblick/" "$(EASY_RSA_PRODUCTS_DIR)"
-	mkdir -p                                                                     "$(EASY_RSA_PRODUCTS_DIR)/EasyRSA-3"
+	tar -C "$(EASY_RSA_SOURCE_DIR)/easy-rsa-2-tunnelblick/" \
+		--exclude=".*" \
+		-cf - . | \
+	tar -C "$(EASY_RSA_PRODUCTS_DIR)" -xf -
+	mkdir -p                                                                      "$(EASY_RSA_PRODUCTS_DIR)/EasyRSA-3"
 	cp -X -f -R "$(EASY_RSA_SOURCE_DIR)/$(EASY_RSA_3_NAME)/doc"                   "$(EASY_RSA_PRODUCTS_DIR)/EasyRSA-3"
 	cp -X -f -R "$(EASY_RSA_SOURCE_DIR)/$(EASY_RSA_3_NAME)/easyrsa3"              "$(EASY_RSA_PRODUCTS_DIR)/EasyRSA-3"
 	cp -X -f -R "$(EASY_RSA_SOURCE_DIR)/$(EASY_RSA_3_NAME)/Licensing"             "$(EASY_RSA_PRODUCTS_DIR)/EasyRSA-3"
diff --git a/tunnelblick/Tunnelblick.xcodeproj/project.pbxproj b/tunnelblick/Tunnelblick.xcodeproj/project.pbxproj
index 72bc62d0..01c23d50 100644
--- a/tunnelblick/Tunnelblick.xcodeproj/project.pbxproj
+++ b/tunnelblick/Tunnelblick.xcodeproj/project.pbxproj
@@ -1480,7 +1480,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/bash;
-			shellScript = "# Touch the build folder to get it to the top of listings sorted by modification date\ntouch build\n\nif [ \"${CONFIGURATION}\" = \"Analyze ONLY\" ]; then\n  # Make sure we never use the binary\n  rm -r -f \"build/${CONFIGURATION}/${PROJECT_NAME}.app\"\n  exit 0\nfi\n\n# Compile Tunnelblick Uninstaller\n  rm -r -f      \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app\"\n  osacompile -o \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app\" -x \"tunnelblick-uninstaller.applescript\"\n\n  # The droplet product of the above 'osacompile' command doesn't support PowerPC G3 processors, so we replace it with a droplet compiled on Tiger (which supports PowerPC G3 and 32-bit Intel processors)\n  # See tunnelblick-uninstaller-droplet-note.txt for details \n  rm -f \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/MacOS/droplet\"\n  cp -p \"tunnelblick-uninstaller-droplet-compiled-on-tiger\" \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/MacOS/droplet\"\n         \n  #  Add the .app's Info.plist and its icon, script, and localization resources\n  cp -p -f \"tunnelblick-uninstaller.Info.plist\"      \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/Info.plist\"\n  cp -p \"tunnelblick-uninstaller.icns\"               \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/Resources/droplet.icns\"\n  cp -p \"tunnelblick-uninstaller.sh\"                 \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/Resources/tunnelblick-uninstaller.sh\"\n\n  for d in `ls \"tunnelblick-uninstaller-localization\"`\n  do\n    cp -p -f -R tunnelblick-uninstaller-localization/${d} \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/Resources\"\n  done\n\n# Copy easy-rsa-tunnelblick, removing .svn folders and .DS_Store files\n  rm -r -f                                     \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick\"\n  cp -R \"../third_party/products/easy-rsa-tunnelblick/\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/keys/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/EasyRSA-3/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/EasyRSA-3/doc/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/EasyRSA-3/easyrsa3/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/EasyRSA-3/easyrsa3/x509-types/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/EasyRSA-3/Licensing/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/EasyRSA-3.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/.svn\"\n  find   \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick\"   -name .DS_Store -exec rm -f  '{}' ';'\n# Index the help files\n  hiutil -Caf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/help/help.helpindex\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/help\"\n\n# Copy the tun and tap kexts\n  if [ -d \"../third_party/products/tuntap/tap-20090913.kext\" ] ; then\n    rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-20090913.kext\"\n    cp -R \"../third_party/products/tuntap/tap-20090913.kext/\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-20090913.kext\"\n  fi\n  if [ -d \"../third_party/products/tuntap/tun-20090913.kext\" ] ; then\n    rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-20090913.kext\"\n    cp -R \"../third_party/products/tuntap/tun-20090913.kext/\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-20090913.kext\"\n  fi\n\n  rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-20111101.kext\"\n  cp -R \"../third_party/products/tuntap/tap-20111101.kext/\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-20111101.kext\"\n\n  rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-20111101.kext\"\n  cp -R \"../third_party/products/tuntap/tun-20111101.kext/\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-20111101.kext\"\n\n  rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap.kext\"\n  cp -R \"../third_party/products/tuntap/tap.kext/\"          \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap.kext\"\n \n  rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun.kext\"\n  cp -R \"../third_party/products/tuntap/tun.kext/\"          \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun.kext\"\n\n# Create copies that are to be signed, too, for Mavericks and higher\n  rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-signed.kext\"\n  cp -R \"../third_party/products/tuntap/tap.kext/\"          \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-signed.kext\"\n \n  rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-signed.kext\"\n  cp -R \"../third_party/products/tuntap/tun.kext/\"          \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-signed.kext\"\n\n# Set the build number in Info.plist for the app and for the kexts\n# Replaces all occurances of \"TBBUILDNUMBER\" in an Info.plist with the contents of TBBuildNumber.txt\n# If an \"Unsigned\" build, appends \" Unsigned\" to CFBundleShortVersionString, which is detected by the \")\" after \"TBBUILDNUMBER\"\n# If an \"Debug\" build,    appends \" Debug\"    to CFBundleShortVersionString, which is detected by the \")\" after \"TBBUILDNUMBER\"\n# @param String, path to Info.plist file that should be modified\nsetBuildNumber()\n{\n\ttbbn=\"$(cat \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/TBBuildNumber.txt\")\"\n\tif [ \"${CONFIGURATION}\" = \"Unsigned Release\" ]; then\n\t\tsed -e \"s|TBBUILDNUMBER)|TBBUILDNUMBER) Unsigned|g\" \"${@}\" | sed -e \"s|TBBUILDNUMBER|${tbbn}|g\" > \"${@}.tmp\"\n\telif [ \"${CONFIGURATION}\" = \"Debug\" ]; then\n\t\tsed -e \"s|TBBUILDNUMBER)|TBBUILDNUMBER) Debug|g\"    \"${@}\" | sed -e \"s|TBBUILDNUMBER|${tbbn}|g\" > \"${@}.tmp\"\n\telse\n\t\tsed -e \"s|TBBUILDNUMBER|${tbbn}|g\" \"${@}\" > \"${@}.tmp\"\n\tfi\n\trm \"${@}\"\n\tmv \"${@}.tmp\" \"${@}\"\n}\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Info.plist\"\nif [ -d \"../third_party/tun-20090913.kext\" ] ; then\n  setBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-20090913.kext/Contents/Info.plist\"\nfi\nif [ -d \"../third_party/tap-20090913.kext\" ] ; then\n  setBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-20090913.kext/Contents/Info.plist\"\nfi\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-20111101.kext/Contents/Info.plist\"\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-20111101.kext/Contents/Info.plist\"\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun.kext/Contents/Info.plist\"\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap.kext/Contents/Info.plist\"\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-signed.kext/Contents/Info.plist\"\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-signed.kext/Contents/Info.plist\"\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/Info.plist\"\n\n# Create the openvpn directory structure:\n# ...Contents/Resources/openvpn contains a folder for each version of OpenVPN.\n# The folder for each vesion of OpenVPN is named \"openvpn-x.x.x\".\n# Each \"openvpn-x.x.x\"folder contains the openvpn binary and the openvpn-down-root.so binary\nmkdir -p \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn\"\ndefault_openvpn=\"z\"\nfor d in `ls \"../third_party/products/openvpn\"`\ndo\n  mkdir -p \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/${d}\"\n  cp \"../third_party/products/openvpn/${d}/openvpn-executable\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/${d}/openvpn\"\n  cp \"../third_party/products/openvpn/${d}/openvpn-down-root.so\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/${d}/openvpn-down-root.so\"\n  chmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/${d}/openvpn-down-root.so\"\n  if [ \"${d}\" \\< \"${default_openvpn}\" ] ; then\n    default_openvpn=\"${d}\"\n  fi\ndone\n\nif [ \"${default_openvpn}\" != \"z\" ] ; then\n  rm -f \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/default\"\n  ln -s \"${default_openvpn}/openvpn\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/default\"\nelse\n  echo \"warning: Could not find a version of OpenVPN to use by default\"\nfi\n\n# Remove extra files that are not needed\n\nrm -f \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/TBBuildNumber.txt\"\n\nrm -f \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/ExternalBuildCleanScript.sh\"\n\n# Remove non-.png files in IconSets (but leave the \"templates.png\" file)\nfor d in `ls \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets\"` ; do\n  if [ -d \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets/${d}\" ] ; then\n    for f in `ls \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets/${d}\"` ; do\n      if [ \"${f##*.}\" != \"png\" ] ; then\n        if [ \"${f%.*}\" != \"templates\" ] ; then\n          if [ -d \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets/${d}/${f}\" ] ; then\n            rm -f -R \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets/${d}/${f}\"\n          else\n            rm -f \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets/${d}/${f}\"\n          fi\n        fi\n      fi\n    done\n  else\n    rm -f \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets/${d}\"\n  fi\ndone\n\n# Remove extended attributes\nfor f in build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/*\ndo\n  xattr -d \"com.apple.FinderInfo\" ${f} 2> /dev/null\ndone\n\n# Remove NeedsTranslation.strings and Removed.strings from all .lproj folders\nshopt -s nullglob\nfor f in build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/*.lproj\ndo\n  if test -f \"${f}/NeedsTranslation.strings\"\n  then\n    rm \"${f}/NeedsTranslation.strings\"\n  fi\n  if test -f \"${f}/Removed.strings\"\n  then\n    rm \"${f}/Removed.strings\"\n  fi \ndone\n\n# Change permissions from 755 to 744 on many executables in Resources (openvpn-down-root.so permissions were changed when setting up the OpenVPN folder structure)\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/atsystemstart\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/installer\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/leasewatch\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/leasewatch3\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/process-network-changes\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/standardize-scutil-output\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tunnelblickd\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.up.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.down.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.route-pre-down.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.1.up.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.1.down.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.2.up.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.2.down.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.3.up.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.3.down.tunnelblick.sh\"\n\n# Sign the app and its tools if Release\nif [ \"${CONFIGURATION}\" = \"Release\" ]; then\n  # Sign the binary tools and the Tunnelblick application itself\n  codesign -s TunnelblickSigning \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/atsystemstart\"\n  codesign -s TunnelblickSigning \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/installer\"\n  codesign -s TunnelblickSigning \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpnstart\"\n  codesign -s TunnelblickSigning \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/process-network-changes\"\n  codesign -s TunnelblickSigning \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/standardize-scutil-output\"\n# The \"signed\" kexts must only be signed in 10.8.3 or higher or they won't load on older systems\n#  codesign -s TunnelblickSigning \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-signed.kext\"\n#  codesign -s TunnelblickSigning \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-signed.kext\"\n\n  for d in `ls \"../third_party/openvpn\"`\n  do\n    codesign -s TunnelblickSigning \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/${d}/openvpn\"\n    codesign -s TunnelblickSigning \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/${d}/openvpn-down-root.so\"\n  done\n\n  codesign -s TunnelblickSigning \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Frameworks/Sparkle.framework/Versions/A\"\n\n  codesign -s TunnelblickSigning \"build/${CONFIGURATION}/${PROJECT_NAME}.app\"\n\n  # Sign the Uninstaller, too\n  codesign -s TunnelblickSigning \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app\"\nfi\n\n# Create the Tunnelblick .dmg and the Uninstaller .dmg except if Debug\nif [ \"${CONFIGURATION}\" != \"Debug\" ]; then\n\n\t# Staging folder\n\tTMPDMG=\"build/${CONFIGURATION}/${PROJECT_NAME}\"\n\n\t# Folder with files for the .dmg (.DS_Store and background folder which contains background.png background image)\n\tDMG_FILES=\"dmgFiles\"\n\n\t# Remove the existing \"staging\" folder and copy the application into it\n\trm -r -f \"$TMPDMG\"\n\tmkdir -p \"$TMPDMG\"\n\tcp -p -R \"build/${CONFIGURATION}/${PROJECT_NAME}.app\" \"$TMPDMG\"\n\n\t# Copy link to documentation to the staging folder\n\tcp -p \"Online Documentation.webloc\" \"$TMPDMG\"\n\n\t# Copy the background folder and its background.png file to the staging folder and make the background folder invisible in the Finder\n\tcp -p -R \"$DMG_FILES/background\" \"$TMPDMG\"\n\tsetfile -a V \"$TMPDMG/background\"\n\n\t# Copy dotDS_Store to .DS_Store and make it invisible in the Finder\n\tcp -p -R \"$DMG_FILES/dotDS_Store\" \"$TMPDMG/.DS_Store\"\n\tsetfile -a V \"$TMPDMG/.DS_Store\"\n\n\t# Remove any existing .dmg and create a new one. Specify \"-noscrub\" so that .DS_Store is copied to the image\n\trm -r -f \"build/${CONFIGURATION}/${PROJECT_NAME}.dmg\"\n\thdiutil create -noscrub -srcfolder \"$TMPDMG\" \"build/${CONFIGURATION}/${PROJECT_NAME}.dmg\"\n\n\t# Leave the staging folder so customized .dmgs can be easily created\n\n\t# Uninstaller Staging folder\n\tTMPDMG=\"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller\"\n\n\t# Folder with files for the uninstaller .dmg (.DS_Store and background folder which contains background.png background image)\n\tDMG_FILES=\"uninstaller-dmgFiles\"\n\n\t# Remove the existing \"staging\" folder and copy the uninstaller into it\n\trm -r -f \"$TMPDMG\"\n\tmkdir -p \"$TMPDMG\"\n\tcp -p -R \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app\" \"$TMPDMG\"\n\n\t# Copy link to documentation to the staging folder\n\tcp -p \"Online Documentation.webloc\" \"$TMPDMG\"\n\n\t# Remove any existing .dmg and create a new one. Specify \"-noscrub\" so that .DS_Store is copied to the image\n\trm -r -f \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.dmg\"\n\thdiutil create -noscrub -srcfolder \"$TMPDMG\" \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.dmg\"\n\n\t# Leave the staging folder so customized .dmgs can be easily created\nfi";
+			shellScript = "# Touch the build folder to get it to the top of listings sorted by modification date\ntouch build\n\nif [ \"${CONFIGURATION}\" = \"Analyze ONLY\" ]; then\n  # Make sure we never use the binary\n  rm -r -f \"build/${CONFIGURATION}/${PROJECT_NAME}.app\"\n  exit 0\nfi\n\n# Compile Tunnelblick Uninstaller\n  rm -r -f      \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app\"\n  osacompile -o \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app\" -x \"tunnelblick-uninstaller.applescript\"\n\n  # The droplet product of the above 'osacompile' command doesn't support PowerPC G3 processors, so we replace it with a droplet compiled on Tiger (which supports PowerPC G3 and 32-bit Intel processors)\n  # See tunnelblick-uninstaller-droplet-note.txt for details \n  rm -f \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/MacOS/droplet\"\n  cp -p \"tunnelblick-uninstaller-droplet-compiled-on-tiger\" \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/MacOS/droplet\"\n         \n  #  Add the .app's Info.plist and its icon, script, and localization resources\n  cp -p -f \"tunnelblick-uninstaller.Info.plist\"      \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/Info.plist\"\n  cp -p \"tunnelblick-uninstaller.icns\"               \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/Resources/droplet.icns\"\n  cp -p \"tunnelblick-uninstaller.sh\"                 \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/Resources/tunnelblick-uninstaller.sh\"\n\n  for d in `ls \"tunnelblick-uninstaller-localization\"`\n  do\n    cp -p -f -R tunnelblick-uninstaller-localization/${d} \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/Resources\"\n  done\n\n# Copy easy-rsa-tunnelblick, removing .svn folders and .DS_Store files\n  rm -r -f                                     \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick\"\n  cp -R \"../third_party/products/easy-rsa-tunnelblick/\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/keys/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/EasyRSA-3/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/EasyRSA-3/doc/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/EasyRSA-3/easyrsa3/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/EasyRSA-3/easyrsa3/x509-types/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/EasyRSA-3/Licensing/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/EasyRSA-3.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/.svn\"\n  rm -rf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick/.svn\"\n  find   \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/easy-rsa-tunnelblick\"   -name .DS_Store -exec rm -f  '{}' ';'\n# Index the help files\n  hiutil -Caf \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/help/help.helpindex\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/help\"\n\n# Copy the tun and tap kexts\n  if [ -d \"../third_party/products/tuntap/tap-20090913.kext\" ] ; then\n    rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-20090913.kext\"\n    cp -R \"../third_party/products/tuntap/tap-20090913.kext/\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-20090913.kext\"\n  fi\n  if [ -d \"../third_party/products/tuntap/tun-20090913.kext\" ] ; then\n    rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-20090913.kext\"\n    cp -R \"../third_party/products/tuntap/tun-20090913.kext/\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-20090913.kext\"\n  fi\n\n  rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-20111101.kext\"\n  cp -R \"../third_party/products/tuntap/tap-20111101.kext/\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-20111101.kext\"\n\n  rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-20111101.kext\"\n  cp -R \"../third_party/products/tuntap/tun-20111101.kext/\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-20111101.kext\"\n\n  rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap.kext\"\n  cp -R \"../third_party/products/tuntap/tap.kext/\"          \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap.kext\"\n \n  rm -r -f                                  \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun.kext\"\n  cp -R \"../third_party/products/tuntap/tun.kext/\"          \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun.kext\"\n\n# Set the build number in Info.plist for the app and for the kexts\n# Replaces all occurances of \"TBBUILDNUMBER\" in an Info.plist with the contents of TBBuildNumber.txt\n# If an \"Unsigned\" build, appends \" Unsigned\" to CFBundleShortVersionString, which is detected by the \")\" after \"TBBUILDNUMBER\"\n# If an \"Debug\" build,    appends \" Debug\"    to CFBundleShortVersionString, which is detected by the \")\" after \"TBBUILDNUMBER\"\n# @param String, path to Info.plist file that should be modified\nsetBuildNumber()\n{\n\ttbbn=\"$(cat \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/TBBuildNumber.txt\")\"\n\tif [ \"${CONFIGURATION}\" = \"Unsigned Release\" ]; then\n\t\tsed -e \"s|TBBUILDNUMBER)|TBBUILDNUMBER) Unsigned|g\" \"${@}\" | sed -e \"s|TBBUILDNUMBER|${tbbn}|g\" > \"${@}.tmp\"\n\telif [ \"${CONFIGURATION}\" = \"Debug\" ]; then\n\t\tsed -e \"s|TBBUILDNUMBER)|TBBUILDNUMBER) Debug|g\"    \"${@}\" | sed -e \"s|TBBUILDNUMBER|${tbbn}|g\" > \"${@}.tmp\"\n\telse\n\t\tsed -e \"s|TBBUILDNUMBER|${tbbn}|g\" \"${@}\" > \"${@}.tmp\"\n\tfi\n\trm \"${@}\"\n\tmv \"${@}.tmp\" \"${@}\"\n}\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Info.plist\"\nif [ -d \"../third_party/tun-20090913.kext\" ] ; then\n  setBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-20090913.kext/Contents/Info.plist\"\nfi\nif [ -d \"../third_party/tap-20090913.kext\" ] ; then\n  setBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-20090913.kext/Contents/Info.plist\"\nfi\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun-20111101.kext/Contents/Info.plist\"\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap-20111101.kext/Contents/Info.plist\"\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tun.kext/Contents/Info.plist\"\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tap.kext/Contents/Info.plist\"\nsetBuildNumber \"build/${CONFIGURATION}/${PROJECT_NAME} Uninstaller.app/Contents/Info.plist\"\n\n# Create the openvpn directory structure:\n# ...Contents/Resources/openvpn contains a folder for each version of OpenVPN.\n# The folder for each vesion of OpenVPN is named \"openvpn-x.x.x\".\n# Each \"openvpn-x.x.x\"folder contains the openvpn binary and the openvpn-down-root.so binary\nmkdir -p \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn\"\ndefault_openvpn=\"z\"\nfor d in `ls \"../third_party/products/openvpn\"`\ndo\n  mkdir -p \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/${d}\"\n  cp \"../third_party/products/openvpn/${d}/openvpn-executable\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/${d}/openvpn\"\n  cp \"../third_party/products/openvpn/${d}/openvpn-down-root.so\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/${d}/openvpn-down-root.so\"\n  chmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/${d}/openvpn-down-root.so\"\n  if [ \"${d}\" \\< \"${default_openvpn}\" ] ; then\n    default_openvpn=\"${d}\"\n  fi\ndone\n\nif [ \"${default_openvpn}\" != \"z\" ] ; then\n  rm -f \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/default\"\n  ln -s \"${default_openvpn}/openvpn\" \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/openvpn/default\"\nelse\n  echo \"warning: Could not find a version of OpenVPN to use by default\"\nfi\n\n# Remove extra files that are not needed\n\nrm -f \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/TBBuildNumber.txt\"\n\nrm -f \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/ExternalBuildCleanScript.sh\"\n\n# Remove non-.png files in IconSets (but leave the \"templates.png\" file)\nfor d in `ls \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets\"` ; do\n  if [ -d \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets/${d}\" ] ; then\n    for f in `ls \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets/${d}\"` ; do\n      if [ \"${f##*.}\" != \"png\" ] ; then\n        if [ \"${f%.*}\" != \"templates\" ] ; then\n          if [ -d \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets/${d}/${f}\" ] ; then\n            rm -f -R \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets/${d}/${f}\"\n          else\n            rm -f \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets/${d}/${f}\"\n          fi\n        fi\n      fi\n    done\n  else\n    rm -f \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/IconSets/${d}\"\n  fi\ndone\n\n# Remove extended attributes\nfor f in build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/*\ndo\n  xattr -d \"com.apple.FinderInfo\" ${f} 2> /dev/null\ndone\n\n# Remove NeedsTranslation.strings and Removed.strings from all .lproj folders\nshopt -s nullglob\nfor f in build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/*.lproj\ndo\n  if test -f \"${f}/NeedsTranslation.strings\"\n  then\n    rm \"${f}/NeedsTranslation.strings\"\n  fi\n  if test -f \"${f}/Removed.strings\"\n  then\n    rm \"${f}/Removed.strings\"\n  fi \ndone\n\n# Change permissions from 755 to 744 on many executables in Resources (openvpn-down-root.so permissions were changed when setting up the OpenVPN folder structure)\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/atsystemstart\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/installer\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/leasewatch\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/leasewatch3\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/process-network-changes\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/standardize-scutil-output\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/tunnelblickd\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.up.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.down.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.route-pre-down.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.1.up.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.1.down.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.2.up.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.2.down.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.3.up.tunnelblick.sh\"\nchmod 744 \"build/${CONFIGURATION}/${PROJECT_NAME}.app/Contents/Resources/client.3.down.tunnelblick.sh\"";
 			showEnvVarsInLog = 0;
 		};
 		616A49200E38D17500477476 /* Build Third Party Items */ = {
@@ -1906,7 +1906,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc";
 				GCC_PREPROCESSOR_DEFINITIONS = "";
 				GCC_VERSION = 4.2;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
@@ -1923,10 +1923,8 @@
 				GCC_WARN_UNUSED_PARAMETER = YES;
 				GCC_WARN_UNUSED_VALUE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PREBINDING = NO;
 				RUN_CLANG_STATIC_ANALYZER = YES;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = "-Wall";
 			};
 			name = "Analyze ONLY";
@@ -1957,9 +1955,7 @@
 				GCC_WARN_UNUSED_VARIABLE = NO;
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PRODUCT_NAME = Tunnelblick;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = (
 					"-Wall",
 					"-Wextra",
@@ -2196,7 +2192,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc";
 				GCC_VERSION = 4.2;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
 				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
@@ -2212,10 +2208,8 @@
 				GCC_WARN_UNUSED_PARAMETER = YES;
 				GCC_WARN_UNUSED_VALUE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PREBINDING = NO;
 				RUN_CLANG_STATIC_ANALYZER = YES;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = "-Wall";
 			};
 			name = "Unsigned Release";
@@ -2224,7 +2218,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc";
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -2245,9 +2239,7 @@
 				GCC_WARN_UNUSED_VARIABLE = NO;
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PRODUCT_NAME = Tunnelblick;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = (
 					"-Wall",
 					"-Wextra",
@@ -2587,7 +2579,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc";
 				GCC_VERSION = 4.2;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
 				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
@@ -2603,10 +2595,8 @@
 				GCC_WARN_UNUSED_PARAMETER = YES;
 				GCC_WARN_UNUSED_VALUE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PREBINDING = NO;
 				RUN_CLANG_STATIC_ANALYZER = YES;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = "-Wall";
 			};
 			name = "Clean Tunnelblick";
@@ -2637,9 +2627,7 @@
 				GCC_WARN_UNUSED_VARIABLE = NO;
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PRODUCT_NAME = Tunnelblick;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = (
 					"-Wall",
 					"-Wextra",
@@ -2806,7 +2794,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc";
 				GCC_VERSION = 4.2;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
 				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
@@ -2822,10 +2810,8 @@
 				GCC_WARN_UNUSED_PARAMETER = YES;
 				GCC_WARN_UNUSED_VALUE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PREBINDING = NO;
 				RUN_CLANG_STATIC_ANALYZER = YES;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = "-Wall";
 			};
 			name = "Clean Third Party";
@@ -2856,9 +2842,7 @@
 				GCC_WARN_UNUSED_VARIABLE = NO;
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PRODUCT_NAME = Tunnelblick;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = (
 					"-Wall",
 					"-Wextra",
@@ -3171,7 +3155,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc";
 				GCC_VERSION = 4.2;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
 				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
@@ -3187,10 +3171,8 @@
 				GCC_WARN_UNUSED_PARAMETER = YES;
 				GCC_WARN_UNUSED_VALUE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PREBINDING = NO;
 				RUN_CLANG_STATIC_ANALYZER = YES;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = "-Wall";
 			};
 			name = "Unsigned Release -Wconversion";
@@ -3218,9 +3200,7 @@
 				GCC_WARN_UNUSED_VARIABLE = NO;
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PRODUCT_NAME = Tunnelblick;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = (
 					"-Wall",
 					"-Wextra",
@@ -3405,9 +3385,7 @@
 				GCC_WARN_UNUSED_VARIABLE = NO;
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PRODUCT_NAME = Tunnelblick;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = (
 					"-Wall",
 					"-Wextra",
@@ -3440,9 +3418,7 @@
 				GCC_WARN_UNUSED_VARIABLE = NO;
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PRODUCT_NAME = Tunnelblick;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = (
 					"-Wall",
 					"-Wextra",
@@ -3456,7 +3432,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc";
 				GCC_PREPROCESSOR_DEFINITIONS = "";
 				GCC_VERSION = 4.2;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
@@ -3473,10 +3449,8 @@
 				GCC_WARN_UNUSED_PARAMETER = YES;
 				GCC_WARN_UNUSED_VALUE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PREBINDING = NO;
 				RUN_CLANG_STATIC_ANALYZER = YES;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = "-Wall";
 			};
 			name = Debug;
@@ -3485,7 +3459,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc";
 				GCC_VERSION = 4.2;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
 				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
@@ -3501,10 +3475,8 @@
 				GCC_WARN_UNUSED_PARAMETER = YES;
 				GCC_WARN_UNUSED_VALUE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.4;
 				PREBINDING = NO;
 				RUN_CLANG_STATIC_ANALYZER = YES;
-				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
 				WARNING_CFLAGS = "-Wall";
 			};
 			name = Release;
diff --git a/tunnelblick/tunnelblick-helper.m b/tunnelblick/tunnelblick-helper.m
index d25d1153..83deec29 100644
--- a/tunnelblick/tunnelblick-helper.m
+++ b/tunnelblick/tunnelblick-helper.m
@@ -1213,18 +1213,16 @@ NSString * TunTapSuffixToUse(void) {
     OSStatus err;
     unsigned major, minor, bugFix;
     if (  EXIT_SUCCESS == (err = getSystemVersion(&major, &minor, &bugFix))  ) {
-        if         ( minor < 6) {
+        if ( minor < 6) {
             suffixToReturn = @"-20090913.kext";
-        } else if  ( minor < 9) {
-            suffixToReturn = @"-20111101.kext";
         } else {
-            suffixToReturn = @"-signed.kext";
+            suffixToReturn = @"-20111101.kext";
         }
     } else {
-        fprintf(stderr, "Unable to determine OS version; using signed Tuntap kexts. Error status returned = %ld", (long) err);
-        suffixToReturn = @"-signed.kext";
+        fprintf(stderr, "Unable to determine OS version; using legacy Tuntap kexts. Error status returned = %ld", (long) err);
+        suffixToReturn = @"-20090913.kext";
     }
-    
+
     return suffixToReturn;
 }
 
-- 
2.52.0

