📄 makeone.bat.bak
字号:
@rem ***************************************************************
@rem ** Copyright 2002 Motorola, Inc. All rights reserved
@rem **
@rem ** makeOne.bat
@rem **
@rem ** This script compiles one of the demo MIDlets.
@rem **
@rem ** Command Line Parameters:
@rem ** - Location of .JAVA files to compile
@rem ** - Location of Emulator
@rem **
@rem **
@rem ** Assumptions:
@rem ** - This script is invoked from the demo\scripts directory
@rem ** - Demo midlets are in the package com\mot\j2me\midlets
@rem ** - The directory demo\com\mot\j2me\midlets exists.
@rem ** - Default behavior is to compile bounce for the 7.5 emulator
@rem ** - Java 1.2 compiler can be invoked:
@rem ** + javac.exe is on the PATH
@rem **
@rem ** Results:
@rem ** - One of the potential targets will be created in it's directory
@rem **
@rem ** - Each output class will be written to a .JAR file
@rem **
@rem **
@rem ***************************************************************
@echo off
@rem ***************************************************************
@rem ** Check to see if a command line argument was specified
@rem ** First argument must be the target MIDlet name
@rem ***************************************************************
@if NOT "%1"=="" set COMPILETARG=%1
@if "%1"=="" set COMPILETARG=GameDemo
@rem ***************************************************************
@rem ** Set the COMPILECLASS variable to point to the midlet dir
@rem ** then append the name of the target MIDlet
@rem ***************************************************************
set COMPILECLASS=com\mot\j2me\midlets\%COMPILETARG%
@rem ***************************************************************
@rem ** Check to see if a command line argument was specified
@rem ** Second argument must be the target Emulator name
@rem ***************************************************************
@if NOT "%2"=="" set TARGETEMUL=%2
@if "%2"=="" set TARGETEMUL=Emulator7.5
@rem ***************************************************************
@rem ** Next 3 lines can be un-REMarked to help with debugging
@rem ** a problematic build.
@rem ***************************************************************
@rem set COMPILETARG
@rem set COMPILECLASS
@rem set TARGETEMUL
@echo Compiling ...
@echo off
@rem ***************************************************************
@rem ** Change to the demo root dir
@rem **
@rem ***************************************************************
cd ..
@rem ***************************************************************
@rem ** Compile using the specified emulator and target MIDlet
@rem ** source files
@rem ***************************************************************
javac -target 1.1 -O -bootclasspath ..\%TARGETEMUL%\lib\cldc.zip;..\%TARGETEMUL%\lib\midp.zip;..\%TARGETEMUL%\lib\lwt.zip %COMPILECLASS%\*.java
@echo Creating JAR ...
@echo off
@rem ***************************************************************
@rem ** Now create the .JAR file in the directory with the sources
@rem ** include the manifest, stored in meta-inf
@rem ***************************************************************
@echo off
jar cmf %COMPILECLASS%\manifest.mf %COMPILECLASS%\%COMPILETARG%.jar %COMPILECLASS%\*.class
@rem ***************************************************************
@rem ** See if the target midlet has any resources that will need
@rem ** to be included in the .JAR
@rem ***************************************************************
@if NOT EXIST %COMPILECLASS%\*.png goto CHECKJPG
cd %COMPILECLASS%
jar uf %COMPILETARG%.jar *.png
cd ..\..\..\..\..\
:CHECKJPG
@if NOT EXIST %COMPILECLASS%\*.jpg goto CHECKWAV
cd %COMPILECLASS%
jar uf %COMPILETARG%.jar *.jpg
cd ..\..\..\..\..\
:CHECKWAV
@if NOT EXIST %COMPILECLASS%\*.wav goto CHECKMID
cd %COMPILECLASS%
jar uf %COMPILETARG%.jar *.wav
cd ..\..\..\..\..\
:CHECKMID
@if NOT EXIST %COMPILECLASS%\*.mid goto JARCOMPLETE
cd %COMPILECLASS%
jar uf %COMPILETARG%.jar *.mid
cd ..\..\..\..\..\
:JARCOMPLETE
@echo Preverifying ...
@echo off
@rem ***************************************************************
@rem ** Use the preverifier that is supplied with the emulator
@rem **
@rem ***************************************************************
@echo off
..\%TARGETEMUL%\bin\preverify -classpath ..\%TARGETEMUL%\lib;..\%TARGETEMUL%\bin;..\%TARGETEMUL%\lib\midp.zip;..\%TARGETEMUL%\lib\cldc.zip -d %COMPILECLASS% %COMPILECLASS%\%COMPILETARG%.jar
@rem ***************************************************************
@rem ** Extract the preverified classes from the .JAR file. These
@rem ** will be runnable if there are no resources involved.
@rem ***************************************************************
@echo off
@echo Restoring preverified classes...
jar xf %COMPILECLASS%\%COMPILETARG%.jar %COMPILECLASS%\*.class
cd scripts
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -