Package org.lilypondbeans.util

Examples of org.lilypondbeans.util.Executor


            }
            pdfFileName = out + "/" + o.getPrimaryFile().getName() + ".pdf";
            midiFileName = out + "/" + o.getPrimaryFile().getName() + ".mid";

            LILY_DIR = LilyOptions.getLilypondDir();
            Executor exe = new Executor();

            File folder = new File(LILY_DIR + "/usr/bin");
            if (!folder.exists()) {
                JOptionPane.showMessageDialog(new JFrame(), "LilyPond Directory " + LILY_DIR + "/usr/bin not found");
                return;
            }
            //  if (System.getProperty("os.name").equals("Linux")) {
            //  exe.execute("lilypond", folder, new String[]{"--pdf", "--output=" + out, lyFileName}, preRun(), postRun());
            //   } else {
            exe.execute("lilypond", folder, new String[]{"--pdf", "--output=\"" + out + "\"", "\"" + lyFileName + "\""}, preRun(), postRun());
            // }

        } catch (Exception ex) {
            ex.printStackTrace();
        }
View Full Code Here


        };
    }

    public void actionPerformed(ActionEvent e) {
        try {
            Executor exe = new Executor();
            File folder = new File(LILY_DIR + "/usr/bin");
             LILY_DIR = LilyOptions.getLilypondDir();
            exe.execute("python.exe", folder, new String[]{
                        LILY_DIR + "/usr/bin/convert-ly.py", "-e", tmpFileName}, preRun(), postRun());
        } catch (Exception ex) {
            //ex.printStackTrace();
        }
    }
View Full Code Here

        if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
            xmlFile = fileChooser.getSelectedFile().getAbsolutePath();
            lyFile = out + "/" + fileChooser.getSelectedFile().getName() + ".ly";
            try {
                Executor exe = new Executor();
                File folder = new File(LILY_DIR + "/usr/bin");
                exe.execute("python.exe", folder, new String[]{
                            LILY_DIR + "/usr/bin/musicxml2ly.py", "-o", lyFile, xmlFile}, null, postRun());
            } catch (Exception ex) {
                //ex.printStackTrace();
            }
        }
View Full Code Here

TOP

Related Classes of org.lilypondbeans.util.Executor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.