简体   繁体   中英

Windows Packaging Icon

I'm able to package my desktop application on my Windows machine without a problem and the app runs. This is all great. But the icon assigned to the file after I run the installation from the generated MSI file is the default Titanium icon.

I'm running Win7, 1.2.0.RC4

The packaging command I'm using is: %APPDATA%\\titanium\\sdk\\win32\\1.2.0.rc4\\tibuild.py" -p PACKAGE -d "%HOMEPATH%\\desktop" -t bundle "%HOMEPATH%\\Documents\\Titanium Studio Workspace\\myApp

Is it possible to change that icon to the icon I use in my Resources directory for the app?

tiapp.xml provides app configuration using XML syntax. Just assign your icon between the icon tags. Here is example from HelloWorld app:

    <?xml version='1.0' encoding='UTF-8'?>
    <ti:app xmlns:ti='http://ti.appcelerator.org'>
    <id>com.example.helloworld</id>
    <name>HelloWorld</name>
    <version>0.1.0</version>
    <publisher>prattd</publisher>
    <url>http://example.com</url>
    <icon>default_app_logo.png</icon>
    <copyright>2012 by prattd</copyright>
    <window>
    <id>initial</id>
        <title>HelloWorld</title>
        <url>app://index.html</url>
        <width>700</width>
        <max-width>3000</max-width>
        <min-width>0</min-width>
        <height>500</height>
        <max-height>3000</max-height>
        <min-height>0</min-height>
        <fullscreen>false</fullscreen>
        <resizable>true</resizable>
        <chrome scrollbars="true">true</chrome>
        <maximizable>true</maximizable>
        <minimizable>true</minimizable>
        <closeable>true</closeable>
    </window>
    </ti:app>

The structure of the app is like this:

    ├── CHANGELOG.txt
    ├── LICENSE.txt
    ├── README.md
    ├── Resources
    │   ├── app.js
    │   ├── default_app_logo.png
    │   └── index.html
    ├── manifest
    └── tiapp.xml

With the above you can set your app icon but not the installer branding created when your app is packaged up.

For the installer, it is possible to customize it by replacing few files within within the SDK itself with your own. We will be doing more to expose these in our new TideBuilder the tidebuilder CLI in upcoming releases to override the defaults.

As you are aware, on Windows 7 the 1.2.0.RC4 SDK lives at C:\\ProgramData\\Titanium. Theinstaller art and icon are located at C:\\ProgramData\\Titanium\\sdk\\win32\\1.2.0.RC4

The files you will be interested in for the windows installer are as follows:

  • default_banner.bmp
  • default_dialog.bmp
  • titanium.ico

Dunno if this is still relevant but in order for icon conversion to work at least on v 1.3.1 you need to have installed ImageMagick installed or it won't update your app icon with the one you have configured. That's under Windows of course but I guess it's true for other platforms.

Link

Install a binary distribution and restart TideSDK Developer after, repackage your application and the icon should be updated. Check the output of the packaging.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM