build target updates
This commit is contained in:
11
docs/faq.md
11
docs/faq.md
@@ -41,17 +41,6 @@ Desktop apps are a bit easier than mobile apps to integrate with ZeroTier and yo
|
||||
|
||||
|
||||
|
||||
|
||||
#### I'm not sure which API is best.
|
||||
-
|
||||
|
||||
***
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#### How do switch network stacks?
|
||||
|
||||
We currently provide a driver for [picoTCP](http://www.picotcp.com/) and [lwIP](http://savannah.nongnu.org/projects/lwip/), and we recommend their useage in that order. Each one has its own pros and cons, if you experience strange behavior it might be worth it to test your app on a different stack. Use `SDK_PICOTCP=1` or `SDK_LWIP=1`. For more info, see: [Network Stacks](network_stacks.md)
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
7C2228D61DCC11B8006A2661 /* lwip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C2228CF1DCC1193006A2661 /* lwip.cpp */; };
|
||||
7C5B40971DCC14E300C43410 /* picotcp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C2228D21DCC11A8006A2661 /* picotcp.cpp */; };
|
||||
7C5B40981DCC14E300C43410 /* lwip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C2228CF1DCC1193006A2661 /* lwip.cpp */; };
|
||||
7C7AF0241DFA1B8600AABE75 /* ManagedRoute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C0463291DE363BA003E2B0E /* ManagedRoute.cpp */; };
|
||||
7C7AF0251DFA223100AABE75 /* BackgroundResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CEAF58E1DBAD10A006585E7 /* BackgroundResolver.cpp */; };
|
||||
7C7AF0261DFA22F300AABE75 /* ethernet.c in Sources */ = {isa = PBXBuildFile; fileRef = 7CEAF5851DBACE7E006585E7 /* ethernet.c */; };
|
||||
7C7D52831DBEADD200896C93 /* intercept.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C7D52791DBEADD200896C93 /* intercept.c */; };
|
||||
7C7D52841DBEADD200896C93 /* proxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C7D527A1DBEADD200896C93 /* proxy.cpp */; };
|
||||
7C7D52851DBEADD200896C93 /* rpc.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C7D527B1DBEADD200896C93 /* rpc.c */; };
|
||||
@@ -121,15 +124,6 @@
|
||||
7C969B6B1DB99E8E00BD3F7F /* ip4_addr.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B631DB99E8E00BD3F7F /* ip4_addr.c */; };
|
||||
7C969B6C1DB99E8E00BD3F7F /* ip4_frag.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B641DB99E8E00BD3F7F /* ip4_frag.c */; };
|
||||
7C969B6D1DB99E8E00BD3F7F /* ip4.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B651DB99E8E00BD3F7F /* ip4.c */; };
|
||||
7C969B771DB99E9A00BD3F7F /* dhcp6.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B6E1DB99E9A00BD3F7F /* dhcp6.c */; };
|
||||
7C969B781DB99E9A00BD3F7F /* ethip6.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B6F1DB99E9A00BD3F7F /* ethip6.c */; };
|
||||
7C969B791DB99E9A00BD3F7F /* icmp6.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B701DB99E9A00BD3F7F /* icmp6.c */; };
|
||||
7C969B7A1DB99E9A00BD3F7F /* inet6.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B711DB99E9A00BD3F7F /* inet6.c */; };
|
||||
7C969B7B1DB99E9A00BD3F7F /* ip6_addr.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B721DB99E9A00BD3F7F /* ip6_addr.c */; };
|
||||
7C969B7C1DB99E9A00BD3F7F /* ip6_frag.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B731DB99E9A00BD3F7F /* ip6_frag.c */; };
|
||||
7C969B7D1DB99E9A00BD3F7F /* ip6.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B741DB99E9A00BD3F7F /* ip6.c */; };
|
||||
7C969B7E1DB99E9A00BD3F7F /* mld6.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B751DB99E9A00BD3F7F /* mld6.c */; };
|
||||
7C969B7F1DB99E9A00BD3F7F /* nd6.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B761DB99E9A00BD3F7F /* nd6.c */; };
|
||||
7C969BAE1DB99EC300BD3F7F /* priv in Resources */ = {isa = PBXBuildFile; fileRef = 7C969BA31DB99EC300BD3F7F /* priv */; };
|
||||
7C969BBA1DB99F9E00BD3F7F /* autoip.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B5E1DB99E8E00BD3F7F /* autoip.c */; };
|
||||
7C969BBB1DB99F9E00BD3F7F /* dhcp.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C969B5F1DB99E8E00BD3F7F /* dhcp.c */; };
|
||||
@@ -235,6 +229,7 @@
|
||||
7C2228D01DCC1193006A2661 /* lwip.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = lwip.hpp; path = ../../../src/stack_drivers/lwip/lwip.hpp; sourceTree = "<group>"; };
|
||||
7C2228D21DCC11A8006A2661 /* picotcp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = picotcp.cpp; path = ../../../src/stack_drivers/picotcp/picotcp.cpp; sourceTree = "<group>"; };
|
||||
7C2228D31DCC11A8006A2661 /* picotcp.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = picotcp.hpp; path = ../../../src/stack_drivers/picotcp/picotcp.hpp; sourceTree = "<group>"; };
|
||||
7C7AF0231DFA1B5C00AABE75 /* ManagedRoute.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ManagedRoute.cpp; path = ../../../zerotierone/osdep/ManagedRoute.cpp; sourceTree = "<group>"; };
|
||||
7C7D52771DBEADD200896C93 /* debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = debug.h; path = ../../../src/debug.h; sourceTree = "<group>"; };
|
||||
7C7D52781DBEADD200896C93 /* defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = defs.h; path = ../../../src/defs.h; sourceTree = "<group>"; };
|
||||
7C7D52791DBEADD200896C93 /* intercept.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = intercept.c; path = ../../../src/intercept.c; sourceTree = "<group>"; };
|
||||
@@ -613,6 +608,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7C0463291DE363BA003E2B0E /* ManagedRoute.cpp */,
|
||||
7C7AF0231DFA1B5C00AABE75 /* ManagedRoute.cpp */,
|
||||
7C04632A1DE363BA003E2B0E /* ManagedRoute.hpp */,
|
||||
7CEAF58E1DBAD10A006585E7 /* BackgroundResolver.cpp */,
|
||||
7CEAF5891DBAD0BF006585E7 /* DeferredPackets.cpp */,
|
||||
@@ -924,8 +920,10 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7C7AF0261DFA22F300AABE75 /* ethernet.c in Sources */,
|
||||
7C7AF0251DFA223100AABE75 /* BackgroundResolver.cpp in Sources */,
|
||||
7C04632B1DE363BA003E2B0E /* ManagedRoute.cpp in Sources */,
|
||||
7C0463271DE362BD003E2B0E /* json.c in Sources */,
|
||||
7C969B7F1DB99E9A00BD3F7F /* nd6.c in Sources */,
|
||||
7CEAF5531DBAC872006585E7 /* Multicaster.cpp in Sources */,
|
||||
7C2228D41DCC11A8006A2661 /* picotcp.cpp in Sources */,
|
||||
7CEAF50B1DBAC841006585E7 /* PortMapper.cpp in Sources */,
|
||||
@@ -952,37 +950,28 @@
|
||||
7CEAF5841DBACB3E006585E7 /* OneService.cpp in Sources */,
|
||||
7CEAF5091DBAC841006585E7 /* Http.cpp in Sources */,
|
||||
7C969B6B1DB99E8E00BD3F7F /* ip4_addr.c in Sources */,
|
||||
7C969B791DB99E9A00BD3F7F /* icmp6.c in Sources */,
|
||||
7C969B5C1DB99E7900BD3F7F /* timeouts.c in Sources */,
|
||||
7CEAF50A1DBAC841006585E7 /* OSUtils.cpp in Sources */,
|
||||
7C969B511DB99E7900BD3F7F /* ip.c in Sources */,
|
||||
7C969B551DB99E7900BD3F7F /* pbuf.c in Sources */,
|
||||
7C969B7E1DB99E9A00BD3F7F /* mld6.c in Sources */,
|
||||
7C969B661DB99E8E00BD3F7F /* autoip.c in Sources */,
|
||||
7C969B7B1DB99E9A00BD3F7F /* ip6_addr.c in Sources */,
|
||||
7C969B781DB99E9A00BD3F7F /* ethip6.c in Sources */,
|
||||
7C969B571DB99E7900BD3F7F /* stats.c in Sources */,
|
||||
7C969B4F1DB99E7900BD3F7F /* inet_chksum.c in Sources */,
|
||||
7C969B681DB99E8E00BD3F7F /* etharp.c in Sources */,
|
||||
7CEAF5581DBAC872006585E7 /* Packet.cpp in Sources */,
|
||||
7C969B671DB99E8E00BD3F7F /* dhcp.c in Sources */,
|
||||
7C969B771DB99E9A00BD3F7F /* dhcp6.c in Sources */,
|
||||
7C7D52851DBEADD200896C93 /* rpc.c in Sources */,
|
||||
7C7D52871DBEADD200896C93 /* sockets.c in Sources */,
|
||||
7CEAF5561DBAC872006585E7 /* Node.cpp in Sources */,
|
||||
7C7D52841DBEADD200896C93 /* proxy.cpp in Sources */,
|
||||
7C04632B1DE363BA003E2B0E /* ManagedRoute.cpp in Sources */,
|
||||
7CC003591D1217A1003E68DC /* http_parser.c in Sources */,
|
||||
7C969B6A1DB99E8E00BD3F7F /* igmp.c in Sources */,
|
||||
7C969B5D1DB99E7900BD3F7F /* udp.c in Sources */,
|
||||
7C969B7D1DB99E9A00BD3F7F /* ip6.c in Sources */,
|
||||
7C969B4E1DB99E7900BD3F7F /* dns.c in Sources */,
|
||||
7CEAF55E1DBAC872006585E7 /* SHA512.cpp in Sources */,
|
||||
7CEAF5511DBAC872006585E7 /* IncomingPacket.cpp in Sources */,
|
||||
7C969B501DB99E7900BD3F7F /* init.c in Sources */,
|
||||
7C969B7A1DB99E9A00BD3F7F /* inet6.c in Sources */,
|
||||
7C969B591DB99E7900BD3F7F /* tcp_in.c in Sources */,
|
||||
7C969B7C1DB99E9A00BD3F7F /* ip6_frag.c in Sources */,
|
||||
7CEAF5611DBAC872006585E7 /* Utils.cpp in Sources */,
|
||||
7CEAF4F61DBAC80C006585E7 /* ControlPlane.cpp in Sources */,
|
||||
7CEAF55A1DBAC872006585E7 /* Peer.cpp in Sources */,
|
||||
@@ -1005,6 +994,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7C7AF0241DFA1B8600AABE75 /* ManagedRoute.cpp in Sources */,
|
||||
7C9D4ED51DF246F200EF20CD /* json.c in Sources */,
|
||||
7C2228D51DCC11B8006A2661 /* picotcp.cpp in Sources */,
|
||||
7C2228D61DCC11B8006A2661 /* lwip.cpp in Sources */,
|
||||
@@ -1263,6 +1253,9 @@
|
||||
"$(SRCROOT)/../../../zerotierone",
|
||||
"$(SRCROOT)/../../../ext/lwip/src/include/",
|
||||
"$(SRCROOT)/../../../ext/lwip/src/include/ipv4/",
|
||||
"$(SRCROOT)/../../../ext/",
|
||||
"$(SRCROOT)/../../../src",
|
||||
"$(SRCROOT)/../../../src/stack_drivers/lwip/",
|
||||
);
|
||||
INFOPLIST_FILE = ZeroTierSDK_Unity3D_iOS/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
|
||||
@@ -1270,6 +1263,9 @@
|
||||
"-D__UNITY_3D__",
|
||||
"-DSDK",
|
||||
"-DSDK_DEBUG",
|
||||
"-D__IOS__",
|
||||
"-DSDK_IPV4",
|
||||
"-DSDK_LWIP",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "zerotier.ZeroTierSDK-Unity3D-iOS";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@@ -1288,12 +1284,18 @@
|
||||
"$(SRCROOT)/../../../zerotierone",
|
||||
"$(SRCROOT)/../../../ext/lwip/src/include/",
|
||||
"$(SRCROOT)/../../../ext/lwip/src/include/ipv4/",
|
||||
"$(SRCROOT)/../../../ext/",
|
||||
"$(SRCROOT)/../../../src",
|
||||
"$(SRCROOT)/../../../src/stack_drivers/lwip/",
|
||||
);
|
||||
INFOPLIST_FILE = ZeroTierSDK_Unity3D_iOS/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
|
||||
OTHER_CFLAGS = (
|
||||
"-D__UNITY_3D__",
|
||||
"-DSDK",
|
||||
"-D__IOS__",
|
||||
"-DSDK_IPV4",
|
||||
"-DSDK_LWIP",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "zerotier.ZeroTierSDK-Unity3D-iOS";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
7C8BC0371D3348A6001E1B6F = {
|
||||
CreatedOnToolsVersion = 7.3;
|
||||
DevelopmentTeam = 57AG88JR8A;
|
||||
LastSwiftMigration = 0810;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -296,6 +297,7 @@
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/../../../../src/wrappers/swift/Apple-Bridging-Header.h";
|
||||
SWIFT_VERSION = 2.3;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -313,6 +315,7 @@
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/../../../../src/wrappers/swift/Apple-Bridging-Header.h";
|
||||
SWIFT_VERSION = 2.3;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
@@ -15,40 +15,8 @@
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "54"
|
||||
endingLineNumber = "54"
|
||||
landmarkName = "UI_TX(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Example_iOS_App/ViewController.swift"
|
||||
timestampString = "494987032.463726"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "230"
|
||||
endingLineNumber = "230"
|
||||
landmarkName = "update_rx()"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Example_iOS_App/ViewController.swift"
|
||||
timestampString = "494987032.463726"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "261"
|
||||
endingLineNumber = "261"
|
||||
landmarkName = "update_rx()"
|
||||
landmarkType = "5">
|
||||
landmarkName = "UI_TX(sender:)"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
|
||||
@@ -114,7 +114,7 @@ class ViewController: UIViewController {
|
||||
// Connect to remote host on ZeroTier virtual network
|
||||
@IBAction func UI_Connect(sender: AnyObject) {
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), {
|
||||
self.connect_thread = NSThread(target:self, selector:"attempt_connect", object:nil)
|
||||
self.connect_thread = NSThread(target:self, selector:#selector(ViewController.attempt_connect), object:nil)
|
||||
self.connect_thread.start()
|
||||
});
|
||||
}
|
||||
@@ -167,7 +167,7 @@ class ViewController: UIViewController {
|
||||
// Bind a ZeroTier socket
|
||||
@IBAction func UI_Bind(sender: AnyObject) {
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), {
|
||||
self.bind_thread = NSThread(target:self, selector:"attempt_bind", object:nil)
|
||||
self.bind_thread = NSThread(target:self, selector:#selector(ViewController.attempt_bind), object:nil)
|
||||
self.bind_thread.start()
|
||||
});
|
||||
}
|
||||
@@ -280,7 +280,7 @@ class ViewController: UIViewController {
|
||||
|
||||
// UI RX update
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), {
|
||||
self.rx_thread = NSThread(target:self, selector:"update_rx", object:nil)
|
||||
self.rx_thread = NSThread(target:self, selector:#selector(ViewController.update_rx), object:nil)
|
||||
self.rx_thread.start()
|
||||
});
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ ONE_SERVICE_NAME = zerotier-one
|
||||
ONE_CLI_NAME = zerotier-cli
|
||||
ONE_ID_TOOL_NAME = zerotier-idtool
|
||||
LWIP_LIB_NAME = liblwip.so
|
||||
PICO_LIB_NAME = libpicotcp.so
|
||||
#
|
||||
SHARED_LIB = $(BUILD)/$(SHARED_LIB_NAME)
|
||||
SDK_INTERCEPT = $(BUILD)/$(SDK_INTERCEPT_NAME)
|
||||
@@ -23,6 +24,7 @@ ONE_SERVICE = $(BUILD)/$(ONE_SERVICE_NAME)
|
||||
ONE_CLI = $(BUILD)/$(ONE_CLI_NAME)
|
||||
ONE_IDTOOL = $(BUILD)/$(ONE_IDTOOL_NAME)
|
||||
LWIP_LIB = $(BUILD)/$(LWIP_LIB_NAME)
|
||||
PICO_LIB = $(BUILD)/$(PICO_LIB_NAME)
|
||||
#
|
||||
LWIP_DIR = ext/lwip
|
||||
PICOTCP_DIR = ext/picotcp
|
||||
@@ -187,7 +189,7 @@ jip:
|
||||
|
||||
# --------- LINUX ----------
|
||||
# Build everything
|
||||
linux: one linux_service_and_intercept
|
||||
linux: one linux_service_and_intercept linux_shared_lib
|
||||
|
||||
# Build vanilla ZeroTier One binary
|
||||
one: $(OBJS) $(ZT1)/service/OneService.o $(ZT1)/one.o $(ZT1)/osdep/LinuxEthernetTap.o
|
||||
@@ -294,6 +296,7 @@ docker_check_test:
|
||||
# Check for the presence of built frameworks/bundles/libaries
|
||||
check:
|
||||
-./check.sh $(LWIP_LIB)
|
||||
-./check.sh $(PICO_LIB)
|
||||
-./check.sh $(SDK_INTERCEPT)
|
||||
-./check.sh $(ONE_SERVICE)
|
||||
-./check.sh $(SDK_SERVICE)
|
||||
|
||||
45
make-mac.mk
45
make-mac.mk
@@ -15,6 +15,7 @@ ONE_SERVICE_NAME = zerotier-one
|
||||
ONE_CLI_NAME = zerotier-cli
|
||||
ONE_ID_TOOL_NAME = zerotier-idtool
|
||||
LWIP_LIB_NAME = liblwip.so
|
||||
PICO_LIB_NAME = libpicotcp.so
|
||||
#
|
||||
SHARED_LIB = $(BUILD)/$(SHARED_LIB_NAME)
|
||||
INTERCEPT = $(BUILD)/$(INTERCEPT_NAME)
|
||||
@@ -23,6 +24,7 @@ ONE_SERVICE = $(BUILD)/$(ONE_SERVICE_NAME)
|
||||
ONE_CLI = $(BUILD)/$(ONE_CLI_NAME)
|
||||
ONE_IDTOOL = $(BUILD)/$(ONE_IDTOOL_NAME)
|
||||
LWIP_LIB = $(BUILD)/$(LWIP_LIB_NAME)
|
||||
PICO_LIB = $(BUILD)/$(PICO_LIB_NAME)
|
||||
#
|
||||
LWIP_DIR = ext/lwip
|
||||
PICOTCP_DIR = ext/picotcp
|
||||
@@ -186,18 +188,18 @@ osx: osx_app_framework osx_unity3d_bundle osx_shared_lib osx_sdk_service osx_int
|
||||
osx_app_framework:
|
||||
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Release -scheme ZeroTierSDK_OSX build SYMROOT="../../../$(BUILD)/osx_app_framework"
|
||||
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Debug -scheme ZeroTierSDK_OSX build SYMROOT="../../../$(BUILD)/osx_app_framework"
|
||||
cp docs/osx_zt_sdk.md $(BUILD)/osx_app_framework/README.md
|
||||
cp docs/osx.md $(BUILD)/osx_app_framework/README.md
|
||||
ios_app_framework:
|
||||
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Release -scheme ZeroTierSDK_iOS build SYMROOT="../../../$(BUILD)/ios_app_framework"
|
||||
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Debug -scheme ZeroTierSDK_iOS build SYMROOT="../../../$(BUILD)/ios_app_framework"
|
||||
cp docs/ios_zt_sdk.md $(BUILD)/ios_app_framework/README.md
|
||||
cp docs/ios.md $(BUILD)/ios_app_framework/README.md
|
||||
|
||||
|
||||
# Build bundles for Unity integrations
|
||||
osx_unity3d_bundle:
|
||||
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Release -scheme ZeroTierSDK_Unity3D_OSX build SYMROOT="../../../$(BUILD)/osx_unity3d_bundle"
|
||||
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Debug -scheme ZeroTierSDK_Unity3D_OSX build SYMROOT="../../../$(BUILD)/osx_unity3d_bundle"
|
||||
cp docs/osx_unity3d_zt_sdk.md $(BUILD)/osx_unity3d_bundle/README.md
|
||||
cp docs/osx_unity3d.md $(BUILD)/osx_unity3d_bundle/README.md
|
||||
chmod 755 $(BUILD)/osx_unity3d_bundle/Debug/ZeroTierSDK_Unity3D_OSX.bundle
|
||||
cp -p -R $(BUILD)/osx_unity3d_bundle/Debug/ZeroTierSDK_Unity3D_OSX.bundle $(INT)/Unity3D/Assets/Plugins
|
||||
|
||||
@@ -205,7 +207,7 @@ osx_unity3d_bundle:
|
||||
ios_unity3d_bundle:
|
||||
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Release -scheme ZeroTierSDK_Unity3D_iOS build SYMROOT="../../../$(BUILD)/ios_unity3d_bundle"
|
||||
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Debug -scheme ZeroTierSDK_Unity3D_iOS build SYMROOT="../../../$(BUILD)/ios_unity3d_bundle"
|
||||
cp docs/ios_unity3d_zt_sdk.md $(BUILD)/ios_unity3d_bundle/README.md
|
||||
cp docs/ios_unity3d.md $(BUILD)/ios_unity3d_bundle/README.md
|
||||
|
||||
#
|
||||
simple_app: tests osx_service_and_intercept
|
||||
@@ -262,7 +264,7 @@ android_jni_lib:
|
||||
-./increment.sh
|
||||
cd $(INT)/android/android_jni_lib/proj; ./gradlew assembleDebug
|
||||
mkdir -p $(BUILD)/android_jni_lib
|
||||
cp docs/android_zt_sdk.md $(BUILD)/android_jni_lib/README.md
|
||||
cp docs/android.md $(BUILD)/android_jni_lib/README.md
|
||||
mv -f $(INT)/android/android_jni_lib/java/libs/* $(BUILD)/android_jni_lib
|
||||
cp -R $(BUILD)/android_jni_lib/* $(INT)/android/example_app/app/src/main/jniLibs
|
||||
|
||||
@@ -272,22 +274,23 @@ android_jni_lib:
|
||||
# -------- TESTING ---------
|
||||
# Check for the presence of built frameworks/bundles/libaries
|
||||
check:
|
||||
./check.sh $(LWIP_LIB)
|
||||
./check.sh $(INTERCEPT)
|
||||
./check.sh $(ONE_SERVICE)
|
||||
./check.sh $(SDK_SERVICE)
|
||||
./check.sh $(SHARED_LIB)
|
||||
./check.sh $(BUILD)/osx_unity3d_bundle/Debug/ZeroTierSDK_Unity3D_OSX.bundle
|
||||
./check.sh $(BUILD)/osx_app_framework/Debug/ZeroTierSDK_OSX.framework
|
||||
./check.sh $(BUILD)/ios_app_framework/Debug-iphoneos/ZeroTierSDK_iOS.framework
|
||||
./check.sh $(BUILD)/ios_unity3d_bundle/Debug-iphoneos/ZeroTierSDK_Unity3D_iOS.bundle
|
||||
./check.sh $(BUILD)/android_jni_lib/arm64-v8a/libZeroTierOneJNI.so
|
||||
./check.sh $(BUILD)/android_jni_lib/armeabi/libZeroTierOneJNI.so
|
||||
./check.sh $(BUILD)/android_jni_lib/armeabi-v7a/libZeroTierOneJNI.so
|
||||
./check.sh $(BUILD)/android_jni_lib/mips/libZeroTierOneJNI.so
|
||||
./check.sh $(BUILD)/android_jni_lib/mips64/libZeroTierOneJNI.so
|
||||
./check.sh $(BUILD)/android_jni_lib/x86/libZeroTierOneJNI.so
|
||||
./check.sh $(BUILD)/android_jni_lib/x86_64/libZeroTierOneJNI.so
|
||||
-./check.sh $(LWIP_LIB)
|
||||
-./check.sh $(PICO_LIB)
|
||||
-./check.sh $(INTERCEPT)
|
||||
-./check.sh $(ONE_SERVICE)
|
||||
-./check.sh $(SDK_SERVICE)
|
||||
-./check.sh $(SHARED_LIB)
|
||||
-./check.sh $(BUILD)/osx_unity3d_bundle/Debug/ZeroTierSDK_Unity3D_OSX.bundle
|
||||
-./check.sh $(BUILD)/osx_app_framework/Debug/ZeroTierSDK_OSX.framework
|
||||
-./check.sh $(BUILD)/ios_app_framework/Debug-iphoneos/ZeroTierSDK_iOS.framework
|
||||
-./check.sh $(BUILD)/ios_unity3d_bundle/Debug-iphoneos/ZeroTierSDK_Unity3D_iOS.bundle
|
||||
-./check.sh $(BUILD)/android_jni_lib/arm64-v8a/libZeroTierOneJNI.so
|
||||
-./check.sh $(BUILD)/android_jni_lib/armeabi/libZeroTierOneJNI.so
|
||||
-./check.sh $(BUILD)/android_jni_lib/armeabi-v7a/libZeroTierOneJNI.so
|
||||
-./check.sh $(BUILD)/android_jni_lib/mips/libZeroTierOneJNI.so
|
||||
-./check.sh $(BUILD)/android_jni_lib/mips64/libZeroTierOneJNI.so
|
||||
-./check.sh $(BUILD)/android_jni_lib/x86/libZeroTierOneJNI.so
|
||||
-./check.sh $(BUILD)/android_jni_lib/x86_64/libZeroTierOneJNI.so
|
||||
|
||||
# Tests
|
||||
OSTYPE=$(shell uname -s | tr '[A-Z]' '[a-z]')
|
||||
|
||||
@@ -430,13 +430,14 @@ void *zts_start_core_service(void *thread_id) {
|
||||
DEBUG_INFO("ZTSDK_BUILD_VERSION = %d", ZTSDK_BUILD_VERSION);
|
||||
#endif
|
||||
|
||||
char current_dir[MAX_DIR_SZ];
|
||||
|
||||
//#if defined(SDK_BUNDLED) && !defined(__ANDROID__)
|
||||
// set_intercept_status(INTERCEPT_DISABLED); // Ignore network calls from ZT service
|
||||
//#endif
|
||||
|
||||
#if defined(__IOS__)
|
||||
// Go to the app's data directory so we can shorten the sun_path we bind to
|
||||
char current_dir[MAX_DIR_SZ];
|
||||
getcwd(current_dir, MAX_DIR_SZ);
|
||||
std::string targetDir = homeDir; // + "/../../";
|
||||
chdir(targetDir.c_str());
|
||||
@@ -444,7 +445,6 @@ void *zts_start_core_service(void *thread_id) {
|
||||
#endif
|
||||
|
||||
#if defined(__UNITY_3D__)
|
||||
char current_dir[MAX_DIR_SZ];
|
||||
getcwd(current_dir, MAX_DIR_SZ);
|
||||
chdir(service_path.c_str());
|
||||
homeDir = current_dir; // homeDir shall be current_dir
|
||||
|
||||
@@ -38,8 +38,12 @@
|
||||
#include <sys/wait.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/route.h>
|
||||
#include <net/if.h>
|
||||
#ifdef __IOS__
|
||||
#include "/usr/include/net/route.h"
|
||||
#else
|
||||
#include <net/route.h>
|
||||
#endif
|
||||
#ifdef __BSD__
|
||||
#include <net/if_dl.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
Reference in New Issue
Block a user