Sprout App Installer Guide
Total Page:16
File Type:pdf, Size:1020Kb
Sprout App Installer Guide DATE: July 17, 2015 Sprout Developer Guide Table of Contents Introduction ................................................................................................................................................................. 3 Steps to Upload an App to Sprout Marketplace ............................................................................................. 3 Signing Digital Binaries .............................................................................................................................................. 6 Steps to Create an MSI (Microsoft Installer Package) ............................................................................................ 6 MSI Installation Using the Visual Studio Installer ............................................................................................... 6 Steps to Create an MSI Installer in Visual Studio 2013 ................................................................................. 7 Set up the Properties of Your Application Folder ........................................................................................ 10 Add the Key Value to the Registry ................................................................................................................. 11 Remove GUI Elements ......................................................................................................................................... 14 MSI Installation Using WiX Toolset ..................................................................................................................... 15 Design of a WiX (.wxs file) ............................................................................................................................... 16 Components of a WiX Source File .................................................................................................................. 16 Creating a WiX File ........................................................................................................................................... 17 Sample WiX File ............................................................................................................................................... 23 Sample WiX File for JavaScript Node-Webkit ............................................................................................... 25 Making MSI Installer Silent .................................................................................................................................. 27 Creating an MSI Installer Using Visual Studio and WiX ................................................................................ 27 Creating an MSI Installer Using WiX and the Command Prompt................................................................ 27 Test Your Results ................................................................................................................................................. 28 Troubleshooting ....................................................................................................................................................... 29 Troubleshooting a WiX Installer ......................................................................................................................... 29 Troubleshooting a Visual Studio Installer ......................................................................................................... 33 2 Sprout Developer Guide Introduction A Sprout app is a native operating system (OS) application taking advantage of Sprout hardware using the HP Projective Computing Platform or the innovative multi-screen layout. An example of a “native” OS app is a Windows® desktop application built to run on the Windows Operating System. Marketplace Developers (an app developer or company registered with the Sprout Developer Portal) must provide app metadata, icon files, and the Microsoft Installer Package (MSI) for their apps to appear in Sprout Marketplace. The following sections explain how to create an MSI installer, app metadata, and custom actions to include as part of the MSI install or uninstall sequence to facilitate the Sprout Workspace app promotion mechanism. Steps to Upload an App to Sprout Marketplace When you have finished building your app, perform the following steps to submit the app to HP: Note: If you are building an app installer to work with Sprout Emulator, you need only follow steps 3 and 6, i.e. creating the market provisioning file for appinfo.xml and using it to create your MSI installer. 1. Digitally sign all your binaries for verifying trust of the app. See Signing Digital Binaries for more information. 2. Create a “Sprout Marketplace Partner provisioning XML manifest file” in a text editor. Sprout Marketplace encrypts this XML manifest file to create the “appinfo.hpspdat” file included as part of your installer. See the sample file given here: Sample HP Sprout Marketplace Provisioning XML File and the procedures given on page 5 for more information. 3. The table on the following page explains all the parameters you need to create your XML manifest file. 3 Sprout Developer Guide XML Tag Name Description Details and Requirements AppDisplayName Display name of the app This field is the name that users see in Sprout as it appears in Sprout Marketplace. Its maximum size is 20 Marketplace. characters. AppDescription Short description of the This field is the description of your app that app. users see in Sprout Marketplace. DeveloperDisplayName Display name of app This field shows users the publisher, developer developer, or company name that created the app. AppVersion Version number Use this format for the version number: Major.Minor.Revision.Build e.g: 1.0.1.0 AppLaunchPath Full Install path for the Use environment variables in the path, e.g: app, including the %ProgramFiles(x86)%. Place the executable filename to launch in the root of the Install directory. AppCategory App category in Sprout Refer to the Sprout Marketplace Category List, Marketplace e.g. “Photography”, select one or more categories in which to list your app, and then tag the categories here. AppID Reserve a unique app ID To generate an app ID, create an entry in the to identify an app launch Management Portal point in Sprout (https://sprout.hp.com/developer/publish/). Workspace. Start with version 0.0.0.1 to create a pre- approved entry. (The final version can be updated after the app approval process.) Create the app ID using the reverse DNS of your company followed by the app name. For example, if your app is SampleApp, and the company’s DNS name is example.com, the app ID should be com.example.sampleapp. DeveloperID Reserve a Globally Unique To generate a GUID, use Microsoft’s Identifier (GUID) to “guidgen.exe” tool, which comes with Visual identify an app developer Studio 2013 (Go to Tools > Create GUID). or publisher. Sample format: DB72D2EE-32DA-4742AA4E- 5A79F1761D83 4 Sprout Developer Guide Sample HP Sprout Marketplace Provisioning XML File <?xml version="1.0" encoding="utf-8"?> <AppMetadata spec="1.0"> <AppDisplayName>Display Name for Your App</AppDisplayName> <AppDescription>Description for your app</AppDescription> <DeveloperDisplayName>Your Company Name</DeveloperDisplayName> <AppVersion>1.0.0.0</AppVersion> <AppLaunchPath>%ProgramFiles(x86)%\YourCompany\YourAppExecu table.exe</AppLaunchPath> <AppCategory>Your App Category (e.g. Photography)</AppCategory> <AppID>com.example.sampleapp</AppID> <DeveloperID>DB72D2EE-32DA-4742-AA4E- 5A79F1761D83</DeveloperID> </AppMetadata> Note: If you are creating an appinfo.xml file for a JavaScript app, point the AppLaunchPath tag to nw.exe. To do this, follow the procedures given in Steps to Create an MSI (Microsoft Installer Package). 4. After authoring the Sprout Marketplace Partner provisioning XML manifest file, attach the file and send it to Sprout App Review ([email protected]) for encryption. Remember to start the Subject line of your email with “[Encrypt]”. 5. You will receive an email reply with the encrypted file “appinfo.hpspdat” attached. Use this file as part of your MSI Installer package, as explained in Steps to Create an MSI (Microsoft Installer Package). 6. Create an MSI Installer, making sure your installer is silent. Follow the procedures in sections MSI Installation Using WiX Toolset and Making MSI Installer Silent of this guide to make your installer silent. 7. Upload the MSI package to the HP Sprout Management Portal for review by the HP Sprout Application Certification team. 5 Sprout Developer Guide Signing Digital Binaries You need to digitally sign your binaries for trust verification. Create a digital certificate and then sign all your binaries before submitting them to Sprout Marketplace. These links are helpful in creating digital signatures: Introduction to Code Signing Creating, Viewing and Managing Certificates VeriSign Code Signing Steps to Create an MSI (Microsoft Installer Package) You can create your MSI installer using tools such as Microsoft Visual Studio (VS) installer, which comes as an installer plugin for VS 2013. Microsoft Visual Studio Installer is a GUI-based tool for creating installers. Alternatively, you can use the WiX Toolset available at http://wixtoolset.org. This xml-based tool is an open-source, XML-based descriptive tool for creating installers for Windows. MSI Installation Using the Visual Studio Installer The Visual Studio installer provides an easy-to-use, GUI-based set up for creating the installer for your app. You need Visual