• R/O
  • SSH
  • HTTPS

asom: Commit


Commit MetaInfo

Revision3 (tree)
Time2007-11-01 18:29:59
Authoryaggy

Log Message

実行用のやつを作成

Change Summary

Incremental Difference

--- experiment/exec/asom.bat (nonexistent)
+++ experiment/exec/asom.bat (revision 3)
@@ -0,0 +1,6 @@
1+set JAVA_HOME="C:\Program Files\Java\jre1.5.0_07"
2+set PATH=%JAVA_HOME%\bin:%PATH%
3+
4+java -cp lib/asom.jar com.momiage.app.asom.main.ASOMLauncher %1
5+
6+pause
--- experiment/exec/asom.sh (nonexistent)
+++ experiment/exec/asom.sh (revision 3)
@@ -0,0 +1,10 @@
1+#!/bin/sh
2+
3+JAVA_HOME=/usr/local/java
4+export JAVA_HOME
5+
6+PATH=${JAVA_HOME}/bin;${PATH}
7+export PATH
8+
9+java -cp lib/asom.jar com.momiage.app.asom.main.ASOMLauncher ${1}
10+
--- experiment/src/com/momiage/app/asom/gui/SourceChaserFrame.java (revision 2)
+++ experiment/src/com/momiage/app/asom/gui/SourceChaserFrame.java (revision 3)
@@ -35,7 +35,7 @@
3535 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
3636 setSize(500, 400);
3737 setContentPane(getJContentPane());
38- setTitle("Application");
38+ setTitle("a source of music");
3939 }
4040
4141 private JPanel getJContentPane() {
@@ -82,7 +82,7 @@
8282 if (jButton == null) {
8383 jButton = new JButton();
8484 jButton.setName("jButton");
85- jButton.setText("jButton");
85+ jButton.setText("PLAY A SOURCE OF MUSIC!");
8686 jButton.addActionListener(this);
8787 }
8888 return jButton;
@@ -98,8 +98,6 @@
9898 }
9999
100100 public void run() {
101- System.out.println("TEST!");
102- System.out.println("TEST!");
103101 int i = 0;
104102 while (i < jTextPane.getText().length()) {
105103 jTextPane.requestFocus();
--- experiment/src/com/momiage/app/asom/main/ASOMLauncher.java (nonexistent)
+++ experiment/src/com/momiage/app/asom/main/ASOMLauncher.java (revision 3)
@@ -0,0 +1,55 @@
1+package com.momiage.app.asom.main;
2+
3+import java.io.File;
4+import java.util.List;
5+
6+import javax.swing.SwingUtilities;
7+
8+import com.momiage.app.asom.gui.SourceChaserFrame;
9+import com.momiage.app.asom.logic.MusicCreator;
10+import com.momiage.app.asom.logic.SourceInfo;
11+import com.momiage.app.asom.logic.SourceInfoReader;
12+import com.momiage.app.asom.logic.SourceTrackInfo;
13+
14+public class ASOMLauncher {
15+
16+ public static String source = "";
17+ public static String midifile = "";
18+
19+ private static final String asomVersion = "a source of music Version 0.0.1";
20+
21+ public static void main(String[] args) throws Exception {
22+
23+ if (1 != args.length) {
24+ System.err.println("usage: java -cp lib/asom.jar com.momiage.app.asom.main.ASOMLauncher SOURCEFILE");
25+ System.exit(-1);
26+ }
27+
28+ if ("-version".equals(args[0])) {
29+ System.out.println(asomVersion);
30+ System.exit(0);
31+ }
32+
33+ source = args[0];
34+ midifile = source + ".mid";
35+
36+ SwingUtilities.invokeLater(new Runnable() {
37+ public void run() {
38+ SourceInfo si;
39+ List<SourceTrackInfo> lsti;
40+ try {
41+ si = SourceInfoReader.readSource(new File(source));
42+ lsti = MusicCreator.create(si, new File(
43+ midifile));
44+ SourceChaserFrame scf = new SourceChaserFrame(si,
45+ lsti);
46+ scf.setVisible(true);
47+ }
48+ catch (Exception e) {
49+ e.printStackTrace();
50+ }
51+ }
52+ });
53+
54+ }
55+}
--- experiment/build.xml (nonexistent)
+++ experiment/build.xml (revision 3)
@@ -0,0 +1,35 @@
1+<?xml version="1.0" encoding="UTF-8" ?>
2+
3+<project default="dist">
4+
5+ <property name="src.dir" value="src" />
6+ <property name="output.dir" value="exec/lib" />
7+ <property name="classes.dir" value="bin" />
8+
9+ <target name="clean">
10+ <delete dir="${classes.dir}" />
11+ <delete dir="${output.dir}" />
12+ <mkdir dir="${classes.dir}" />
13+ <mkdir dir="${output.dir}" />
14+ </target>
15+
16+ <target name="compile" depends="clean">
17+
18+ <javac srcdir="${src.dir}"
19+ destdir="${classes.dir}"
20+ encoding="MS932"
21+ debug="on"
22+ debuglevel="lines"
23+ />
24+
25+
26+ </target>
27+
28+ <target name="dist" depends="compile">
29+
30+ <jar destfile="${output.dir}/asom.jar"
31+ basedir="${classes.dir}" index="true"/>
32+
33+ </target>
34+
35+</project>
Show on old repository browser