Re: [Denemo-devel] PNG selection export (was Re: Beginner questions (cross-staff, PNG selection export, feathered beams, batch export, Print View behaviour))

2019-08-20 Thread Lib Lists
On Mon, 19 Aug 2019 at 18:25, Richard Shann  wrote:
>
> On Sat, 2019-08-17 at 13:02 +0200, Lib Lists wrote:
> > Yes, I noticed that there are no updated builds for MacOS. Do you
> > know
> > how difficult is to build for MacOS?
> The builds that are on the Downloads page of denemo.org were made by
> Jeremiah Benham, but he doesn't have access to a Mac for testing (I
> think they were cross-built). Is it one of these that you are using?

Yes, the one I'm using is taken from here: http://www.denemo.org/downloads-page/

>
> >  Otherwise I'll give a try running
> > the Windows version with Wine / Crossover.

Just tried, it doesn't work and it doesn't look promising (just a
black window and then a crash).

>
> The Windows version is built daily (again cross-compiling on a Unix
> machine).
>
> I'm not sure how difficult it would be to build Denemo natively on a
> Mac - many years ago I used to build it natively on Windows, I guess it
> would depend on the availability of the many libraries for the Mac.

I might give it a try in few weeks.

Lib

>
> HTH
>
> Richard

___
Denemo-devel mailing list
Denemo-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] PNG selection export (was Re: Beginner questions (cross-staff, PNG selection export, feathered beams, batch export, Print View behaviour))

2019-08-19 Thread Richard Shann
On Sat, 2019-08-17 at 13:02 +0200, Lib Lists wrote:
> Yes, I noticed that there are no updated builds for MacOS. Do you
> know
> how difficult is to build for MacOS?
The builds that are on the Downloads page of denemo.org were made by
Jeremiah Benham, but he doesn't have access to a Mac for testing (I
think they were cross-built). Is it one of these that you are using?

>  Otherwise I'll give a try running
> the Windows version with Wine / Crossover.

The Windows version is built daily (again cross-compiling on a Unix
machine).

I'm not sure how difficult it would be to build Denemo natively on a
Mac - many years ago I used to build it natively on Windows, I guess it
would depend on the availability of the many libraries for the Mac.

HTH

Richard

___
Denemo-devel mailing list
Denemo-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] PNG selection export (was Re: Beginner questions (cross-staff, PNG selection export, feathered beams, batch export, Print View behaviour))

2019-08-17 Thread Lib Lists
On Sat, 17 Aug 2019 at 11:11, Richard Shann  wrote:
>
> On Fri, 2019-08-16 at 15:07 +0200, Lib Lists wrote:
> > > Once you have the echo message from the myopen.sh saying what the
> > > command it is issuing is you can then check that the file does in
> > > fact
> > > exist and is a .png image ... indeed you can simply repeat the
> > > command
> > > that myopen.sh is telling you directly on the command line to check
> > > that it is working. (Possible snags could include unusual
> > > characters in
> > > the file name(*) - some operating systems have restrictions and
> > > some
> > > characters such as spaces cause parsing problems).
> > > HTH
> > > Richard
> > > (*) so test with a file named something simple, like "junk.denemo"
> >
> >
> > Hi,
> > thanks for your help.
> > if I launch the script from the terminal it works (as in your example
> > open -a /PATH/TO/Preview mypicture.png). However, when I launch the
> > script from Denemo (I put the full path of the script in the Image
> > Viewer field) nothing happens, i.e. I don't see the echo message on
> > the terminal and the same pop-up window.
>
> As you don't have the echo message we can be pretty sure the problem is
> *not* the same as the failure to launch Safari when trying to use the
> Denemo manual - in that case Safari was launched, it just didn't expect
> a URL on the command line, expecting a file name instead (so you could
> fix that by a script that chopped the initial file:/// off).
>
> I've looked at the source code and it seems the problem is that for
> some Glib versions the success status of the typesetting is being
> inverted.
> I've fixed this now in the sources, but unfortunately I don't think
> there is any daily build for MacOS - indeed I'm not sure if anyone is
> ready, willing and able to build for MacOS - so you will need a work
> around. You may be able to get there by locating the temporary
> directory where Denemo is storing the results of typesetting. On Unix
> it is /tmp/Denemo_*
> a new one of which is created each time you start Denemo. In there you
> will find the .png files that are created (they are named
> denemoprintA.png and denemoprintB.png alternately).

Hi, thanks for your help! I'll fix the safari problem with a script.
I found the TMP folder, on a mac an easy way to find it is to look for
$TMPDIR, which is a different folder than /tmp. There I found the
Denemo folder with a denemoprintA.png picture correctly created.
Yes, I noticed that there are no updated builds for MacOS. Do you know
how difficult is to build for MacOS? Otherwise I'll give a try running
the Windows version with Wine / Crossover.

Lib

>
> HTH
>
> Richard
>
>
>
>
>
>

___
Denemo-devel mailing list
Denemo-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] PNG selection export (was Re: Beginner questions (cross-staff, PNG selection export, feathered beams, batch export, Print View behaviour))

2019-08-17 Thread Richard Shann
On Fri, 2019-08-16 at 15:07 +0200, Lib Lists wrote:
> > Once you have the echo message from the myopen.sh saying what the
> > command it is issuing is you can then check that the file does in
> > fact
> > exist and is a .png image ... indeed you can simply repeat the
> > command
> > that myopen.sh is telling you directly on the command line to check
> > that it is working. (Possible snags could include unusual
> > characters in
> > the file name(*) - some operating systems have restrictions and
> > some
> > characters such as spaces cause parsing problems).
> > HTH
> > Richard
> > (*) so test with a file named something simple, like "junk.denemo"
> 
> 
> Hi,
> thanks for your help.
> if I launch the script from the terminal it works (as in your example
> open -a /PATH/TO/Preview mypicture.png). However, when I launch the
> script from Denemo (I put the full path of the script in the Image
> Viewer field) nothing happens, i.e. I don't see the echo message on
> the terminal and the same pop-up window.

As you don't have the echo message we can be pretty sure the problem is
*not* the same as the failure to launch Safari when trying to use the
Denemo manual - in that case Safari was launched, it just didn't expect
a URL on the command line, expecting a file name instead (so you could
fix that by a script that chopped the initial file:/// off).

I've looked at the source code and it seems the problem is that for
some Glib versions the success status of the typesetting is being
inverted.
I've fixed this now in the sources, but unfortunately I don't think
there is any daily build for MacOS - indeed I'm not sure if anyone is
ready, willing and able to build for MacOS - so you will need a work
around. You may be able to get there by locating the temporary
directory where Denemo is storing the results of typesetting. On Unix
it is /tmp/Denemo_*
a new one of which is created each time you start Denemo. In there you
will find the .png files that are created (they are named
denemoprintA.png and denemoprintB.png alternately).

HTH

Richard







___
Denemo-devel mailing list
Denemo-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] PNG selection export (was Re: Beginner questions (cross-staff, PNG selection export, feathered beams, batch export, Print View behaviour))

2019-08-16 Thread Lib Lists
On Fri, 16 Aug 2019 at 10:15, Richard Shann  wrote:
>
> On Fri, 2019-08-16 at 09:47 +0200, Lib Lists wrote:
> > On Thu, 15 Aug 2019 at 12:59, Richard Shann 
> > wrote:
> > >
> > > On Tue, 2019-08-13 at 10:56 +0200, Lib Lists wrote:
> > > > > > Hi, writing in a terminal '/PATH/TO/Preview somefile.png'
> > > > > > doesn't
> > > > > > work. However, 'open -a  /PATH/TO/Preview somefile.png' works
> > > > > > as
> > > > > > well
> > > > > > as 'open somefile.png'.
> > > > >
> > > > > In that case you may be able to set the Image Viewer field to
> > > > > "open"
> > > > > without the quotes
> > > > > and it may work. (I'm hoping there is an executable named
> > > > > "open"
> > > > > that
> > > > > takes a filename as a parameter and decides what to do with it)
> > > > >
> > > >
> > > > Hi, I tried but it doesn't work, same result as before. I tried
> > > > 'open', 'open -a PATH/TO/Preview'. Here the
> > > > man page for 'open'
> > > > https://ss64.com/osx/open.html. In the preferences I also setup
> > > > an
> > > > internet browser ('PATH/TO/Safari) and I found a problem: Safari
> > > > correctly opens, but the address to the file (the help file in
> > > > this
> > > > case) is written as:
> > > > file:///file:/Applications/Denemo.app/Contents/Resources/share/de
> > > > nemo
> > > > /manual/denemo-manual.html
> > > > with the double 'file' bit at the beginning. Maybe related with
> > > > the
> > > > problem with Preview?
> > >
> > > Well, this sounds like it is not difficult to fix: Denemo is
> > > successfully launching the executable program, but the programs
> > > launched are failing to pick up and use the parameter
> > > appropriately. In
> > > the case of Safari it is taking the parameter to be a file name and
> > > prefixing file:/// to it while how the "open" thing is failing is
> > > less
> > > clear, as the man page you quote indicates that calling it with a
> > > pdf
> > > filename as parameter should work. Setting the field to 'open -a
> > > PATH/TO/Preview' would *not* work, as it would try to execute a
> > > program
> > > named 'open -a PATH/TO/Preview' which doesn't exist.
> > > So the easy fix is to create a script that calls the program you
> > > want
> > > to call with the correct parameter. On Unix you would write a file
> > > containing something like
> > >
> > > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8
> > > ><
> > > #!/bin/bash
> > >
> > > echo Opening $1 as png using the command: open -a
> > > /PATH/TO/Preview $1
> > >
> > > open -a /PATH/TO/Preview $1
> > >
> > > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8
> > > ><
> > >
> > > you would put this into a file, say myopen.sh and make it
> > > executable
> > > chmod a+x myopen.sh
> > >
> > > You could use any other scripting language to take the file name as
> > > provided by Denemo and invoke your display program.
> >
> > Hi Richard,
> > thank you, but unfortunately it didn't work. I get the same result as
> > before (pop-up saying 'Your PNG file has now been created).
>
> But the difference now is that you should get a message on the terminal
> saying
>
> Opening $1 as png using the command: open -a /PATH/TO/Preview $1
>
> where $1 is replaced by the actual parameter it is receiving.
> Indeed, as your first test, invoke myopen.sh directly from the command
> line
>
> /PATH/TO/myopen.sh mypicture.png
>
> where mypicture.png is some .png image.
>
> It should print
>
> Opening mypicture.png as png using the command: open -a /PATH/TO/Preview 
> mypicture.png
>
> (where, of course, /PATH/TO is not literal but means that you write the
> path to the appropriate executable) and proceed to display your png.
>
> Once you have an executable script that does display your png as you
> want it then I can't imagine the circumstance where the executable
> script is launched from within the Denemo process and fails (well, you
> could have an out-of-memory error ...)
>
> Once you have the echo message from the myopen.sh saying what the
> command it is issuing is you can then check that the file does in fact
> exist and is a .png image ... indeed you can simply repeat the command
> that myopen.sh is telling you directly on the command line to check
> that it is working. (Possible snags could include unusual characters in
> the file name(*) - some operating systems have restrictions and some
> characters such as spaces cause parsing problems).
> HTH
> Richard
> (*) so test with a file named something simple, like "junk.denemo"


Hi,
thanks for your help.
if I launch the script from the terminal it works (as in your example
open -a /PATH/TO/Preview mypicture.png). However, when I launch the
script from Denemo (I put the full path of the script in the Image
Viewer field) nothing happens, i.e. I don't see the echo message on
the terminal and the same pop-up window.
To double check, I'm selecting some music and then 'Export Selection as PNG'.

Lib

___
Denemo-devel 

Re: [Denemo-devel] PNG selection export (was Re: Beginner questions (cross-staff, PNG selection export, feathered beams, batch export, Print View behaviour))

2019-08-16 Thread Richard Shann
On Fri, 2019-08-16 at 09:47 +0200, Lib Lists wrote:
> On Thu, 15 Aug 2019 at 12:59, Richard Shann 
> wrote:
> > 
> > On Tue, 2019-08-13 at 10:56 +0200, Lib Lists wrote:
> > > > > Hi, writing in a terminal '/PATH/TO/Preview somefile.png'
> > > > > doesn't
> > > > > work. However, 'open -a  /PATH/TO/Preview somefile.png' works
> > > > > as
> > > > > well
> > > > > as 'open somefile.png'.
> > > > 
> > > > In that case you may be able to set the Image Viewer field to
> > > > "open"
> > > > without the quotes
> > > > and it may work. (I'm hoping there is an executable named
> > > > "open"
> > > > that
> > > > takes a filename as a parameter and decides what to do with it)
> > > > 
> > > 
> > > Hi, I tried but it doesn't work, same result as before. I tried
> > > 'open', 'open -a PATH/TO/Preview'. Here the
> > > man page for 'open'
> > > https://ss64.com/osx/open.html. In the preferences I also setup
> > > an
> > > internet browser ('PATH/TO/Safari) and I found a problem: Safari
> > > correctly opens, but the address to the file (the help file in
> > > this
> > > case) is written as:
> > > file:///file:/Applications/Denemo.app/Contents/Resources/share/de
> > > nemo
> > > /manual/denemo-manual.html
> > > with the double 'file' bit at the beginning. Maybe related with
> > > the
> > > problem with Preview?
> > 
> > Well, this sounds like it is not difficult to fix: Denemo is
> > successfully launching the executable program, but the programs
> > launched are failing to pick up and use the parameter
> > appropriately. In
> > the case of Safari it is taking the parameter to be a file name and
> > prefixing file:/// to it while how the "open" thing is failing is
> > less
> > clear, as the man page you quote indicates that calling it with a
> > pdf
> > filename as parameter should work. Setting the field to 'open -a
> > PATH/TO/Preview' would *not* work, as it would try to execute a
> > program
> > named 'open -a PATH/TO/Preview' which doesn't exist.
> > So the easy fix is to create a script that calls the program you
> > want
> > to call with the correct parameter. On Unix you would write a file
> > containing something like
> > 
> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8
> > ><
> > #!/bin/bash
> > 
> > echo Opening $1 as png using the command: open -a
> > /PATH/TO/Preview $1
> > 
> > open -a /PATH/TO/Preview $1
> > 
> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8
> > ><
> > 
> > you would put this into a file, say myopen.sh and make it
> > executable
> > chmod a+x myopen.sh
> > 
> > You could use any other scripting language to take the file name as
> > provided by Denemo and invoke your display program.
> 
> Hi Richard,
> thank you, but unfortunately it didn't work. I get the same result as
> before (pop-up saying 'Your PNG file has now been created).

But the difference now is that you should get a message on the terminal
saying

Opening $1 as png using the command: open -a /PATH/TO/Preview $1

where $1 is replaced by the actual parameter it is receiving.
Indeed, as your first test, invoke myopen.sh directly from the command
line

/PATH/TO/myopen.sh mypicture.png

where mypicture.png is some .png image.

It should print

Opening mypicture.png as png using the command: open -a /PATH/TO/Preview 
mypicture.png

(where, of course, /PATH/TO is not literal but means that you write the
path to the appropriate executable) and proceed to display your png.

Once you have an executable script that does display your png as you
want it then I can't imagine the circumstance where the executable
script is launched from within the Denemo process and fails (well, you
could have an out-of-memory error ...)

Once you have the echo message from the myopen.sh saying what the
command it is issuing is you can then check that the file does in fact
exist and is a .png image ... indeed you can simply repeat the command
that myopen.sh is telling you directly on the command line to check
that it is working. (Possible snags could include unusual characters in
the file name(*) - some operating systems have restrictions and some
characters such as spaces cause parsing problems).
HTH
Richard
(*) so test with a file named something simple, like "junk.denemo"

___
Denemo-devel mailing list
Denemo-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/denemo-devel


Re: [Denemo-devel] PNG selection export (was Re: Beginner questions (cross-staff, PNG selection export, feathered beams, batch export, Print View behaviour))

2019-08-16 Thread Lib Lists
On Thu, 15 Aug 2019 at 12:59, Richard Shann  wrote:
>
> On Tue, 2019-08-13 at 10:56 +0200, Lib Lists wrote:
> > > > Hi, writing in a terminal '/PATH/TO/Preview somefile.png' doesn't
> > > > work. However, 'open -a  /PATH/TO/Preview somefile.png' works as
> > > > well
> > > > as 'open somefile.png'.
> > >
> > > In that case you may be able to set the Image Viewer field to
> > > "open"
> > > without the quotes
> > > and it may work. (I'm hoping there is an executable named "open"
> > > that
> > > takes a filename as a parameter and decides what to do with it)
> > >
> >
> > Hi, I tried but it doesn't work, same result as before. I tried
> > 'open', 'open -a PATH/TO/Preview'. Here the
> > man page for 'open'
> > https://ss64.com/osx/open.html. In the preferences I also setup an
> > internet browser ('PATH/TO/Safari) and I found a problem: Safari
> > correctly opens, but the address to the file (the help file in this
> > case) is written as:
> > file:///file:/Applications/Denemo.app/Contents/Resources/share/denemo
> > /manual/denemo-manual.html
> > with the double 'file' bit at the beginning. Maybe related with the
> > problem with Preview?
>
> Well, this sounds like it is not difficult to fix: Denemo is
> successfully launching the executable program, but the programs
> launched are failing to pick up and use the parameter appropriately. In
> the case of Safari it is taking the parameter to be a file name and
> prefixing file:/// to it while how the "open" thing is failing is less
> clear, as the man page you quote indicates that calling it with a pdf
> filename as parameter should work. Setting the field to 'open -a
> PATH/TO/Preview' would *not* work, as it would try to execute a program
> named 'open -a PATH/TO/Preview' which doesn't exist.
> So the easy fix is to create a script that calls the program you want
> to call with the correct parameter. On Unix you would write a file
> containing something like
>
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> #!/bin/bash
>
> echo Opening $1 as png using the command: open -a /PATH/TO/Preview $1
>
> open -a /PATH/TO/Preview $1
>
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
>
> you would put this into a file, say myopen.sh and make it executable
> chmod a+x myopen.sh
>
> You could use any other scripting language to take the file name as
> provided by Denemo and invoke your display program.

Hi Richard,
thank you, but unfortunately it didn't work. I get the same result as
before (pop-up saying 'Your PNG file has now been created).

>
> However, it sounds like "open" may not behave like a normal executable
> program, and a quick search for Preview on the MacOS suggests that you
> cannot invoke it with an option to provide the filename that Preview is
> to work on - is there a man page for Preview? - so if that is really
> the case, bizarre as it seems, then you might have to write an
> AppleScript or use some more normal display program.

I'm quite sure it is possible to invoke it with a filename. In fact
'open filename' is the same as double-clicking on the file (see
attached man page for open), it'll open the file with the default
application, while 'open -a appname filename' opens filename with the
application appname.

Cheers,

Lib

>
> HTH
>
> Richard
>
>
>
>
>
>
>
>
>
>
>
>
>


open.1
Description: Binary data
___
Denemo-devel mailing list
Denemo-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/denemo-devel


[Denemo-devel] PNG selection export (was Re: Beginner questions (cross-staff, PNG selection export, feathered beams, batch export, Print View behaviour))

2019-08-15 Thread Richard Shann
On Tue, 2019-08-13 at 10:56 +0200, Lib Lists wrote:
> > > Hi, writing in a terminal '/PATH/TO/Preview somefile.png' doesn't
> > > work. However, 'open -a  /PATH/TO/Preview somefile.png' works as
> > > well
> > > as 'open somefile.png'.
> > 
> > In that case you may be able to set the Image Viewer field to
> > "open"
> > without the quotes
> > and it may work. (I'm hoping there is an executable named "open"
> > that
> > takes a filename as a parameter and decides what to do with it)
> > 
> 
> Hi, I tried but it doesn't work, same result as before. I tried
> 'open', 'open -a PATH/TO/Preview'. Here the
> man page for 'open'
> https://ss64.com/osx/open.html. In the preferences I also setup an
> internet browser ('PATH/TO/Safari) and I found a problem: Safari
> correctly opens, but the address to the file (the help file in this
> case) is written as:
> file:///file:/Applications/Denemo.app/Contents/Resources/share/denemo
> /manual/denemo-manual.html
> with the double 'file' bit at the beginning. Maybe related with the
> problem with Preview?

Well, this sounds like it is not difficult to fix: Denemo is
successfully launching the executable program, but the programs
launched are failing to pick up and use the parameter appropriately. In
the case of Safari it is taking the parameter to be a file name and
prefixing file:/// to it while how the "open" thing is failing is less
clear, as the man page you quote indicates that calling it with a pdf
filename as parameter should work. Setting the field to 'open -a
PATH/TO/Preview' would *not* work, as it would try to execute a program
named 'open -a PATH/TO/Preview' which doesn't exist.
So the easy fix is to create a script that calls the program you want
to call with the correct parameter. On Unix you would write a file
containing something like

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
#!/bin/bash

echo Opening $1 as png using the command: open -a /PATH/TO/Preview $1

open -a /PATH/TO/Preview $1

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

you would put this into a file, say myopen.sh and make it executable
chmod a+x myopen.sh

You could use any other scripting language to take the file name as
provided by Denemo and invoke your display program.

However, it sounds like "open" may not behave like a normal executable
program, and a quick search for Preview on the MacOS suggests that you
cannot invoke it with an option to provide the filename that Preview is
to work on - is there a man page for Preview? - so if that is really
the case, bizarre as it seems, then you might have to write an
AppleScript or use some more normal display program.

HTH

Richard














___
Denemo-devel mailing list
Denemo-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/denemo-devel