views:

1400

answers:

6

I'm using Visual Studio 2008 Professional Edition. I wrote an application for Windows Mobile and I would like to create the installer for this application. How does it do?

+1  A: 

http://msdn.microsoft.com/en-us/library/bb158729.aspx

Here you can find more than one solutions to your problem. Also, there are softwares for creating CAB files directly and outside of the VS2008 environment, but all the ones I tried were nasty AND costy as well.

rhapsodhy
+6  A: 

You'll need to package your application up in a CAB file.

To do this is quite easy - you just create a new "Smart Device CAB Project" (New Projet->Other project types->Setup and Deployment).

To start with - specify that you want the output from your application's exe project to go in the Application Directory, along with any other dependent dlls.

You may also want to create an icon for your application by right clicking File System On Target Machine, selecting Add Special Folder->Start Menu Folder, then right clicking again in the Start Menu Folder and selecting Create New Shortcut. Now point this shortcut at the exe for your application.

Depending on the requirements of your project, it may also be desirable to create a desktop installer (msi file) that your users can run directly on their Windows PC, which instructs ActiveSync to install your cab file automatically when the Windows Mobile device is next plugged in. Basically this is done by calling ActiveSync (CeAppMgr.exe) from the command line and passing it an ini file referencing your cab file.

If you need to do anything else more complex during your installation, it is also possible to write a "custom action" where the cab file calls out to another dll (written by you) to execute any additional steps that need to happen during the install.

A comprehensive guide to all the above is available here

John Sibly
+1  A: 

My own experience is that it's just too time-costly to create setup files run under Windows (unless you are just talking about creating setup projects that outputs CAB, which requires additional setup procedure for .NET framework, and could only be run inside your WM machine).

The "official" procedure includes the generation of the CAB file, additional DLL to make your CAB file "autorun", and an additional setup project to install that DLL.

Refer to here if you're going in this way: http://msdn.microsoft.com/en-us/library/bb158529.aspx

After days of struggling, I decided to purchase commercial products to automate the setup file creation. The one I've purchased is named "PocketPC Installer Professional" (google it as I'm not related to this commercial product). The setup generated does not look similar with usual Windows software setups, but at least it works and requires less effort.

Leo To
A: 

Thanks for the reply. I found this tutorial:Installer.


The best of the best : Satellite Forms KnowledgeBase

mykhaylo
+1  A: 

A tool like Mobile Packager (www.MobilePackager.com) can also be used to create installation packages for Windows Mobile. It allows you to create very slick installers for installation via desktop or on device installation.

Check it out

A: 

Here is a very basic example of a script in InnoSetup (with preprocessor) to create a desktop installer for a windows mobile device. You must already have the CAB created and the .ini written for this to work properly.

#define AppName "Your Software"
#define AppPublisher "Your Name Here"
#define ExeName "Your Software.exe"
#define UnixName "YourSoftware"
#define Short "YS"
#define Version "1.0"

[Setup]
AppName={#AppName}
AppVerName={#AppName} {#Version}
AppPublisher={#AppPublisher}
DefaultDirName={pf}\{#AppName}
DefaultGroupName={#AppName}
AllowNoIcons=yes
LicenseFile=license.rtf
OutputDir=//
OutputBaseFilename={#Short}_{#Version}_Setup
SetupIconFile=Icons\{#UnixName}.ico
Compression=lzma
SolidCompression=yes

[Languages]
Name: english; MessagesFile: compiler:Default.isl

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Registry]
Root: HKLM; Subkey: Software\{#Short}; ValueType: string; ValueName: Version; ValueData: {#Version}; Flags: uninsdeletekey

[Files]
Source: license.rtf; DestDir: {app}; Flags: ignoreversion
Source: {#UnixName}_{#Version}_Setup.CAB; DestDir: {app}; Flags: ignoreversion
Source: {#UnixName}_{#Version}_Setup.ini; DestDir: {app}; Flags: ignoreversion

[Icons]
Name: {group}\{#AppName}; Filename: {app}\{#ExeName}
Name: {group}\{cm:UninstallProgram,{#AppName}}; Filename: {uninstallexe}
Name: {userdesktop}\{#AppName}; Filename: {app}\{#ExeName}; Tasks: desktopicon
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#AppName}; Filename: {app}\{#ExeName}; Tasks: quicklaunchicon

[Run]
Filename: "{pf64}\Microsoft ActiveSync\CEAPPMGR.EXE"; Parameters: ""{app}\{#UnixName}_{#Version}_Setup.ini""; Check: Is64BitInstallMode; WorkingDir: {app}
Filename: "{pf32}\Microsoft ActiveSync\CEAPPMGR.EXE"; Parameters: ""{app}\{#UnixName}_{#Version}_Setup.ini""; Check: not Is64BitInstallMode; WorkingDir: {app}
MaQleod