Browse Source

1.4.0

tags/v1.4.0
boB Rudis 7 months ago
parent
commit
58acd9c3ca
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
100 changed files with 9646 additions and 34 deletions
  1. +1
    -0
      .gitignore
  2. +41
    -1
      RSwitch.xcodeproj/project.pbxproj
  3. +18
    -9
      RSwitch/Base.lproj/Main.storyboard
  4. +7
    -0
      RSwitch/c/RSwitch-Bridging-Header.h
  5. BIN
      RSwitch/c/libprocInfo.a
  6. +19
    -0
      RSwitch/c/procHelper.h
  7. +18
    -0
      RSwitch/c/procHelper.m
  8. +205
    -0
      RSwitch/c/procInfo.h
  9. +0
    -0
      RSwitch/c/swift/AboutViewController.swift
  10. +0
    -0
      RSwitch/c/swift/Alerts.swift
  11. +0
    -0
      RSwitch/c/swift/AppDelegate.swift
  12. +0
    -0
      RSwitch/c/swift/Bundle.swift
  13. +0
    -0
      RSwitch/c/swift/DownloadRStudio.swift
  14. +0
    -0
      RSwitch/c/swift/DownloadTarball.swift
  15. +0
    -0
      RSwitch/c/swift/HandleSwitch.swift
  16. +25
    -0
      RSwitch/c/swift/HandleSwitchTo.swift
  17. +0
    -0
      RSwitch/c/swift/HandleUpdate.swift
  18. +55
    -9
      RSwitch/c/swift/Menu.swift
  19. +0
    -0
      RSwitch/c/swift/Notify.swift
  20. +0
    -0
      RSwitch/c/swift/String+Version.swift
  21. +23
    -15
      RSwitch/c/swift/Utils.swift
  22. +0
    -0
      RSwitch/c/swift/ViewController.swift
  23. +8
    -0
      build/RSwitch.build/Release/RSwitch.build/DerivedSources/Entitlements.plist
  24. +1
    -0
      build/RSwitch.build/Release/RSwitch.build/DerivedSources/Pods-RSwitch-checkManifestLockResult.txt
  25. +1
    -0
      build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch-OutputFileMap.json
  26. +16
    -0
      build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch-master.d
  27. +4
    -0
      build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch-master.swiftdeps
  28. +4
    -0
      build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch-master.swiftdeps~
  29. +4
    -0
      build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch-master.swiftdeps~moduleonly
  30. +13
    -0
      build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch.LinkFileList
  31. +13
    -0
      build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch.SwiftFileList
  32. BIN
      build/RSwitch.build/Release/RSwitch.build/RSwitch-all-non-framework-target-headers.hmap
  33. BIN
      build/RSwitch.build/Release/RSwitch.build/RSwitch-all-target-headers.hmap
  34. BIN
      build/RSwitch.build/Release/RSwitch.build/RSwitch-generated-files.hmap
  35. BIN
      build/RSwitch.build/Release/RSwitch.build/RSwitch-own-target-headers.hmap
  36. BIN
      build/RSwitch.build/Release/RSwitch.build/RSwitch-project-headers.hmap
  37. +8
    -0
      build/RSwitch.build/Release/RSwitch.build/RSwitch.app.xcent
  38. BIN
      build/RSwitch.build/Release/RSwitch.build/RSwitch.hmap
  39. +10
    -0
      build/RSwitch.build/Release/RSwitch.build/Script-FEB62898714FA5EEEAA0AFDE.sh
  40. +1
    -0
      build/RSwitch.build/Release/RSwitch.build/all-product-headers.yaml
  41. BIN
      build/XCBuildData/908dad76795ea13c6fc2915c74d69cd9-desc.xcbuild
  42. +93
    -0
      build/XCBuildData/908dad76795ea13c6fc2915c74d69cd9-manifest.xcbuild
  43. BIN
      build/XCBuildData/BuildDescriptionCacheIndex-a4dabeac050d47b4e44bb951c02cf12a
  44. BIN
      build/XCBuildData/build.db
  45. +0
    -0
      guide/.Rhistory
  46. +18
    -0
      guide/_site.yml
  47. +362
    -0
      guide/_site/acknowledgements.html
  48. BIN
      guide/_site/app-switch.png
  49. +376
    -0
      guide/_site/develop.html
  50. +2
    -0
      guide/_site/footer.html
  51. +596
    -0
      guide/_site/index.html
  52. BIN
      guide/_site/latest.png
  53. BIN
      guide/_site/launch-new.png
  54. BIN
      guide/_site/main-menu.png
  55. BIN
      guide/_site/menu-info.png
  56. BIN
      guide/_site/r-change-notify.png
  57. BIN
      guide/_site/r-devel-exists.png
  58. BIN
      guide/_site/r-macos-downloads.png
  59. BIN
      guide/_site/rstudio-exists.png
  60. BIN
      guide/_site/rstudio-in-progress.png
  61. BIN
      guide/_site/rstudio-success.png
  62. +587
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/bootstrap-theme.css
  63. +1
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/bootstrap-theme.css.map
  64. +5
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/bootstrap-theme.min.css
  65. +6799
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/bootstrap.css
  66. +1
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/bootstrap.css.map
  67. +5
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/bootstrap.min.css
  68. +11
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/cerulean.min.css
  69. +30
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/cosmo.min.css
  70. +30
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/darkly.min.css
  71. +30
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/flatly.min.css
  72. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/Lato.ttf
  73. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/LatoBold.ttf
  74. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/LatoItalic.ttf
  75. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/NewsCycle.ttf
  76. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/NewsCycleBold.ttf
  77. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/OpenSans.ttf
  78. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/OpenSansBold.ttf
  79. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/OpenSansBoldItalic.ttf
  80. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/OpenSansItalic.ttf
  81. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/OpenSansLight.ttf
  82. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/OpenSansLightItalic.ttf
  83. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/Raleway.ttf
  84. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/RalewayBold.ttf
  85. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/Roboto.ttf
  86. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/RobotoBold.ttf
  87. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/RobotoLight.ttf
  88. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/RobotoMedium.ttf
  89. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/SourceSansPro.ttf
  90. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/SourceSansProBold.ttf
  91. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/SourceSansProItalic.ttf
  92. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/SourceSansProLight.ttf
  93. BIN
      guide/_site/site_libs/bootstrap-3.3.5/css/fonts/Ubuntu.ttf
  94. +24
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/journal.min.css
  95. +37
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/lumen.min.css
  96. +36
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/paper.min.css
  97. +24
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/readable.min.css
  98. +24
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/sandstone.min.css
  99. +24
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/simplex.min.css
  100. +36
    -0
      guide/_site/site_libs/bootstrap-3.3.5/css/spacelab.min.css

+ 1
- 0
.gitignore View File

@@ -24,3 +24,4 @@ Icon
Network Trash Folder
Temporary Items
.apdisk
.Rproj.user

+ 41
- 1
RSwitch.xcodeproj/project.pbxproj View File

@@ -18,6 +18,9 @@
01073F1F2311E67D007162C9 /* HandleUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01073F1E2311E67D007162C9 /* HandleUpdate.swift */; };
01073F212311E6BD007162C9 /* HandleSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01073F202311E6BD007162C9 /* HandleSwitch.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 */; };
018A8C412312F4940006E87D /* HandleSwitchTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 018A8C402312F4940006E87D /* HandleSwitchTo.swift */; };
01F3EF0C230E635300DF5DF9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F3EF0B230E635300DF5DF9 /* AppDelegate.swift */; };
01F3EF0E230E635300DF5DF9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F3EF0D230E635300DF5DF9 /* ViewController.swift */; };
01F3EF10230E635500DF5DF9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 01F3EF0F230E635500DF5DF9 /* Assets.xcassets */; };
@@ -37,6 +40,12 @@
01073F1E2311E67D007162C9 /* HandleUpdate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HandleUpdate.swift; sourceTree = "<group>"; };
01073F202311E6BD007162C9 /* HandleSwitch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HandleSwitch.swift; 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>"; };
018A8C3A2312C7BC0006E87D /* libprocInfo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libprocInfo.a; sourceTree = "<group>"; };
018A8C3C2312C8380006E87D /* RSwitch-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RSwitch-Bridging-Header.h"; sourceTree = "<group>"; };
018A8C3D2312CB480006E87D /* procHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = procHelper.h; sourceTree = "<group>"; };
018A8C3E2312CB480006E87D /* procHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = procHelper.m; sourceTree = "<group>"; };
018A8C402312F4940006E87D /* HandleSwitchTo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HandleSwitchTo.swift; sourceTree = "<group>"; };
01F3EF08230E635300DF5DF9 /* RSwitch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RSwitch.app; sourceTree = BUILT_PRODUCTS_DIR; };
01F3EF0B230E635300DF5DF9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
01F3EF0D230E635300DF5DF9 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -54,6 +63,7 @@
buildActionMask = 2147483647;
files = (
52B8A14237DA712A6A2ABDE0 /* Pods_RSwitch.framework in Frameworks */,
018A8C3B2312C7BC0006E87D /* libprocInfo.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -69,6 +79,7 @@
01073F1E2311E67D007162C9 /* HandleUpdate.swift */,
01073F1C2311E64E007162C9 /* DownloadRStudio.swift */,
01073F1A2311E613007162C9 /* DownloadTarball.swift */,
018A8C402312F4940006E87D /* HandleSwitchTo.swift */,
01073F182311E3B8007162C9 /* Bundle.swift */,
01073F162311E397007162C9 /* Menu.swift */,
01073F142311E370007162C9 /* Notify.swift */,
@@ -80,6 +91,19 @@
path = swift;
sourceTree = "<group>";
};
018A8C342312C6510006E87D /* c */ = {
isa = PBXGroup;
children = (
018A8C3C2312C8380006E87D /* RSwitch-Bridging-Header.h */,
018A8C3A2312C7BC0006E87D /* libprocInfo.a */,
018A8C392312C7BC0006E87D /* procInfo.h */,
018A8C3D2312CB480006E87D /* procHelper.h */,
018A8C3E2312CB480006E87D /* procHelper.m */,
01073F232311E859007162C9 /* swift */,
);
path = c;
sourceTree = "<group>";
};
01F3EEFF230E635300DF5DF9 = {
isa = PBXGroup;
children = (
@@ -101,7 +125,7 @@
01F3EF0A230E635300DF5DF9 /* RSwitch */ = {
isa = PBXGroup;
children = (
01073F232311E859007162C9 /* swift */,
018A8C342312C6510006E87D /* c */,
01F3EF0F230E635500DF5DF9 /* Assets.xcassets */,
01F3EF11230E635500DF5DF9 /* Main.storyboard */,
01F3EF14230E635500DF5DF9 /* Info.plist */,
@@ -160,6 +184,7 @@
TargetAttributes = {
01F3EF07230E635300DF5DF9 = {
CreatedOnToolsVersion = 11.0;
LastSwiftMigration = 1100;
};
};
};
@@ -241,8 +266,10 @@
buildActionMask = 2147483647;
files = (
01073F212311E6BD007162C9 /* HandleSwitch.swift in Sources */,
018A8C3F2312CB480006E87D /* procHelper.m in Sources */,
01073F1F2311E67D007162C9 /* HandleUpdate.swift in Sources */,
01073F1B2311E613007162C9 /* DownloadTarball.swift in Sources */,
018A8C412312F4940006E87D /* HandleSwitchTo.swift in Sources */,
0178970D230ED25100F8F5BC /* AboutViewController.swift in Sources */,
01073F192311E3B8007162C9 /* Bundle.swift in Sources */,
01073F152311E370007162C9 /* Notify.swift in Sources */,
@@ -391,6 +418,7 @@
baseConfigurationReference = 53FF56D90FA7100C1726A4F7 /* Pods-RSwitch.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
@@ -401,11 +429,17 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/RSwitch/c",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 1.4.0;
PRODUCT_BUNDLE_IDENTIFIER = is.rud.bob.RSwitch;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "RSwitch/c/RSwitch-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
@@ -415,6 +449,7 @@
baseConfigurationReference = 574911021B3B7938E36AB013 /* Pods-RSwitch.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
@@ -425,11 +460,16 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/RSwitch/c",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 1.4.0;
PRODUCT_BUNDLE_IDENTIFIER = is.rud.bob.RSwitch;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "RSwitch/c/RSwitch-Bridging-Header.h";
SWIFT_VERSION = 5.0;
};
name = Release;


+ 18
- 9
RSwitch/Base.lproj/Main.storyboard View File

@@ -721,22 +721,22 @@
<objects>
<viewController storyboardIdentifier="about2" id="KlD-6a-3Gc" customClass="AboutViewController" sceneMemberID="viewController">
<view key="view" id="SgY-wa-ilj">
<rect key="frame" x="0.0" y="0.0" width="480" height="240"/>
<rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<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="7" y="9" width="463" height="223"/>
<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">
<rect key="frame" x="0.0" y="0.0" width="463" height="223"/>
<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">
<rect key="frame" x="0.0" y="0.0" width="463" height="223"/>
<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"/>
<color key="backgroundColor" name="alternatingContentBackgroundColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="463" height="223"/>
<size key="minSize" width="463" height="247"/>
<size key="maxSize" width="463" height="10000000"/>
<attributedString key="textStorage">
<fragment>
@@ -763,9 +763,8 @@ MIT Licensed
</attributes>
</fragment>
<fragment>
<string key="content">

dial app icon by IconMark from the Noun Project
<string key="content" base64-UTF8="YES">
Cgo
</string>
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
@@ -773,6 +772,16 @@ dial app icon by IconMark from the Noun Project
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
<fragment>
<string key="content">dial app icon by IconMark from the Noun Project
String+Version by DragonCherry
ProcInfo by Patrick Wardle </string>
<attributes>
<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>
</fragment>
</attributedString>
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
</textView>
@@ -792,7 +801,7 @@ dial app icon by IconMark from the Noun Project
</viewController>
<customObject id="N40-nE-NTQ" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="689" y="357"/>
<point key="canvasLocation" x="689" y="373"/>
</scene>
</scenes>
</document>

+ 7
- 0
RSwitch/c/RSwitch-Bridging-Header.h View File

@@ -0,0 +1,7 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//

#import <Foundation/Foundation.h>
#include "procInfo.h"
#include "procHelper.h"

BIN
RSwitch/c/libprocInfo.a View File


+ 19
- 0
RSwitch/c/procHelper.h View File

@@ -0,0 +1,19 @@
//
// procHelper.h
// RSwitch
//
// Created by hrbrmstr on 8/25/19.
// Copyright © 2019 Bob Rudis. All rights reserved.
//

#ifndef procHelper_h
#define procHelper_h

#include <stdio.h>
#include "procHelper.h"
#include "procInfo.h"
#import <Foundation/Foundation.h>

NSMutableArray *getArgs(pid_t pid);

#endif /* procHelper_h */

+ 18
- 0
RSwitch/c/procHelper.m View File

@@ -0,0 +1,18 @@
//
// procHelper.c
// RSwitch
//
// Created by hrbrmstr on 8/25/19.
// Copyright © 2019 Bob Rudis. All rights reserved.
//

#include "procHelper.h"
#include "procInfo.h"
#import <Foundation/Foundation.h>

NSMutableArray *getArgs(pid_t pid) {
Process* process = [[Process alloc] init:pid];
return(process.arguments);
}

+ 205
- 0
RSwitch/c/procInfo.h View File

@@ -0,0 +1,205 @@
//
// File: procInfo.h
// Project: Proc Info
//
// Created by: Patrick Wardle
// Copyright: 2017 Objective-See
// License: Creative Commons Attribution-NonCommercial 4.0 International License
//

#ifndef procInfo_h
#define procInfo_h

#import <libproc.h>
#import <sys/sysctl.h>
#import <Foundation/Foundation.h>

/* CLASSES */#import <Foundation/Foundation.h>


@class Binary;
@class Process;

/* DEFINES */

//from audit_kevents.h
#define EVENT_EXIT 1
#define EVENT_FORK 2
#define EVENT_EXECVE 23
#define EVENT_EXEC 27
#define EVENT_SPAWN 43190

//signers
enum Signer{None, Apple, AppStore, DevID, AdHoc};

//signature status
#define KEY_SIGNATURE_STATUS @"signatureStatus"

//signer
#define KEY_SIGNATURE_SIGNER @"signatureSigner"

//signing auths
#define KEY_SIGNATURE_AUTHORITIES @"signatureAuthorities"

//code signing id
#define KEY_SIGNATURE_IDENTIFIER @"signatureIdentifier"

//entitlements
#define KEY_SIGNATURE_ENTITLEMENTS @"signatureEntitlements"

/* TYPEDEFS */

//block for library
typedef void (^ProcessCallbackBlock)(Process* _Nonnull);

/* OBJECT: PROCESS INFO */

@interface ProcInfo : NSObject

//init w/ flag
// flag dictates if CPU-intensive logic (code signing, etc) should be preformed
-(id _Nullable)init:(BOOL)goEasy;

//start monitoring
-(void)start:(ProcessCallbackBlock _Nonnull )callback;

//stop monitoring
-(void)stop;

//get list of running processes
-(NSMutableArray* _Nonnull)currentProcesses;

@end

/* OBJECT: PROCESS */

@interface Process : NSObject

/* PROPERTIES */

//pid
@property pid_t pid;

//ppid
@property pid_t ppid;

//user id
@property uid_t uid;

//type
// used by process mon
@property u_int16_t type;

//exit code
@property u_int32_t exit;

//path
@property(nonatomic, retain)NSString* _Nullable path;

//args
@property(nonatomic, retain)NSMutableArray* _Nonnull arguments;

//ancestors
@property(nonatomic, retain)NSMutableArray* _Nonnull ancestors;

//signing info
@property(nonatomic, retain)NSMutableDictionary* _Nonnull signingInfo;

//Binary object
// has path, hash, etc
@property(nonatomic, retain)Binary* _Nonnull binary;

//timestamp
@property(nonatomic, retain)NSDate* _Nonnull timestamp;

/* METHODS */

//init with a pid
// method will then (try) fill out rest of object
-(id _Nullable)init:(pid_t)processID;

//generate signing info
// also classifies if Apple/from App Store/etc.
-(void)generateSigningInfo:(SecCSFlags)flags;

//set process's path
-(void)pathFromPid;

//generate list of ancestors
-(void)enumerateAncestors;

//class method
// get's parent of arbitrary process
+(pid_t)getParentID:(pid_t)child;

@end

/* OBJECT: BINARY */

@interface Binary : NSObject
{
}

/* PROPERTIES */

//path
@property(nonatomic, retain)NSString* _Nonnull path;

//name
@property(nonatomic, retain)NSString* _Nonnull name;

//icon
@property(nonatomic, retain)NSImage* _Nonnull icon;

//file attributes
@property(nonatomic, retain)NSDictionary* _Nullable attributes;

//spotlight meta data
@property(nonatomic, retain)NSDictionary* _Nullable metadata;

//bundle
// nil for non-apps
@property(nonatomic, retain)NSBundle* _Nullable bundle;

//signing info
@property(nonatomic, retain)NSDictionary* _Nonnull signingInfo;

//hash
@property(nonatomic, retain)NSMutableString* _Nonnull sha256;

//identifier
// either signing id or sha256 hash
@property(nonatomic, retain)NSString* _Nonnull identifier;

/* METHODS */

//init w/ a path
-(id _Nonnull)init:(NSString* _Nonnull)path;

/* the following methods are rather CPU-intensive
as such, if the proc monitoring is run with the 'goEasy' option, they aren't automatically invoked
*/
//get an icon for a process
// for apps, this will be app's icon, otherwise just a standard system one
-(void)getIcon;

//generate signing info (statically)
-(void)generateSigningInfo:(SecCSFlags)flags;

/* the following methods are not invoked automatically
as such, if you code has to manually invoke them if you want this info
*/

//generate hash
// algo: sha256
-(void)generateHash;

//generate id
// either signing id, or sha256 hash
-(void)generateIdentifier;

@end

#endif

RSwitch/swift/AboutViewController.swift → RSwitch/c/swift/AboutViewController.swift View File


RSwitch/swift/Alerts.swift → RSwitch/c/swift/Alerts.swift View File


RSwitch/swift/AppDelegate.swift → RSwitch/c/swift/AppDelegate.swift View File


RSwitch/swift/Bundle.swift → RSwitch/c/swift/Bundle.swift View File


RSwitch/swift/DownloadRStudio.swift → RSwitch/c/swift/DownloadRStudio.swift View File


RSwitch/swift/DownloadTarball.swift → RSwitch/c/swift/DownloadTarball.swift View File


RSwitch/swift/HandleSwitch.swift → RSwitch/c/swift/HandleSwitch.swift View File


+ 25
- 0
RSwitch/c/swift/HandleSwitchTo.swift View File

@@ -0,0 +1,25 @@
//
// HandleSwitchTo.swift
// RSwitch
//
// Created by hrbrmstr on 8/25/19.
// Copyright © 2019 Bob Rudis. All rights reserved.
//

import Foundation


import Foundation
import Cocoa

extension AppDelegate {
@objc func switch_to(_ sender: NSMenuItem?) {

let app = sender!.representedObject as! NSRunningApplication
app.activate(options: NSApplication.ActivationOptions.activateIgnoringOtherApps)
}

}

RSwitch/swift/HandleUpdate.swift → RSwitch/c/swift/HandleUpdate.swift View File


RSwitch/swift/Menu.swift → RSwitch/c/swift/Menu.swift View File

@@ -19,9 +19,11 @@ extension AppDelegate: NSMenuDelegate {
menu.removeAllItems()
// add selection to open frameworks dir in Finder
menu.addItem(NSMenuItem(title: "Open R Frameworks Directory", action: #selector(openFrameworksDir), keyEquivalent: "" ))
menu.addItem(NSMenuItem(title: "Open R Frameworks Directory", action: #selector(openFrameworksDir), keyEquivalent: ""))
menu.addItem(NSMenuItem.separator())

menu.addItem(NSMenuItem(title: "Current R Version:", action: nil, keyEquivalent: ""))
// populate installed versions
let fm = FileManager.default
var targetPath:String? = nil
@@ -79,20 +81,64 @@ extension AppDelegate: NSMenuDelegate {
let rstudioItem = NSMenuItem(title: NSLocalizedString("Download latest RStudio daily build", comment: "Download latest RStudio item"), action: self.rstudio_enabled ? #selector(download_latest_rstudio) : nil, keyEquivalent: "")
rstudioItem.isEnabled = self.rstudio_enabled
menu.addItem(rstudioItem)

// Add items to open variosu R for macOS pages
menu.addItem(NSMenuItem.separator())
menu.addItem(NSMenuItem(title: NSLocalizedString("Open R for macOS Developers Page…", comment: "Open macOS Dev Page item"), action: #selector(browse_r_macos_dev_page), keyEquivalent: ""))
menu.addItem(NSMenuItem(title: NSLocalizedString("Open R for macOS CRAN Page…", comment: "Open macOS CRAN Page item"), action: #selector(browse_r_macos_cran_page), keyEquivalent: ""))
menu.addItem(NSMenuItem(title: NSLocalizedString("Open R-SIG-Mac Archives Page…", comment: "Open R-SIG-Mac Page item"), action: #selector(browse_r_sig_mac_page), keyEquivalent: ""))
menu.addItem(NSMenuItem(title: NSLocalizedString("Open R Installation/Admin macOS Section…", comment: "Open R Install Page item"), action: #selector(browse_r_admin_macos_page), keyEquivalent: ""))
menu.addItem(NSMenuItem(title: NSLocalizedString("Open RStudio macOS Dailies Page…", comment: "Open RStudio macOS Dailies Page item"), action: #selector(browse_rstudio_mac_dailies_page), keyEquivalent: ""))

let webDropdown = NSMenuItem(title: "Web resources", action: nil, keyEquivalent: "")
let webSub = NSMenu()
menu.addItem(webDropdown)
menu.setSubmenu(webSub, for: webDropdown)
webSub.addItem(NSMenuItem(title: NSLocalizedString("R for macOS Developers…", comment: "macOS Dev Page item"), action: #selector(browse_r_macos_dev_page), keyEquivalent: ""))
webSub.addItem(NSMenuItem(title: NSLocalizedString("R for macOS CRAN…", comment: "macOS CRAN Page item"), action: #selector(browse_r_macos_cran_page), keyEquivalent: ""))
webSub.addItem(NSMenuItem(title: NSLocalizedString("R-SIG-Mac Archives…", comment: "R-SIG-Mac Page item"), action: #selector(browse_r_sig_mac_page), keyEquivalent: ""))
webSub.addItem(NSMenuItem(title: NSLocalizedString("R-devel News…", comment: "R-devel News Page item"), action: #selector(browse_r_devel_news_page), keyEquivalent: ""))
webSub.addItem(NSMenuItem(title: NSLocalizedString("R Installation/Admin macOS Section…", comment: "R Install Page item"), action: #selector(browse_r_admin_macos_page), keyEquivalent: ""))
webSub.addItem(NSMenuItem.separator())
webSub.addItem(NSMenuItem(title: NSLocalizedString("RStudio macOS Dailies…", comment: "RStudio macOS Dailies Page item"), action: #selector(browse_rstudio_mac_dailies_page), keyEquivalent: ""))
webSub.addItem(NSMenuItem(title: NSLocalizedString("R StackOverflow…", comment: "R StackOverflow Page item"), action: #selector(browse_r_stackoverflow_page), keyEquivalent: ""))
webSub.addItem(NSMenuItem(title: NSLocalizedString("RStudio Community…", comment: "RStudio Community Page item"), action: #selector(browse_rstudio_community_page), keyEquivalent: ""))

let running_rstudios = NSWorkspace.shared.runningApplications.filter {
$0.bundleIdentifier == "org.rstudio.RStudio"
}
let running_rapps = NSWorkspace.shared.runningApplications.filter {
$0.bundleIdentifier == "org.R-project.R"
}
if ((running_rstudios.count) + (running_rapps.count) > 0) {
menu.addItem(NSMenuItem.separator())

let switchToDropdown = NSMenuItem(title: "Switch to", action: nil, keyEquivalent: "")
let switchToSub = NSMenu()
menu.addItem(switchToDropdown)
menu.setSubmenu(switchToSub, for: switchToDropdown)
for app in running_rstudios + running_rapps {
let args = getArgs(app.processIdentifier)!
let title = app.localizedName! + (args.count > 1 ? " : " + (args[1] as! NSString).lastPathComponent.replacingOccurrences(of: ".Rproj", with: "") : "")
let mi = NSMenuItem(title: title, action: #selector(switch_to), keyEquivalent: "")
mi.representedObject = app
switchToSub.addItem(mi)
}
}
// Add launchers
menu.addItem(NSMenuItem.separator())
menu.addItem(NSMenuItem(title: NSLocalizedString("Launch R GUI", comment: "Launch R GUI item"), action: #selector(launchRApp), keyEquivalent: ""))
menu.addItem(NSMenuItem(title: NSLocalizedString("Launch RStudio", comment: "Launch RStudio item"), action: #selector(launchRStudio), keyEquivalent: ""))
let launch_r = "Launch R GUI" + (NSEvent.modifierFlags.contains(NSEvent.ModifierFlags.control) ? " (new instance)" : "")
let launch_rstudio = "Launch RStudio" + (NSEvent.modifierFlags.contains(NSEvent.ModifierFlags.control) ? " (new instance)" : "")
menu.addItem(NSMenuItem(title: NSLocalizedString(launch_r, comment: "Launch R GUI item"), action: #selector(launchRApp), keyEquivalent: ""))
menu.addItem(NSMenuItem(title: NSLocalizedString(launch_rstudio, comment: "Launch RStudio item"), action: #selector(launchRStudio), keyEquivalent: ""))
// Add a About item
menu.addItem(NSMenuItem.separator())

RSwitch/swift/Notify.swift → RSwitch/c/swift/Notify.swift View File


RSwitch/swift/String+Version.swift → RSwitch/c/swift/String+Version.swift View File


RSwitch/swift/Utils.swift → RSwitch/c/swift/Utils.swift View File

@@ -14,7 +14,6 @@ public func browse(_ urlString : String) {
NSWorkspace.shared.open(url)
}


extension AppDelegate {
struct app_urls {
@@ -23,26 +22,23 @@ extension AppDelegate {
static let r_sig_mac = "https://stat.ethz.ch/pipermail/r-sig-mac/"
static let rstudio_dailies = "https://dailies.rstudio.com/rstudio/oss/mac/"
static let latest_rstudio_dailies = "https://www.rstudio.org/download/latest/daily/desktop/mac/RStudio-latest.dmg"
static let browse_r_admin_macos = "https://cran.rstudio.org/doc/manuals/R-admin.html#Installing-R-under-macOS"
static let r_admin_macos = "https://cran.rstudio.org/doc/manuals/R-admin.html#Installing-R-under-macOS"
static let r_devel_news = "https://developer.r-project.org/blosxom.cgi/R-devel/NEWS"
static let r_stackoverflow = "https://stackoverflow.com/questions/tagged/r"
static let rstudio_community = "https://community.rstudio.com/"
static let version_check = "https://rud.is/rswitch/releases/current-version.txt"
static let releases = "https://git.rud.is/hrbrmstr/RSwitch/releases"
}
// browse macOS dev page
@objc func browse_r_macos_dev_page(_ sender: NSMenuItem?) { browse(app_urls.mac_r_project) }
// browse macOS dev page
@objc func browse_r_macos_cran_page(_ sender: NSMenuItem?) { browse(app_urls.macos_cran) }
// browse macOS dev page
@objc func browse_r_sig_mac_page(_ sender: NSMenuItem?) { browse(app_urls.r_sig_mac) }
// browse RStudio macOS Dailies
@objc func browse_rstudio_mac_dailies_page(_ sender: NSMenuItem?) { browse(app_urls.rstudio_dailies) }
// browse R Install/Admin macOS section
@objc func browse_r_admin_macos_page(_ sender: NSMenuItem?) { browse(app_urls.browse_r_admin_macos) }
@objc func browse_r_admin_macos_page(_ sender: NSMenuItem?) { browse(app_urls.r_admin_macos) }
@objc func browse_r_devel_news_page(_ sender: NSMenuItem?) { browse(app_urls.r_devel_news) }
@objc func browse_r_stackoverflow_page(_ sender: NSMenuItem?) { browse(app_urls.r_stackoverflow) }
@objc func browse_rstudio_community_page(_ sender: NSMenuItem?) { browse(app_urls.rstudio_community) }

// Show about dialog
@objc func about(_ sender: NSMenuItem?) { abtController.showWindow(self) }

@@ -50,9 +46,21 @@ extension AppDelegate {
@objc func openFrameworksDir(_ sender: NSMenuItem?) { NSWorkspace.shared.openFile(app_dirs.macos_r_framework, withApplication: "Finder") }
// Launch RStudio
@objc func launchRStudio(_ sender: NSMenuItem?) { NSWorkspace.shared.launchApplication("RStudio.app") }
@objc func launchRStudio(_ sender: NSMenuItem?) {
if (NSEvent.modifierFlags.contains(NSEvent.ModifierFlags.control)) {
NSWorkspace.shared.launchApplication(withBundleIdentifier: "org.rstudio.RStudio", options: NSWorkspace.LaunchOptions.newInstance, additionalEventParamDescriptor: nil, launchIdentifier: nil)
} else {
NSWorkspace.shared.launchApplication("RStudio.app")
}
}

// Launch R.app
@objc func launchRApp(_ sender: NSMenuItem?) { NSWorkspace.shared.launchApplication("R.app") }
@objc func launchRApp(_ sender: NSMenuItem?) {
if (NSEvent.modifierFlags.contains(NSEvent.ModifierFlags.control)) {
NSWorkspace.shared.launchApplication(withBundleIdentifier: "org.R-project.R", options: NSWorkspace.LaunchOptions.newInstance, additionalEventParamDescriptor: nil, launchIdentifier: nil)
} else {
NSWorkspace.shared.launchApplication("R.app")
}
}

}

RSwitch/swift/ViewController.swift → RSwitch/c/swift/ViewController.swift View File


+ 8
- 0
build/RSwitch.build/Release/RSwitch.build/DerivedSources/Entitlements.plist View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>

+ 1
- 0
build/RSwitch.build/Release/RSwitch.build/DerivedSources/Pods-RSwitch-checkManifestLockResult.txt View File

@@ -0,0 +1 @@
SUCCESS

+ 1
- 0
build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch-OutputFileMap.json View File

@@ -0,0 +1 @@
{"":{"dependencies":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch-master.d","diagnostics":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch-master.dia","swift-dependencies":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch-master.swiftdeps"},"/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/AboutViewController.swift":{"llvm-bc":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/AboutViewController.bc","object":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/AboutViewController.o"},"/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/Alerts.swift":{"llvm-bc":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Alerts.bc","object":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Alerts.o"},"/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/AppDelegate.swift":{"llvm-bc":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/AppDelegate.bc","object":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/AppDelegate.o"},"/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/Bundle.swift":{"llvm-bc":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Bundle.bc","object":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Bundle.o"},"/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/DownloadRStudio.swift":{"llvm-bc":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/DownloadRStudio.bc","object":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/DownloadRStudio.o"},"/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/DownloadTarball.swift":{"llvm-bc":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/DownloadTarball.bc","object":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/DownloadTarball.o"},"/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/HandleSwitch.swift":{"llvm-bc":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/HandleSwitch.bc","object":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/HandleSwitch.o"},"/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/HandleUpdate.swift":{"llvm-bc":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/HandleUpdate.bc","object":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/HandleUpdate.o"},"/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/Menu.swift":{"llvm-bc":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Menu.bc","object":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Menu.o"},"/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/Notify.swift":{"llvm-bc":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Notify.bc","object":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Notify.o"},"/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/String+Version.swift":{"llvm-bc":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/String+Version.bc","object":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/String+Version.o"},"/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/Utils.swift":{"llvm-bc":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Utils.bc","object":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Utils.o"},"/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/ViewController.swift":{"llvm-bc":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/ViewController.bc","object":"/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/ViewController.o"}}

+ 16
- 0
build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch-master.d
File diff suppressed because it is too large
View File


+ 4
- 0
build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch-master.swiftdeps View File

@@ -0,0 +1,4 @@
version: "Apple Swift version 5.1 (swiftlang-1100.0.270.6 clang-1100.0.32.1)"
options: "31f9dde5ec8ab8a7473738363610d79b"
build_time: [1566730886, 39869000]
inputs:

+ 4
- 0
build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch-master.swiftdeps~ View File

@@ -0,0 +1,4 @@
version: "Apple Swift version 5.1 (swiftlang-1100.0.270.6 clang-1100.0.32.1)"
options: "31f9dde5ec8ab8a7473738363610d79b"
build_time: [1566730710, 120239000]
inputs:

+ 4
- 0
build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch-master.swiftdeps~moduleonly View File

@@ -0,0 +1,4 @@
version: "Apple Swift version 5.1 (swiftlang-1100.0.270.6 clang-1100.0.32.1)"
options: "31f9dde5ec8ab8a7473738363610d79b"
build_time: [1566730886, 39869000]
inputs:

+ 13
- 0
build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch.LinkFileList View File

@@ -0,0 +1,13 @@
/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/HandleSwitch.o
/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/HandleUpdate.o
/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/DownloadTarball.o
/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/AboutViewController.o
/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Bundle.o
/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Notify.o
/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/DownloadRStudio.o
/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Menu.o
/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Alerts.o
/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/ViewController.o
/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/AppDelegate.o
/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/String+Version.o
/Users/hrbrmstr/Development/rswitch/RSwitch/build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/Utils.o

+ 13
- 0
build/RSwitch.build/Release/RSwitch.build/Objects-normal/x86_64/RSwitch.SwiftFileList View File

@@ -0,0 +1,13 @@
/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/HandleSwitch.swift
/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/HandleUpdate.swift
/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/DownloadTarball.swift
/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/AboutViewController.swift
/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/Bundle.swift
/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/Notify.swift
/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/DownloadRStudio.swift
/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/Menu.swift
/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/Alerts.swift
/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/ViewController.swift
/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/AppDelegate.swift
/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/String+Version.swift
/Users/hrbrmstr/Development/rswitch/RSwitch/RSwitch/swift/Utils.swift

BIN
build/RSwitch.build/Release/RSwitch.build/RSwitch-all-non-framework-target-headers.hmap View File


BIN
build/RSwitch.build/Release/RSwitch.build/RSwitch-all-target-headers.hmap View File


BIN
build/RSwitch.build/Release/RSwitch.build/RSwitch-generated-files.hmap View File


BIN
build/RSwitch.build/Release/RSwitch.build/RSwitch-own-target-headers.hmap View File


BIN
build/RSwitch.build/Release/RSwitch.build/RSwitch-project-headers.hmap View File


+ 8
- 0
build/RSwitch.build/Release/RSwitch.build/RSwitch.app.xcent View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>

BIN
build/RSwitch.build/Release/RSwitch.build/RSwitch.hmap View File


+ 10
- 0
build/RSwitch.build/Release/RSwitch.build/Script-FEB62898714FA5EEEAA0AFDE.sh View File

@@ -0,0 +1,10 @@
#!/bin/sh
diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
# print error to STDERR
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
exit 1
fi
# This output is used by Xcode 'outputs' to avoid re-running this script phase.
echo "SUCCESS" > "${SCRIPT_OUTPUT_FILE_0}"


+ 1
- 0
build/RSwitch.build/Release/RSwitch.build/all-product-headers.yaml View File

@@ -0,0 +1 @@
{"case-sensitive":"false","roots":[],"version":0}

BIN
build/XCBuildData/908dad76795ea13c6fc2915c74d69cd9-desc.xcbuild View File


+ 93
- 0
build/XCBuildData/908dad76795ea13c6fc2915c74d69cd9-manifest.xcbuild
File diff suppressed because it is too large
View File


BIN
build/XCBuildData/BuildDescriptionCacheIndex-a4dabeac050d47b4e44bb951c02cf12a View File


BIN
build/XCBuildData/build.db View File


+ 0
- 0
guide/.Rhistory View File


+ 18
- 0
guide/_site.yml View File

@@ -0,0 +1,18 @@
name: "RSwitch"
navbar:
title: "RSwitch"
left:
- text: "Use"
href: index.html
- text: "Develop"
href: develop.html
- text: "Acknowledgements"
href: acknowledgements.html
- text: "Landing Page"
href: "https://rud.is/rswitch"
output:
html_document:
toc: true
theme: darkly
include:
after_body: footer.html

+ 362
- 0
guide/_site/acknowledgements.html View File

@@ -0,0 +1,362 @@
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />




<title>Acknowledgements</title>

<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/darkly.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>

<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}
</script>



<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>




<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
height: auto;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
</style>


<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 60px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 65px;
margin-top: -65px;
}
.section h2 {
padding-top: 65px;
margin-top: -65px;
}
.section h3 {
padding-top: 65px;
margin-top: -65px;
}
.section h4 {
padding-top: 65px;
margin-top: -65px;
}
.section h5 {
padding-top: 65px;
margin-top: -65px;
}
.section h6 {
padding-top: 65px;
margin-top: -65px;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
display: block;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #cccccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left>.dropdown-menu {
left: -100%;
margin-left: 10px;
border-radius: 6px 0 6px 6px;
}
</style>

<script>
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
href = window.location.pathname
href = href.substr(href.lastIndexOf('/') + 1)
if (href === "")
href = "index.html";
var menuAnchor = $('a[href="' + href + '"]');

// mark it active
menuAnchor.parent().addClass('active');

// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
});
</script>

<!-- tabsets -->

<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "&#xe258;";
border: none;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs > li.active {
display: block;
}

.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}

.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>

<!-- code folding -->




</head>

<body>


<div class="container-fluid main-container">




<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">RSwitch</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">Use</a>
</li>
<li>
<a href="develop.html">Develop</a>
</li>
<li>
<a href="acknowledgements.html">Acknowledgements</a>
</li>
<li>
<a href="https://rud.is/rswitch">Landing Page</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->

<div class="fluid-row" id="header">



<h1 class="title toc-ignore">Acknowledgements</h1>

</div>


<p>RSwitch wasn’t my idea. It’s been around forever on the <a href="http://mac.r-project.org/">R for macOS Developer’s Page</a> but stopped working on Catalina since it hadn’t been updated in ages, was only 32-bit (which is a no-go for Catalina), and had no available source code to modify.</p>
<p>Despite having found and old-old copy of the source code by hacking URLs via the Internet Archive, none of that code was used to make this incarnation of RSwitch.</p>
<p>RSwitch uses three external frameworks to accomplish its tasks:</p>
<ul>
<li><a href="https://github.com/scinfu/SwiftSoup">SwiftSoup</a> by Nabil Chatbi</li>
<li><a href="https://github.com/objective-see/ProcInfo">ProcInfo</a> by the infamous Patrick Wardle</li>
<li><a href="https://github.com/DragonCherry/VersionCompare/">VersionCompare</a> by DragonCherry</li>
</ul>
<p>The current (but, likely not final) app icon and menubar icon is based on the <a href="https://thenounproject.com/search/?q=dial&amp;i=866019#">‘dial’ Noun Project font icon</a> created by Icon Mark.</p>

<hr noshade size=1/>
<p>Copyright &copy; 2019 Bob Rudis. All rights reserved.</p>



</div>

<script>

// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});


</script>

<!-- tabsets -->

<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});

$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
});
});
</script>

<!-- code folding -->


<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>

</body>
</html>

BIN
guide/_site/app-switch.png View File

Before After
Width: 562  |  Height: 433  |  Size: 109KB

+ 376
- 0
guide/_site/develop.html View File

@@ -0,0 +1,376 @@
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />




<title>Developing RSwitch</title>

<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/darkly.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>

<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}
</script>



<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>




<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
height: auto;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
</style>


<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 60px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 65px;
margin-top: -65px;
}
.section h2 {
padding-top: 65px;
margin-top: -65px;
}
.section h3 {
padding-top: 65px;
margin-top: -65px;
}
.section h4 {
padding-top: 65px;
margin-top: -65px;
}
.section h5 {
padding-top: 65px;
margin-top: -65px;
}
.section h6 {
padding-top: 65px;
margin-top: -65px;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
display: block;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #cccccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left>.dropdown-menu {
left: -100%;
margin-left: 10px;
border-radius: 6px 0 6px 6px;
}
</style>

<script>
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
href = window.location.pathname
href = href.substr(href.lastIndexOf('/') + 1)
if (href === "")
href = "index.html";
var menuAnchor = $('a[href="' + href + '"]');

// mark it active
menuAnchor.parent().addClass('active');

// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
});
</script>

<!-- tabsets -->

<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "&#xe258;";
border: none;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs > li.active {
display: block;
}

.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}

.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>

<!-- code folding -->




</head>

<body>


<div class="container-fluid main-container">




<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">RSwitch</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">Use</a>
</li>
<li>
<a href="develop.html">Develop</a>
</li>
<li>
<a href="acknowledgements.html">Acknowledgements</a>
</li>
<li>
<a href="https://rud.is/rswitch">Landing Page</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->

<div class="fluid-row" id="header">



<h1 class="title toc-ignore">Developing RSwitch</h1>

</div>


<p>Contributions to RSwitch are welcome and encouraged!</p>
<p>You will need:</p>
<ul>
<li><a href="https://developer.apple.com/xcode/">Xcode 11</a> (still in beta as of this writing)</li>
<li>Familiarity with <a href="https://swift.org/blog/swift-5-released/">Swift 5.x</a></li>
<li>Tolerance to use one of the following social coding sites:
<ul>
<li><a href="https://git.rud.is/hrbrmstr/RSwitch">My self-hosted Gitea instance</a></li>
<li><a href="https://git.sr.ht/~hrbrmstr/RSwitch">SourceHut</a></li>
<li><a href="https://gitlab.com/hrbrmstr/RSwitch">GitLab</a></li>
<li><a href="https://bitbucket.com/hrbrmstr/RSwitch">Bitbucket</a></li>
<li><a href="https://github.com/hrbrmstr/RSwitch">GitHub</a></li>
</ul></li>
<li>The ability to use <a href="https://git-scm.com/book/ms/v2/Git-Tools-Signing-Your-Work">signed git commits</a></li>
</ul>
<p>To work on anything related to RSwitch:</p>
<ul>
<li>claim or file a new issue</li>
<li>get concensus on the feature/change</li>
<li>develop and test on a fork &amp; branch</li>
<li>share a copy of the app back to the folks monitoring the issue</li>
<li>submit a PR once the feature/change has been finalized</li>
</ul>

<hr noshade size=1/>
<p>Copyright &copy; 2019 Bob Rudis. All rights reserved.</p>



</div>

<script>

// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});


</script>

<!-- tabsets -->

<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});

$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
});
});
</script>

<!-- code folding -->


<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>

</body>
</html>

+ 2
- 0
guide/_site/footer.html View File

@@ -0,0 +1,2 @@
<hr noshade size=1/>
<p>Copyright &copy; 2019 Bob Rudis. All rights reserved.</p>

+ 596
- 0
guide/_site/index.html View File

@@ -0,0 +1,596 @@
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />




<title>Using RSwitch</title>

<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/darkly.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>

<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}
</script>



<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>




<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
height: auto;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
</style>


<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 60px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 65px;
margin-top: -65px;
}
.section h2 {
padding-top: 65px;
margin-top: -65px;
}
.section h3 {
padding-top: 65px;
margin-top: -65px;
}
.section h4 {
padding-top: 65px;
margin-top: -65px;
}
.section h5 {
padding-top: 65px;
margin-top: -65px;
}
.section h6 {
padding-top: 65px;
margin-top: -65px;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
display: block;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #cccccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left>.dropdown-menu {
left: -100%;
margin-left: 10px;
border-radius: 6px 0 6px 6px;
}
</style>

<script>
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
href = window.location.pathname
href = href.substr(href.lastIndexOf('/') + 1)
if (href === "")
href = "index.html";
var menuAnchor = $('a[href="' + href + '"]');

// mark it active
menuAnchor.parent().addClass('active');

// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
});
</script>

<!-- tabsets -->

<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "&#xe258;";
border: none;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs > li.active {
display: block;
}

.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}

.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>

<!-- code folding -->



<style type="text/css">

#TOC {
margin: 25px 0px 20px 0px;
}
@media (max-width: 768px) {
#TOC {
position: relative;
width: 100%;
}
}


.toc-content {
padding-left: 30px;
padding-right: 40px;
}

div.main-container {
max-width: 1200px;
}

div.tocify {
width: 20%;
max-width: 260px;
max-height: 85%;
}

@media (min-width: 768px) and (max-width: 991px) {
div.tocify {
width: 25%;
}
}

@media (max-width: 767px) {
div.tocify {
width: 100%;
max-width: none;
}
}

.tocify ul, .tocify li {
line-height: 20px;
}

.tocify-subheader .tocify-item {
font-size: 0.90em;
}

.tocify .list-group-item {
border-radius: 0px;
}


</style>



</head>

<body>


<div class="container-fluid main-container">


<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
</div>

<div class="toc-content col-xs-12 col-sm-8 col-md-9">




<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">RSwitch</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">Use</a>
</li>
<li>
<a href="develop.html">Develop</a>
</li>
<li>
<a href="acknowledgements.html">Acknowledgements</a>
</li>
<li>
<a href="https://rud.is/rswitch">Landing Page</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->

<div class="fluid-row" id="header">



<h1 class="title toc-ignore">Using RSwitch</h1>

</div>


<p>RSwitch is a macOS menubar application that works on macOS 10.14+ and provides handy shortcuts for developing with R on macOS. You can download it from the <a href="https://rud.is/rswitch/">landing page</a> or contribute to the <a href="develop.html">development</a> of the application.</p>
<div id="basiccore-usage" class="section level2">
<h2>Basic/Core Usage</h2>
<p>After downloading and running the application a new menubar item will appear and the core menu will look something like this:</p>
<p><img src="menu-info.png" /></p>
<p>The initial and primary feature of the RSwitch app was to enable switching what your system considers to be the “current” version of R. To understand how that is “computed”, you should use the “R Frameworks Directory” option which opens up <code>/Library/Frameworks/R.framework/Versions</code> in the Finder so you can browse and manipulate the contents of that directory tree on your own.</p>
<pre class="r"><code>fs::dir_tree(path = &quot;/Library/Frameworks/R.framework/Versions&quot;, recurse = FALSE)</code></pre>
<pre><code>/Library/Frameworks/R.framework/Versions
├── 3.5
├── 3.6
├── 3.7
└── Current</code></pre>
<p>The “R Framework” is, well, <em>R</em> on your macOS system. All of the necessary supporting libraries, code, pacakges, configuration elements, etc. exist in the framework directory. Here is the top-level contents of the <code>3.5</code> version of the R Framework:</p>
<pre class="r"><code>fs::dir_tree(path = &quot;/Library/Frameworks/R.framework/Versions/3.5&quot;, recurse = 1)</code></pre>
<pre><code>/Library/Frameworks/R.framework/Versions/3.5
├── Headers
├── PrivateHeaders
│ ├── Defn.h
│ ├── Errormsg.h
│ ├── Fileio.h
│ ├── Graphics.h
│ ├── GraphicsBase.h
│ ├── IOStuff.h
│ ├── Internal.h
│ ├── Makefile.in
│ ├── Makefile.win
│ ├── Parse.h
│ ├── Print.h
│ ├── R.h
│ ├── R_ext
│ ├── Rconnections.h
│ ├── Rdefines.h
│ ├── Rdynpriv.h
│ ├── Rembedded.h
│ ├── Rgraphics.h
│ ├── Rinlinedfuns.h
│ ├── Rinterface.h
│ ├── Rinternals.h
│ ├── Rmath.h0.in
│ ├── Rmodules
│ ├── S.h
│ ├── Startup.h
│ ├── config.h
│ ├── config.h.in
│ ├── rlocale.h
│ ├── stamp-h.in
│ └── vg
├── R
└── Resources
├── COPYING
├── Info.plist
├── R
├── Rscript
├── SVN-REVISION
├── bin
├── doc
├── etc
├── fontconfig
├── include
├── lib
├── library
├── man1
├── modules
├── share
└── tests</code></pre>
<p>When you download and run the <a href="https://cran.r-project.org/bin/macosx/">official R macOS installer</a> files are installed into a versioned tree and the <code>Current</code> symbolic link is updated to point to what you just installed. By making all of the installed resources depend on the <code>Current</code> symbolic link, the R Core team made it possible to switch R versions just by changing that link. For example, The <code>R</code> console application in <code>/usr/local/bin</code> is a symbolc link to:</p>
<p><code>/usr/local/bin/R@ -&gt; /Library/Frameworks/R.framework/Resources/bin/R</code></p>
<p>The <code>Resources</code> directory (and everything else in <code>/Library/Frameworks/R.framework/</code> uses the <code>Current</code> symbolic link to get to the correct targets):</p>
<ul>
<li><code>Headers@ -&gt; Versions/Current/Headers</code></li>
<li><code>Libraries@ -&gt; Versions/Current/Resources/lib</code></li>
<li><code>PrivateHeaders@ -&gt; Versions/Current/PrivateHeaders</code></li>
<li><code>R@ -&gt; Versions/Current/R</code></li>
<li><code>Resources@ -&gt; Versions/Current/Resources</code></li>
<li><code>Versions/</code></li>
</ul>
<p>For the most control, you can install a coexisting version of R <strong>oldrel</strong>-1, <strong>oldrel</strong> (as of the date this document was created those would be R 3.4 and R 3.5), current <strong>release</strong> (R 3.6) and <strong>devel</strong> (3.7) by hand by going to the <a href="https://mac.r-project.org/">R for macOS Developer’s Page</a> and downloading the <code>tar.gz</code> version of those distributions:</p>
<p><img src="r-macos-downloads.