This commit is contained in:
Alin
2024-10-25 10:00:58 -06:00
parent 6df39021a6
commit de6583b457
6 changed files with 16 additions and 182 deletions
-54
View File
@@ -1,54 +0,0 @@
{
"sourceLanguage" : "en",
"strings" : {
"CFBundleDisplayName" : {
"comment" : "Bundle display name",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "FinderOpen"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "FinderOpen"
}
}
}
},
"CFBundleName" : {
"comment" : "Bundle name",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "FinderOpen"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "FinderOpen"
}
}
}
},
"NSHumanReadableCopyright" : {
"comment" : "Copyright (human-readable)",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : ""
}
}
}
}
},
"version" : "1.0"
}
+1 -9
View File
@@ -49,8 +49,6 @@
C7F8436C2CBF066F00E3E30A /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = C7F8436A2CBF066F00E3E30A /* Localizable.xcstrings */; };
C7FB173B2B96321300B96F9A /* AppsListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7FB173A2B96321300B96F9A /* AppsListView.swift */; };
C7FEBA112BDC422200AE195F /* AppSearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7FEBA102BDC422200AE195F /* AppSearchView.swift */; };
F61C77662CCB014B0046F758 /* InfoPlist.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = F61C77652CCB014B0046F758 /* InfoPlist.xcstrings */; };
F61C77682CCB014B0046F758 /* InfoPlist.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = F61C77672CCB014B0046F758 /* InfoPlist.xcstrings */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -142,8 +140,6 @@
C7F8436A2CBF066F00E3E30A /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
C7FB173A2B96321300B96F9A /* AppsListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppsListView.swift; sourceTree = "<group>"; };
C7FEBA102BDC422200AE195F /* AppSearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppSearchView.swift; sourceTree = "<group>"; };
F61C77652CCB014B0046F758 /* InfoPlist.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = InfoPlist.xcstrings; sourceTree = "<group>"; };
F61C77672CCB014B0046F758 /* InfoPlist.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = InfoPlist.xcstrings; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -233,7 +229,6 @@
C77B90242AF2D796009CC655 /* Pearcleaner.entitlements */,
C77B90072AF18E2F009CC655 /* Assets.xcassets */,
C7F8436A2CBF066F00E3E30A /* Localizable.xcstrings */,
F61C77672CCB014B0046F758 /* InfoPlist.xcstrings */,
);
path = Resources;
sourceTree = "<group>";
@@ -290,7 +285,6 @@
C78121642BC892A000BE06BD /* FinderOpen */ = {
isa = PBXGroup;
children = (
F61C77652CCB014B0046F758 /* InfoPlist.xcstrings */,
C78121652BC892A000BE06BD /* FinderOpen.swift */,
C78121672BC892A000BE06BD /* Info.plist */,
C78121682BC892A000BE06BD /* FinderOpen.entitlements */,
@@ -390,10 +384,10 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
ro,
sk,
"zh-HK",
Base,
);
mainGroup = C77B8FF72AF18E2E009CC655;
packageReferences = (
@@ -418,7 +412,6 @@
files = (
C77B90082AF18E2F009CC655 /* Assets.xcassets in Resources */,
C7A27E812AFD7C4600166168 /* com.alienator88.PearcleanerSentinel.plist in Resources */,
F61C77682CCB014B0046F758 /* InfoPlist.xcstrings in Resources */,
C7F8436B2CBF066F00E3E30A /* Localizable.xcstrings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -427,7 +420,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F61C77662CCB014B0046F758 /* InfoPlist.xcstrings in Resources */,
C7F8436C2CBF066F00E3E30A /* Localizable.xcstrings in Resources */,
C7A6DBF12C9DD27200CFA042 /* Assets.xcassets in Resources */,
);
@@ -7,7 +7,7 @@
"location" : "https://github.com/alienator88/AlinFoundation",
"state" : {
"branch" : "main",
"revision" : "03555dbc156da3888bb547dee6710fe4d5c73567"
"revision" : "0fe29c87256581095fd8be696d765f9472530072"
}
},
{
@@ -56,6 +56,10 @@
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<LocationScenarioReference
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
referenceType = "1">
</LocationScenarioReference>
</LaunchAction>
<ProfileAction
buildConfiguration = "Debug"
+10 -4
View File
@@ -30,9 +30,15 @@ struct PearcleanerApp: App {
let conditionManager = ConditionManager.shared
init() {
let arguments = CommandLine.arguments
let filteredArguments = arguments.filter { !["-NSDocumentRevisionsDebugMode", "YES"].contains($0) }
let isRunningInTerminal = isatty(STDIN_FILENO) != 0
var arguments = CommandLine.arguments
arguments = arguments.filter { !["-NSDocumentRevisionsDebugMode", "YES", "-AppleTextDirection", "NO"].contains($0) }
if let langIndex = arguments.firstIndex(of: "-AppleLanguages"), langIndex + 1 < arguments.count {
arguments.remove(at: langIndex) // Remove "-AppleLanguages"
arguments.remove(at: langIndex) // Remove the associated language value (e.g., "(zh-HK)")
}
// let isRunningInTerminal = isatty(STDIN_FILENO) != 0
let termType = ProcessInfo.processInfo.environment["TERM"]
let isRunningInTerminal = termType != nil && termType != "dumb"
// If running from terminal and no arguments are provided
if isRunningInTerminal && arguments.count == 1 {
@@ -41,7 +47,7 @@ struct PearcleanerApp: App {
}
// The first argument is always the binary path, so check if there are more than 1 arguments
if filteredArguments.count > 1 {
if arguments.count > 1 {
// Process the CLI options
processCLI(arguments: arguments, appState: appState, locations: locations, fsm: fsm)
}
-114
View File
@@ -1,114 +0,0 @@
{
"sourceLanguage" : "en",
"strings" : {
"CFBundleDisplayName" : {
"comment" : "Bundle display name",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Pearcleaner"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "Pearcleaner"
}
}
}
},
"CFBundleGetInfoString" : {
"comment" : "Get Info string",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : ""
}
}
}
},
"CFBundleName" : {
"comment" : "Bundle name",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Pearcleaner"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "Pearcleaner"
}
}
}
},
"NSAppleEventsUsageDescription" : {
"comment" : "Privacy - AppleEvents Sending Usage Description",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Pearcleaner needs to send Apple Events to Finder to delete files"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "Pearcleaner 需要將 Apple Event 傳送至 Finder 以刪除檔案"
}
}
}
},
"NSHumanReadableCopyright" : {
"comment" : "Copyright (human-readable)",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : ""
}
}
}
},
"NSSystemAdministrationUsageDescription" : {
"comment" : "Privacy - System Administration Usage Description",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Pearcleaner requires full disk access to be able to delete files in locations with no permission"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "Pearcleaner 需要完整磁碟取用權限才能在沒有權限的位置刪除檔案"
}
}
}
},
"NSSystemExtensionUsageDescription" : {
"comment" : "Privacy - System Extension Usage Description",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : ""
}
}
}
}
},
"version" : "1.0"
}