FBA The Creator

The True Multiplatform PC / PocketPC Opensource Development Tool - Read Only Mode - Kept only for historical purposes - Thank you all ;)
It is currently Thu Jun 04, 2026 2:40 am

All times are UTC




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Fri Sep 11, 2009 1:57 am 
Offline
User avatar

Joined: Mon Apr 13, 2009 2:22 pm
Posts: 23
Location: Italy
The FBA is great, you know, and can generate directly the self installing CAB files for you application. On my WM6 smartphone, I have a little problem with CAB files: during the install steps, there is a popup message that informs me about something like: "attention, the program can have problems to run, cause is written for a previous version of OS". That's not true, all the programs runs very good on my smartphone, so I decided to make a little modification to the CAB file in order to specify that the program is good even for WM6. To make those modifications, you need for some tools. Read below to know what you have to do for create such tools.

1) Download from Microsoft the free package 'cabsdk.exe' at this link: http://support.microsoft.com/kb/310618 (or search with google for "microsoft cabsdk.exe"); the package is self-extracting EXE and contains many files, but you just need for cabarc.exe, that is in the folder 'BIN' of the package (once uncompressed).

2) Create a new folder on your disk, where you like, and call it 'CABedit'

3) In the new created folder, copy the executable 'cabarc.exe'

4) Inside the new folder, create another folder called 'Source'

5) With Notepad, create a text file with this contents:

@echo off
del source\*.* /q
set /p fn="Enter CAB filename (no extension) "
cabarc -p x %fn%.cab source\

then save it, always in the 'CABedit' folder, as 'extractcab.bat'. This will be your command file for cab decompression.

6) With Notepad, again, create another text file with this contents:

@echo off
set /p fn="Enter CAB filename (no extension) "
cabarc -p -r -P source\ n %fn%.cab source\*.*

then save it, as usual in the 'CABedit folder', as 'makecab.bat'. This will be your command file for cab compression.

At this point you have your tools for modifying the CAB files generated by FBA. Please, don't make any modification if you don't know what you are doing ! CAB files are for program installation, so PAY ATTENTION.

;------------

And now, let's start to modify the CAB file generated from FBA; after the modifications, the message for 'old version' will disappear when installing on WM6 devices.

1) Copy the CAB file generated from FBA to the 'CABedit' folder. I will use the 'netpong.cab' as example.

2) Double click the 'makecab.bat' icon. The console screen appears and you have to supply the file name without extension; so type in 'netpong' and press return. In the 'source' folder you can find all the files that where compressed in the CAB.

3) Find the file '_setup.xml' in the folder 'Source' and click with the right mouse button on it. On the contestual menu, select 'open with' and choose 'notepad'.

3) Look for the line (at the beginning of file) with the contents:

<parm name="InstallPhase" value="install" />

and insert, immediatly after that, these lines :

<parm name="OSVersionMin" value="3.0" />
<parm name="OSVersionMax" value="7.0" />
<parm name="BuildNumberMin" value="0" />
<parm name="BuildNumberMax" value="-536870912" />

then save the file. The added lines are for the OS version and Build number; note that WM7.0 isn't still available, but it's OK.

4) Move up to the CABedit folder and double click the 'makecab.bat' icon. The console screen opens and you must provide a name for the output cab (without extension). Type in, for example, 'netpong_wm6' and press return.

The modified CAB file has been generated in the 'CABedit' folder, with the name 'netpong_wm6.cab'.
Naturally, the procedure can be used to implement additional commands to the _setup.xml file, but I highly recommend to have a deep look at the 'official' docs regarding the CAB files and their structure.

Note: may be evilmaio can supply a very easy info to modify the 'CAB Build Template' in FBA environment, to have the same effects as the operations I just described, but I think that the procedure will be useful anyway, as tool for little modifications in CAB files made with other programs and so on. Obviously, the way that evilmaio will suggest, would be the best for FBA environment !
:mrgreen:


Top
   
PostPosted: Fri Sep 11, 2009 7:29 am 
Offline
FBA Administrator
FBA Administrator
User avatar

Joined: Fri Mar 21, 2008 11:19 pm
Posts: 238
Location: Rome - Italy
Hi and thanks for sharing.
But I don't understand or I'm missing something..
Isn't the "Cab Build Templates" window inside "Build PocketPC Install Package" section enough for your purposes? :)
You should be able to modify install templates directly from FBA
Attachment:
options.PNG
options.PNG [ 16.73 KiB | Viewed 22707 times ]


Top
   
PostPosted: Fri Sep 11, 2009 1:47 pm 
Offline
User avatar

Joined: Mon Apr 13, 2009 2:22 pm
Posts: 23
Location: Italy
Hello evilmaio. Yes, I know there is the "Cab build templates" and the red note on my message was intended just for it, but I have a problem with it. When I add something, or modify something, and click the SAVE button, the modifications I made are lost. I don't know why. May be some write-protected file ? In any case, the output _setup.xml file, hasnt the infos for the OS version and Build number if you use 'smartphone' and 'CAB output'. So I did that job just to make a 'patch' and solve the problem. Please, would you explain how to use the "Cab build templates" in order to save my modifications ? Thank you in advance, bye
Emilio

_________________
http://ficara.altervista.org


Top
   
PostPosted: Fri Sep 11, 2009 3:45 pm 
Offline
FBA Administrator
FBA Administrator
User avatar

Joined: Fri Mar 21, 2008 11:19 pm
Posts: 238
Location: Rome - Italy
Mmmh..maybe a bug on templates save...
I will test it in next weeks (or you could try to modify the IDE directly from sources, if you have delphi, because it's an IDE related issue).


Top
   
PostPosted: Fri Sep 11, 2009 6:05 pm 
Offline
User avatar

Joined: Mon Apr 13, 2009 2:22 pm
Posts: 23
Location: Italy
Thank you, evilmaio. Unfortunately I haven't a Delphi compiler, but I have tested that the files arm_template_inf.dat and arm_template_ini.dat can be easily modified with notepad. Now I will try to modify them to obtain the same result as in my 'patch'. If you agreed, I will leave on the forum the thread about the cab modification; may be someone would find it useful for cab mods in other applications. Bye...

_________________
http://ficara.altervista.org


Top
   
PostPosted: Fri Sep 11, 2009 7:02 pm 
Offline
FBA Administrator
FBA Administrator
User avatar

Joined: Fri Mar 21, 2008 11:19 pm
Posts: 238
Location: Rome - Italy
Sure ;)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited