Skip to content

Commit

Permalink
Did MULTIPLE fixes, made the app better. Added Install Homebrew butto…
Browse files Browse the repository at this point in the history
…n, 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
  • Loading branch information
EmeraldLoc committed Apr 19, 2022
1 parent df0cd28 commit df4aadc
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 109 deletions.
4 changes: 2 additions & 2 deletions sm_osx.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"sm_osx/Preview Content\"";
DEVELOPMENT_TEAM = 25RK3JMVLT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "sm-osx-Info.plist";
Expand Down Expand Up @@ -356,7 +356,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"sm_osx/Preview Content\"";
DEVELOPMENT_TEAM = 25RK3JMVLT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "sm-osx-Info.plist";
Expand Down
25 changes: 23 additions & 2 deletions sm_osx/LauncherView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct LauncherView: View {
@FetchRequest(sortDescriptors:[SortDescriptor(\.title)]) var launcherRepos: FetchedResults<LauncherRepos>
@State var existingRepo = URL(string: "")
@State var repoTitle = ""
@State var currentVersion = "v1.1.2\n"
@State var currentVersion = "v1.1.3\n"
@State var updateAlert = false
@State var latestVersion = ""
@State var repoArgs = ""
Expand Down Expand Up @@ -162,6 +162,24 @@ struct LauncherView: View {
}
}

Button("Install Homebrew") {
print(shell.installBrew("/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\""))

let content = UNMutableNotificationContent()
content.title = "Finished installing homebrew"
content.subtitle = "Homebrew is now installed. If this is your first time with homebrew, please hit the install dependencies button."
content.sound = UNNotificationSound.default

// show this notification instantly
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 0.0001, repeats: false)

// choose a random identifier
let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: trigger)

// add our notification request
UNUserNotificationCenter.current().add(request)
}

Text("Homebrew is REQUIRED for this software to work, please install homebrew at brew.sh")
.padding(.horizontal)

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

Button(action:{
print(try! shell.shell("brew install make mingw-w64 gcc sdl2 pkg-config glew glfw3 libusb audiofile coreutils"))
print(try! shell.shell("/usr/local/bin/brew install make mingw-w64 gcc gcc@9 sdl2 pkg-config glew glfw3 libusb audiofile coreutils"))

print("its intel's turn nerd what an idiot man")

print(try! shell.intelShell("/usr/local/bin/brew install gcc gcc@9 sdl2 pkg-config glew glfw3 libusb audiofile coreutils"))

let content = UNMutableNotificationContent()
content.title = "Finished installing dependencies"
Expand Down
Loading

0 comments on commit df4aadc

Please sign in to comment.