remove antenna dependency

This commit is contained in:
sillysagiri 2024-11-02 13:26:10 +07:00
parent 0b0d7c876c
commit 5db84aa14e
3 changed files with 76 additions and 171 deletions

121
build.xml
View File

@ -1,110 +1,65 @@
<project name="dothack"> <project name="dothack">
<property file="config.properties"/> <property file="config.properties"/>
<taskdef resource="antenna.properties" classpath="${antenna.path}"/>
<target name="clean"> <target name="clean">
<delete dir="build"/> <delete dir="build"/>
</target> </target>
<target name="debug"> <target name="compile">
<mkdir dir="build/classes_debug"/> <mkdir dir="build/classes"/>
<wtkbuild <javac
includeAntRuntime="false" includeAntRuntime="false"
destdir="build/classes_debug" srcdir="src"
srcdir="src" destdir="build/classes"
source="1.4" source="1.4"
target="1.4" target="1.4"
debug="true" debug="true"
preverify="false" classpath="${midlet.j2me};${midlet.lib}">
classpath="${midlet.lib}">
<compilerarg value="-Xlint:-options"/> <compilerarg value="-Xlint:-options"/>
</wtkbuild> </javac>
<wtkjad <jar
jadfile="build/${project.name}_debug.jad" destfile="build/${project.name}_not_preverified.jar"
name="${project.name}" manifest="src/MANIFEST"
vendor="${project.vendor}" compress="true"
version="${project.version}"> level="9">
<midlet <fileset dir="build/classes"/>
name="${midlet.name}"
class="${midlet.class}">
</midlet>
</wtkjad>
<wtkpackage
jarfile="build/${project.name}_debug.jar"
jadfile="build/${project.name}_debug.jad"
libclasspath="${midlet.lib}"
obfuscate="true"
preverify="false">
<!-- include -->
<fileset dir="build/classes_debug"/>
<fileset dir="assets"/> <fileset dir="assets"/>
<zipfileset src="${midlet.lib}" includes="**/*.class" excludes="example/**/*.class"/>
<!-- using proguard to preverify --> </jar>
<argument value="-microedition"/> </target>
<!-- proguard args --> <target name="debug">
<argument value="-dontshrink -dontoptimize -dontobfuscate -target 1.4"/> <antcall target="compile"/>
</wtkpackage>
<java jar="${proguard.path}" fork="true">
<arg value="-microedition"/>
<arg value="-injars build/${project.name}_not_preverified.jar"/>
<arg value="-outjars build/${project.name}_debug.jar"/>
<arg value="-libraryjars ${midlet.j2me}"/>
<arg value="-dontshrink"/>
<arg value="-dontoptimize"/>
<arg value="-dontobfuscate"/>
<arg value="-target 1.4"/>
</java>
</target> </target>
<target name="release"> <target name="release">
<mkdir dir="build/classes_release"/> <antcall target="compile"/>
<wtkbuild
includeAntRuntime="false"
destdir="build/classes_release"
srcdir="src"
source="1.4"
target="1.4"
debug="false"
preverify="false"
classpath="${midlet.lib}">
<compilerarg value="-Xlint:-options"/>
</wtkbuild>
<wtkjad
jadfile="build/${project.name}_release.jad"
name="${project.name}"
vendor="${project.vendor}"
version="${project.version}">
<midlet
name="${midlet.name}"
class="${midlet.class}">
</midlet>
</wtkjad>
<wtkpackage
jarfile="build/${project.name}_release.jar"
jadfile="build/${project.name}_release.jad"
libclasspath="${midlet.lib}"
obfuscate="true"
preverify="false">
<!-- include -->
<fileset dir="build/classes_release"/>
<fileset dir="assets"/>
<!-- using proguard to preverify -->
<argument value="-microedition"/>
<!-- proguard args -->
<argument value="-target 1.4 -keep 'class * extends javax.microedition.midlet.MIDlet' -repackageclasses '' -optimizationpasses 4 -allowaccessmodification"/>
</wtkpackage>
<java jar="${proguard.path}" fork="true">
<arg value="-microedition"/>
<arg value="-injars build/${project.name}_not_preverified.jar"/>
<arg value="-outjars build/${project.name}_release.jar"/>
<arg value="-libraryjars ${midlet.j2me}"/>
<arg value="-keep class * extends javax.microedition.midlet.MIDlet"/>
<arg value="-repackageclasses"/>
<arg value="-target 1.4"/>
</java>
</target> </target>
</project> </project>

View File

@ -1,87 +1,11 @@
## sdk & tools ## sdk & tools
antenna.path=/home/sillysagiri/Documents/antenna/antenna-bin-1.2.1-beta.jar proguard.path=/home/sillysagiri/Documents/proguard-7.6.0/lib/proguard.jar
wtk.home=/home/sillysagiri/Documents/wtk/
wtk.proguard.home=/home/sillysagiri/Documents/proguard-7.6.0/
# ======================================================== # # ======================================================== #
## project ## project
project.name=dothack-allscreen project.name=dothack-allscreen
project.vendor=sillysagiri
project.manifest=MANIFEST.MF
project.version=1.0.0
## midlet ## Specify library here (separated by `:` )
midlet.name=dothack
midlet.class=dothack.DotHack
## Specify library here (separated by `;` )
midlet.lib=library/tinygzip/tinylinegzip.jar midlet.lib=library/tinygzip/tinylinegzip.jar
midlet.j2me=library/j2me/cldcapi11.jar:library/j2me/microemu-jsr-75.jar:library/j2me/midpapi20.jar
## Preprocessor
symbols=
# ======================================================== #
## WTK Properties
## Specifies the version of CLDC to use.
wtk.cldc.version=1.1
## Specifies the version of MIDP to use.
wtk.midp.version=2.0
## Enables or disables the Multimedia API (MMAPI).
wtk.mmapi.enabled=true
## Enables or disables the Wireless Messaging API (WMA) 1.0 (JSR-120).
# wtk.wma.enabled true
## Enables or disables the Wireless Messaging API (WMA) 2.0 (JSR-205).
# wtk.wma2.enabled=true
## Enables or disables the J2ME Web Services API (J2MEWS).
# wtk.j2mews.enabled=true
## Enables or disables the J2ME Bluetooth API (JSR-82).
# wtk.bluetooth.enabled=true
## Enables or disables the J2ME 3D API (JSR-184).
# wtk.java3d.enabled=true
## Enables or disables the J2ME optional PDA packages (JSR-75).
# wtk.optionalpda.enabled=true
## Enables or disables the J2ME location services API (JSR-179).
# wtk.locationservices.enabled=true
## Enables or disables the J2ME content handler API (JSR-211).
# wtk.contenthandler.enabled=true
## Enables or disables the J2ME Security and Trust Services API (JSR-177).
# wtk.satsa.enabled=true
## Enables or disables the J2ME Mobile Internationalization API (JSR-238).
# wtk.miapi.enabled=true
## Enables or disables the J2ME Advanced Multimedia Supplements API (JSR-234).
# wtk.ams.enabled=true
## Enables or disables the J2ME Payment API (JSR-229).
# wtk.papi.enabled=true
## Enables or disables the J2ME Scalable 2D Vector Graphics API (JSR-226).
# wtk.s2dvgapi.enabled=true
## Enables or disables the J2ME Session Initiation Protocol API (JSR-180).
# wtk.sipapi.enabled=true
## Enables all additional libraries (except for CLDC and MIDP) defined for your toolkit.
# wtk.all.enabled=true
## Sets a totally custom BOOTCLASSPATH. Use this property if the set of APIs you need is not covered by the above properties (for example because you are using the system libraries provided another vendor or you have some important additional libraries).
# wtk.midpapi=Varies
# ======================================================== #

View File

@ -1,17 +1,43 @@
.hack//vol1 is a j2me game originally from old korean game... _ _ _ _ _ ____
the original game runs on the mighty cldc 1.0/midp 1.0 and boasts a stunning resolution of 128x128 pixels __| | ___ | |_ | |__ __ _ ___ | | __ (_)|___ \ _ __ ___ ___
/ _` | / _ \ | __|| '_ \ / _` | / __|| |/ /_____ | | __) || '_ ` _ \ / _ \
| (_| || (_) || |_ | | | || (_| || (__ | <|_____|| | / __/ | | | | | || __/
\__,_| \___/ \__||_| |_| \__,_| \___||_|\_\ _/ ||_____||_| |_| |_| \___|
|__/
.hack//vol1 is a j2me game from many of dothack series.
the game runs on cldc 1.0/midp 1.0 with resolution of 128x128 pixels
you can get the game here on archive.net you can get the game here on archive.net
https://archive.org/details/dh1_ezi https://archive.org/details/dh1_ezi
there is also people who translate this to english here there is also english patch here
https://archive.org/download/dh1_ezi_en https://archive.org/download/dh1_ezi_en
however, due to some native apis used in the original game. the game doesnt work on most emulator. however, due to some native api used in the original game. the game doesnt work
ive been on a mission to swap out those stubborn native apis for their midp equivalents on most emulator.
i took on the heroic quest of porting this masterpiece to a more contemporary version of j2me: cldc 1.1/midp 2.0... this is a project in progress to decode the game and rewrite the entire codebase
plus, i also tried added support for larger screens, like 240x320... with more contemporary version of j2me cldc 1.1/midp 2.0. swapping out those
native api with midp api equivalents. and support the game with bigger screen
- building this project is just for entertainment purposes and for gaining more knowledge
ugh... just peek at the build.sh file for now. i promise ill whip up a more detailed guide soon...after i finish this epic battle with caffeine! about java micro edition.
*** Building tools ***
Requirements:
- c/c++ compiler
most of the tools written in simple single file c++ and can be compiled with
your choice of compiler
*** Building dothack-j2me ***
Requirements:
- JDK 8, (jdk should be able to target java 1.4)
- apache ant
to build debug mode:
ant debug
to build release mode:
ant release