Thursday, September 27, 2007

general makesis

When I'm trying to pick up some dev work on my mirrlicht project, I came across a little annoying problem for Symbian development. That is to write a small tool which can take symbian package file containing relative paths. The relative paths make it easier to switch between different SDK installations.
There is a tip here suggesting to use option -d"Your epoc root dir" when you call makesis. However it would be better to pass the epoc root directory automatically.

I've found a way to do this using the command "devices" provided with the symbian SDK and a dos batch file.


@echo off
set filename=yourproject
if "%1"=="gcce" set filename=yourproject-GCCE
for /F "usebackq tokens=3 delims= " %%i in (`devices -default`) DO (
for /F "usebackq tokens=1,3 delims= " %%j in (`devices -info @%%i`) DO if "%%j"=="Root" makesis -d%%k %yourproject%.pkg
)
)

Note that the second "for" statement is in one line. I've tested this on S60 SDK. But it should also work for UIQ.