えったんブログ

30過ぎてえったんってどうなのよ、と思いつつ
なんとなく続ける夫婦えったん&marchのブログ
<< ロゴ画像をフェードインしたい :: main :: smilin' >>

makeしたいんだヽ(`Д´)ノウワワン

尊敬する師匠のセイさん(?)に教えてもらったCygwin開発環境。
http://pitecan.com/ezplus/
時代は、Eclipseみたいだけどカスタマイズ楽々なのでmakefileがいいんだブアー。
JCSL1.2.2は、KToolbarは起動が遅い。Emulatorもさらに遅い。
(Emulatorはしばらく256Kのエミュ(あれも他のキャリアに比べて重くて嫌になってたんだけど3GCはさらに重い、最悪)を使ってたんだけとdrawRegion使い始めた時点でアウト。

・・・コマンドわかんないよ(´・ω・`)
いろいろ考えてとりあえずコンパイルできたmakefile↓
# アプリ名/ベンダ名
TARGET = xxx
MIDLETNAME = xxx
VENDOR = march
VER = 1.0.0
ICON = xxx

# 標準Java開発環境 (from Sun)
JDK2 = c:/j2sdk1.4.2_04/
JAVAC = $(JDK2)/bin/javac
JAVA = $(JDK2)/bin/java
JAR = $(JDK2)/bin/jar
JAVADOC = $(JDK2)/bin/javadoc
JAVADOC_FLAGS = -version -author -private -use -overview overview.html -windowtitle $(TARGET)

# Java Micro Edition Wireless Toolkit (from Sun)
J2MEWTK = c:/WTK22
PREVERIFY = $(J2MEWTK)/bin/preverify
MIDPLIB = $(J2MEWTK)/lib/midpapi20.jar;$(J2MEWTK)/lib/cldcapi11.jar

# voda用開発環境
VODALIB = c:/JSCL122_SDK101/lib/stubclasses_JSCL.zip
VODACLASSPATH = '$(MIDPLIB);$(VODALIB)'

# 補助ツール
EZTOOLDIR = ../maketool
MAKEMANIFEST = $(EZTOOLDIR)/makemanifest_voda
MANIFEST2JAD = $(EZTOOLDIR)/manifest2jad_voda
SJIS2UTF8 = $(EZTOOLDIR)/csconv.exe
PROGUARD = $(JAVA) -jar c:/java/jar/proguard.jar


# 固有情報
SRCS = xxx.java xxxCanvas.java


# all
all: src_all
cd ../src/ ; for i in $(SRCS) ; do ($(JAVAC) -encoding SJIS -g:none \
-d ../tmpclasses -bootclasspath $(VODACLASSPATH) \
-classpath '../tmpclasses;.' $$i ) done
$(MAKEMANIFEST) $(MIDLETNAME) $(VENDOR) $(VER) $(ICON) ../bin/MANIFEST.INI > ../bin/MANIFEST.MF
cd ../bin; $(SJIS2UTF8) MANIFEST.MF -SShift_JIS -F%SOURCE% -OUTF-8 -NCRLF -ROFF -Auto
$(JAR) cfm ../bin/$(TARGET)_.jar ../bin/MANIFEST.MF -C ../tmpclasses .
$(JAR) ufm ../bin/$(TARGET)_.jar ../bin/MANIFEST.MF -C ../res .
cd ../bin; $(PROGUARD) @midlets.pro -verbose -ignorewarning
cd ../work; $(JAR) xf ../bin/$(TARGET).jar
rm -rf ../temp
mkdir ../temp
$(PREVERIFY) -d ../temp -classpath $(VODACLASSPATH) ../work
$(MAKEMANIFEST) $(MIDLETNAME) $(VENDOR) $(VER) $(ICON) ../bin/MANIFEST.INI > ../bin/MANIFEST.MF
cd ../bin; $(SJIS2UTF8) MANIFEST.MF -SShift_JIS -F%SOURCE% -OUTF-8 -NCRLF -ROFF -Auto
$(JAR) cfm ../bin/$(TARGET).jar ../bin/MANIFEST.MF -C ../temp .
$(JAR) ufm ../bin/$(TARGET).jar ../bin/MANIFEST.MF -C ../res .
cd ../bin; $(MANIFEST2JAD) $(TARGET)

src_all:
rm -rf ../src
mkdir ../src
cp -f $(SRCS) ../src
rm -rf ../temp
mkdir ../temp
rm -rf ../tmpclasses
mkdir ../tmpclasses
rm -rf ../work
mkdir ../work


さらにコマンドラインでエミュレーターを・・・。
emulator.bat?
emulator.exe?
emulatorw.exe?
なんだよどれだよ!?しかも/helpは英語でクラスがどーのこーの。

ググる

CLDC+MIDP+携帯電話用Javaスレッド part 4(cache)
236 :231:2005/04/03(日) 23:04:24
C:\JSCL122_SDK101\bin\emulatorw.exe -gui -Xdescriptor:G:\Vアプリ
\project\Hello\bin\Hello.jad

ではなく

C:\JSCL122_SDK101\bin\emulator.exe -Xdescriptor:G:\Vアプリ
\project\Hello\bin\Hello.jad

ならうまく起動しました。jadファイル以前の問題だったとは・・・、
逝ってきます。


ほうほう、
・・・
C:\JSCL122_SDK101\bin\emulator.exe -Xdescriptor:xxx.jad
でできました。
marchも逝ってきます。

そういえばプロジェクトの終盤に師匠もエクリプスいいっすよ、って言ってたなぁ・・・。
それでなんですけどね・・・
c:/j2sdk1.4.2_04//bin/jar cfm ../bin/xxx.jar ../bin/MANIFEST.MF -C ../temp .
c:/j2sdk1.4.2_04//bin/jar ufm ../bin/xxx.jar ../bin/MANIFEST.MF -C ../res .
ってしたところで、ブワーーっと
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MIDlet-Name
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MIDlet-Vendor
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MIDlet-Version
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MIDlet-1
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MIDlet-Icon
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MicroEdition-Configuration
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MicroEdition-Profile
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MIDlet-Data-Size
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MIDxlet-ScreenSize
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MIDxlet-API
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MIDlet-Permissions
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MIDlet-Copyright
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MIDlet-Description
2006/02/11 15:32:14 java.util.jar.Attributes read
警告: Duplicate name in Manifest: MIDlet-Info-URL

ってでちゃうんですよ。どうしたらいいんでしょうね?

=================================================
2/23
Duplicateの警告についてはJarアーカイブするときに
1行で記せばいいことが判明↓

$(JAR) cfm ../bin/$(TARGET).jar ../bin/MANIFEST.MF -C ../temp . -C ../res .

=================================================

さらにもっとすごいのがproguardの方、

cd ../bin; c:/j2sdk1.4.2_04/bin/java -jar c:/java/jar/proguard.jar @midlets.pro
-verbose -ignorewarning
ProGuard, version 2.1
Reading jars...
Reading program jar [xxx_.jar]
Reading library jar [c:/JSCL122_SDK101/lib/stubclasses_JSCL.zip]
Reading library jar [c:/WTK22/lib/midpapi20.jar]
Note: duplicate definition of library class [java.lang.IllegalStateException]
Note: duplicate definition of library class [java.util.Timer]
Note: duplicate definition of library class [java.util.TimerTask]
Note: duplicate definition of library class [javax.microedition.io.HttpConnection]
Note: duplicate definition of library class [javax.microedition.io.PushRegistry]
Note: duplicate definition of library class [javax.microedition.io.SocketConnection]
Note: duplicate definition of library class [javax.microedition.io.ServerSocketConnection]
Note: duplicate definition of library class [javax.microedition.io.CommConnection]
Note: duplicate definition of library class [javax.microedition.io.SecurityInfo]
Note: duplicate definition of library class [javax.microedition.io.UDPDatagramConnection]
Note: duplicate definition of library class [javax.microedition.io.HttpsConnection]
Note: duplicate definition of library class [javax.microedition.io.SecureConnection]
Note: duplicate definition of library class [javax.microedition.pki.Certificate]
Note: duplicate definition of library class [javax.microedition.pki.CertificateException]
Note: duplicate definition of library class [javax.microedition.lcdui.AlertType]
Note: duplicate definition of library class [javax.microedition.lcdui.Display]
Note: duplicate definition of library class [javax.microedition.lcdui.Displayable]
Note: duplicate definition of library class [javax.microedition.lcdui.Image]
Note: duplicate definition of library class [javax.microedition.lcdui.Item]
Note: duplicate definition of library class [javax.microedition.lcdui.Command]
Note: duplicate definition of library class [javax.microedition.lcdui.CommandListener]
Note: duplicate definition of library class [javax.microedition.lcdui.Font]
Note: duplicate definition of library class [javax.microedition.lcdui.Ticker]
Note: duplicate definition of library class [javax.microedition.lcdui.Graphics]
Note: duplicate definition of library class [javax.microedition.lcdui.ItemCommandListener]
Note: duplicate definition of library class [javax.microedition.lcdui.Screen]
Note: duplicate definition of library class [javax.microedition.lcdui.Alert]
Note: duplicate definition of library class [javax.microedition.lcdui.Gauge]
Note: duplicate definition of library class [javax.microedition.lcdui.game.Sprite]
Note: duplicate definition of library class [javax.microedition.lcdui.game.Layer]
Note: duplicate definition of library class [javax.microedition.lcdui.game.TiledLayer]
Note: duplicate definition of library class [javax.microedition.lcdui.game.LayerManager]
Note: duplicate definition of library class [javax.microedition.lcdui.game.GameCanvas]
Note: duplicate definition of library class [javax.microedition.lcdui.Choice]
Note: duplicate definition of library class [javax.microedition.lcdui.ItemStateListener]
Note: duplicate definition of library class [javax.microedition.lcdui.StringItem]
Note: duplicate definition of library class [javax.microedition.lcdui.ChoiceGroup]
Note: duplicate definition of library class [javax.microedition.lcdui.Spacer]
Note: duplicate definition of library class [javax.microedition.lcdui.Canvas]
Note: duplicate definition of library class [javax.microedition.lcdui.List]
Note: duplicate definition of library class [javax.microedition.lcdui.Form]
Note: duplicate definition of library class [javax.microedition.lcdui.TextBox]
Note: duplicate definition of library class [javax.microedition.lcdui.TextField]
Note: duplicate definition of library class [javax.microedition.lcdui.DateField]
Note: duplicate definition of library class [javax.microedition.lcdui.CustomItem]
Note: duplicate definition of library class [javax.microedition.lcdui.ImageItem]
Note: duplicate definition of library class [javax.microedition.midlet.MIDlet]
Note: duplicate definition of library class [javax.microedition.midlet.MIDletStateChangeException]
Note: duplicate definition of library class [javax.microedition.rms.InvalidRecordIDException]
Note: duplicate definition of library class [javax.microedition.rms.RecordStoreException]
Note: duplicate definition of library class [javax.microedition.rms.RecordComparator]
Note: duplicate definition of library class [javax.microedition.rms.RecordEnumeration]
Note: duplicate definition of library class [javax.microedition.rms.RecordStoreNotOpenException]
Note: duplicate definition of library class [javax.microedition.rms.RecordListener]
Note: duplicate definition of library class [javax.microedition.rms.RecordStore]
Note: duplicate definition of library class [javax.microedition.rms.RecordStoreNotFoundException]
Note: duplicate definition of library class [javax.microedition.rms.RecordStoreFullException]
Note: duplicate definition of library class [javax.microedition.rms.RecordFilter]
Note: duplicate definition of library class [javax.microedition.media.Control]
Note: duplicate definition of library class [javax.microedition.media.Controllable]
Note: duplicate definition of library class [javax.microedition.media.Player]
Note: duplicate definition of library class [javax.microedition.media.MediaException]
Note: duplicate definition of library class [javax.microedition.media.PlayerListener]
Note: duplicate definition of library class [javax.microedition.media.Manager]
Note: duplicate definition of library class [javax.microedition.media.control.ToneControl]
Note: duplicate definition of library class [javax.microedition.media.control.VolumeControl]
Reading library jar [c:/WTK22/lib/cldcapi11.jar]
Note: duplicate definition of library class [java.util.Calendar]
Note: duplicate definition of library class [java.util.TimeZone]
Note: duplicate definition of library class [java.util.Date]
Note: duplicate definition of library class [java.util.EmptyStackException]
Note: duplicate definition of library class [java.util.Enumeration]
Note: duplicate definition of library class [java.util.Hashtable]
Note: duplicate definition of library class [java.util.Random]
Note: duplicate definition of library class [java.util.Stack]
Note: duplicate definition of library class [java.util.Vector]
Note: duplicate definition of library class [java.util.NoSuchElementException]
Note: duplicate definition of library class [java.lang.Object]
Note: duplicate definition of library class [java.lang.String]
Note: duplicate definition of library class [java.lang.StringBuffer]
Note: duplicate definition of library class [java.lang.Class]
Note: duplicate definition of library class [java.lang.InterruptedException]
Note: duplicate definition of library class [java.lang.Exception]
Note: duplicate definition of library class [java.lang.Throwable]
Note: duplicate definition of library class [java.lang.ClassNotFoundException]
Note: duplicate definition of library class [java.lang.InstantiationException]
Note: duplicate definition of library class [java.lang.IllegalAccessException]
Note: duplicate definition of library class [java.lang.ref.Reference]
Note: duplicate definition of library class [java.lang.ref.WeakReference]
Note: duplicate definition of library class [java.lang.Byte]
Note: duplicate definition of library class [java.lang.NumberFormatException]
Note: duplicate definition of library class [java.lang.IllegalArgumentException]
Note: duplicate definition of library class [java.lang.RuntimeException]
Note: duplicate definition of library class [java.lang.ArithmeticException]
Note: duplicate definition of library class [java.lang.Error]
Note: duplicate definition of library class [java.lang.ArrayStoreException]
Note: duplicate definition of library class [java.lang.Float]
Note: duplicate definition of library class [java.lang.Boolean]
Note: duplicate definition of library class [java.lang.ArrayIndexOutOfBoundsException]
Note: duplicate definition of library class [java.lang.IndexOutOfBoundsException]
Note: duplicate definition of library class [java.lang.Character]
Note: duplicate definition of library class [java.lang.ClassCastException]
Note: duplicate definition of library class [java.lang.Double]
Note: duplicate definition of library class [java.lang.Long]
Note: duplicate definition of library class [java.lang.Integer]
Note: duplicate definition of library class [java.lang.IllegalThreadStateException]
Note: duplicate definition of library class [java.lang.IllegalMonitorStateException]
Note: duplicate definition of library class [java.lang.Math]
Note: duplicate definition of library class [java.lang.NegativeArraySizeException]
Note: duplicate definition of library class [java.lang.NoClassDefFoundError]
Note: duplicate definition of library class [java.lang.Runtime]
Note: duplicate definition of library class [java.lang.System]
Note: duplicate definition of library class [java.lang.NullPointerException]
Note: duplicate definition of library class [java.lang.OutOfMemoryError]
Note: duplicate definition of library class [java.lang.VirtualMachineError]
Note: duplicate definition of library class [java.lang.Runnable]
Note: duplicate definition of library class [java.lang.Short]
Note: duplicate definition of library class [java.lang.SecurityException]
Note: duplicate definition of library class [java.lang.Thread]
Note: duplicate definition of library class [java.lang.StringIndexOutOfBoundsException]
Note: duplicate definition of library class [java.io.UnsupportedEncodingException]
Note: duplicate definition of library class [java.io.IOException]
Note: duplicate definition of library class [java.io.InputStream]
Note: duplicate definition of library class [java.io.Reader]
Note: duplicate definition of library class [java.io.Writer]
Note: duplicate definition of library class [java.io.OutputStream]
Note: duplicate definition of library class [java.io.ByteArrayOutputStream]
Note: duplicate definition of library class [java.io.DataInput]
Note: duplicate definition of library class [java.io.DataOutputStream]
Note: duplicate definition of library class [java.io.DataOutput]
Note: duplicate definition of library class [java.io.DataInputStream]
Note: duplicate definition of library class [java.io.EOFException]
Note: duplicate definition of library class [java.io.InputStreamReader]
Note: duplicate definition of library class [java.io.InterruptedIOException]
Note: duplicate definition of library class [java.io.OutputStreamWriter]
Note: duplicate definition of library class [java.io.PrintStream]
Note: duplicate definition of library class [java.io.ByteArrayInputStream]
Note: duplicate definition of library class [java.io.UTFDataFormatException]
Note: duplicate definition of library class [javax.microedition.io.Connection]
Note: duplicate definition of library class [javax.microedition.io.ConnectionNotFoundException]
Note: duplicate definition of library class [javax.microedition.io.Connector]
Note: duplicate definition of library class [javax.microedition.io.Datagram]
Note: duplicate definition of library class [javax.microedition.io.ContentConnection]
Note: duplicate definition of library class [javax.microedition.io.StreamConnection]
Note: duplicate definition of library class [javax.microedition.io.InputConnection]
Note: duplicate definition of library class [javax.microedition.io.OutputConnection]
Note: duplicate definition of library class [javax.microedition.io.DatagramConnection]
Note: duplicate definition of library class [javax.microedition.io.StreamConnectionNotifier]
Removing unused library classes...
Original number of library classes: 510
Final number of library classes: 6
Printing kept classes, fields, and methods...
xxx
xxx
Shrinking...
Removing unused program classes and class elements...
Original number of program classes: 4
Final number of program classes: 4
Obfuscating...
Renaming program classes and class elements...
Writing jars...
Writing output jar [xxx.jar]
Adding resources from jar [xxx_.jar]

こんなんでてきますけど・・・
Warningきらいなの、きもちわるい・・・。
でも時間ないからこれに関してはあとまわしで・・・。

=================================================
2/23
PROGUARDのこっちはいまだにわからん〜
=================================================
JCSL1.2.2 -
2006.02.11 Saturday :: comments (1) :: trackbacks (0)

「makeしたいんだヽ(`Д´)ノウワワン」の評価です。


Comments

ハイハイ、よくがんばりました。
えったん :: 2006/02/12 12:03 AM

Comment Form

Trackbacks