Browse Source

cmdline

master
boB Rudis 4 years ago
parent
commit
60e9c18b7b
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 2
      Pods/Pods.xcodeproj/xcuserdata/hrbrmstr.xcuserdatad/xcschemes/Just.xcscheme
  2. 2
      Pods/Pods.xcodeproj/xcuserdata/hrbrmstr.xcuserdatad/xcschemes/Pods-RSwitch.xcscheme
  3. 11
      Pods/Target Support Files/Just/Just.debug.xcconfig
  4. 11
      Pods/Target Support Files/Just/Just.release.xcconfig
  5. 186
      RSwitch.xcodeproj/project.pbxproj
  6. 5
      RSwitch.xcodeproj/xcuserdata/hrbrmstr.xcuserdatad/xcschemes/xcschememanagement.plist
  7. 16
      RSwitch.xcworkspace/xcshareddata/swiftpm/Package.resolved
  8. BIN
      RSwitch.xcworkspace/xcuserdata/hrbrmstr.xcuserdatad/UserInterfaceState.xcuserstate
  9. 40
      RSwitch/Base.lproj/Main.storyboard
  10. 4
      RSwitch/Swift/MenuActions/RStudioServerAction.swift
  11. 90
      rswitch-cmd/main.swift

2
Pods/Pods.xcodeproj/xcuserdata/hrbrmstr.xcuserdatad/xcschemes/Just.xcscheme

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1140"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

2
Pods/Pods.xcodeproj/xcuserdata/hrbrmstr.xcuserdatad/xcschemes/Pods-RSwitch.xcscheme

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1140"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

11
Pods/Target Support Files/Just/Just.debug.xcconfig

@ -0,0 +1,11 @@
CODE_SIGN_IDENTITY =
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Just
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Just
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

11
Pods/Target Support Files/Just/Just.release.xcconfig

@ -0,0 +1,11 @@
CODE_SIGN_IDENTITY =
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Just
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Just
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

186
RSwitch.xcodeproj/project.pbxproj

@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 52;
objects = {
/* Begin PBXBuildFile section */
@ -19,6 +19,11 @@
010A1C1423215B0900E32A9A /* SessionWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 010A1C1323215B0900E32A9A /* SessionWindowController.swift */; };
0117C9E0232270F0004BC889 /* RStudioUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0117C9DF232270F0004BC889 /* RStudioUtils.swift */; };
011951B4231F00A000B62C3A /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 011951B3231F00A000B62C3A /* Preferences.swift */; };
01575A37245443D7004A5715 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01575A36245443D7004A5715 /* main.swift */; };
01575A3B245445B2004A5715 /* rswitch-cmd in Resources */ = {isa = PBXBuildFile; fileRef = 01575A34245443D7004A5715 /* rswitch-cmd */; };
01575A4024544892004A5715 /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = 01575A3F24544892004A5715 /* ArgumentParser */; };
01575A4324544DA6004A5715 /* RVersions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01975549231BD919003FAD7B /* RVersions.swift */; };
01575A4424544F49004A5715 /* AppAlerts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0198B99F231970ED003F7578 /* AppAlerts.swift */; };
0178970D230ED25100F8F5BC /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0178970C230ED25100F8F5BC /* AboutViewController.swift */; };
018A8C3B2312C7BC0006E87D /* libprocInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 018A8C3A2312C7BC0006E87D /* libprocInfo.a */; };
018A8C3F2312CB480006E87D /* procHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 018A8C3E2312CB480006E87D /* procHelper.m */; };
@ -46,6 +51,28 @@
C4290DD6231F190F00AA5955 /* AppMenuActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4290DD5231F190E00AA5955 /* AppMenuActions.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
01575A3C24544613004A5715 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 01F3EF00230E635300DF5DF9 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 01575A33245443D7004A5715;
remoteInfo = "rswitch-cmd";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
01575A32245443D7004A5715 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
01073F0E2311AE2E007162C9 /* String+Version.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Version.swift"; sourceTree = "<group>"; };
01073F122311E1CF007162C9 /* Globals.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Globals.swift; sourceTree = "<group>"; };
@ -59,6 +86,8 @@
010A1C1323215B0900E32A9A /* SessionWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionWindowController.swift; sourceTree = "<group>"; };
0117C9DF232270F0004BC889 /* RStudioUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RStudioUtils.swift; sourceTree = "<group>"; };
011951B3231F00A000B62C3A /* Preferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Preferences.swift; sourceTree = "<group>"; };
01575A34245443D7004A5715 /* rswitch-cmd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "rswitch-cmd"; sourceTree = BUILT_PRODUCTS_DIR; };
01575A36245443D7004A5715 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
016750FB2319A7A4009E2FD6 /* RSwitch.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RSwitch.entitlements; sourceTree = "<group>"; };
0178970C230ED25100F8F5BC /* AboutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = "<group>"; };
018A8C392312C7BC0006E87D /* procInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = procInfo.h; sourceTree = "<group>"; };
@ -95,6 +124,14 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
01575A31245443D7004A5715 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
01575A4024544892004A5715 /* ArgumentParser in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
01F3EF05230E635300DF5DF9 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@ -135,6 +172,14 @@
path = Swift;
sourceTree = "<group>";
};
01575A35245443D7004A5715 /* rswitch-cmd */ = {
isa = PBXGroup;
children = (
01575A36245443D7004A5715 /* main.swift */,
);
path = "rswitch-cmd";
sourceTree = "<group>";
};
018A8C342312C6510006E87D /* ObjC */ = {
isa = PBXGroup;
children = (
@ -218,16 +263,20 @@
isa = PBXGroup;
children = (
01F3EF0A230E635300DF5DF9 /* RSwitch */,
01575A35245443D7004A5715 /* rswitch-cmd */,
01F3EF09230E635300DF5DF9 /* Products */,
6E9DFB632C8DAEE9C1D64321 /* Pods */,
08E99D67B1A9A0A9D2CF3F66 /* Frameworks */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
01F3EF09230E635300DF5DF9 /* Products */ = {
isa = PBXGroup;
children = (
01F3EF08230E635300DF5DF9 /* RSwitch.app */,
01575A34245443D7004A5715 /* rswitch-cmd */,
);
name = Products;
sourceTree = "<group>";
@ -265,6 +314,26 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
01575A33245443D7004A5715 /* rswitch-cmd */ = {
isa = PBXNativeTarget;
buildConfigurationList = 01575A38245443D7004A5715 /* Build configuration list for PBXNativeTarget "rswitch-cmd" */;
buildPhases = (
01575A30245443D7004A5715 /* Sources */,
01575A31245443D7004A5715 /* Frameworks */,
01575A32245443D7004A5715 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = "rswitch-cmd";
packageProductDependencies = (
01575A3F24544892004A5715 /* ArgumentParser */,
);
productName = "rswitch-cmd";
productReference = 01575A34245443D7004A5715 /* rswitch-cmd */;
productType = "com.apple.product-type.tool";
};
01F3EF07230E635300DF5DF9 /* RSwitch */ = {
isa = PBXNativeTarget;
buildConfigurationList = 01F3EF18230E635500DF5DF9 /* Build configuration list for PBXNativeTarget "RSwitch" */;
@ -278,6 +347,7 @@
buildRules = (
);
dependencies = (
01575A3D24544613004A5715 /* PBXTargetDependency */,
);
name = RSwitch;
productName = RSwitch;
@ -290,10 +360,13 @@
01F3EF00230E635300DF5DF9 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1100;
LastUpgradeCheck = 1130;
LastSwiftUpdateCheck = 1140;
LastUpgradeCheck = 1140;
ORGANIZATIONNAME = "Bob Rudis";
TargetAttributes = {
01575A33245443D7004A5715 = {
CreatedOnToolsVersion = 11.4;
};
01F3EF07230E635300DF5DF9 = {
CreatedOnToolsVersion = 11.0;
LastSwiftMigration = 1100;
@ -301,7 +374,7 @@
};
};
buildConfigurationList = 01F3EF03230E635300DF5DF9 /* Build configuration list for PBXProject "RSwitch" */;
compatibilityVersion = "Xcode 9.3";
compatibilityVersion = "Xcode 11.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
@ -309,11 +382,15 @@
Base,
);
mainGroup = 01F3EEFF230E635300DF5DF9;
packageReferences = (
01575A3E24544892004A5715 /* XCRemoteSwiftPackageReference "swift-argument-parser" */,
);
productRefGroup = 01F3EF09230E635300DF5DF9 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
01F3EF07230E635300DF5DF9 /* RSwitch */,
01575A33245443D7004A5715 /* rswitch-cmd */,
);
};
/* End PBXProject section */
@ -323,6 +400,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
01575A3B245445B2004A5715 /* rswitch-cmd in Resources */,
01F3EF10230E635500DF5DF9 /* Assets.xcassets in Resources */,
01F3EF13230E635500DF5DF9 /* Main.storyboard in Resources */,
);
@ -373,6 +451,16 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
01575A30245443D7004A5715 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
01575A4424544F49004A5715 /* AppAlerts.swift in Sources */,
01575A4324544DA6004A5715 /* RVersions.swift in Sources */,
01575A37245443D7004A5715 /* main.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
01F3EF04230E635300DF5DF9 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -415,6 +503,14 @@
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
01575A3D24544613004A5715 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 01575A33245443D7004A5715 /* rswitch-cmd */;
targetProxy = 01575A3C24544613004A5715 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
01F3EF11230E635500DF5DF9 /* Main.storyboard */ = {
isa = PBXVariantGroup;
@ -427,6 +523,42 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
01575A39245443D7004A5715 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = CBY22P58G8;
ENABLE_HARDENED_RUNTIME = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = "is.rud.rswitch-cmd";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
01575A3A245443D7004A5715 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = CBY22P58G8;
ENABLE_HARDENED_RUNTIME = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = "is.rud.rswitch-cmd";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_VERSION = 5.0;
};
name = Release;
};
01F3EF16230E635500DF5DF9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -478,7 +610,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INSTALL_PATH = /Users/hrbrmstr/Desktop;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
@ -533,7 +665,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INSTALL_PATH = /Users/hrbrmstr/Desktop;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = NO;
@ -550,8 +682,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = RSwitch/RSwitch.entitlements;
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = CBY22P58G8;
ENABLE_HARDENED_RUNTIME = YES;
@ -569,7 +701,8 @@
MARKETING_VERSION = 1.7.0;
PRODUCT_BUNDLE_IDENTIFIER = is.rud.bob.RSwitch;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "rswitch-1+";
PROVISIONING_PROFILE_SPECIFIER = "";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_OBJC_BRIDGING_HEADER = "RSwitch/ObjC/RSwitch-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
@ -583,8 +716,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = RSwitch/RSwitch.entitlements;
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = CBY22P58G8;
ENABLE_HARDENED_RUNTIME = YES;
@ -602,7 +735,8 @@
MARKETING_VERSION = 1.7.0;
PRODUCT_BUNDLE_IDENTIFIER = is.rud.bob.RSwitch;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "rswitch-1+";
PROVISIONING_PROFILE_SPECIFIER = "";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_OBJC_BRIDGING_HEADER = "RSwitch/ObjC/RSwitch-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
@ -612,6 +746,15 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
01575A38245443D7004A5715 /* Build configuration list for PBXNativeTarget "rswitch-cmd" */ = {
isa = XCConfigurationList;
buildConfigurations = (
01575A39245443D7004A5715 /* Debug */,
01575A3A245443D7004A5715 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
01F3EF03230E635300DF5DF9 /* Build configuration list for PBXProject "RSwitch" */ = {
isa = XCConfigurationList;
buildConfigurations = (
@ -631,6 +774,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */
01575A3E24544892004A5715 /* XCRemoteSwiftPackageReference "swift-argument-parser" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "git@github.com:apple/swift-argument-parser.git";
requirement = {
branch = master;
kind = branch;
};
};
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
01575A3F24544892004A5715 /* ArgumentParser */ = {
isa = XCSwiftPackageProductDependency;
package = 01575A3E24544892004A5715 /* XCRemoteSwiftPackageReference "swift-argument-parser" */;
productName = ArgumentParser;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 01F3EF00230E635300DF5DF9 /* Project object */;
}

5
RSwitch.xcodeproj/xcuserdata/hrbrmstr.xcuserdatad/xcschemes/xcschememanagement.plist

@ -7,6 +7,11 @@
<key>RSwitch.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>rswitch-cmd.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
</dict>

16
RSwitch.xcworkspace/xcshareddata/swiftpm/Package.resolved

@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "swift-argument-parser",
"repositoryURL": "git@github.com:apple/swift-argument-parser.git",
"state": {
"branch": "master",
"revision": "1081d08b1d716e6a68a9cbc258bb309359fbae1e",
"version": null
}
}
]
},
"version": 1
}

BIN
RSwitch.xcworkspace/xcuserdata/hrbrmstr.xcuserdatad/UserInterfaceState.xcuserstate

Binary file not shown.

40
RSwitch/Base.lproj/Main.storyboard

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="16085" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15505"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16085"/>
<capability name="System colors introduced in macOS 10.14" minToolsVersion="10.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -832,11 +832,11 @@ DQ
<scrollView appearanceType="aqua" fixedFrame="YES" borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rEB-nx-gFw">
<rect key="frame" x="9" y="11" width="463" height="247"/>
<autoresizingMask key="autoresizingMask"/>
<clipView key="contentView" ambiguous="YES" drawsBackground="NO" copiesOnScroll="NO" id="iCP-uh-CRl">
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="iCP-uh-CRl">
<rect key="frame" x="0.0" y="0.0" width="463" height="247"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView ambiguous="YES" editable="NO" drawsBackground="NO" importsGraphics="NO" verticallyResizable="YES" smartInsertDelete="YES" id="kWH-Et-k6l">
<textView editable="NO" drawsBackground="NO" importsGraphics="NO" verticallyResizable="YES" smartInsertDelete="YES" id="kWH-Et-k6l">
<rect key="frame" x="0.0" y="0.0" width="463" height="247"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
@ -845,31 +845,13 @@ DQ
<size key="maxSize" width="463" height="10000000"/>
<attributedString key="textStorage">
<fragment>
<string key="content" base64-UTF8="YES">
Cg
</string>
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" metaFont="label" size="17"/>
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
<fragment>
<string key="content">RSwitch v1.6.0
<string key="content">
RSwitch v1.7.0
Copyright © 2019 Bob Rudis
Copyright © 2020 Bob Rudis
MIT Licensed
</string>
<attributes>
<color key="NSColor" red="0.0" green="0.56031829119999998" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<font key="NSFont" metaFont="label" size="17"/>
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
<fragment>
<string key="content" base64-UTF8="YES">
Cg
</string>
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
@ -901,7 +883,7 @@ String+Version by DragonCherry
ProcInfo by Patrick Wardle
Just by Daniel Duan</string>
<attributes>
<color key="NSColor" red="0.0" green="0.56031829119999998" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="11" name="HelveticaNeue"/>
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
@ -911,11 +893,11 @@ Just by Daniel Duan</string>
</textView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="1Xi-yD-fAs">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="1Xi-yD-fAs">
<rect key="frame" x="-100" y="-100" width="225" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="S8X-5h-pQ6">
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="S8X-5h-pQ6">
<rect key="frame" x="-100" y="-100" width="15" height="223"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>

4
RSwitch/Swift/MenuActions/RStudioServerAction.swift

@ -36,14 +36,14 @@ class RStudioServerMenuAction {
menu.addItem(rsDropdown)
menu.setSubmenu(rsSub, for: rsDropdown)
let newRStudioSessItem = NSMenuItem(title: "New RStudio Server Connection…", action: Selector(("newRstudioServerSession:")), keyEquivalent: "")
let newRStudioSessItem = NSMenuItem(title: "New RStudio Server Connection…", action: #selector(AppDelegate.newRstudioServerSession(_:)), keyEquivalent: "")
rsSub.addItem(newRStudioSessItem)
rsSub.addItem(NSMenuItem.separator())
for sess in manager.sessions! {
let sessItem = NSMenuItem(title: sess.menuTitle, action: Selector(("activateServerSession:")), keyEquivalent: "")
let sessItem = NSMenuItem(title: sess.menuTitle, action: #selector(AppDelegate.activateServerSession(_:)), keyEquivalent: "")
sessItem.representedObject = sess
rsSub.addItem(sessItem)

90
rswitch-cmd/main.swift

@ -0,0 +1,90 @@
//
// main.swift
// rswitch-cmd
//
// Created by boB Rudis on 4/25/20.
// Copyright © 2020 Bob Rudis. All rights reserved.
//
import Foundation
import ArgumentParser
final class StandardErrorOutputStream: TextOutputStream {
func write(_ string: String) {
FileHandle.standardError.write(Data(string.utf8))
}
}
struct RSwitch: ParsableCommand {
static var configuration = CommandConfiguration(
abstract: "Switch R versions.",
version: "1.0.0"
)
@Flag(name: .shortAndLong, help: "List R versions.")
var list: Bool
@Argument(help: "The R version to switch to.")
var rversion: String?
func run() throws {
var outputStream = StandardErrorOutputStream()
let targetPath = RVersions.currentVersionTarget()
let versions = try RVersions.reloadVersions()
if (list || (rversion == nil)) {
for version in versions {
let complete = RVersions.hasRBinary(versionPath: version)
var v = version
if (version == targetPath) { v = v + " *" }
if (!complete) { v = version + " (incomplete)" }
print(v)
}
} else {
if (!versions.contains(rversion!)) {
print("R version " + rversion! + " not found.", to: &outputStream)
} else {
if (rversion! == targetPath) {
print("Current R version already points to " + targetPath)
} else {
let fm = FileManager.default
let rm_link = (RVersions.macos_r_framework as NSString).appendingPathComponent("Current")
let new_link = (RVersions.macos_r_framework as NSString).appendingPathComponent(rversion!)
do {
try fm.removeItem(atPath: rm_link)
} catch {
print("Failed to remove existing R version symlink. Check file/directory permissions.", to: &outputStream)
Darwin.exit(1)
}
do {
try fm.createSymbolicLink(
at: NSURL(fileURLWithPath: rm_link) as URL,
withDestinationURL: NSURL(fileURLWithPath: new_link) as URL
)
} catch {
print("Failed to create a symlink to the chosen R version. Check file/directory permissions.", to: &outputStream)
Darwin.exit(2)
}
Darwin.exit(0)
}
}
}
}
}
RSwitch.main()
Loading…
Cancel
Save