mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
ios build and clean up macos
This commit is contained in:
parent
b33b19358c
commit
4bdcbbdec9
22
veilid-flutter/example/ios/Podfile.lock
Normal file
22
veilid-flutter/example/ios/Podfile.lock
Normal file
@ -0,0 +1,22 @@
|
||||
PODS:
|
||||
- Flutter (1.0.0)
|
||||
- veilid (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
- veilid (from `.symlinks/plugins/veilid/ios`)
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
veilid:
|
||||
:path: ".symlinks/plugins/veilid/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
||||
veilid: c3ddd66ae3c95c8ad925c02e403d38c8809f762c
|
||||
|
||||
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
|
||||
|
||||
COCOAPODS: 1.11.2
|
@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objectVersion = 51;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
@ -13,6 +13,7 @@
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
FEE7B6B3B613F78995A4690A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1EAB6BDBA67DBB8DED93560 /* Pods_Runner.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@ -29,9 +30,12 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0DEA6A7039338BC067F4FB23 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
400B233027A7674E0074EE57 /* libveilid_flutter.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libveilid_flutter.a; path = ../../ios/lib/libveilid_flutter.a; sourceTree = "<group>"; };
|
||||
41720C3D885A5FD597C42EA7 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
@ -42,6 +46,8 @@
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
B1EAB6BDBA67DBB8DED93560 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D12CAD1E1213967B2B34ABF5 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -49,12 +55,23 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FEE7B6B3B613F78995A4690A /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
3BAD380B896D08D779A46A64 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0DEA6A7039338BC067F4FB23 /* Pods-Runner.debug.xcconfig */,
|
||||
41720C3D885A5FD597C42EA7 /* Pods-Runner.release.xcconfig */,
|
||||
D12CAD1E1213967B2B34ABF5 /* Pods-Runner.profile.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -72,6 +89,8 @@
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
3BAD380B896D08D779A46A64 /* Pods */,
|
||||
C971D38A89F5E1CEE6D692A1 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@ -98,6 +117,15 @@
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C971D38A89F5E1CEE6D692A1 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
400B233027A7674E0074EE57 /* libveilid_flutter.a */,
|
||||
B1EAB6BDBA67DBB8DED93560 /* Pods_Runner.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@ -105,12 +133,14 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
DCEBE99800A061D4FDC59942 /* [CP] Check Pods Manifest.lock */,
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
A5D76AF0FD12267359F0B3A4 /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@ -181,7 +211,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
@ -197,6 +227,45 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
A5D76AF0FD12267359F0B3A4 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
DCEBE99800A061D4FDC59942 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@ -235,6 +304,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = arm64;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
@ -306,6 +376,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = arm64;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
@ -361,6 +432,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = arm64;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
|
@ -4,4 +4,7 @@
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Veilid</string>
|
||||
<string>Veilid Plugin Example</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
@ -15,7 +15,7 @@ EXTERNAL SOURCES:
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
|
||||
veilid: fd5957b2b4ff66a1dbeba0433afdce762d21d90c
|
||||
veilid: f6b04d095ac7058ddf9c00215eb2699de8cc4673
|
||||
|
||||
PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
|
||||
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
||||
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
||||
40BAB9F027A74B09000EC229 /* libveilid_flutter.dylib in Bundle Framework */ = {isa = PBXBuildFile; fileRef = 40BAB9EF27A74B09000EC229 /* libveilid_flutter.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
400B233427A772C20074EE57 /* libveilid_flutter.dylib in Bundle Framework */ = {isa = PBXBuildFile; fileRef = 400B233327A772C20074EE57 /* libveilid_flutter.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
8526E2FC060241577E5281A0 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E89F2D855D7BDA4933E1A2EC /* Pods_Runner.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
40BAB9F027A74B09000EC229 /* libveilid_flutter.dylib in Bundle Framework */,
|
||||
400B233427A772C20074EE57 /* libveilid_flutter.dylib in Bundle Framework */,
|
||||
);
|
||||
name = "Bundle Framework";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -70,7 +70,7 @@
|
||||
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
|
||||
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
|
||||
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
|
||||
40BAB9EF27A74B09000EC229 /* libveilid_flutter.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libveilid_flutter.dylib; path = ../../macos/lib/libveilid_flutter.dylib; sourceTree = "<group>"; };
|
||||
400B233327A772C20074EE57 /* libveilid_flutter.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libveilid_flutter.dylib; path = ../../../target/macos_lib/libveilid_flutter.dylib; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
|
||||
B8606FB3C4AA619FC22C3115 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
@ -104,7 +104,7 @@
|
||||
33CC10E42044A3C60003C045 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
40BAB9EF27A74B09000EC229 /* libveilid_flutter.dylib */,
|
||||
400B233327A772C20074EE57 /* libveilid_flutter.dylib */,
|
||||
33FAB671232836740065AC1E /* Runner */,
|
||||
33CEB47122A05771004F2AC0 /* Flutter */,
|
||||
33CC10EE2044A3C60003C045 /* Products */,
|
||||
|
@ -1,5 +1,6 @@
|
||||
name: veilid_example
|
||||
description: Demonstrates how to use the veilid plugin.
|
||||
version: 1.0.0+1
|
||||
|
||||
# The following line prevents the package from being accidentally published to
|
||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||
|
@ -1,2 +1,2 @@
|
||||
#import "GeneratedPluginRegistrant.h"
|
||||
//#import "GeneratedPluginRegistrant.h"
|
||||
#import "bridge_generated.h"
|
@ -7,11 +7,11 @@ Pod::Spec.new do |s|
|
||||
s.version = '0.0.1'
|
||||
s.summary = 'Veilid Network'
|
||||
s.description = <<-DESC
|
||||
Veilid Network
|
||||
Veilid Network Plugin
|
||||
DESC
|
||||
s.homepage = 'http://example.com'
|
||||
s.license = { :file => '../LICENSE' }
|
||||
s.author = { 'Your Company' => 'email@example.com' }
|
||||
s.homepage = 'http://veilid.com'
|
||||
s.license = 'LGPL-2.0-or-later OR MPL-2.0 OR (MIT AND BSD-3-Clause)'
|
||||
s.author = { 'John Smith' => 'jsmith@example.com' }
|
||||
s.source = { :path => '.' }
|
||||
s.source_files = 'Classes/**/*'
|
||||
s.dependency 'Flutter'
|
||||
@ -20,4 +20,21 @@ Veilid Network
|
||||
# Flutter.framework does not contain a i386 slice.
|
||||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
|
||||
s.swift_version = '5.0'
|
||||
|
||||
require 'json'
|
||||
require 'pathname'
|
||||
cargo_target_dir = File.join(File.dirname(JSON.parse(`cargo locate-project`)['root']), 'target')
|
||||
|
||||
s.xcconfig = {
|
||||
'OTHER_LDFLAGS' => '-lveilid_flutter',
|
||||
"LIBRARY_SEARCH_PATHS" => File.join(cargo_target_dir, 'ios_lib')
|
||||
}
|
||||
|
||||
s.script_phase = {
|
||||
:name => 'Cargo Build',
|
||||
:script => File.join(File.dirname(__dir__), 'rust', 'ios_build.sh'),
|
||||
:execution_position => :before_compile,
|
||||
:output_files => [ File.join(cargo_target_dir, 'ios_lib', 'libveilid_flutter.a') ]
|
||||
}
|
||||
|
||||
end
|
||||
|
1
veilid-flutter/macos/.gitignore
vendored
1
veilid-flutter/macos/.gitignore
vendored
@ -1 +0,0 @@
|
||||
lib
|
@ -20,11 +20,15 @@ Veilid Network Plugin
|
||||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
|
||||
s.swift_version = '5.0'
|
||||
|
||||
require 'json'
|
||||
require 'pathname'
|
||||
cargo_target_dir = File.join(File.dirname(JSON.parse(`cargo locate-project`)['root']), 'target')
|
||||
|
||||
s.script_phase = {
|
||||
:name => 'Cargo Build',
|
||||
:script => File.join(File.dirname(__dir__), 'rust', 'macos_build.sh'),
|
||||
:execution_position => :before_compile,
|
||||
:output_files => [ File.join(File.dirname(__dir__), 'lib', 'libveilid_flutter.dylib') ]
|
||||
:output_files => [ File.join(cargo_target_dir, 'macos_lib', 'libveilid_flutter.dylib') ]
|
||||
}
|
||||
|
||||
# s.prepare_command = <<-CMD
|
||||
|
@ -1,15 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Setup varaiables
|
||||
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
FLUTTER_DIR=$(dirname `which flutter`)
|
||||
HOMEBREW_DIR=$(dirname `which brew`)
|
||||
CARGO_DIR=$(dirname `which cargo`)
|
||||
CARGO_MANIFEST_PATH=$(python -c "import os; print(os.path.realpath(\"$SCRIPTDIR/Cargo.toml\"))")
|
||||
# echo CARGO_MANIFEST_PATH: $CARGO_MANIFEST_PATH
|
||||
TARGET_DIR=$(dirname `cargo locate-project --message-format plain`)/target
|
||||
|
||||
# Configure outputs
|
||||
OUTPUT_FILENAME=libveilid_flutter.a
|
||||
OUTPUT_DIR=$TARGET_DIR/ios_lib
|
||||
|
||||
# Get Rust configurations from xcode configurations
|
||||
if [ "$CONFIGURATION" == "Debug" ]; then
|
||||
EXTRA_CARGO_OPTIONS="$@"
|
||||
RUST_CONFIGURATION="debug"
|
||||
else
|
||||
EXTRA_CARGO_OPTIONS="$@ --release"
|
||||
RUST_CONFIGURATION="release"
|
||||
fi
|
||||
|
||||
# Build all the matching architectures for the xcode configurations
|
||||
ARCHS=${ARCHS:=arm64}
|
||||
echo ARCHS: $ARCHS
|
||||
LIPO_LIST=""
|
||||
for arch in $ARCHS
|
||||
do
|
||||
if [ "$arch" == "arm64" ]; then
|
||||
@ -24,9 +39,14 @@ do
|
||||
echo Unsupported ARCH: $arch
|
||||
continue
|
||||
fi
|
||||
FLUTTER_DIR=$(dirname `which flutter`)
|
||||
HOMEBREW_DIR=$(dirname `which brew`)
|
||||
CARGO_DIR=$(dirname `which cargo`)
|
||||
|
||||
# Cargo build
|
||||
env -i PATH=/usr/bin:/bin:/usr/local/bin:$HOMEBREW_DIR:$FLUTTER_DIR:$CARGO_DIR HOME="$HOME" USER="$USER" cargo $CARGO_TOOLCHAIN build $EXTRA_CARGO_OPTIONS --target $CARGO_TARGET --manifest-path $CARGO_MANIFEST_PATH
|
||||
|
||||
# Add output to lipo list
|
||||
LIPO_LIST="$LIPO_LIST $TARGET_DIR/$CARGO_TARGET/$RUST_CONFIGURATION/$OUTPUT_FILENAME"
|
||||
done
|
||||
|
||||
# Lipo the architectures together
|
||||
mkdir -p $OUTPUT_DIR
|
||||
lipo -output "$OUTPUT_DIR/$OUTPUT_FILENAME" -create $LIPO_LIST
|
||||
|
@ -10,7 +10,7 @@ TARGET_DIR=$(dirname `cargo locate-project --message-format plain`)/target
|
||||
|
||||
# Configure outputs
|
||||
OUTPUT_FILENAME=libveilid_flutter.dylib
|
||||
OUTPUT_DIR=$SCRIPTDIR/../macos/lib
|
||||
OUTPUT_DIR=$TARGET_DIR/macos_lib
|
||||
|
||||
# Get Rust configurations from xcode configurations
|
||||
if [ "$CONFIGURATION" == "Debug" ]; then
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user