Skip to content
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

Distribution archives should include all required resources #9

Closed
maximumspatium opened this issue Apr 18, 2017 · 6 comments
Closed
Labels

Comments

@maximumspatium
Copy link
Contributor

maximumspatium commented Apr 18, 2017

Running gradle build will produce two distribution archives in build/distributions. Starting the application from there won't work correctly due to missing resources, mainly from /config and /res folders. This should be fixed.

@Foolius
Copy link

Foolius commented May 5, 2017

How do the missing resources problem is shown? I can process images without any error, but the resulting xml file is empty. Is this because of the missing resources?

@semperos
Copy link

I built the app and manually created an installation directory with the contents of the zip and the config and res folders at the root. I was able to process a PDF and export it as MusicXML. The only exception I'm still seeing is:

java.lang.IllegalArgumentException: URI is not hierarchical
        at java.io.File.<init>(File.java:418)
        at org.audiveris.omr.classifier.AbstractClassifier.load(AbstractClassifier.java:313)
        at org.audiveris.omr.classifier.BasicClassifier.<init>(BasicClassifier.java:98)
        at org.audiveris.omr.classifier.BasicClassifier.getInstance(BasicClassifier.java:119)
        at org.audiveris.omr.classifier.ShapeClassifier.getInstance(ShapeClassifier.java:85)
        at org.audiveris.omr.classifier.ShapeClassifier$1.call(ShapeClassifier.java:57)
        at org.audiveris.omr.classifier.ShapeClassifier$1.call(ShapeClassifier.java:50)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

I'm not familiar enough with the code base to know how config and res are currently used, but in general, if everything in those folders is loaded from the classpath (rather than direct filesystem access), it should be relatively simple either to produce an "uberjar" with all resources needed inside it, or at least to edit the existing zip/tar archives by adding the config and res folders to them and then update their scripts to include those folders in the runtime classpath.

Assuming Audiveris can handle a few more of my PDF's, I plan to use this quite actively for getting music I have only as PDF's or scans into Lilypond via MusicXML, so @maximumspatium if you have thoughts on how you'd like this issue approached, I'm happy to write up a PR.

@zhs2472
Copy link

zhs2472 commented Jul 5, 2017

@hbitteur @semperos Could you please tell me how to resolve this bug? Without the resources it can not identify many music notations such as clef, beat and rests. Thanks very much for your help.

@hbitteur
Copy link
Contributor

hbitteur commented Jul 5, 2017

I'm working on it right now, you can expect a fix within one day or so

@zhs2472
Copy link

zhs2472 commented Jul 5, 2017

@hbitteur Thanks very much for your great work!

@hbitteur
Copy link
Contributor

hbitteur commented Jul 5, 2017

OK, this is now fixed in the release-5.0 branch, see 81bb320

Rather than waiting for official release 5.0, your can use the following command to just download the proper branch:
git clone -b release-5.0 --single-branch https://github.com/Audiveris/audiveris.git
And then build and run as usual.

Nota: it should be OK as well if you run from the expanded Audiveris.zip distribution.
Feedback welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants