Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions Config/products/macpacker.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,55 @@
{
"version": "1.0.1",
"items": [
{
"type": "feat",
"highlight": true,
"title": {
"en": "Progress-only Finder actions",
"de": "Finder-Aktionen nur mit Fortschrittsanzeige",
"es-MX": "Acciones de Finder solo con progreso",
"fa": "نمایش فقط پیشرفت عملیات Finder",
"fr": "Actions Finder avec progression seule",
"it": "Azioni Finder con solo avanzamento",
"ja": "Finder操作で進行状況のみ表示",
"ko": "Finder 작업 진행 상황만 표시",
"nl": "Alleen voortgang bij Finder-acties",
"pl": "Tylko postęp operacji Findera",
"pt-BR": "Ações do Finder só com progresso",
"ru": "Только прогресс действий Finder",
"tr": "Finder işlemlerinde yalnızca ilerleme",
"uk": "Лише перебіг дій Finder",
"vi": "Chỉ hiện tiến trình thao tác Finder",
"zh-Hans": "Finder 操作仅显示进度"
},
"issues": [
"279"
]
},
{
"type": "feat",
"title": {
"en": "Optional confirmation before Trash cleanup",
"de": "Optionale Bestätigung vor dem Verschieben in den Papierkorb",
"es-MX": "Confirmación opcional antes de mover a la Papelera",
"fa": "تأیید اختیاری پیش از انتقال به سطل زباله",
"fr": "Confirmation facultative avant la mise à la corbeille",
"it": "Conferma facoltativa prima di spostare nel Cestino",
"ja": "ゴミ箱へ移動する前の確認を選択可能に",
"ko": "휴지통으로 이동하기 전 확인 선택",
"nl": "Optionele bevestiging vóór verplaatsen naar de prullenmand",
"pl": "Opcjonalne potwierdzenie przed przeniesieniem do Kosza",
"pt-BR": "Confirmação opcional antes de mover para o Lixo",
"ru": "Необязательное подтверждение перед перемещением в Корзину",
"tr": "Çöp Sepeti’ne taşımadan önce isteğe bağlı onay",
"uk": "Необов’язкове підтвердження перед переміщенням у Смітник",
"vi": "Tùy chọn xác nhận trước khi chuyển vào Thùng rác",
"zh-Hans": "移至废纸篓前可选择是否确认"
},
"issues": [
"296"
]
},
{
"type": "fix",
"highlight": true,
Expand Down
21 changes: 15 additions & 6 deletions FinderExtension/FinderSync.swift
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,21 @@ class FinderSync: FIFinderSync {
}

log.notice("Opening main app for '\(action)'", context: ["url": url.absoluteString])
let opened = NSWorkspace.shared.open(url)
if opened {
log.notice("Handed '\(action)' off to the main app")
} else {
log.error("NSWorkspace could not open \(url.absoluteString) — is the '\(appScheme)' scheme registered to MacPacker?")
let progressOnly = item.action.supportsProgressOnly && FinderMenuSettings.isProgressOnly()
let configuration = NSWorkspace.OpenConfiguration()
configuration.activates = !progressOnly
if progressOnly {
// Supplied only on a cold launch. This also covers URL delivery
// after applicationDidFinishLaunching, before which no URL exists
// for the app to inspect.
configuration.arguments = ["-\(FinderOperationSession.launchArgument)", "YES"]
}
NSWorkspace.shared.open([url], withApplicationAt: Bundle.appRootURL, configuration: configuration) { _, error in
if let error {
log.error("Could not hand Finder action to MacPacker", context: ["error": error.localizedDescription])
} else {
log.notice("Handed '\(action)' off to the main app")
}
}
}

Expand Down Expand Up @@ -358,4 +368,3 @@ class FinderSync: FIFinderSync {
}

}

22 changes: 22 additions & 0 deletions MacPacker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
25D80C9E2E80204A00A55040 /* FinderExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 252F12022E7ABDD9004CCEBE /* FinderExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
25E426CA2E6BEB3800F10BE5 /* XADMasterSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 25E426C92E6BEB3800F10BE5 /* XADMasterSwift */; };
25E6DA782FE5A6FC00AD47BB /* ArchivePreviewUI in Frameworks */ = {isa = PBXBuildFile; productRef = 25E6DA772FE5A6FC00AD47BB /* ArchivePreviewUI */; };
C0DECA110000000000000001 = {isa = PBXBuildFile; productRef = C0DECA110000000000000002; };
C0DECA110000000000000003 = {isa = PBXBuildFile; productRef = C0DECA110000000000000004; };
C0DECA110000000000000005 = {isa = PBXBuildFile; fileRef = C0DECA110000000000000006; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -71,6 +74,7 @@
remoteGlobalIDString = 25C0A8A32A78DE5F002C1C2A;
remoteInfo = MacPacker;
};
C0DECA11000000000000000B = {isa = PBXContainerItemProxy; containerPortal = 25C0A89C2A78DE5F002C1C2A; proxyType = 1; remoteGlobalIDString = C0DECA11000000000000000C; remoteInfo = MacPackerCLI; };
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -98,6 +102,7 @@
name = "Embed Foundation Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
C0DECA11000000000000000A = {isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 6; files = (C0DECA110000000000000005, ); name = "Embed command-line tool"; runOnlyForDeploymentPostprocessing = 0; };
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
Expand All @@ -115,6 +120,7 @@
25CFF88F2F98BF5B003F064E /* Version.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; };
25D7B4F02FBFB82E00021B10 /* products/macpacker.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = products/macpacker.json; sourceTree = "<group>"; };
25D7B5BC2FBFCCF000021B10 /* Release_Store.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release_Store.xcconfig; sourceTree = "<group>"; };
C0DECA110000000000000006 = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; path = "macpacker-cli"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
Expand Down Expand Up @@ -162,6 +168,7 @@
252F12032E7ABDD9004CCEBE /* FinderExtension */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (252F120E2E7ABDD9004CCEBE /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = FinderExtension; sourceTree = "<group>"; };
2567C8322E8FB75F008E1BD8 /* QuickLookExtension */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (2567C8412E8FB75F008E1BD8 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = QuickLookExtension; sourceTree = "<group>"; };
25B7C0DE2F0000000000A002 /* MacPackerUITests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = MacPackerUITests; sourceTree = "<group>"; };
C0DECA110000000000000007 = {isa = PBXFileSystemSynchronizedRootGroup; path = Modules/Sources/MacPackerCLI; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -220,6 +227,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
C0DECA110000000000000008 = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = (C0DECA110000000000000001, C0DECA110000000000000003, ); runOnlyForDeploymentPostprocessing = 0; };
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand All @@ -246,6 +254,7 @@
252F12032E7ABDD9004CCEBE /* FinderExtension */,
2567C8322E8FB75F008E1BD8 /* QuickLookExtension */,
25B7C0DE2F0000000000A002 /* MacPackerUITests */,
C0DECA110000000000000007,
25C0A8A52A78DE5F002C1C2A /* Products */,
25C0A8DF2A7B5569002C1C2A /* Frameworks */,
);
Expand All @@ -254,6 +263,7 @@
25C0A8A52A78DE5F002C1C2A /* Products */ = {
isa = PBXGroup;
children = (
C0DECA110000000000000006,
25C0A8A42A78DE5F002C1C2A /* MacPacker.app */,
254BB5592ABBE8430059A1D5 /* MacPackerStore.app */,
252F12022E7ABDD9004CCEBE /* FinderExtension.appex */,
Expand Down Expand Up @@ -381,6 +391,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 25C0A8C92A78DE62002C1C2A /* Build configuration list for PBXNativeTarget "MacPacker" */;
buildPhases = (
C0DECA11000000000000000A,
25C0A8A02A78DE5F002C1C2A /* Sources */,
25C0A8A12A78DE5F002C1C2A /* Frameworks */,
25C0A8A22A78DE5F002C1C2A /* Resources */,
Expand All @@ -389,6 +400,7 @@
buildRules = (
);
dependencies = (
C0DECA11000000000000000D,
252F13CF2E801C4C004CCEBE /* PBXTargetDependency */,
2567C83C2E8FB75F008E1BD8 /* PBXTargetDependency */,
);
Expand All @@ -410,6 +422,7 @@
productReference = 25C0A8A42A78DE5F002C1C2A /* MacPacker.app */;
productType = "com.apple.product-type.application";
};
C0DECA11000000000000000C = {isa = PBXNativeTarget; buildConfigurationList = C0DECA11000000000000000E; buildPhases = (C0DECA110000000000000009, C0DECA110000000000000008, ); buildRules = (); dependencies = (); fileSystemSynchronizedGroups = (C0DECA110000000000000007, ); name = MacPackerCLI; packageProductDependencies = (C0DECA110000000000000002, C0DECA110000000000000004, ); productName = "macpacker-cli"; productReference = C0DECA110000000000000006; productType = "com.apple.product-type.tool"; };
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand Down Expand Up @@ -469,6 +482,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
C0DECA11000000000000000C,
25C0A8A32A78DE5F002C1C2A /* MacPacker */,
254BB53C2ABBE8430059A1D5 /* MacPacker Store */,
252F12012E7ABDD9004CCEBE /* FinderExtension */,
Expand Down Expand Up @@ -554,6 +568,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
C0DECA110000000000000009 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (); runOnlyForDeploymentPostprocessing = 0; };
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
Expand Down Expand Up @@ -582,6 +597,7 @@
target = 25C0A8A32A78DE5F002C1C2A /* MacPacker */;
targetProxy = 25B7C0DE2F0000000000A007 /* PBXContainerItemProxy */;
};
C0DECA11000000000000000D = {isa = PBXTargetDependency; target = C0DECA11000000000000000C; targetProxy = C0DECA11000000000000000B; };
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
Expand Down Expand Up @@ -1299,6 +1315,9 @@
};
name = "Release Store";
};
C0DECA11000000000000000F = {isa = XCBuildConfiguration; buildSettings = {CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; ENABLE_HARDENED_RUNTIME = YES; MACOSX_DEPLOYMENT_TARGET = 14.6; PRODUCT_NAME = "macpacker-cli"; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_VERSION = 6.0; }; name = "Debug"; };
C0DECA110000000000000010 = {isa = XCBuildConfiguration; buildSettings = {CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; ENABLE_HARDENED_RUNTIME = YES; MACOSX_DEPLOYMENT_TARGET = 14.6; PRODUCT_NAME = "macpacker-cli"; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_VERSION = 6.0; }; name = "Release"; };
C0DECA110000000000000011 = {isa = XCBuildConfiguration; buildSettings = {CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; ENABLE_HARDENED_RUNTIME = YES; MACOSX_DEPLOYMENT_TARGET = 14.6; PRODUCT_NAME = "macpacker-cli"; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_VERSION = 6.0; }; name = "Release Store"; };
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand Down Expand Up @@ -1362,6 +1381,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C0DECA11000000000000000E = {isa = XCConfigurationList; buildConfigurations = (C0DECA11000000000000000F, C0DECA110000000000000010, C0DECA110000000000000011, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; };
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
Expand Down Expand Up @@ -1485,6 +1505,8 @@
isa = XCSwiftPackageProductDependency;
productName = ArchivePreviewUI;
};
C0DECA110000000000000002 = {isa = XCSwiftPackageProductDependency; productName = ArchiveCommands; };
C0DECA110000000000000004 = {isa = XCSwiftPackageProductDependency; productName = Swift7zip; };
/* End XCSwiftPackageProductDependency section */
};
rootObject = 25C0A89C2A78DE5F002C1C2A /* Project object */;
Expand Down
Loading