VS2008, Windows Mobile Installer project

此生再无相见时 提交于 2019-12-09 06:54:50

问题


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:


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




回答2:


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.


(source: mobilepackager.com)

Check it out




回答3:


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.




回答4:


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.




回答5:


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


The best of the best : Satellite Forms KnowledgeBase




回答6:


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}


来源:https://stackoverflow.com/questions/574839/vs2008-windows-mobile-installer-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!