diff --git a/Downterm/Downterm.xcodeproj/project.pbxproj b/Downterm/Downterm.xcodeproj/project.pbxproj index 93e17ed..52acea9 100644 --- a/Downterm/Downterm.xcodeproj/project.pbxproj +++ b/Downterm/Downterm.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 77; + objectVersion = 63; objects = { /* Begin PBXBuildFile section */ @@ -206,7 +206,6 @@ packageReferences = ( 80F03B77566BF59C9941EAD4 /* XCRemoteSwiftPackageReference "SwiftTerm" */, ); - preferredProjectObjectVersion = 77; projectDirPath = ""; projectRoot = ""; targets = ( @@ -251,8 +250,11 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_USE_OPTIMIZATION_PROFILE = YES; CODE_SIGN_ENTITLEMENTS = Downterm/Resources/Downterm.entitlements; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; COMBINE_HIDPI_IMAGES = YES; + "DEVELOPMENT_TEAM[sdk=macosx*]" = G698BP272N; INFOPLIST_FILE = Downterm/Resources/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -332,8 +334,11 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_USE_OPTIMIZATION_PROFILE = YES; CODE_SIGN_ENTITLEMENTS = Downterm/Resources/Downterm.entitlements; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; COMBINE_HIDPI_IMAGES = YES; + "DEVELOPMENT_TEAM[sdk=macosx*]" = G698BP272N; INFOPLIST_FILE = Downterm/Resources/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/Downterm/Downterm.xcodeproj/project.xcworkspace/xcuserdata/harvmaster.xcuserdatad/UserInterfaceState.xcuserstate b/Downterm/Downterm.xcodeproj/project.xcworkspace/xcuserdata/harvmaster.xcuserdatad/UserInterfaceState.xcuserstate index 3a96b67..de94b2f 100644 Binary files a/Downterm/Downterm.xcodeproj/project.xcworkspace/xcuserdata/harvmaster.xcuserdatad/UserInterfaceState.xcuserstate and b/Downterm/Downterm.xcodeproj/project.xcworkspace/xcuserdata/harvmaster.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Downterm/Downterm.xcodeproj/xcshareddata/xcschemes/Downterm.xcscheme b/Downterm/Downterm.xcodeproj/xcshareddata/xcschemes/Downterm.xcscheme new file mode 100644 index 0000000..6e80252 --- /dev/null +++ b/Downterm/Downterm.xcodeproj/xcshareddata/xcschemes/Downterm.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Downterm/Downterm.xcodeproj/xcshareddata/xcschemes/Release-Downterm.xcscheme b/Downterm/Downterm.xcodeproj/xcshareddata/xcschemes/Release-Downterm.xcscheme new file mode 100644 index 0000000..a329a7f --- /dev/null +++ b/Downterm/Downterm.xcodeproj/xcshareddata/xcschemes/Release-Downterm.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Downterm/Downterm.xcodeproj/xcuserdata/harvmaster.xcuserdatad/xcschemes/xcschememanagement.plist b/Downterm/Downterm.xcodeproj/xcuserdata/harvmaster.xcuserdatad/xcschemes/xcschememanagement.plist index 14a7c50..b64e539 100644 --- a/Downterm/Downterm.xcodeproj/xcuserdata/harvmaster.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Downterm/Downterm.xcodeproj/xcuserdata/harvmaster.xcuserdatad/xcschemes/xcschememanagement.plist @@ -9,6 +9,19 @@ orderHint 0 + Release-Downterm.xcscheme_^#shared#^_ + + orderHint + 1 + + + SuppressBuildableAutocreation + + 1485207FA11756EC2DF4F08B + + primary + + diff --git a/Downterm/Downterm/Models/TerminalSession.swift b/Downterm/Downterm/Models/TerminalSession.swift index 483495e..5bdbfac 100644 --- a/Downterm/Downterm/Models/TerminalSession.swift +++ b/Downterm/Downterm/Models/TerminalSession.swift @@ -36,11 +36,20 @@ class TerminalSession: NSObject, ObservableObject, LocalProcessDelegate, Termina private func startShell() { let shellPath = resolveShell() + let shellName = (shellPath as NSString).lastPathComponent + let loginExecName = "-\(shellName)" + FileManager.default.changeCurrentDirectoryPath(NSHomeDirectory()) let proc = LocalProcess(delegate: self) - proc.startProcess(executable: shellPath) + // Launch as a login shell so user startup files initialize PATH/tools. + proc.startProcess( + executable: shellPath, + args: ["-l"], + environment: nil, + execName: loginExecName + ) process = proc - title = (shellPath as NSString).lastPathComponent + title = shellName } private func resolveShell() -> String {