You will find below a quick guide to install MIDPath on a development environment.
We obtain a directory named midpath. We will refer to it below by this environment variable: $MIDPATH_HOME
Note:
For cacao-cldc, use the midpath-test-cacao-cldc.sh script
Now complete steps 2, 4, 5 and 6
1 Install from the distribution
1.1 Step 1: Get the distro
# tar -zxf midpath-<VERSION>.tar.gz
1.2 Step 2: Install your favorite JVM
- JamVM
# apt-get install jamvm
- Kaffe
# apt-get install kaffe
- Cacao
# apt-get install cacao
- Cacao-cldc: How to compile cacao-cldc for MIDPath
1.3 Step 3: Install Classpath (not needed if you use Kaffe or cacao-cldc)
# apt-get install classpath-common
1.4 Step 4: Compile the native backends
Compile the native part for the chosen backends ($MIDPATH_HOME/native directory) For GTK:# cd $MIDPATH_HOME/native/gtk
# make
# cp *.so $MIDPATH_HOME/dist
- The SDL backend native part is in a specific directory: $MIDPATH_HOME/external/sdljava/native
- There is no native part for the AWT backend because it's provided by Classpath
- Maybe you have to adapt the Makefile to your compilation environment and set cflags at hand instead of using pkg-config if it's not available to you.
- If you use cross-compilation, set your CC variable adequately in the Makefile or in the make command line.
1.5 Step 5: Configure your MIDP2 environment
Modify configuration.cfg file in resources-embedded/com/sun/midp/configuration/ directory Set the screen size and choose your backend (see below). (note: do '''not''' modify the parameter javax.microedition.lcdui.toolkit. Let it to "virtual" value)##======================================== ## Graphics parameters ##======================================== javax.microedition.lcdui.screenWidth:176 javax.microedition.lcdui.screenHeight:210 # Toolkit configuration (possible values: SDL, virtual) # The toolkit parameter should be set to "virtual" unless you know what you do. # (to change the UI backend, see the backend parameter of the virtual toolkit below) javax.microedition.lcdui.toolkit:virtual ##====================================== ## Parameters for the Virtual UI Toolkit ##====================================== # Possible backend values: NULL, SDL, AWT, AWT_GRABBER, SWT, X11, GTK, QT org.thenesis.midpath.ui.backend:AWT # SDL backend configuration. # Possible bitsPerPixels values: 8, 16, 32 # Possible video mode values: SW, HW (i.e software, hardware) org.thenesis.midpath.ui.backend.sdl.bitsPerPixel:32 org.thenesis.midpath.ui.backend.sdl.videoMode:SW # X11 backend configuration. # Display value examples: :0.0, 192.168.0.1:1.0 org.thenesis.midpath.ui.backend.x11.Display::0.0 # Possible fontRenderer values: raw, BDF org.thenesis.midpath.ui.fontRenderer:raw org.thenesis.midpath.font.bdf.filename:VeraMono-12-8.bdf ##========================== ## Parameters for the sound ##========================== # Sound configuration (possible values: SDL, virtual) # The "player" parameter should be set to "virtual" unless you know what you do. # The virtual engine requires this hardware configuration: 16 bits, stereo, little endian org.thenesis.midpath.sound.engine:virtual # Possible sound backend values: NULL, ALSA, ESD, PulseAudio org.thenesis.midpath.sound.backend:NULL org.thenesis.midpath.sound.device:default org.thenesis.midpath.sound.sampleRate:44100 # Buffer size MUST be a power of two org.thenesis.midpath.sound.bufferSize:8192 ##====================================== ## Event parameters ##====================================== javax.microedition.lcdui.pointerSupported:true javax.microedition.lcdui.pointerMotionSupported:true ##====================================== ## Filesystem parameters ##====================================== # The RMS root path (if not defined, records are read/written in the current directory) com.sun.midp.rms.rootPath: ##====================================== ## MIDlet Manager (J2SE only) ##====================================== # The MIDlet repository path (if not defined, MIDlets are searched in the current directory) org.thenesis.midpath.main.repositoryPath:
1.6 Step 6: Start the test MIDlet
# cd $MIDPATH_HOME/bin # chmod u+x midpath-test.sh # ./midpath-test.sh
2 Install from the source repository
2.1 Step A: Grab the sources
# svn export https://midpath.svn.sourceforge.net/svnroot/midpath/trunk # export MIDPATH_HOME=$(pwd)/trunk
2.2 Step B: Set the compilation Java environment
- Complete step 3
- Install ecj (or a package which contains javac)
# apt-get install ecj
2.3 Step C: Build
# cd $MIDPATH_HOME # chmod u+x build.sh # ./build.sh
Version 3.1 last modified by Administrator on 05/01/2009 at 14:02
Document data
Attachments:
No attachments for this document
Comments: 0