OSDN Git Service

1.22raのバグフィクス
authoryuki <yuki@c066991c-cf13-ec4a-a49a-846e61667af5>
Wed, 2 Dec 2009 05:43:00 +0000 (05:43 +0000)
committeryuki <yuki@c066991c-cf13-ec4a-a49a-846e61667af5>
Wed, 2 Dec 2009 05:43:00 +0000 (05:43 +0000)
git-svn-id: http://192.168.11.7/svn/saccubus/trunk@28 c066991c-cf13-ec4a-a49a-846e61667af5

frontend/nbproject/build-impl.xml
frontend/nbproject/genfiles.properties
frontend/nbproject/project.properties
frontend/src/saccubus/Converter.java
frontend/src/saccubus/util/Cws2Fws.java [deleted file]
frontend/src/yukihane/swf/Cws2Fws.java [new file with mode: 0644]

index 615a98a..2a200f7 100644 (file)
@@ -20,6 +20,13 @@ is divided into following sections:
 \r
         -->\r
 <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="saccubus_frontend-impl">\r
+    <fail message="Please build using Ant 1.7.1 or higher.">\r
+        <condition>\r
+            <not>\r
+                <antversion atleast="1.7.1"/>\r
+            </not>\r
+        </condition>\r
+    </fail>\r
     <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>\r
     <!-- \r
                 ======================\r
@@ -48,21 +55,52 @@ is divided into following sections:
     </target>\r
     <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">\r
         <available file="${manifest.file}" property="manifest.available"/>\r
-        <condition property="manifest.available+main.class">\r
+        <condition property="main.class.available">\r
             <and>\r
-                <isset property="manifest.available"/>\r
                 <isset property="main.class"/>\r
                 <not>\r
                     <equals arg1="${main.class}" arg2="" trim="true"/>\r
                 </not>\r
             </and>\r
         </condition>\r
+        <condition property="manifest.available+main.class">\r
+            <and>\r
+                <isset property="manifest.available"/>\r
+                <isset property="main.class.available"/>\r
+            </and>\r
+        </condition>\r
+        <condition property="do.mkdist">\r
+            <and>\r
+                <isset property="libs.CopyLibs.classpath"/>\r
+                <not>\r
+                    <istrue value="${mkdist.disabled}"/>\r
+                </not>\r
+            </and>\r
+        </condition>\r
         <condition property="manifest.available+main.class+mkdist.available">\r
             <and>\r
                 <istrue value="${manifest.available+main.class}"/>\r
-                <isset property="libs.CopyLibs.classpath"/>\r
+                <isset property="do.mkdist"/>\r
             </and>\r
         </condition>\r
+        <condition property="manifest.available+mkdist.available">\r
+            <and>\r
+                <istrue value="${manifest.available}"/>\r
+                <isset property="do.mkdist"/>\r
+            </and>\r
+        </condition>\r
+        <condition property="manifest.available-mkdist.available">\r
+            <or>\r
+                <istrue value="${manifest.available}"/>\r
+                <isset property="do.mkdist"/>\r
+            </or>\r
+        </condition>\r
+        <condition property="manifest.available+main.class-mkdist.available">\r
+            <or>\r
+                <istrue value="${manifest.available+main.class}"/>\r
+                <isset property="do.mkdist"/>\r
+            </or>\r
+        </condition>\r
         <condition property="have.tests">\r
             <or>\r
                 <available file="${test.src.dir}"/>\r
@@ -97,6 +135,7 @@ is divided into following sections:
         <property name="javadoc.preview" value="true"/>\r
         <property name="application.args" value=""/>\r
         <property name="source.encoding" value="${file.encoding}"/>\r
+        <property name="runtime.encoding" value="${source.encoding}"/>\r
         <condition property="javadoc.encoding.used" value="${javadoc.encoding}">\r
             <and>\r
                 <isset property="javadoc.encoding"/>\r
@@ -112,11 +151,9 @@ is divided into following sections:
         <condition property="do.depend.true">\r
             <istrue value="${do.depend}"/>\r
         </condition>\r
-        <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">\r
-            <and>\r
-                <isset property="jaxws.endorsed.dir"/>\r
-                <available file="nbproject/jaxws-build.xml"/>\r
-            </and>\r
+        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>\r
+        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">\r
+            <length length="0" string="${endorsed.classpath}" when="greater"/>\r
         </condition>\r
     </target>\r
     <target name="-post-init">\r
@@ -152,14 +189,23 @@ is divided into following sections:
             <attribute default="${includes}" name="includes"/>\r
             <attribute default="${excludes}" name="excludes"/>\r
             <attribute default="${javac.debug}" name="debug"/>\r
-            <attribute default="/does/not/exist" name="sourcepath"/>\r
+            <attribute default="${empty.dir}" name="sourcepath"/>\r
+            <attribute default="${empty.dir}" name="gensrcdir"/>\r
             <element name="customize" optional="true"/>\r
             <sequential>\r
+                <property location="${build.dir}/empty" name="empty.dir"/>\r
+                <mkdir dir="${empty.dir}"/>\r
                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">\r
+                    <src>\r
+                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">\r
+                            <include name="*"/>\r
+                        </dirset>\r
+                    </src>\r
                     <classpath>\r
                         <path path="@{classpath}"/>\r
                     </classpath>\r
-                    <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>\r
+                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>\r
+                    <compilerarg line="${javac.compilerargs}"/>\r
                     <customize/>\r
                 </javac>\r
             </sequential>\r
@@ -213,6 +259,7 @@ is divided into following sections:
                     </syspropertyset>\r
                     <formatter type="brief" usefile="false"/>\r
                     <formatter type="xml"/>\r
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
                     <jvmarg line="${run.jvmargs}"/>\r
                 </junit>\r
             </sequential>\r
@@ -269,8 +316,11 @@ is divided into following sections:
             <element name="customize" optional="true"/>\r
             <sequential>\r
                 <java classname="@{classname}" dir="${work.dir}" fork="true">\r
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
                     <jvmarg line="${debug-args-line}"/>\r
                     <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>\r
+                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>\r
+                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>\r
                     <jvmarg line="${run.jvmargs}"/>\r
                     <classpath>\r
                         <path path="@{classpath}"/>\r
@@ -287,12 +337,16 @@ is divided into following sections:
     <target name="-init-macrodef-java">\r
         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">\r
             <attribute default="${main.class}" name="classname"/>\r
+            <attribute default="${run.classpath}" name="classpath"/>\r
             <element name="customize" optional="true"/>\r
             <sequential>\r
                 <java classname="@{classname}" dir="${work.dir}" fork="true">\r
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
+                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>\r
+                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>\r
                     <jvmarg line="${run.jvmargs}"/>\r
                     <classpath>\r
-                        <path path="${run.classpath}"/>\r
+                        <path path="@{classpath}"/>\r
                     </classpath>\r
                     <syspropertyset>\r
                         <propertyref prefix="run-sys-prop."/>\r
@@ -316,7 +370,23 @@ is divided into following sections:
                 COMPILATION SECTION\r
                 ===================\r
             -->\r
-    <target depends="init" name="deps-jar" unless="no.deps"/>\r
+    <target name="-deps-jar-init" unless="built-jar.properties">\r
+        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>\r
+        <delete file="${built-jar.properties}" quiet="true"/>\r
+    </target>\r
+    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">\r
+        <mkdir dir="${build.dir}"/>\r
+        <touch file="${built-jar.properties}" verbose="false"/>\r
+        <property file="${built-jar.properties}" prefix="already.built.jar."/>\r
+        <fail message="Cycle detected: saccubus_frontend was already built">\r
+            <condition>\r
+                <isset property="already.built.jar.${basedir}"/>\r
+            </condition>\r
+        </fail>\r
+        <propertyfile file="${built-jar.properties}">\r
+            <entry key="${basedir}" value=""/>\r
+        </propertyfile>\r
+    </target>\r
     <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>\r
     <target depends="init" name="-check-automatic-build">\r
         <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>\r
@@ -332,10 +402,15 @@ is divided into following sections:
         <!-- You can override this target in the ../build.xml file. -->\r
     </target>\r
     <target if="do.depend.true" name="-compile-depend">\r
-        <j2seproject3:depend/>\r
+        <pathconvert property="build.generated.subdirs">\r
+            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
+                <include name="*"/>\r
+            </dirset>\r
+        </pathconvert>\r
+        <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>\r
     </target>\r
     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">\r
-        <j2seproject3:javac/>\r
+        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>\r
         <copy todir="${build.classes.dir}">\r
             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
         </copy>\r
@@ -352,7 +427,7 @@ is divided into following sections:
     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">\r
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>\r
         <j2seproject3:force-recompile/>\r
-        <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>\r
+        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>\r
     </target>\r
     <target name="-post-compile-single">\r
         <!-- Empty placeholder for easier customization. -->\r
@@ -372,10 +447,10 @@ is divided into following sections:
         <!-- Empty placeholder for easier customization. -->\r
         <!-- You can override this target in the ../build.xml file. -->\r
     </target>\r
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">\r
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">\r
         <j2seproject1:jar/>\r
     </target>\r
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">\r
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">\r
         <j2seproject1:jar manifest="${manifest.file}"/>\r
     </target>\r
     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">\r
@@ -418,11 +493,53 @@ is divided into following sections:
         <property location="${dist.jar}" name="dist.jar.resolved"/>\r
         <echo>java -jar "${dist.jar.resolved}"</echo>\r
     </target>\r
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">\r
+        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
+        <pathconvert property="run.classpath.without.build.classes.dir">\r
+            <path path="${run.classpath}"/>\r
+            <map from="${build.classes.dir.resolved}" to=""/>\r
+        </pathconvert>\r
+        <pathconvert pathsep=" " property="jar.classpath">\r
+            <path path="${run.classpath.without.build.classes.dir}"/>\r
+            <chainedmapper>\r
+                <flattenmapper/>\r
+                <globmapper from="*" to="lib/*"/>\r
+            </chainedmapper>\r
+        </pathconvert>\r
+        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>\r
+        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">\r
+            <fileset dir="${build.classes.dir}"/>\r
+            <manifest>\r
+                <attribute name="Class-Path" value="${jar.classpath}"/>\r
+            </manifest>\r
+        </copylibs>\r
+    </target>\r
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">\r
+        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
+        <pathconvert property="run.classpath.without.build.classes.dir">\r
+            <path path="${run.classpath}"/>\r
+            <map from="${build.classes.dir.resolved}" to=""/>\r
+        </pathconvert>\r
+        <pathconvert pathsep=" " property="jar.classpath">\r
+            <path path="${run.classpath.without.build.classes.dir}"/>\r
+            <chainedmapper>\r
+                <flattenmapper/>\r
+                <globmapper from="*" to="lib/*"/>\r
+            </chainedmapper>\r
+        </pathconvert>\r
+        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>\r
+        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">\r
+            <fileset dir="${build.classes.dir}"/>\r
+            <manifest>\r
+                <attribute name="Class-Path" value="${jar.classpath}"/>\r
+            </manifest>\r
+        </copylibs>\r
+    </target>\r
     <target name="-post-jar">\r
         <!-- Empty placeholder for easier customization. -->\r
         <!-- You can override this target in the ../build.xml file. -->\r
     </target>\r
-    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>\r
+    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>\r
     <!--\r
                 =================\r
                 EXECUTION SECTION\r
@@ -442,6 +559,10 @@ is divided into following sections:
         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
         <j2seproject1:java classname="${run.class}"/>\r
     </target>\r
+    <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">\r
+        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
+        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>\r
+    </target>\r
     <!--\r
                 =================\r
                 DEBUGGING SECTION\r
@@ -450,6 +571,9 @@ is divided into following sections:
     <target depends="init" if="netbeans.home" name="-debug-start-debugger">\r
         <j2seproject1:nbjpdastart name="${debug.class}"/>\r
     </target>\r
+    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">\r
+        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>\r
+    </target>\r
     <target depends="init,compile" name="-debug-start-debuggee">\r
         <j2seproject3:debug>\r
             <customize>\r
@@ -467,6 +591,11 @@ is divided into following sections:
         <j2seproject3:debug classname="${debug.class}"/>\r
     </target>\r
     <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>\r
+    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">\r
+        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>\r
+        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>\r
+    </target>\r
+    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>\r
     <target depends="init" name="-pre-debug-fix">\r
         <fail unless="fix.includes">Must set fix.includes</fail>\r
         <property name="javac.includes" value="${fix.includes}.java"/>\r
@@ -489,6 +618,9 @@ is divided into following sections:
             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">\r
                 <filename name="**/*.java"/>\r
             </fileset>\r
+            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
+                <include name="**/*.java"/>\r
+            </fileset>\r
         </javadoc>\r
     </target>\r
     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">\r
@@ -550,7 +682,7 @@ is divided into following sections:
         <j2seproject3:junit testincludes="**/*Test.java"/>\r
     </target>\r
     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">\r
-        <fail if="tests.failed">Some tests failed; see details above.</fail>\r
+        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>\r
     </target>\r
     <target depends="init" if="have.tests" name="test-report"/>\r
     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>\r
@@ -563,7 +695,7 @@ is divided into following sections:
         <j2seproject3:junit excludes="" includes="${test.includes}"/>\r
     </target>\r
     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">\r
-        <fail if="tests.failed">Some tests failed; see details above.</fail>\r
+        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>\r
     </target>\r
     <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>\r
     <!--\r
@@ -629,7 +761,23 @@ is divided into following sections:
                 CLEANUP SECTION\r
                 ===============\r
             -->\r
-    <target depends="init" name="deps-clean" unless="no.deps"/>\r
+    <target name="-deps-clean-init" unless="built-clean.properties">\r
+        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>\r
+        <delete file="${built-clean.properties}" quiet="true"/>\r
+    </target>\r
+    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">\r
+        <mkdir dir="${build.dir}"/>\r
+        <touch file="${built-clean.properties}" verbose="false"/>\r
+        <property file="${built-clean.properties}" prefix="already.built.clean."/>\r
+        <fail message="Cycle detected: saccubus_frontend was already built">\r
+            <condition>\r
+                <isset property="already.built.clean.${basedir}"/>\r
+            </condition>\r
+        </fail>\r
+        <propertyfile file="${built-clean.properties}">\r
+            <entry key="${basedir}" value=""/>\r
+        </propertyfile>\r
+    </target>\r
     <target depends="init" name="-do-clean">\r
         <delete dir="${build.dir}"/>\r
         <delete dir="${dist.dir}"/>\r
@@ -639,4 +787,20 @@ is divided into following sections:
         <!-- You can override this target in the ../build.xml file. -->\r
     </target>\r
     <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>\r
+    <target name="-check-call-dep">\r
+        <property file="${call.built.properties}" prefix="already.built."/>\r
+        <condition property="should.call.dep">\r
+            <not>\r
+                <isset property="already.built.${call.subproject}"/>\r
+            </not>\r
+        </condition>\r
+    </target>\r
+    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">\r
+        <ant antfile="${call.script}" inheritall="false" target="${call.target}">\r
+            <propertyset>\r
+                <propertyref prefix="transfer."/>\r
+                <mapper from="transfer.*" to="*" type="glob"/>\r
+            </propertyset>\r
+        </ant>\r
+    </target>\r
 </project>\r
index f357634..88be93a 100644 (file)
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=958a1d3e
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.\r
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.\r
 nbproject/build-impl.xml.data.CRC32=acca94f7\r
-nbproject/build-impl.xml.script.CRC32=fb1d8295\r
-nbproject/build-impl.xml.stylesheet.CRC32=65b8de21\r
+nbproject/build-impl.xml.script.CRC32=2105e08c\r
+nbproject/build-impl.xml.stylesheet.CRC32=1022abd3@1.30.1.45\r
index e159a18..2c4abe3 100644 (file)
@@ -1,10 +1,11 @@
-application.title=saccubus_frontend\r
+application.title=Saccubus\r
 application.vendor=yuki\r
 build.classes.dir=${build.dir}/classes\r
 build.classes.excludes=**/*.java,**/*.form\r
 # This directory is removed when the project is cleaned:\r
 build.dir=build\r
 build.generated.dir=${build.dir}/generated\r
+build.generated.sources.dir=${build.dir}/generated-sources\r
 # Only compile against the classpath explicitly listed here:\r
 build.sysclasspath=ignore\r
 build.test.classes.dir=${build.dir}/test/classes\r
@@ -19,6 +20,7 @@ debug.test.classpath=\
 dist.dir=dist\r
 dist.jar=${dist.dir}/saccubus_frontend.jar\r
 dist.javadoc.dir=${dist.dir}/javadoc\r
+endorsed.classpath=\r
 excludes=\r
 includes=**\r
 jar.compress=false\r
@@ -43,6 +45,11 @@ javadoc.splitindex=true
 javadoc.use=true\r
 javadoc.version=false\r
 javadoc.windowtitle=\r
+jnlp.codebase.type=local\r
+jnlp.descriptor=application\r
+jnlp.enabled=false\r
+jnlp.offline-allowed=false\r
+jnlp.signed=false\r
 main.class=saccubus.Saccubus\r
 manifest.file=manifest.mf\r
 meta.inf.dir=${src.dir}/META-INF\r
index c4906dd..48163f0 100644 (file)
@@ -7,7 +7,7 @@ import java.io.*;
 import saccubus.conv.ConvertToVideoHook;
 import java.net.URLEncoder;
 import java.util.Properties;
-import saccubus.util.Cws2Fws;
+import yukihane.swf.Cws2Fws;
 
 /**
  * <p>\83^\83C\83g\83\8b\82³\82«\82ã\82Î\82·</p>
@@ -328,7 +328,7 @@ public class Converter extends Thread {
        private static final int CODE_CONVERTING_ABORTED = 100;
 
        private int converting_video(String vhook_path) {
-               File fwsFile = Cws2Fws.createFws(VideoFile);
+        File fwsFile = Cws2Fws.createFws(VideoFile, new File("fws_tmp.swf"));
 
                StringBuffer sb = new StringBuffer();
                sb.append("\"");
diff --git a/frontend/src/saccubus/util/Cws2Fws.java b/frontend/src/saccubus/util/Cws2Fws.java
deleted file mode 100644 (file)
index 01e9980..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-package saccubus.util;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.zip.InflaterInputStream;
-
-/**
- *
- * @author yuki
- */
-public class Cws2Fws {
-
-       private static final String CWS = "CWS";
-       private static final String FWS = "FWS";
-
-       /**
-        * \88³\8fkSWF\82©\82Ç\82¤\82©\94»\92è\82·\82é.
-        * @param file \94»\92è\91Î\8fÛ.
-        * @return \88³\8fkSWF\82Å\82 \82ê\82Îtrue.
-        */
-       public static boolean isCws(File file) {
-               BufferedInputStream bis = null;
-               try {
-                       bis = new BufferedInputStream(new FileInputStream(file));
-                       byte header[] = new byte[CWS.length()];
-                       bis.read(header, 0, header.length);
-                       if (CWS.equals(new String(header))) {
-                               return true;
-                       }
-               } catch (IOException ex) {
-                       Logger.getLogger(Cws2Fws.class.getName()).log(Level.SEVERE, null, ex);
-               } finally {
-                       if (bis != null) {
-                               try {
-                                       bis.close();
-                               } catch (IOException ex) {
-                                       Logger.getLogger(Cws2Fws.class.getName()).log(Level.SEVERE, null, ex);
-                               }
-                       }
-               }
-               return false;
-       }
-
-       /**
-        * \88³\8fkSWF\82ð\93W\8aJ\82·\82é.
-        * @param in \93W\8aJ\91Î\8fÛ.
-        * @return \93W\8aJ\8cã\82Ì\83t\83@\83C\83\8b\91Î\8fÛ\82ª\88³\8fkSWF\82Å\82È\82¯\82ê\82Înull.
-        */
-       public static File createFws(File in) {
-               if (!isCws(in)) {
-                       return null;
-               }
-               File out = new File("fws_tmp.swf");
-               BufferedInputStream bis = null;
-               BufferedOutputStream bos = null;
-               try {
-                       byte buffer[] = new byte[1024];
-                       bis = new BufferedInputStream(new FileInputStream(in));
-                       bis.read(buffer, 0, CWS.length()); // CWS
-                       bis.read(buffer, 0, 5); // \82»\82Ì\91¼\83w\83b\83_
-
-                       bos = new BufferedOutputStream(new FileOutputStream(out));
-                       bos.write(FWS.getBytes());
-                       bos.write(buffer);
-
-                       InflaterInputStream iis = new InflaterInputStream(bis);
-                       while (true) {
-                               int res = iis.read(buffer);
-                               if (res < 0) {
-                                       break;
-                               }
-                               bos.write(buffer, 0, res);
-                       }
-                       return out;
-               } catch (IOException ex) {
-                       Logger.getLogger(Cws2Fws.class.getName()).log(Level.SEVERE, null, ex);
-               } finally {
-                       if (bis != null) {
-                               try {
-                                       bis.close();
-                               } catch (IOException ex) {
-                                       Logger.getLogger(Cws2Fws.class.getName()).log(Level.SEVERE, null, ex);
-                               }
-                       }
-                       if (bos != null) {
-                               try {
-                                       bos.close();
-                               } catch (IOException ex) {
-                                       Logger.getLogger(Cws2Fws.class.getName()).log(Level.SEVERE, null, ex);
-                               }
-                       }
-               }
-               return null;
-       }
-}
diff --git a/frontend/src/yukihane/swf/Cws2Fws.java b/frontend/src/yukihane/swf/Cws2Fws.java
new file mode 100644 (file)
index 0000000..0bc3ad4
--- /dev/null
@@ -0,0 +1,97 @@
+/** $Id$ */
+package yukihane.swf;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.zip.InflaterInputStream;
+
+public class Cws2Fws {
+
+    private static final String CWS = "CWS";
+    private static final String FWS = "FWS";
+
+    /**
+     * \88³\8fkSWF\82©\82Ç\82¤\82©\94»\92è\82·\82é.
+     * @param file \94»\92è\91Î\8fÛ.
+     * @return \88³\8fkSWF\82Å\82 \82ê\82Îtrue.
+     */
+    public static boolean isCws(File file) {
+        BufferedInputStream bis = null;
+        try {
+            bis = new BufferedInputStream(new FileInputStream(file));
+            byte header[] = new byte[CWS.length()];
+            bis.read(header, 0, header.length);
+            if (CWS.equals(new String(header))) {
+                return true;
+            }
+        } catch (IOException ex) {
+            Logger.getLogger(Cws2Fws.class.getName()).log(Level.SEVERE, null, ex);
+        } finally {
+            if (bis != null) {
+                try {
+                    bis.close();
+                } catch (IOException ex) {
+                    Logger.getLogger(Cws2Fws.class.getName()).log(Level.SEVERE, null, ex);
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * \88³\8fkSWF\82ð\93W\8aJ\82·\82é.
+     * @param in \93W\8aJ\91Î\8fÛ.
+     * @return \93W\8aJ\8cã\82Ì\83t\83@\83C\83\8b\91Î\8fÛ\82ª\88³\8fkSWF\82Å\82È\82¯\82ê\82Înull.
+     */
+    public static File createFws(File in, File out) {
+        if (!isCws(in)) {
+            return null;
+        }
+        BufferedInputStream bis = null;
+        BufferedOutputStream bos = null;
+        try {
+            byte buffer[] = new byte[1024];
+            bis = new BufferedInputStream(new FileInputStream(in));
+            bis.read(buffer, 0, CWS.length()); // CWS
+            bis.read(buffer, 0, 5); // \82»\82Ì\91¼\83w\83b\83_
+
+            bos = new BufferedOutputStream(new FileOutputStream(out));
+            bos.write(FWS.getBytes());
+            bos.write(buffer, 0, 5);
+
+            InflaterInputStream iis = new InflaterInputStream(bis);
+            while (true) {
+                int res = iis.read(buffer);
+                if (res < 0) {
+                    break;
+                }
+                bos.write(buffer, 0, res);
+            }
+            return out;
+        } catch (IOException ex) {
+            Logger.getLogger(Cws2Fws.class.getName()).log(Level.SEVERE, null, ex);
+        } finally {
+            if (bis != null) {
+                try {
+                    bis.close();
+                } catch (IOException ex) {
+                    Logger.getLogger(Cws2Fws.class.getName()).log(Level.SEVERE, null, ex);
+                }
+            }
+            if (bos != null) {
+                try {
+                    bos.close();
+                } catch (IOException ex) {
+                    Logger.getLogger(Cws2Fws.class.getName()).log(Level.SEVERE, null, ex);
+                }
+            }
+        }
+        return null;
+    }
+}