0

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?

John Conde
  • 217,595
  • 99
  • 455
  • 496
Mike
  • 59
  • 1
  • 4
  • So you assigned your icon in the tiapp.xml and when you run the app for debugging reasons, it shows the correct icon? – Christian Engel Oct 01 '12 at 10:38
  • Actually, it turned out I needed to install ImageMagick separately. Once I installed it the icon came out proper after local packaging. – Mike Dec 13 '12 at 02:12

2 Answers2

1

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
fairwinds
  • 2,133
  • 12
  • 21
0

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.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Phrozen
  • 559
  • 4
  • 13