-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS rewrite #373
Comments
As I wrote to the list, I volunteer to update the current macOS wrapper for ChordPro. I wrote a proof of concept macOS SwiftUI wrapper: https://github.com/Desbeers/ChordProMac For now, it is just calling the official binary to do the hard work:
My main goal for now was to bridge SwiftUI with the core ChordPro binary. That is working now, so adding more arguments like settings to the core is not that hard to do. A harder struggle will be to include the core into the macOS package itself but I’m sure that will be doable. Something new for me, but I’m sure we find out how to do! Eventually, I would love to have this wrapper in the official ChordPro source! This is not meant to be an alternative implementation :-) I try to keep is a simple as possible. No external dependencies and try to support older macOS versions as best as I could. |
Looks great already! |
I assumed you have a Mac and Xcode installed. Else, helaas-pindakaas... You need a Mac to build and run it... Do you have a Mac? Since you provide a binary for macOS that was obvious to me... |
No, I do not have a Mac... I have a VBox with MacOS that I use to make the MacOS binary distributions, but it doesn't have Xcode. But if I can make binary distributions I assume you can? |
I can move your binary into the macOS package (after some homework) and build it. Hoverer, that makes it mine, not yours. That is not the goal. You should build it somehow because I don’t want to be a a new implantation :-) |
First step is to make it work and in such a shape that an average MacOS user will like it. In an ideal situation all binary kits should be built centrally and automatically, but that isn't the case anyway. Kits for Debian and Fedora are built indepently. I don't know if GitHub can build MacOS kits, if so that would be an option. |
I’m unable to build the Mac dmg myself for now, it has too many missing packages to compile, wrong perl version etc... However, I just moved the precompiled ‘chordpro’, ‘libperl’ and ‘lib’ + ‘script’ folders from the official app into my source and the result is a self-containing app that seems to work well. I don’t have an Apple developers account so I’m unable to make a pre-compiled app to share. It would be great if somebody with a Mac can download the source and compiles it with Xcode so I know it’s working as I intended. |
Isn't it possible to add your app to the prebuilt dmg and use it as entry point instead of dndhandler? I build the MacOS dmg with homebrew perl.
Then unpack the ChordPro github stuff, go into that folder, and type
If you then go to the folder pp/macos, you should be able to run a 'make'. |
Unfortunately, that still does not work... I can build from Git, and with cpan but the ‘make’ in I tried to install ‘wxWidgets’ but again errors... I’m well known with Anyway, I gave that a rest for the moment and updated my wrapper to a very useful state.
Main thing missing is the selection of custom files to use but I know my way around to do that. I’m well known with the sandbox restrictions and how to deal with them. Code-signing is a different issue. The current wrapper is not signed so the familiar “the developer could not be verified” pops up. Ok, I thought that was no big deal. I compile a package, strip my useless free singing (that only works on my mac) and call it the day. Unfortunately, I found out that arm-binaries for the Mac must be signed wit a valid and paid developer account, else it will simply not run. So, there are only three options:
So, lets give it a thought and meanwhile it would be nice if we can find another Mac user in the community who like to try my new wrapper. It looks and works very well for me! |
Just to make sure: are you using the
In the makefile there is |
Does that apply to dmg as well? |
Let's stay optimistic and get technical. If you take a look at |
Let’s answer your pervious questions first.
Yes.
It makes no difference.
Yes. It is just a nice packaging of the application. Same rules apply. The application in the dmg must be code signed for arm Macs. Now lets get technical as well: I don’t understand your last suggestion. I don’t care how a chordpro binary is created (in a technical way). All my SwiftUI wrapper is doing is calling the binary in a Swift I just copied the binary, together with its requirements, from the current package into a folder inside my source to run in a Task. Reason for that is sandboxing. I can run it from a I wrote a ‘Book Creation App’ in exactly the same way that is using Pandoc and a full Latex install. All must be installed independent with Good enough for my home projects but not for chordpro. The self-contained binary must be part of the package. And that is were the bigger problem is right now.
Once a binary can be created, I can write an new We are getting close! This is much more challenging than I thought but does not discourage me! The SwiftUI wrapper itself is a non-issue for me, wrote it in a couple of hours with joy and any additional options are simple to implement. The foundation is in place. Settings will be preserved, build-in templates and notations are not hard-coded but directly from the source so the wrapper is very stable. |
I've checked in new version of the pp/macos/Makefile. This should be able to build cli-only with TARGET=chordpro. |
So unless we find someone to build/sign this will be the end of ChordPro for MacOS? I've been told that intel binaries will still run on arm Macs (but you'll get a warning). The best option would be to form an MacOS Special Interest Group within the ChordPro community. Unfortunately, most MacOS users on the list are not responsive to support questions (you being the god-sent exception). |
Closer, but still complaining about missing packages. I think that is because the building is using the |
Correct, intel builds will still run on arm Macs. Unsigned universal builds will not. But, good news! I found out how to build a intel-only version, stripped the signing, uploaded it to GitHub, created a completely fresh account on my Mac, downloaded the ZIP, 2 times Clumsy, but progress! So, I have a test build available: https://github.com/Desbeers/ChordProMac/tree/main/TestBuild |
I’m afraid you need a new macOS... SwiftUI is very immature on older versions than 13. MacOS 10.15 only supports SwiftUI version 1 and that was really horrible... I suggest to keep the current wrapper around for older Macs and just add mine as an addition for never versions. |
No problem, I need to maintain the current Wx wrapper anyway, for Linux and Windows. |
Do you need additional modifications from my side, to make it easier for you to build? |
Poor Linux and Windows users. My wrapper will turn ChordPro for macOS from the Ugly Duck into the most beautiful Swan of the Family, hahaha!!
A managed to get the minimum version down to macOS 12 (not committed yet). Slightly less beautiful but a good compromise to support at least the last three versions and fundamentally the same. I can’t go any lower... Sorry!
Thanks, but not for now. It simply does not build the command line version on my Mac. I just keep your latest bin in my source and see how to fix that later. My TODO list:
And then...
All doable. The fact that I have a public available app now proves that it can be done! |
Can you do a fresh checkout from git,
and send me the complete log? |
Last login: Wed May 29 20:15:48 on ttys003 |
I get the same exact error on my Mac. (M2 Pro on Sonoma 14.4.1) |
Welcome to debug! |
Het commando voor cli is |
That command results in the same error. I'm going to try out perlbrew and see if I have any luck with that. Homebrew's perl should not be trying to pull cpan modules from the system, I don't think. And I made sure that I have homebrew's libpng installed. (I'm not a perl guru, though) |
Fixed.
Fixed.
Improved. |
Try |
Error that there was no --config option but selecting the ChordPro widgets in the Preference of wxGlade as 'local widgets path' did the trick. Working! |
Ah, yes. See
|
I've just updated from dev and now with _191 I cannot open the Settings:
|
Fixed it, but I hadn't pushed the commit. Should work now. |
Build a fresh _194 on macOS and Fedora. A quick look showed me all is fine. Give me a few hours for bug-hunting and if no major things, I'll send you an ARM build. |
(started with fresh install and removed the prefs file; ChordPro build with the enhanced Dark Mode
I did get a crash one time; but I’m unable to reproduce it. It crashed on startup (once, but both on macOS and Fedora) and when opening again, all was fine again. Message in the Terminal:
All in all. Great! New config creating
Ooops, showstopper... (I will update the existing relevant docs; ignoring this issue) 'electric' actions
Learning a new expression as well... (I’ll leave the docs to others for now) SongbookBriefly tested it; all seems (still) fine. Tried the ’standard cover page’ as well my custom cover. (with all my excitement about the highlighted editor and inline preview I almost forgot about this great addition) Rearranging the songs works fine as well. All good! Minor thing, the ‘dialog’ when creating the Preview does jump in width. It showing full path while scanning its files at start or so... No big deal. Creating new songs
Settings
Dialogs
So...Almost good to go! It is just the ‘created new config’ that I see as a showstopper; especially because that is the door to the real power of ChordPro’s gorgeous PDF creation. |
Probably when you switched theme at the system level while chordpro was running. Fixed.
Done. The only reason why it was editable was to be able to create a new config.
It wrote the wrong config. Fixed.
Standard behaviour, unfortunately.
Cute. It is not modified but still you want a save dialog. Fixed. Fixes are in 6.060_199. |
The longer I think about it (and the more I use it) I think the songbook builder should be the central starting point. 'Getting Started' could be something similar to
Feels natural to me. |
I like this idea very much! The current I can split it into separate pages, so we get:
Don’t really know where to put ‘Legacy ASCII input format` yet. Is it really legacy? Maybe for ChordPro (I don’t know) but it is a common format. See ultimate-guitar for example. It is just ‘Chords over Lyrics’ notation. So, I think just create a separate page for it and take it from there... No time today but tomorrow I can just ‘move stuff’ around and give the Then some for you: It is not obvious in the Songbook GUI that you can double-click a song to edit it and can come back to the songbook. A nice ‘notification’ (like for the custom library) when starting a new songbook that you can ‘double-click’ it to edit it and can come back. Simple but effective; the GUI should be self-explanatory. |
I think you mostly nailed it by describing it as ‘Chords over Lyrics’ notation. It is important that users recognize the format and know that ChordPro can deal with it. |
Suggestions to further emphasize the role of the songbook:
|
On macOS, can you visit a folder in the Finder and then 'open ChordPro here' (starting ChordPro with the folder as argument)? |
Oh yes, simple and clear. No need to make it more fancy.
Currently, no. The (On my Fedora, I can open many ChordPro windows, on macOS I cannot) Ok, I let this ChordPro is not a library utility, it is a file format. A challenge to find a balance. Lets stay focused. Leave the GUI as it for now please. PR later tomorrow... |
Well, gave it a shot to focus more on the songbook. Writing documentation is not my strongest point but I think it is already better like this... |
Great. Your challenge for 2025: embed ChordPro natively in Swift ☺. Thanks a lot, I'll take over from here. |
Nah, my first challenge concerning ChordPro for 2025 is get the dndwrapper as it should be. So that means I have to get my hands dirty on Then I want to have more easy config stuff into wxChordPro, together with some more fancy build-in templates. This not just by suggestions but with PR’s. That is why I back-ported ChordProMac to Chord Provider. My playground. Meanwhile I keep playing with my ’structured’ parsing and ‘document cleaning’ but that is very opinionated stuff and maybe for another day. So enough to learn and contribute again next year! When you need |
Maybe a bit too cheesy ☺ |
LOL! |
I've branched R6.070.RC1 for prerelease. Can you check it out and make an ARM image? |
I’ve downloaded the source from the pre-release page and build an ARM version; so it should exactly be the same. Tested the install on a ‘clean’ macOS VM and all seems to work fine; including the installation script. I mailed you a link. |
Ok, completely useless and just eye-candy, but I like to port the macOS Finder ‘Thumbnail Creation’ that is part of my Chord Provider to ChordPro. Because why not? It is just looking into the document for a var extensionBadge = "ChordPro"
let title = /{title(.+?)}/
if let result = try? title.firstMatch(in: fileContents) {
extensionBadge = String(result.1).replacingOccurrences(of: ":", with: "").trimmingCharacters(in: .whitespaces)
} The I’ve updated my README to make my intensions clear. Chord Provider is my hobby project for almost 5 years but I’m devoted to the official implementation. |
I've branched R6.070.RC2 for prerelease. Can you check it out (or use the tar.gz from the release page) and make an ARM image? |
Link in your mail! (we have to improve this workflow ☺ ) |
The biggest philosophical difference between ChordPro and my Chord Provider is that my implementation is a I would like an existing file to be opened in a My workflow:
(to be discussed for a next release ☺) |
No description provided.
The text was updated successfully, but these errors were encountered: