Skip to content

Commit 220c4fd

Browse files
committed
changes
1 parent 430aecc commit 220c4fd

15 files changed

Lines changed: 50 additions & 101 deletions

File tree

.gitignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
Pods/
21
.DS_Store
32
.DS_Store/
43
*/.DS_Store
5-
**/*.xcworkspace/xcuserdata*
6-
**/*.xcodeproj/xcuserdata*
7-
native/build
8-
native/build_debug
4+
95
node_modules
106
.env
117
dist

native/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
**/*.xcworkspace/xcuserdata*
2+
**/*.xcodeproj/xcuserdata*
3+
build
4+
build_debug
5+
DerivedData
6+
Pods/
7+
update/*.pkg
8+
update/*.dmg
9+
update/*.app
10+
update/*.zip
11+
update/update-test.xml

native/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ SPEC CHECKSUMS:
8181

8282
PODFILE CHECKSUM: a4fdf35b1dcec9414bd0137d36ff00e0ba6eaf99
8383

84-
COCOAPODS: 1.9.1
84+
COCOAPODS: 1.9.3

native/app/Source/Application.swift

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -132,29 +132,6 @@ class Application {
132132
quit()
133133
}
134134
}
135-
} else if (Driver.isOutdated && !Driver.skipCurrentVersion) {
136-
Alert.confirm(
137-
title: "Audio Driver Update",
138-
message: "There is an optional Audio Driver update that should improve user experience. \nIn order to update eqMac will ask for your System Password. \nPlease close any apps playing audio (Spotify, YouTube etc.) otherwise installation might fail.\nVersion change: \(Driver.lastInstalledVersion ?? "1.0.0") -> \(Driver.bundledVersion)",
139-
okText: "Update Driver",
140-
cancelText: "Skip Driver update"
141-
) { update in
142-
if update {
143-
Driver.install(started: {
144-
UI.showLoadingWindow("Updating eqMac audio driver\nIf this process takes too long,\nplease restart your Mac")
145-
}) { success in
146-
if (success) {
147-
UI.hideLoadingWindow()
148-
completion()
149-
} else {
150-
driverFailedToInstallPrompt()
151-
}
152-
}
153-
} else {
154-
Driver.skipCurrentVersion = true
155-
completion()
156-
}
157-
}
158135
} else {
159136
completion()
160137
}

native/app/Source/ApplicationDataBus.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ApplicationDataBus: DataBus {
2424
"name": host.localizedName as AnyObject,
2525
"model": Sysctl.model as String,
2626
"version": Bundle.main.infoDictionary?["CFBundleVersion"] as Any,
27-
"driverVersion": Driver.lastInstalledVersion
27+
// "driverVersion": Driver.bundledVersion
2828
]
2929
}
3030

@@ -61,16 +61,16 @@ class ApplicationDataBus: DataBus {
6161
}
6262

6363
self.on(.GET, "/driver/reinstall/available") { _, res in
64-
return "Yes"
65-
}
66-
67-
self.on(.GET, "/driver/reinstall") { _, res in
68-
Application.reinstallDriver { success in
69-
res.send([ "reinstalled": success ])
70-
}
71-
return nil
64+
return false
7265
}
7366

67+
// self.on(.GET, "/driver/reinstall") { _, res in
68+
// Application.reinstallDriver { success in
69+
// res.send([ "reinstalled": success ])
70+
// }
71+
// return nil
72+
// }
73+
//
7474
self.on(.GET, "/update") { _, _ in
7575
Application.checkForUpdates()
7676
return "Checking for updates."

native/app/Source/Audio/Sources/System/Driver.swift

Lines changed: 25 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,16 @@ enum CustomProperties: String {
2828
}
2929

3030
class Driver {
31-
static var legacyIsInstalled: Bool {
32-
get {
33-
for legacyDriverUID in Constants.LEGACY_DRIVER_UIDS {
34-
let device = AudioDevice.getOutputDeviceFromUID(UID: legacyDriverUID)
35-
if (device != nil) { return true }
36-
}
37-
return false
38-
}
39-
}
40-
41-
static var lastInstalledVersion: String? {
42-
get {
43-
return Storage[.lastInstalledDriverVersion]
44-
}
45-
set {
46-
Storage[.lastInstalledDriverVersion] = newValue
47-
}
48-
}
49-
31+
// static var legacyIsInstalled: Bool {
32+
// get {
33+
// for legacyDriverUID in Constants.LEGACY_DRIVER_UIDS {
34+
// let device = AudioDevice.getOutputDeviceFromUID(UID: legacyDriverUID)
35+
// if (device != nil) { return true }
36+
// }
37+
// return false
38+
// }
39+
// }
40+
//
5041
static var pluginId: AudioObjectID? {
5142
return AudioDevice.lookupIDByPluginBundleID(by: Constants.DRIVER_BUNDLE_ID)
5243
}
@@ -56,39 +47,21 @@ class Driver {
5647
return self.device != nil || self.pluginId != nil
5748
}
5849
}
59-
60-
static var info: Dictionary<String, Any> {
61-
return NSDictionary(contentsOfFile: Bundle.main.path(forResource: "Info", ofType: "plist", inDirectory: "Embedded/eqMac.driver/Contents")!) as! Dictionary<String, Any>
62-
}
63-
64-
static var bundledVersion: String {
65-
return info["CFBundleVersion"] as! String
66-
}
67-
68-
static var lastSkippedDriverVersion: String? {
69-
get {
70-
return Storage[.lastSkippedDriverVersion]
71-
}
72-
set {
73-
Storage[.lastSkippedDriverVersion] = newValue
74-
}
75-
}
76-
77-
static var skipCurrentVersion: Bool {
78-
get {
79-
return lastSkippedDriverVersion == bundledVersion
80-
}
81-
set {
82-
lastSkippedDriverVersion = newValue ? bundledVersion : nil
83-
}
84-
}
85-
86-
static var isOutdated: Bool {
87-
get {
88-
return bundledVersion != lastInstalledVersion
89-
}
90-
}
91-
50+
//
51+
// static var info: Dictionary<String, Any> {
52+
// return NSDictionary(contentsOfFile: Bundle.main.path(forResource: "Info", ofType: "plist", inDirectory: "Embedded/eqMac.driver/Contents")!) as! Dictionary<String, Any>
53+
// }
54+
//
55+
// static var bundledVersion: String {
56+
// return info["CFBundleVersion"] as! String
57+
// }
58+
//
59+
// static var isOutdated: Bool {
60+
// get {
61+
// return bundledVersion != lastInstalledVersion
62+
// }
63+
// }
64+
//
9265
static var sampleRates: [Double] {
9366
return [
9467
8_000,
@@ -249,18 +222,12 @@ class Driver {
249222

250223
static func install (started: (() -> Void)? = nil, _ finished: @escaping (Bool) -> Void) {
251224
Script.sudo("install_driver", started: started, { success in
252-
if (success) {
253-
lastInstalledVersion = bundledVersion
254-
}
255225
finished(success)
256226
})
257227
}
258228

259229
static func uninstall (started: (() -> Void)? = nil, _ finished: @escaping (Bool) -> Void) {
260230
Script.sudo("uninstall_driver", started: started, { success in
261-
if (success) {
262-
lastInstalledVersion = nil
263-
}
264231
finished(success)
265232
})
266233
}

native/app/Source/Helpers/Storage.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ extension DefaultsKeys {
2626

2727
// Effects - Equalizer - Advanced
2828
static let advancedEqualizerPresets = DefaultsKey<[AdvancedEqualizerPreset]?>("advancedEqualizerPresets")
29-
static let lastInstalledDriverVersion = DefaultsKey<String?>("lastInstalledDriverVersion")
30-
static let lastSkippedDriverVersion = DefaultsKey<String?>("lastSkippedDriverVersion")
3129
}
3230

3331
let Storage = Defaults

native/app/update/deploy.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)