This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 116529 - Build Mac OSX app needs improvements
Summary: Build Mac OSX app needs improvements
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-24 14:42 UTC by timdudgeon
Modified: 2008-02-26 10:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description timdudgeon 2007-09-24 14:42:58 UTC
Improvements are needed for the "Build Mac OS X Application" target.

1. Tray icon needs to be set. Without this the wrong icon is displayed in the Mac tray.
In harness/lanchers/app.sh this line needs to be added to the lancher script:
-J-Xdock:icon='"$progdir"/../../"$APPNAME".icns"' \

2. harness/etc/applicationIcon.icns needs to be dynamically generated to include the correct icons. Currently generic
ones are used.

3. The correct version number needs to be substituted into harness/etc/Info.plist
Currently the version is hadcoded as 0.1.
Comment 1 Milos Kleint 2007-09-25 14:04:59 UTC
done. 

2. I have no idea how to generate the icns file. Therefore the application building target just looks in the
<suitename>/<suitecluster>/etc folder for the <suitename>.icns file. if found it's used, it not the default one from
harness is used.
Additionally the suite building target will recognize the release/ subfolder and make it part of the suite cluster.
Therefor you can place your icns file in the ${basedir}/release/etc/my_suite.icns file and it will be included in the
final binaries.

3. introducing new ant property "app.name" for the suite project that will include the correct version in the Info.plist
file.

Checking in launchers/app.sh;
/cvs/apisupport/harness/release/launchers/app.sh,v  <--  app.sh
new revision: 1.15; previous revision: 1.14
done
Checking in suite.xml;
/cvs/apisupport/harness/release/suite.xml,v  <--  suite.xml
new revision: 1.38; previous revision: 1.37
done
Checking in etc/Info.plist;
/cvs/apisupport/harness/release/etc/Info.plist,v  <--  Info.plist
new revision: 1.2; previous revision: 1.1
done
IDE:
Comment 2 Jesse Glick 2007-09-26 17:44:31 UTC
Please document any new folders or properties in harness/README.
Comment 3 Milos Kleint 2007-09-27 08:00:51 UTC
done
/cvs/apisupport/harness/release/README,v  <--  README
new revision: 1.60; previous revision: 1.59
Comment 4 timdudgeon 2008-01-02 13:07:55 UTC
I think there is one small problem here that remains. 
The step that copies the user defined .icns file over the top of the default one fails silently because the overwrite
property is not set (ant defaults this to false).

So that part needs to be (around line 271 of harness/suite.xml):

<copy verbose="true" failonerror="true" overwrite="true"
              file="dist/${app.name}.app/Contents/Resources/${app.name}/${app.name}/etc/${app.name}.icns" 
              tofile="dist/${app.name}.app/Contents/Resources/${app.name}.icns"/>
Comment 5 timdudgeon 2008-01-02 13:41:23 UTC
Also, one more refinement needed. The Info.plist template still has 0.1 as the short version number.
In harness/etc/Info.plist change

<key>CFBundleShortVersionString</key>
    <string>0.1</string>

to 

<key>CFBundleShortVersionString</key>
    <string>${app.version}</string>
Comment 6 Milos Kleint 2008-02-26 10:32:22 UTC
done in http://hg.netbeans.org/main/rev/472f58316333