From b75fa2c258eda5f9ef19760d6886df3fb5dcb067 Mon Sep 17 00:00:00 2001 From: orz Date: Sun, 6 Nov 2016 08:20:35 +0900 Subject: [PATCH] =?UTF-8?q?1.66.1.2=20ffmpeg=20n3.2=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/saccubus/FFmpeg.java | 4 ++++ frontend/src/saccubus/MainFrame_AboutBox.java | 4 ++-- frontend/src/saccubus/Prompt.java | 1 + frontend/src/saccubus/Saccubus.java | 13 +++++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/frontend/src/saccubus/FFmpeg.java b/frontend/src/saccubus/FFmpeg.java index d5b8f77e..a2787173 100644 --- a/frontend/src/saccubus/FFmpeg.java +++ b/frontend/src/saccubus/FFmpeg.java @@ -98,6 +98,8 @@ public int exec(int abortedCode, CallbackInterface callback, Logger log) { // process = Runtime.getRuntime().exec(getCmd()); pb = new ProcessBuilder(getCmdArrayList()); pb.redirectErrorStream(true); + // add java.class.path to env PATH + pb.environment().put("PATH", Saccubus.pathenv); process = pb.start(); ebr = new BufferedReader(new InputStreamReader(process.getInputStream(), "UTF-8")); String e; @@ -206,6 +208,8 @@ public int exec(Callback callback, Logger log){ // process = Runtime.getRuntime().exec(getCmd()); pb = new ProcessBuilder(getCmdArrayList()); pb.redirectErrorStream(true); + // add java.class.path to env PATH + pb.environment().put("PATH", Saccubus.pathenv); process = pb.start(); ebr = new BufferedReader(new InputStreamReader(process.getInputStream())); String e; diff --git a/frontend/src/saccubus/MainFrame_AboutBox.java b/frontend/src/saccubus/MainFrame_AboutBox.java index 22a052e7..da880beb 100644 --- a/frontend/src/saccubus/MainFrame_AboutBox.java +++ b/frontend/src/saccubus/MainFrame_AboutBox.java @@ -52,8 +52,8 @@ public class MainFrame_AboutBox extends JDialog implements ActionListener { // String version = "ver1.22r(2008/04/27)"; - public static final String rev = "1.66.1.1"; - private static final String modefied = " (2016/10/11)"; + public static final String rev = "1.66.1.2"; + private static final String modefied = " (2016/11/06)"; String productHTML = "" + diff --git a/frontend/src/saccubus/Prompt.java b/frontend/src/saccubus/Prompt.java index 58077cec..7e5c678c 100644 --- a/frontend/src/saccubus/Prompt.java +++ b/frontend/src/saccubus/Prompt.java @@ -72,6 +72,7 @@ public class Prompt { private static Logger log; public static void main(String[] args){ + Saccubus.initEnv(); int code = 0; do { code = main1(args.clone()); diff --git a/frontend/src/saccubus/Saccubus.java b/frontend/src/saccubus/Saccubus.java index d90d8f9b..9ebe5786 100644 --- a/frontend/src/saccubus/Saccubus.java +++ b/frontend/src/saccubus/Saccubus.java @@ -1,5 +1,7 @@ package saccubus; +import java.io.File; + import javax.swing.SwingUtilities; import javax.swing.UIManager; @@ -24,6 +26,7 @@ * @version 1.0 */ public class Saccubus { + public static String pathenv; boolean packFrame = false; /** @@ -48,6 +51,15 @@ public Saccubus() { // メインフレーム表示 frame.setVisible(true); } + public static void initEnv(){ + // add java.class.path to env PATH, pathenv + String classPath = System.getProperty("java.class.path"); + pathenv = System.getProperty("java.library.path"); // getenv("PATH") + if(!pathenv.contains(classPath)){ + pathenv = classPath + File.pathSeparator + pathenv; + System.setProperty("java.library.path",pathenv); + } + } /** * アプリケーションエントリポイント。 @@ -56,6 +68,7 @@ public Saccubus() { * String[] */ public static void main(String[] args) { + initEnv(); if (args.length > 0) { Prompt.main(args); return;