Skip to content
This repository was archived by the owner on Jun 2, 2022. It is now read-only.

Commit 58acd9c

Browse files
committed
1.4.0
1 parent e72ee95 commit 58acd9c

File tree

159 files changed

+31167
-34
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+31167
-34
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ Icon
2424
Network Trash Folder
2525
Temporary Items
2626
.apdisk
27+
.Rproj.user

RSwitch.xcodeproj/project.pbxproj

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
01073F1F2311E67D007162C9 /* HandleUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01073F1E2311E67D007162C9 /* HandleUpdate.swift */; };
1919
01073F212311E6BD007162C9 /* HandleSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01073F202311E6BD007162C9 /* HandleSwitch.swift */; };
2020
0178970D230ED25100F8F5BC /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0178970C230ED25100F8F5BC /* AboutViewController.swift */; };
21+
018A8C3B2312C7BC0006E87D /* libprocInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 018A8C3A2312C7BC0006E87D /* libprocInfo.a */; };
22+
018A8C3F2312CB480006E87D /* procHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 018A8C3E2312CB480006E87D /* procHelper.m */; };
23+
018A8C412312F4940006E87D /* HandleSwitchTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 018A8C402312F4940006E87D /* HandleSwitchTo.swift */; };
2124
01F3EF0C230E635300DF5DF9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F3EF0B230E635300DF5DF9 /* AppDelegate.swift */; };
2225
01F3EF0E230E635300DF5DF9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F3EF0D230E635300DF5DF9 /* ViewController.swift */; };
2326
01F3EF10230E635500DF5DF9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 01F3EF0F230E635500DF5DF9 /* Assets.xcassets */; };
@@ -37,6 +40,12 @@
3740
01073F1E2311E67D007162C9 /* HandleUpdate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HandleUpdate.swift; sourceTree = "<group>"; };
3841
01073F202311E6BD007162C9 /* HandleSwitch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HandleSwitch.swift; sourceTree = "<group>"; };
3942
0178970C230ED25100F8F5BC /* AboutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = "<group>"; };
43+
018A8C392312C7BC0006E87D /* procInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = procInfo.h; sourceTree = "<group>"; };
44+
018A8C3A2312C7BC0006E87D /* libprocInfo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libprocInfo.a; sourceTree = "<group>"; };
45+
018A8C3C2312C8380006E87D /* RSwitch-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RSwitch-Bridging-Header.h"; sourceTree = "<group>"; };
46+
018A8C3D2312CB480006E87D /* procHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = procHelper.h; sourceTree = "<group>"; };
47+
018A8C3E2312CB480006E87D /* procHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = procHelper.m; sourceTree = "<group>"; };
48+
018A8C402312F4940006E87D /* HandleSwitchTo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HandleSwitchTo.swift; sourceTree = "<group>"; };
4049
01F3EF08230E635300DF5DF9 /* RSwitch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RSwitch.app; sourceTree = BUILT_PRODUCTS_DIR; };
4150
01F3EF0B230E635300DF5DF9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
4251
01F3EF0D230E635300DF5DF9 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -54,6 +63,7 @@
5463
buildActionMask = 2147483647;
5564
files = (
5665
52B8A14237DA712A6A2ABDE0 /* Pods_RSwitch.framework in Frameworks */,
66+
018A8C3B2312C7BC0006E87D /* libprocInfo.a in Frameworks */,
5767
);
5868
runOnlyForDeploymentPostprocessing = 0;
5969
};
@@ -69,6 +79,7 @@
6979
01073F1E2311E67D007162C9 /* HandleUpdate.swift */,
7080
01073F1C2311E64E007162C9 /* DownloadRStudio.swift */,
7181
01073F1A2311E613007162C9 /* DownloadTarball.swift */,
82+
018A8C402312F4940006E87D /* HandleSwitchTo.swift */,
7283
01073F182311E3B8007162C9 /* Bundle.swift */,
7384
01073F162311E397007162C9 /* Menu.swift */,
7485
01073F142311E370007162C9 /* Notify.swift */,
@@ -80,6 +91,19 @@
8091
path = swift;
8192
sourceTree = "<group>";
8293
};
94+
018A8C342312C6510006E87D /* c */ = {
95+
isa = PBXGroup;
96+
children = (
97+
018A8C3C2312C8380006E87D /* RSwitch-Bridging-Header.h */,
98+
018A8C3A2312C7BC0006E87D /* libprocInfo.a */,
99+
018A8C392312C7BC0006E87D /* procInfo.h */,
100+
018A8C3D2312CB480006E87D /* procHelper.h */,
101+
018A8C3E2312CB480006E87D /* procHelper.m */,
102+
01073F232311E859007162C9 /* swift */,
103+
);
104+
path = c;
105+
sourceTree = "<group>";
106+
};
83107
01F3EEFF230E635300DF5DF9 = {
84108
isa = PBXGroup;
85109
children = (
@@ -101,7 +125,7 @@
101125
01F3EF0A230E635300DF5DF9 /* RSwitch */ = {
102126
isa = PBXGroup;
103127
children = (
104-
01073F232311E859007162C9 /* swift */,
128+
018A8C342312C6510006E87D /* c */,
105129
01F3EF0F230E635500DF5DF9 /* Assets.xcassets */,
106130
01F3EF11230E635500DF5DF9 /* Main.storyboard */,
107131
01F3EF14230E635500DF5DF9 /* Info.plist */,
@@ -160,6 +184,7 @@
160184
TargetAttributes = {
161185
01F3EF07230E635300DF5DF9 = {
162186
CreatedOnToolsVersion = 11.0;
187+
LastSwiftMigration = 1100;
163188
};
164189
};
165190
};
@@ -241,8 +266,10 @@
241266
buildActionMask = 2147483647;
242267
files = (
243268
01073F212311E6BD007162C9 /* HandleSwitch.swift in Sources */,
269+
018A8C3F2312CB480006E87D /* procHelper.m in Sources */,
244270
01073F1F2311E67D007162C9 /* HandleUpdate.swift in Sources */,
245271
01073F1B2311E613007162C9 /* DownloadTarball.swift in Sources */,
272+
018A8C412312F4940006E87D /* HandleSwitchTo.swift in Sources */,
246273
0178970D230ED25100F8F5BC /* AboutViewController.swift in Sources */,
247274
01073F192311E3B8007162C9 /* Bundle.swift in Sources */,
248275
01073F152311E370007162C9 /* Notify.swift in Sources */,
@@ -391,6 +418,7 @@
391418
baseConfigurationReference = 53FF56D90FA7100C1726A4F7 /* Pods-RSwitch.debug.xcconfig */;
392419
buildSettings = {
393420
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
421+
CLANG_ENABLE_MODULES = YES;
394422
CODE_SIGN_IDENTITY = "Developer ID Application";
395423
CODE_SIGN_STYLE = Manual;
396424
COMBINE_HIDPI_IMAGES = YES;
@@ -401,11 +429,17 @@
401429
"$(inherited)",
402430
"@executable_path/../Frameworks",
403431
);
432+
LIBRARY_SEARCH_PATHS = (
433+
"$(inherited)",
434+
"$(PROJECT_DIR)/RSwitch/c",
435+
);
404436
MACOSX_DEPLOYMENT_TARGET = 10.14;
405437
MARKETING_VERSION = 1.4.0;
406438
PRODUCT_BUNDLE_IDENTIFIER = is.rud.bob.RSwitch;
407439
PRODUCT_NAME = "$(TARGET_NAME)";
408440
PROVISIONING_PROFILE_SPECIFIER = "";
441+
SWIFT_OBJC_BRIDGING_HEADER = "RSwitch/c/RSwitch-Bridging-Header.h";
442+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
409443
SWIFT_VERSION = 5.0;
410444
};
411445
name = Debug;
@@ -415,6 +449,7 @@
415449
baseConfigurationReference = 574911021B3B7938E36AB013 /* Pods-RSwitch.release.xcconfig */;
416450
buildSettings = {
417451
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
452+
CLANG_ENABLE_MODULES = YES;
418453
CODE_SIGN_IDENTITY = "Developer ID Application";
419454
CODE_SIGN_STYLE = Manual;
420455
COMBINE_HIDPI_IMAGES = YES;
@@ -425,11 +460,16 @@
425460
"$(inherited)",
426461
"@executable_path/../Frameworks",
427462
);
463+
LIBRARY_SEARCH_PATHS = (
464+
"$(inherited)",
465+
"$(PROJECT_DIR)/RSwitch/c",
466+
);
428467
MACOSX_DEPLOYMENT_TARGET = 10.14;
429468
MARKETING_VERSION = 1.4.0;
430469
PRODUCT_BUNDLE_IDENTIFIER = is.rud.bob.RSwitch;
431470
PRODUCT_NAME = "$(TARGET_NAME)";
432471
PROVISIONING_PROFILE_SPECIFIER = "";
472+
SWIFT_OBJC_BRIDGING_HEADER = "RSwitch/c/RSwitch-Bridging-Header.h";
433473
SWIFT_VERSION = 5.0;
434474
};
435475
name = Release;

RSwitch/Base.lproj/Main.storyboard

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -721,22 +721,22 @@
721721
<objects>
722722
<viewController storyboardIdentifier="about2" id="KlD-6a-3Gc" customClass="AboutViewController" sceneMemberID="viewController">
723723
<view key="view" id="SgY-wa-ilj">
724-
<rect key="frame" x="0.0" y="0.0" width="480" height="240"/>
724+
<rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
725725
<autoresizingMask key="autoresizingMask"/>
726726
<subviews>
727727
<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">
728-
<rect key="frame" x="7" y="9" width="463" height="223"/>
728+
<rect key="frame" x="9" y="11" width="463" height="247"/>
729729
<autoresizingMask key="autoresizingMask"/>
730730
<clipView key="contentView" ambiguous="YES" drawsBackground="NO" copiesOnScroll="NO" id="iCP-uh-CRl">
731-
<rect key="frame" x="0.0" y="0.0" width="463" height="223"/>
731+
<rect key="frame" x="0.0" y="0.0" width="463" height="247"/>
732732
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
733733
<subviews>
734734
<textView ambiguous="YES" editable="NO" drawsBackground="NO" importsGraphics="NO" verticallyResizable="YES" smartInsertDelete="YES" id="kWH-Et-k6l">
735-
<rect key="frame" x="0.0" y="0.0" width="463" height="223"/>
735+
<rect key="frame" x="0.0" y="0.0" width="463" height="247"/>
736736
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
737737
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
738738
<color key="backgroundColor" name="alternatingContentBackgroundColor" catalog="System" colorSpace="catalog"/>
739-
<size key="minSize" width="463" height="223"/>
739+
<size key="minSize" width="463" height="247"/>
740740
<size key="maxSize" width="463" height="10000000"/>
741741
<attributedString key="textStorage">
742742
<fragment>
@@ -763,16 +763,25 @@ MIT Licensed
763763
</attributes>
764764
</fragment>
765765
<fragment>
766-
<string key="content">
767-
768-
dial app icon by IconMark from the Noun Project
766+
<string key="content" base64-UTF8="YES">
767+
Cgo
769768
</string>
770769
<attributes>
771770
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
772771
<font key="NSFont" metaFont="label" size="17"/>
773772
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
774773
</attributes>
775774
</fragment>
775+
<fragment>
776+
<string key="content">dial app icon by IconMark from the Noun Project
777+
String+Version by DragonCherry
778+
ProcInfo by Patrick Wardle </string>
779+
<attributes>
780+
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
781+
<font key="NSFont" size="11" name="HelveticaNeue"/>
782+
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
783+
</attributes>
784+
</fragment>
776785
</attributedString>
777786
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
778787
</textView>
@@ -792,7 +801,7 @@ dial app icon by IconMark from the Noun Project
792801
</viewController>
793802
<customObject id="N40-nE-NTQ" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
794803
</objects>
795-
<point key="canvasLocation" x="689" y="357"/>
804+
<point key="canvasLocation" x="689" y="373"/>
796805
</scene>
797806
</scenes>
798807
</document>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//
2+
// Use this file to import your target's public headers that you would like to expose to Swift.
3+
//
4+
5+
#import <Foundation/Foundation.h>
6+
#include "procInfo.h"
7+
#include "procHelper.h"

RSwitch/c/libprocInfo.a

201 KB
Binary file not shown.

RSwitch/c/procHelper.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// procHelper.h
3+
// RSwitch
4+
//
5+
// Created by hrbrmstr on 8/25/19.
6+
// Copyright © 2019 Bob Rudis. All rights reserved.
7+
//
8+
9+
#ifndef procHelper_h
10+
#define procHelper_h
11+
12+
#include <stdio.h>
13+
#include "procHelper.h"
14+
#include "procInfo.h"
15+
#import <Foundation/Foundation.h>
16+
17+
NSMutableArray *getArgs(pid_t pid);
18+
19+
#endif /* procHelper_h */

RSwitch/c/procHelper.m

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// procHelper.c
3+
// RSwitch
4+
//
5+
// Created by hrbrmstr on 8/25/19.
6+
// Copyright © 2019 Bob Rudis. All rights reserved.
7+
//
8+
9+
#include "procHelper.h"
10+
#include "procInfo.h"
11+
#import <Foundation/Foundation.h>
12+
13+
NSMutableArray *getArgs(pid_t pid) {
14+
15+
Process* process = [[Process alloc] init:pid];
16+
return(process.arguments);
17+
18+
}

0 commit comments

Comments
 (0)