Topics

Mac issue: can't open or save #mac


Tony Mann
 

I am using the new Mac binary. It was working fine, but now I cannot open or save files. When I try to do so, the file dialogs never appear, and there is no error. I restarted the computer, but no luck.

I am using macOS Catalina 10.15.6. Let me know what I can do to help debug this.


Johan Vromans
 

It looks like we hit Apple's sandboxing restrictions. See e.g. https://www.emaculation.com/forum/viewtopic.php?p=63584#p63584.

If I understand this correctly. it means that ChordPro can not use Open and Save dialogs. You still can open a document by dragging it onto the app, and save the PDF from the previewer but you cannot save the (modified) source, and not open another song.

This is very nasty, and goes way beyond my MacOS knowledge.

The only thing I can think of is to create pseudo dialogs for opening and saving. This is not fun.

Fortunately, the command line chordpro is fully functional.


Tony Mann
 

This mentions a possible solution:


But it might require patching Wx. I am looking into it.

On Oct 1, 2020, at 12:39 PM, Johan Vromans <jvromans+gio@...> wrote:

It looks like we hit Apple's sandboxing restrictions. See e.g. https://www.emaculation.com/forum/viewtopic.php?p=63584#p63584.

If I understand this correctly. it means that ChordPro can not use Open and Save dialogs. You still can open a document by dragging it onto the app, and save the PDF from the previewer but you cannot save the (modified) source, and not open another song.

This is very nasty, and goes way beyond my MacOS knowledge.

The only thing I can think of is to create pseudo dialogs for opening and saving. This is not fun.

Fortunately, the command line chordpro is fully functional.



Tony Mann
 

Johan.

There is apparently a way to disable sandboxing in a Mac App, as mentioned in this post.

You can turn off sandboxing by selecting the project item in the navigator pane, and choosing the Entitlements tab of the project editor.

In the tool you used to create the Mac binary, can you access the Entitlements document?


On Oct 1, 2020, at 12:39 PM, Johan Vromans <jvromans+gio@...> wrote:

It looks like we hit Apple's sandboxing restrictions. See e.g. https://www.emaculation.com/forum/viewtopic.php?p=63584#p63584.

If I understand this correctly. it means that ChordPro can not use Open and Save dialogs. You still can open a document by dragging it onto the app, and save the PDF from the previewer but you cannot save the (modified) source, and not open another song.

This is very nasty, and goes way beyond my MacOS knowledge.

The only thing I can think of is to create pseudo dialogs for opening and saving. This is not fun.

Fortunately, the command line chordpro is fully functional.



Tony Mann
 

Johan,

Here is latest WxWidgets Mac file dialog code. It appears they are using the correct call, per this post. Do you know which version of WxWidgets you are using in your binary?

On Oct 2, 2020, at 7:31 AM, Tony Mann via groups.io <thephatmann@...> wrote:

Johan.

There is apparently a way to disable sandboxing in a Mac App, as mentioned in this post.

You can turn off sandboxing by selecting the project item in the navigator pane, and choosing the Entitlements tab of the project editor.

In the tool you used to create the Mac binary, can you access the Entitlements document?


On Oct 1, 2020, at 12:39 PM, Johan Vromans <jvromans+gio@...> wrote:

It looks like we hit Apple's sandboxing restrictions. See e.g. https://www.emaculation.com/forum/viewtopic.php?p=63584#p63584.

If I understand this correctly. it means that ChordPro can not use Open and Save dialogs. You still can open a document by dragging it onto the app, and save the PDF from the previewer but you cannot save the (modified) source, and not open another song.

This is very nasty, and goes way beyond my MacOS knowledge.

The only thing I can think of is to create pseudo dialogs for opening and saving. This is not fun.

Fortunately, the command line chordpro is fully functional.




Johan Vromans
 

I'm currently using CitrusPerl that includes wxWidgets 3.0. For several reasons I cannot build the perl-Wx 'glue' layer so I cannot fix anything perl or wxWidgets oriented.

Likewise, I do not use Xcode to build the applications, so fiddling with entitlements is also no option. And, as I understand, this would only be temporary.

The only option as I see now is to build a real Mac app (using Swift) to function as a GUI layer around the ChordPro core. This is far beyond my Mac knowledge and, also important, far beyond what I want to know about Mac app development. Now if there were 100 enthousiast Mac users that want to run the ChordPro GUI, and some of them would be willing to actively participate in development, I would consider spending several weeks on this. But since there is seems to be only one enthousiast Mac ChordPro user -- sorry.

I welcome other options, but this is how I currently see it.


Sean Adair
 

Hi Johann & Tony,
True, I haven’t said much here lately, or tried the recent mac versions, after getting very frustrated with the CLI install (although in retrospect, I think it was a location specifying problem), as well as limited enthusiasm for a solution limited to CLI commands and carefully formatted hand edited code preferences.   I’m really just a dabbler in the mac back end, and suspected that my participation at this stage might slow you down with naive questions more than help.  I was hoping for that full success report, and to just start using it!  

A true mac app built in swift would be amazing though.  The other GUI options for chpro files are limited, and don’t approach the powerful features you are developing in the true core app.  I KNOW there are enthusiastic mac users out there and it’s a very popular platform for musicians in my opinion.  Most of them far less techy than me, lol. 

So, I want to not just endorse the effort, but volunteer to help how I can.   I played with the Swift tutorials alongside my son (also mac musician), and help a lot of people with mac issues, but my coding is super basic, even in HTML (CSS gives me headaches, touching the php for my wordpress sites gives me the hobbies) and unix commands in the shell need a dictionary open all the time.  For better or worse, that’s many of us long time mac users - we are pretty spoiled just how well things just work most of the time. 
  
Would it help if I installed your most recent version, got active with some actual production in the CLI, and tried some of my limited hacking tricks on the wx gui? 
I’ve just started getting work projects after a long time off, but I’d love to make progress on this, after years of frustration in not having a clean, configurable lyrics and chords system.  I’m so ready to take my rtf files with fiddly spacing the chords on separate line and work this way.
I’m here reading and following what I can of the progress, and pledge to participate as best I can.

Sean Adair
NYC

On Oct 2, 2020, at 11:38 AM, Johan Vromans <jvromans+gio@...> wrote:

I'm currently using CitrusPerl that includes wxWidgets 3.0. For several reasons I cannot build the perl-Wx 'glue' layer so I cannot fix anything perl or wxWidgets oriented.

Likewise, I do not use Xcode to build the applications, so fiddling with entitlements is also no option. And, as I understand, this would only be temporary.

The only option as I see now is to build a real Mac app (using Swift) to function as a GUI layer around the ChordPro core. This is far beyond my Mac knowledge and, also important, far beyond what I want to know about Mac app development. Now if there were 100 enthousiast Mac users that want to run the ChordPro GUI, and some of them would be willing to actively participate in development, I would consider spending several weeks on this. But since there is seems to be only one enthousiast Mac ChordPro user -- sorry.

I welcome other options, but this is how I currently see it.



Johan Vromans
 

An addendum to one of my earlier postings.

It is currently possible to:

  • Start ChordPro by double-clicking a ChordPro document
  • Preview the document, make changes
  • Save the final result (PDF) from the previewer
  • Save the modified document

What doesn't work but is fixable:

  • A query save dialog when ChordPro is terminated and the document is modified.

What is not possible and not fixable:

  • Save a modified document under a different name (Save As...)
  • Open another document

Despite the latter limitations I think the current ChordPro app is sufficiently usable to be useful.


Johan Vromans
 

@Sean: Thanks for chiming in.

Yes, it would definitely be helpful to get active with some actual production in the CLI and become familiar with the possibilities of the chrodpro program. You can follow the instructions in https://www.chordpro.org/chordpro/chordpro-install-on-mac-osx/ to get ChordPro CLI running.

For the GUI part I'd say forget ChordPro+Wx. The combination of Perl and Wx and MacOS is not fun. (It may be possible to get a good combination if you manage to build a Perl+Wx app with Xcode, I don't know). It seems clear that for MacOS we would need a real MacOS app, wich includes the sandboxing and signing stuff.

ChordPro consists of three tools: the core library, a command line wrapper and a GUI (Wx) wrapper. These wrappers are rather thin, they merely call the core library. It should not be that hard to write a GUI wrapper in Swift with Xcode, and then call the chordpro core as an external subroutine. The functionality of the current GUI wrapper is just opening and closing of documents, and maintain a (sub)set of preferences.

So please get going and I'll be there to help, albeit from a different timezone (CET).


Bob-TFMS
 

Hello Johan.  Allow me to add that I too have been watching in the wings because I would not be able to contribute much, and because I'm happy with the CLI.  However, I am using ChordPro on a Mac for the moment.

I may move over to use it on a linux virtual machine before too long. A virtual environment may be a solution for other users who are frustrated.  I hope that's a helpful suggestion.

<rant>
Mac is making the platform so secure that nothing will run on it...
<sarcasm>
Once they get to the point where it can't be used in any fashion, it will be totally secure.
</sarcasm>
</rant>

I appreciate the efforts you have made, and I really like ChordPro.

Bob Taylor


Johan Vromans
 

@bob As long as you use the command line version you can do everything you want. It is full functional.

@ALL Here's a new dmg with a number of MacOS specific changes to make ChordPro more useful: https://www.chordpro.org/dl/ChordPro-installer-0-977-20-1-macos-x64.dmg


Bob-TFMS
 

Thank you!

On Sat, Oct 3, 2020 at 1:06 PM Johan Vromans <jvromans+gio@...> wrote:

@bob As long as you use the command line version you can do everything you want. It is full functional.





@ALL Here's a new dmg with a number of MacOS specific changes to make ChordPro more useful:

https://www.chordpro.org/dl/ChordPro-installer-0-977-20-1-macos-x64.dmg