diff --git a/CHANGELOG.md b/CHANGELOG.md index e509079d..8a2fad2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,12 @@ heading, and (b) bumping `pubspec.yaml` `version:` in the same commit. ### Added +- macOS desktop target — OS-detecting Makefile (`make run` works on + macOS/Linux/Windows), 1280x720 default window, squared app icons, + sandbox entitlements with SBPL exceptions, `_DARWIN_C_SOURCE` for + ptyc compilation, native traffic dots skipped (macOS titlebar owns + them), expanded PATH for Homebrew and `~/.local/bin` on GUI apps. + - Shared ClideFilterBox widget with search icon, clear button, and debounced input. Applied consistently across all sidebar panes: Files (path filter with flat results), Git (filter staged/unstaged diff --git a/Makefile b/Makefile index be237cd9..2b9054ef 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,19 @@ INSTALL_DIR ?= $(HOME)/.local/bin +# -- OS detection ------------------------------------------------------------ +# Maps uname to Flutter device/build targets: linux, macos, windows. + +UNAME_S := $(shell uname -s) +ifeq ($(UNAME_S),Linux) + FLUTTER_OS := linux +else ifeq ($(UNAME_S),Darwin) + FLUTTER_OS := macos +else + # Windows (MSYS2, Git Bash, Cygwin all report variants with "MINGW"/"MSYS"/"CYGWIN") + FLUTTER_OS := windows +endif + VERSION_BASE ?= $(shell awk -F': *' '/^version:/ {gsub(/[" ]/,"",$$2); print $$2; exit}' pubspec.yaml) COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo unknown) DIRTY := $(shell git diff --quiet HEAD 2>/dev/null || echo .dirty) @@ -19,7 +32,26 @@ help: ## Show this help. .PHONY: run run: ## Launch the Flutter desktop app. - GDK_BACKEND=x11 LD_LIBRARY_PATH=$(CURDIR)/native/linux-x64$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH} flutter run -d linux +ifeq ($(FLUTTER_OS),linux) + GDK_BACKEND=x11 LD_LIBRARY_PATH=$(CURDIR)/native/linux-x64$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH} flutter run -d linux --dart-define=CLIDE_WORKSPACE=$(CURDIR) +else + flutter run -d $(FLUTTER_OS) --dart-define=CLIDE_WORKSPACE=$(CURDIR) +endif + +.PHONY: run-testmode +run-testmode: ## Launch ClideTestApp (platform integration tests, auto-exits). +ifeq ($(FLUTTER_OS),linux) + GDK_BACKEND=x11 LD_LIBRARY_PATH=$(CURDIR)/native/linux-x64$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH} \ + flutter run -d linux --dart-define=CLIDE_WORKSPACE=$(CURDIR) --dart-define=CLIDE_TESTMODE=true 2>&1 \ + | tee /tmp/clide-testmode.log & PID=$$!; \ + (sleep 60 && kill $$PID 2>/dev/null) & TIMER=$$!; \ + wait $$PID 2>/dev/null; kill $$TIMER 2>/dev/null; true +else + flutter run -d $(FLUTTER_OS) --dart-define=CLIDE_WORKSPACE=$(CURDIR) --dart-define=CLIDE_TESTMODE=true 2>&1 \ + | tee /tmp/clide-testmode.log & PID=$$!; \ + (sleep 60 && kill $$PID 2>/dev/null) & TIMER=$$!; \ + wait $$PID 2>/dev/null; kill $$TIMER 2>/dev/null; true +endif .PHONY: pubget pubget: ## flutter pub get. @@ -27,7 +59,11 @@ pubget: ## flutter pub get. .PHONY: build-check build-check: ## Verify native + Dart build compiles (no run). +ifeq ($(FLUTTER_OS),linux) LD_LIBRARY_PATH=$(CURDIR)/native/linux-x64$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH} flutter build linux +else + flutter build $(FLUTTER_OS) +endif .PHONY: analyze analyze: ## flutter analyze. @@ -85,6 +121,10 @@ ui-smoke: ## Build + serve + run Playwright smoke + stop. tools/ui/serve.sh @sh -c 'trap "tools/ui/stop.sh >/dev/null 2>&1" EXIT; cd tools/ui && npx playwright test smoke.spec.ts' +.PHONY: build +build: ## flutter build for the current OS. + flutter build $(FLUTTER_OS) + .PHONY: build-linux build-linux: ## flutter build linux (desktop bundle). flutter build linux @@ -93,6 +133,38 @@ build-linux: ## flutter build linux (desktop bundle). build-macos: ## flutter build macos (desktop bundle). flutter build macos +# -- dugite-native (bundled git) ------------------------------------------ + +DUGITE_VERSION := v2.53.0-3 +DUGITE_COMMIT := f49d009 + +ifeq ($(FLUTTER_OS),macos) + ifeq ($(shell uname -m),arm64) + DUGITE_PLATFORM := macOS-arm64 + else + DUGITE_PLATFORM := macOS-x64 + endif +else ifeq ($(FLUTTER_OS),linux) + DUGITE_PLATFORM := ubuntu-x64 +else + DUGITE_PLATFORM := windows-x64 +endif + +DUGITE_TAR := dugite-native-v2.53.0-$(DUGITE_COMMIT)-$(DUGITE_PLATFORM).tar.gz +DUGITE_URL := https://github.com/desktop/dugite-native/releases/download/$(DUGITE_VERSION)/$(DUGITE_TAR) +DUGITE_DIR := native/dugite + +.PHONY: dugite-fetch +dugite-fetch: ## Download and extract the dugite-native git distribution. + @if [ -f $(DUGITE_DIR)/bin/git ]; then echo "dugite already present at $(DUGITE_DIR)/bin/git"; exit 0; fi + @mkdir -p $(DUGITE_DIR) + curl -sL "$(DUGITE_URL)" | tar xz -C $(DUGITE_DIR) + @echo "dugite-native $(DUGITE_VERSION) ($(DUGITE_PLATFORM)) extracted to $(DUGITE_DIR)/" + +.PHONY: dugite-clean +dugite-clean: ## Remove the dugite-native directory. + rm -rf $(DUGITE_DIR) + # -- ptyc (C supporter tool) --------------------------------------------- PTYC_PRESENT := $(shell test -f ptyc/Makefile && echo yes || echo no) diff --git a/lib/src/pty/env.dart b/lib/src/pty/env.dart index 31d7bf7d..7117d2ad 100644 --- a/lib/src/pty/env.dart +++ b/lib/src/pty/env.dart @@ -1,4 +1,5 @@ -/// Default environment for PTY-spawned children. +/// Default environment for PTY-spawned children and subprocess PATH +/// expansion for macOS GUI apps. /// /// `xterm.dart` on the UI side + most shells + tmux + Claude CLI all /// understand the 24-bit-colour triplet `TERM=xterm-256color` + @@ -7,6 +8,35 @@ /// the renderer can do true colour. library; +import 'dart:io'; + +/// On macOS, GUI apps inherit a minimal PATH that omits Homebrew, +/// ~/.local/bin, and similar directories. This getter returns the +/// platform PATH with those well-known directories merged in. +/// On Linux/Windows it returns the PATH unchanged. +String get expandedPath { + _cachedPath ??= _buildExpandedPath(); + return _cachedPath!; +} + +String? _cachedPath; + +String _buildExpandedPath() { + final base = Platform.environment['PATH'] ?? ''; + if (!Platform.isMacOS) return base; + final home = Platform.environment['HOME'] ?? ''; + final extras = [ + if (home.isNotEmpty) '$home/.local/bin', + '/opt/homebrew/bin', + '/opt/homebrew/sbin', + '/usr/local/bin', + ]; + final existing = base.split(':').toSet(); + final missing = extras.where((p) => !existing.contains(p)); + if (missing.isEmpty) return base; + return [...missing, ...existing].join(':'); +} + /// Base env clide's daemon builds for every PTY child. Callers merge /// with the user's environment before passing to `ptyc` — a child that /// needs user env like `HOME` / `USER` / `SHELL` still gets them; the diff --git a/lib/widgets/src/clide_column_hat.dart b/lib/widgets/src/clide_column_hat.dart index 1c87f836..5f6017ce 100644 --- a/lib/widgets/src/clide_column_hat.dart +++ b/lib/widgets/src/clide_column_hat.dart @@ -57,21 +57,8 @@ class _LeftContent extends StatelessWidget { @override Widget build(BuildContext context) { - if (kIsWeb) return const SizedBox.expand(); - final isMac = !kIsWeb && Platform.isMacOS; - if (!isMac) return const SizedBox.expand(); - return Padding( - padding: const EdgeInsets.only(left: 8), - child: Row( - children: [ - _TrafficDot(color: const Color(0xFFFF5F57), onTap: wc.close), - const SizedBox(width: 6), - _TrafficDot(color: const Color(0xFFFEBC2E), onTap: wc.minimize), - const SizedBox(width: 6), - _TrafficDot(color: const Color(0xFF28C840), onTap: wc.toggleMaximize), - ], - ), - ); + // On macOS the native titlebar draws traffic lights; skip duplicates. + return const SizedBox.expand(); } } diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig index c2efd0b6..4b81f9b2 100644 --- a/macos/Flutter/Flutter-Debug.xcconfig +++ b/macos/Flutter/Flutter-Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig index c2efd0b6..5caa9d15 100644 --- a/macos/Flutter/Flutter-Release.xcconfig +++ b/macos/Flutter/Flutter-Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Podfile b/macos/Podfile new file mode 100644 index 00000000..ff5ddb3b --- /dev/null +++ b/macos/Podfile @@ -0,0 +1,42 @@ +platform :osx, '10.15' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/macos/Podfile.lock b/macos/Podfile.lock new file mode 100644 index 00000000..0a5fc2c3 --- /dev/null +++ b/macos/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - FlutterMacOS (1.0.0) + +DEPENDENCIES: + - FlutterMacOS (from `Flutter/ephemeral`) + +EXTERNAL SOURCES: + FlutterMacOS: + :path: Flutter/ephemeral + +SPEC CHECKSUMS: + FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1 + +PODFILE CHECKSUM: 54d867c82ac51cbd61b565781b9fada492027009 + +COCOAPODS: 1.16.2 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 6a05f18d..193ecd42 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -21,12 +21,14 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 297ABF525870E629CC48206C /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD963F2642924E0591B51988 /* Pods_RunnerTests.framework */; }; 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; 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 */; }; + A77CA612BC9C20EF6E98F59F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CB445CAFB92AD65384B1FDE /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -60,11 +62,12 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 1F59ABE84DD967EF97C0828F /* 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 = ""; }; 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* clide_app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "clide_app.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10ED2044A3C60003C045 /* clide_app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = clide_app.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; @@ -77,7 +80,14 @@ 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 86BA7DD81C84317527B7FA17 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 8CB445CAFB92AD65384B1FDE /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D1311BF0D11B512081749B4 /* 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 = ""; }; + 8D2FD31E0BFC50664DCC95FC /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + BBB98BB9AFED9D5695860710 /* 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 = ""; }; + C4747BC3976FE4EB908CBD38 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + DD963F2642924E0591B51988 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -85,6 +95,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 297ABF525870E629CC48206C /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -92,6 +103,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + A77CA612BC9C20EF6E98F59F /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -125,6 +137,7 @@ 331C80D6294CF71000263BE5 /* RunnerTests */, 33CC10EE2044A3C60003C045 /* Products */, D73912EC22F37F3D000D13A0 /* Frameworks */, + 5DBD2728A5161A6BC1DA1B2C /* Pods */, ); sourceTree = ""; }; @@ -172,9 +185,25 @@ path = Runner; sourceTree = ""; }; + 5DBD2728A5161A6BC1DA1B2C /* Pods */ = { + isa = PBXGroup; + children = ( + 1F59ABE84DD967EF97C0828F /* Pods-Runner.debug.xcconfig */, + 8D1311BF0D11B512081749B4 /* Pods-Runner.release.xcconfig */, + BBB98BB9AFED9D5695860710 /* Pods-Runner.profile.xcconfig */, + C4747BC3976FE4EB908CBD38 /* Pods-RunnerTests.debug.xcconfig */, + 86BA7DD81C84317527B7FA17 /* Pods-RunnerTests.release.xcconfig */, + 8D2FD31E0BFC50664DCC95FC /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; D73912EC22F37F3D000D13A0 /* Frameworks */ = { isa = PBXGroup; children = ( + 8CB445CAFB92AD65384B1FDE /* Pods_Runner.framework */, + DD963F2642924E0591B51988 /* Pods_RunnerTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -186,6 +215,7 @@ isa = PBXNativeTarget; buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( + 3AA87D7656590373EC743956 /* [CP] Check Pods Manifest.lock */, 331C80D1294CF70F00263BE5 /* Sources */, 331C80D2294CF70F00263BE5 /* Frameworks */, 331C80D3294CF70F00263BE5 /* Resources */, @@ -204,6 +234,7 @@ isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 5764BC9738B8761F8EE8C699 /* [CP] Check Pods Manifest.lock */, 33CC10E92044A3C60003C045 /* Sources */, 33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EB2044A3C60003C045 /* Resources */, @@ -329,6 +360,50 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; + 3AA87D7656590373EC743956 /* [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-RunnerTests-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; + }; + 5764BC9738B8761F8EE8C699 /* [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 */ @@ -380,6 +455,7 @@ /* Begin XCBuildConfiguration section */ 331C80DB294CF71000263BE5 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = C4747BC3976FE4EB908CBD38 /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -394,6 +470,7 @@ }; 331C80DC294CF71000263BE5 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 86BA7DD81C84317527B7FA17 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -408,6 +485,7 @@ }; 331C80DD294CF71000263BE5 /* Profile */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 8D2FD31E0BFC50664DCC95FC /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata index 1d526a16..21a3cc14 100644 --- a/macos/Runner.xcworkspace/contents.xcworkspacedata +++ b/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png index 5e86e138..bacc18bb 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png index ccab3598..35cba635 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png index e184d2cc..978eb21e 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png index f633df2f..c0211a89 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png index b9d7958e..c7cf44dc 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png index 85df5774..04ad81cf 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png index 79a802ad..f7770107 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/macos/Runner/Base.lproj/MainMenu.xib b/macos/Runner/Base.lproj/MainMenu.xib index 80e867a4..06afcd8e 100644 --- a/macos/Runner/Base.lproj/MainMenu.xib +++ b/macos/Runner/Base.lproj/MainMenu.xib @@ -332,10 +332,10 @@ - + - + diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements index dddb8a30..d2fa9a4c 100644 --- a/macos/Runner/DebugProfile.entitlements +++ b/macos/Runner/DebugProfile.entitlements @@ -8,5 +8,24 @@ com.apple.security.network.server + com.apple.security.network.client + + com.apple.security.files.user-selected.read-write + + com.apple.security.temporary-exception.sbpl + + (allow process-exec* (literal "/bin/zsh")) + (allow process-exec* (literal "/usr/bin/which")) + (allow process-exec* (subpath "/Users/jeroenschweitzer/.local/bin")) + (allow process-exec* (subpath "/Users/jeroenschweitzer/Projects/clide/ptyc/bin")) + (allow process-exec* (subpath "/Users/jeroenschweitzer/Projects/clide/native/dugite")) + (allow process-fork) + (allow file-read* file-write* (subpath "/Users/jeroenschweitzer/Projects")) + (allow file-read* file-write* (subpath "/Users/jeroenschweitzer/projects")) + (allow file-read* (subpath "/opt/homebrew")) + (allow file-read* (subpath "/Users/jeroenschweitzer/.local")) + (allow file-read* (subpath "/Users/jeroenschweitzer/.pql")) + (allow file-read* file-write* (subpath "/private/tmp")) + diff --git a/macos/Runner/DebugProfile.entitlements.template b/macos/Runner/DebugProfile.entitlements.template new file mode 100644 index 00000000..cceb2926 --- /dev/null +++ b/macos/Runner/DebugProfile.entitlements.template @@ -0,0 +1,41 @@ + + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + com.apple.security.network.client + + com.apple.security.files.user-selected.read-write + + com.apple.security.temporary-exception.sbpl + + (allow process-exec* (literal "__SHELL__")) + (allow process-exec* (literal "/usr/bin/which")) + (allow process-exec* (subpath "__HOMEDIR__/.local/bin")) + (allow process-exec* (subpath "__PROJECTS__/clide/ptyc/bin")) + (allow process-exec* (subpath "__PROJECTS__/clide/native/dugite")) + (allow process-fork) + (allow file-read* file-write* (subpath "__PROJECTS__")) + (allow file-read* (subpath "/opt/homebrew")) + (allow file-read* (subpath "__HOMEDIR__/.local")) + (allow file-read* (subpath "__HOMEDIR__/.pql")) + (allow file-read* file-write* (subpath "/private/tmp")) + + + diff --git a/ptyc/ptyc.c b/ptyc/ptyc.c index 03b7c1e1..48095ffb 100644 --- a/ptyc/ptyc.c +++ b/ptyc/ptyc.c @@ -18,6 +18,9 @@ #define _POSIX_C_SOURCE 200809L #define _XOPEN_SOURCE 600 +#ifdef __APPLE__ +#define _DARWIN_C_SOURCE /* CMSG_SPACE / CMSG_LEN on macOS */ +#endif #include #include