Skip to content

Commit df4aadc

Browse files
committed
Did MULTIPLE fixes, made the app better. Added Install Homebrew button, also you no longer have to open the app via rosetta to compile sm64ex-coop. Also added option to not add repo to launcher. Also some var cleanup swell
1 parent df0cd28 commit df4aadc

File tree

4 files changed

+166
-109
lines changed

4 files changed

+166
-109
lines changed

sm_osx.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@
324324
CURRENT_PROJECT_VERSION = 1;
325325
DEVELOPMENT_ASSET_PATHS = "\"sm_osx/Preview Content\"";
326326
DEVELOPMENT_TEAM = 25RK3JMVLT;
327-
ENABLE_HARDENED_RUNTIME = YES;
327+
ENABLE_HARDENED_RUNTIME = NO;
328328
ENABLE_PREVIEWS = YES;
329329
GENERATE_INFOPLIST_FILE = YES;
330330
INFOPLIST_FILE = "sm-osx-Info.plist";
@@ -356,7 +356,7 @@
356356
CURRENT_PROJECT_VERSION = 1;
357357
DEVELOPMENT_ASSET_PATHS = "\"sm_osx/Preview Content\"";
358358
DEVELOPMENT_TEAM = 25RK3JMVLT;
359-
ENABLE_HARDENED_RUNTIME = YES;
359+
ENABLE_HARDENED_RUNTIME = NO;
360360
ENABLE_PREVIEWS = YES;
361361
GENERATE_INFOPLIST_FILE = YES;
362362
INFOPLIST_FILE = "sm-osx-Info.plist";

sm_osx/LauncherView.swift

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct LauncherView: View {
1717
@FetchRequest(sortDescriptors:[SortDescriptor(\.title)]) var launcherRepos: FetchedResults<LauncherRepos>
1818
@State var existingRepo = URL(string: "")
1919
@State var repoTitle = ""
20-
@State var currentVersion = "v1.1.2\n"
20+
@State var currentVersion = "v1.1.3\n"
2121
@State var updateAlert = false
2222
@State var latestVersion = ""
2323
@State var repoArgs = ""
@@ -162,6 +162,24 @@ struct LauncherView: View {
162162
}
163163
}
164164

165+
Button("Install Homebrew") {
166+
print(shell.installBrew("/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\""))
167+
168+
let content = UNMutableNotificationContent()
169+
content.title = "Finished installing homebrew"
170+
content.subtitle = "Homebrew is now installed. If this is your first time with homebrew, please hit the install dependencies button."
171+
content.sound = UNNotificationSound.default
172+
173+
// show this notification instantly
174+
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 0.0001, repeats: false)
175+
176+
// choose a random identifier
177+
let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: trigger)
178+
179+
// add our notification request
180+
UNUserNotificationCenter.current().add(request)
181+
}
182+
165183
Text("Homebrew is REQUIRED for this software to work, please install homebrew at brew.sh")
166184
.padding(.horizontal)
167185

@@ -170,7 +188,10 @@ struct LauncherView: View {
170188

171189
Button(action:{
172190
print(try! shell.shell("brew install make mingw-w64 gcc sdl2 pkg-config glew glfw3 libusb audiofile coreutils"))
173-
print(try! shell.shell("/usr/local/bin/brew install make mingw-w64 gcc gcc@9 sdl2 pkg-config glew glfw3 libusb audiofile coreutils"))
191+
192+
print("its intel's turn nerd what an idiot man")
193+
194+
print(try! shell.intelShell("/usr/local/bin/brew install gcc gcc@9 sdl2 pkg-config glew glfw3 libusb audiofile coreutils"))
174195

175196
let content = UNMutableNotificationContent()
176197
content.title = "Finished installing dependencies"

0 commit comments

Comments
 (0)