Lord-Kamina / SwiftDefaultApps

Replacement for RCDefaultApps, written in Swift.
Other
1.45k stars 62 forks source link

Precompiled version? #1

Closed luckman212 closed 6 years ago

luckman212 commented 7 years ago

First, thank you for writing this!

Any chance you'll release a precompiled prefPane on GitHub? It was pretty easy to build with Xcode, but it would still be convenient to have.

Lord-Kamina commented 7 years ago

Hey, no problem, and if at any point you think you might be able to contribute, feel free to!

About the compiled version; probably yes. To be honest, I thought I had posted it already.

shillem commented 7 years ago

I second that! A precompiled version would be very handy.

talkstream commented 7 years ago

Agree. I see «To install, double click on the .prefpane, and you will be prompted to install it.» in README.MD, but there is no any .prefpane files :)

It should be useful. And big thanks for your work.

gedeminas commented 7 years ago

Not so easy to compile for everyone, i'll be waiting for compiled version too, thanks.

Lord-Kamina commented 7 years ago

Check https://github.com/Lord-Kamina/SwiftDefaultApps/releases/tag/v1.1.0

shillem commented 7 years ago

@Lord-Kamina I get the following error:

You can’t open SwiftDefaultApps preferences pane because it doesn’t work on an Intel-based Mac.

gedeminas commented 7 years ago

Same here.

Lord-Kamina commented 7 years ago

Yeah it seems Xcode fucked something up; let me see what’s up and I’ll upload again.

Lord-Kamina commented 7 years ago

Am fixing the issue now, problem is for some reason not all @objc inferences registered warnings so I ended up having to look some up by hand.

Lord-Kamina commented 7 years ago

Should be fixed now.

luckman212 commented 7 years ago

Hmm. I just downloaded the archive (md5 hash bd7eb396cccf1d289a00ca4721457b6c) it and I'm still getting that error. Tested on 2 different Macs...

bugged

Lord-Kamina commented 7 years ago

I think that checksum is wrong. I'll reupload the archive. md5 should be c7a2391390ac3ef3d106a83ecb3b9e2d

EDIT: Try now.

luckman212 commented 7 years ago

I re-downloaded, and I do have the c7a2391390ac3ef3d106a83ecb3b9e2d hash now on the .7z file. However, still cannot open the prefPane, same error. Very odd.

Lord-Kamina commented 7 years ago

Try deleting the previous version entirely and copying it over again? Also, what version of macOS are you on?

luckman212 commented 7 years ago

Yes, I've done that. I'm on 10.13 (17A365)

Lord-Kamina commented 7 years ago

It might be a High Sierra issue?

Try this... Open a Terminal and run

/Applications/System\ Preferences.app/Contents/MacOS/System\ Preferences ~/Library/PreferencePanes/SwiftDefaultApps.prefPane 2>&1

Replace the location of the prefpane as appropriate. That should give a somewhat more verbose idea of what the issue actually is.

luckman212 commented 7 years ago

Here's what I get :

mbp:~ luckman212$ /Applications/System\ Preferences.app/Contents/MacOS/System\ Preferences ~/Library/PreferencePanes/SwiftDefaultApps.prefPane 2>&1
2017-09-27 23:00:59.744 AllowPasswordPref[3050:337112] error == Error Domain=com.apple.LocalAuthentication Code=-6 "Biometry is not available on this device." UserInfo={NSLocalizedDescription=Biometry is not available on this device.}
2017-09-27 23:00:59.745 AllowPasswordPref[3050:337112] Hardware Check err == -1
2017-09-27 23:00:59.763 AllowPasswordPref[3050:337112] Is Network User? == 0
2017-09-27 23:00:59.921 System Preferences[3047:337095] Error loading /Users/luckman212/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/MacOS/SwiftDefaultApps:  dlopen(/Users/luckman212/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/MacOS/SwiftDefaultApps, 265): can't resolve symbol _OBJC_CLASS_$_NSError in /Users/luckman212/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/MacOS/../Frameworks/libswiftCore.dylib because dependent dylib #1 could not be loaded in /Users/luckman212/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/MacOS/../Frameworks/libswiftCore.dylib
2017-09-27 23:00:59.922 System Preferences[3047:337095] [NSPrefPaneBundle instantiatePrefPaneObject] (/Users/luckman212/Library/PreferencePanes/SwiftDefaultApps.prefPane): principalClass is nil.
2017-09-27 23:01:00.072 System Preferences[3047:337095]  ### AE 1868656752 sender's PID is 3047 (System Preferences)
Lord-Kamina commented 7 years ago

I've got no idea what the issue is, but it's most likely to do with Swift 4. Hope SO or some other place can shed some light.

talkstream commented 7 years ago

Dear @Lord-Kamina, I just want to say it works well for me on 10.11.6. Thanks.

gedeminas commented 7 years ago

I got the same error as luckman212 on 10.13

Lord-Kamina commented 7 years ago

I
I had already confirmed the bug by asking my brother to try it. I don't really know yet what is causing it, though, so please be patient.

On October 1, 2017 at 11:31:16, Gediminas (notifications@github.com(mailto:notifications@github.com)) wrote:

I got the same error as luckman212 on 10.13

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub(https://github.com/Lord-Kamina/SwiftDefaultApps/issues/1#issuecomment-333380537), or mute the thread(https://github.com/notifications/unsubscribe-auth/AGJfLJQaUR2vqAxR4OuuNDcATatr2kGJks5sn6I0gaJpZM4PKJH6).

Lord-Kamina commented 7 years ago

I think it's a bug to do with Runpath search paths that apparently behave differently on 10.13, but haven't been able to figure it out yet.

Lord-Kamina commented 7 years ago

@xayoung I accidentally deleted your comment because am sleepy and from mu cell.

Could you try this version?

https://www.dropbox.com/s/q8bweehizosklv3/SwiftDefaultApps-1.1.0.7z?dl=0

Put it in the appropriate folder and try running it with the following command :

DYLD_PRINT_RPATHS=TRUE /Applications/System\
Preferences.app/Contents/MacOS/System\ Preferences
~/Library/PreferencePanes/SwiftDefaultApps.prefPane 2>&1

And post the output of that please?

gebing commented 7 years ago

I download the file from dropbox, and run as above. The error is below: 2017-11-04 19:43:24.995 System Preferences[49977:1930442] Error loading /var/root/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/MacOS/SwiftDefaultApps: dlopen(/var/root/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/MacOS/SwiftDefaultApps, 265): can't resolve symbol _OBJCCLASS$_NSError in /private/var/root/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/MacOS/../Frameworks/libswiftCore.dylib because dependent dylib #1 could not be loaded in /private/var/root/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/MacOS/../Frameworks/libswiftCore.dylib 2017-11-04 19:43:24.995 System Preferences[49977:1930442] [NSPrefPaneBundle instantiatePrefPaneObject] (/var/root/Library/PreferencePanes/SwiftDefaultApps.prefPane): principalClass is nil.

Lord-Kamina commented 7 years ago

I haven't been able to solve this. I think it's a bug in Swift.

On November 4, 2017 at 08:44:03, gebing (notifications@github.com) wrote:

2017-11-04 19:43:24.995 System Preferences[49977:1930442] Error loading /var/root/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/MacOS/SwiftDefaultApps: dlopen(/var/root/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/MacOS/SwiftDefaultApps, 265): can't resolve symbol OBJC_CLASS$_NSError in /private/var/root/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/MacOS/../Frameworks/libswiftCore.dylib because dependent dylib #1 https://github.com/Lord-Kamina/SwiftDefaultApps/issues/1 could not be loaded in /private/var/root/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/MacOS/../Frameworks/libswiftCore.dylib 2017-11-04 19:43:24.995 System Preferences[49977:1930442] [NSPrefPaneBundle instantiatePrefPaneObject] (/var/root/Library/PreferencePanes/SwiftDefaultApps.prefPane): principalClass is nil.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Lord-Kamina/SwiftDefaultApps/issues/1#issuecomment-341890499, or mute the thread https://github.com/notifications/unsubscribe-auth/AGJfLBQWEp9eNJSVpk0AAikmMRjBsqjqks5szE4DgaJpZM4PKJH6 .

qkdreyer commented 6 years ago

https://gist.github.com/qkdreyer/dc1561b39b9e87ed1557c565c87ac8d4

Lord-Kamina commented 6 years ago

I reproduced it myself on my brother’s (running HS) laptop. As I said earlier, I believe this might be a bug in Swift. While it’s a known fact Swift is not yet ABI compatible and one cannot load binaries compiled against one version alongside binaries compiled against another, it strikes me as definitely odd that it would work on Sierra and not on High Sierra. Especially considering Sierra has Swift 3 an High Sierra Swift 4 (which is what the prefpane was compiled and linked against)

--  Gregorio Litenstein Goldzweig 
Médico Cirujano  
Fono:  +56 9 96343643 E-Mail:  g.litenstein@gmail.com

On November 7, 2017 at 11:32:48, Quentin Dreyer (notifications@github.com) wrote:

https://gist.github.com/qkdreyer/dc1561b39b9e87ed1557c565c87ac8d4

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

qkdreyer commented 6 years ago

FWIW, I'm not getting any errors from libswiftCore.dylib SwiftDefaultApps 1.1.0 on macOS High Sierra 10.13.4 (17E199).

https://gist.github.com/qkdreyer/dc1561b39b9e87ed1557c565c87ac8d4/revisions

Now, I'd contribute to https://github.com/caskroom/homebrew-cask/ by adding a cask, but only release having .dmg/.zip/.tgz/.tbz2 extension are supported. Could you publish a new release with one of these extension instead of .7z @Lord-Kamina ?

Lord-Kamina commented 6 years ago

I'm visiting the USA so not at the moment. I'll pick my new laptop in a week. Then I can test properly in 10.13 and also swift 4.1. Will get back to you.

Lord-Kamina commented 6 years ago

@qkdreyer I just built and tested it with the latest Xcode and Swift 4.1 on 10.13.4 and it appears to be running fine indeed. I'd completely forgotten about the 7z issue though, sure, I'll do one of those.

fedelibre commented 6 years ago

I had the same problem on High Sierra 10.13.3. I've just upgraded to 10.13.6 and it works fine.

@Lord-Kamina I think you can close this issue

RulerOf commented 5 years ago

You can install the prefpane with brew cask install swiftdefaultappsprefpane

DJF3 commented 4 years ago

You can install the prefpane with brew cask install swiftdefaultappsprefpane Could you add this to the Readme.md?

Lord-Kamina commented 4 years ago

You can install the prefpane with brew cask install swiftdefaultappsprefpane Could you add this to the Readme.md?

While I think it's cool that the prefpane was added to Homebrew (and thus reached more people) I'm loath to do this because I really dislike Homebrew and would rather not encourage it. For the sake of saving a couple keystrokes for novice users, Homebrew introduces a sizable security vulnerability into macOS by changing the permissions of /usr/local

sean256 commented 4 years ago

@Lord-Kamina I don't think that's a concern anymore. Homebrew now uses /usr/local/Homebrew