mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
flutter work
This commit is contained in:
parent
fa3ad29d21
commit
3e24154e3d
@ -109,4 +109,4 @@ if [ "$BREW_USER" == "" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
sudo -H -u $BREW_USER brew install capnp cmake wabt llvm protobuf openjdk@11
|
sudo -H -u $BREW_USER brew install capnp cmake wabt llvm protobuf openjdk@11
|
||||||
|
sudo gem install cocoapods
|
||||||
|
@ -46,8 +46,8 @@ Future<VeilidConfig> getDefaultVeilidConfig() async {
|
|||||||
clientWhitelistTimeoutMs: 300000,
|
clientWhitelistTimeoutMs: 300000,
|
||||||
reverseConnectionReceiptTimeMs: 5000,
|
reverseConnectionReceiptTimeMs: 5000,
|
||||||
holePunchReceiptTimeMs: 5000,
|
holePunchReceiptTimeMs: 5000,
|
||||||
nodeId: "",
|
nodeId: null,
|
||||||
nodeIdSecret: "",
|
nodeIdSecret: null,
|
||||||
bootstrap: kIsWeb
|
bootstrap: kIsWeb
|
||||||
? ["ws://bootstrap.dev.veilid.net:5150/ws"]
|
? ["ws://bootstrap.dev.veilid.net:5150/ws"]
|
||||||
: ["bootstrap.dev.veilid.net"],
|
: ["bootstrap.dev.veilid.net"],
|
||||||
|
@ -33,8 +33,27 @@ target 'Runner' do
|
|||||||
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
|
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require 'json'
|
||||||
|
require 'pathname'
|
||||||
|
require 'fileutils'
|
||||||
|
workspace_dir = File.dirname(JSON.parse(`cargo locate-project --workspace`)['root'])
|
||||||
|
cargo_target_dir = File.join(workspace_dir, 'target')
|
||||||
|
lipo_dir= File.join(cargo_target_dir, 'lipo-darwin')
|
||||||
|
veilid_flutter = File.join(lipo_dir, 'libveilid_flutter.dylib')
|
||||||
|
FileUtils.mkdir_p(lipo_dir)
|
||||||
|
FileUtils.touch(veilid_flutter)
|
||||||
|
|
||||||
post_install do |installer|
|
post_install do |installer|
|
||||||
installer.pods_project.targets.each do |target|
|
project = installer.pods_project
|
||||||
|
reference = project.add_file_reference(veilid_flutter, project.main_group["Frameworks"])
|
||||||
|
|
||||||
|
project.targets.each do |target|
|
||||||
flutter_additional_macos_build_settings(target)
|
flutter_additional_macos_build_settings(target)
|
||||||
|
|
||||||
|
if (target.is_a? Xcodeproj::Project::Object::PBXNativeTarget) && target.name == "veilid"
|
||||||
|
target.resources_build_phase.add_file_reference(reference)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -23,6 +23,6 @@ SPEC CHECKSUMS:
|
|||||||
path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19
|
path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19
|
||||||
veilid: f2b3b5b3ac8cd93fc5443ab830d5153575dacf36
|
veilid: f2b3b5b3ac8cd93fc5443ab830d5153575dacf36
|
||||||
|
|
||||||
PODFILE CHECKSUM: 554ea19fe44240be72b76305f41eaaeb731ea434
|
PODFILE CHECKSUM: 4ccbce18f83e3892ae919944d8803eb392455cb9
|
||||||
|
|
||||||
COCOAPODS: 1.11.3
|
COCOAPODS: 1.11.3
|
||||||
|
@ -159,7 +159,6 @@
|
|||||||
BC8854C07DAB1433F44BB126 /* Pods-Runner.release.xcconfig */,
|
BC8854C07DAB1433F44BB126 /* Pods-Runner.release.xcconfig */,
|
||||||
269F3F1A4251F82E97C46D1F /* Pods-Runner.profile.xcconfig */,
|
269F3F1A4251F82E97C46D1F /* Pods-Runner.profile.xcconfig */,
|
||||||
);
|
);
|
||||||
name = Pods;
|
|
||||||
path = Pods;
|
path = Pods;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
@ -289,7 +288,7 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire\n";
|
||||||
};
|
};
|
||||||
6C9005308B324F4C4A5637A3 /* [CP] Embed Pods Frameworks */ = {
|
6C9005308B324F4C4A5637A3 /* [CP] Embed Pods Frameworks */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
@ -1556,6 +1556,10 @@ abstract class VeilidAPIException implements Exception {
|
|||||||
return VeilidAPIExceptionMissingArgument(
|
return VeilidAPIExceptionMissingArgument(
|
||||||
json["context"], json["argument"]);
|
json["context"], json["argument"]);
|
||||||
}
|
}
|
||||||
|
case "Generic":
|
||||||
|
{
|
||||||
|
return VeilidAPIExceptionGeneric(json["message"]);
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
throw VeilidAPIExceptionInternal(
|
throw VeilidAPIExceptionInternal(
|
||||||
@ -1681,6 +1685,18 @@ class VeilidAPIExceptionMissingArgument implements VeilidAPIException {
|
|||||||
VeilidAPIExceptionMissingArgument(this.context, this.argument);
|
VeilidAPIExceptionMissingArgument(this.context, this.argument);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class VeilidAPIExceptionGeneric implements VeilidAPIException {
|
||||||
|
final String message;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return "VeilidAPIException: Generic (message: $message)";
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
VeilidAPIExceptionGeneric(this.message);
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
/// VeilidVersion
|
/// VeilidVersion
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ const _base = 'veilid_flutter';
|
|||||||
final _path = Platform.isWindows
|
final _path = Platform.isWindows
|
||||||
? '$_base.dll'
|
? '$_base.dll'
|
||||||
: Platform.isMacOS
|
: Platform.isMacOS
|
||||||
? 'lib$_base.dylib'
|
? 'veilid.framework/Resources/lib$_base.dylib'
|
||||||
: 'lib$_base.so';
|
: 'lib$_base.so';
|
||||||
final _dylib =
|
final _dylib =
|
||||||
Platform.isIOS ? DynamicLibrary.process() : DynamicLibrary.open(_path);
|
Platform.isIOS ? DynamicLibrary.process() : DynamicLibrary.open(_path);
|
||||||
|
Loading…
Reference in New Issue
Block a user