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 214983 - Building installers fails in RC1
Summary: Building installers fails in RC1
Status: VERIFIED FIXED
Alias: None
Product: installer
Classification: Unclassified
Component: NBI (show other bugs)
Version: 7.2
Hardware: PC All
: P2 normal with 1 vote (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-29 11:44 UTC by bloodysmartie
Modified: 2012-07-11 03:29 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
protocol of installer build process (37.01 KB, text/plain)
2012-06-29 11:44 UTC, bloodysmartie
Details
Read branding.token property from platform.properties, if it is there (784 bytes, patch)
2012-07-09 09:07 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bloodysmartie 2012-06-29 11:44:01 UTC
Created attachment 121552 [details]
protocol of installer build process

After reading that 7.2 RC1 is available, i installed it immediately to play around a bit. I opened my project and tried to run it without a problem. But when i tried to package it, an error occurred:

C:\Program Files\NetBeans 7.2 RC1\harness\nbi\stub\template.xml:41: The following error occurred while executing this line:
C:\Users\David\Documents\NetBeansProjects\Ganesha\build\installer\build.xml:116: The following error occurred while executing this line:
C:\Users\David\Documents\NetBeansProjects\Ganesha\build\installer\nbi_all\.common\product.xml:485: src 'C:\Users\David\Documents\NetBeansProjects\Ganesha\dist\${branding.token}.zip' doesn't exist.

It seems that at some point the variable "${branding.token}" is not evaluated correctly because when i look in the created directories in "build\installer" i find some files named like "${branding.token}.gif".

Also, under "build\installer\ext\components\products" there is a subdirectory "helloworld" that for sure doesn't belong to my project.

I'll attach the protocol to this message.
Comment 1 mienamoo 2012-06-29 12:06:42 UTC
I am experiencing the same with NetBeans IDE 7.2 RC1 (Build 201206141830).

Steps to reproduce:

1. Create a new Ant-based NetBeans Platform Application.
2. Choose Package As > Installers from the project's context menu.

This still happens if I add a new module to the application.

I checked that the branding name is specified in the application project's properties (Application category) and also that at least one installer is checked in the Installer category. And I even specified an application icon in the branding options to check whether that would make a difference. But the problem persists.
Comment 2 mienamoo 2012-07-02 11:39:07 UTC
This is a regression, since this feature works as expected in NetBeans 7.1.1 (build 201203012225).

I created a project with NetBeans 7.1.1 and one with NetBeans 7.2 and compared them. In the 7.1.1 project, branding.token is specified in project.properties, while it is in platform.properties for 7.2. That is the only significant difference that I found between the two folders. I don't know whether this change was intentional, but IMHO logically it makes more sense to have that in project.properties.

The interesting thing is that I could build installers for the project created with 7.1.1, using the harness and platform of 7.2 in the IDE 7.2. But just moving the branding.token for the new project from the one file to the other did not help...

So the (ugly) workaround for this issue is to create the suite with 7.1.1 instead of 7.2. :)
Comment 3 Libor Fischmeistr 2012-07-02 15:19:07 UTC
mienamoo, you're very close to right solution :)
It's correct the branding.token is moved to project.properties. The problem is that the branding.token isn't replaced while creating or changing project properties...

So simple workaround:

in <project folder>/nbproject/project.properties change property branding.token to your application name. 

The correct app name is in platform.properties - branding.token
Comment 4 mienamoo 2012-07-03 05:56:08 UTC
Awesome thanks! That does indeed work! :D
Comment 5 Libor Fischmeistr 2012-07-03 09:20:35 UTC
Caused by issue 197066. Milos, can you look at it? It should be simple fix in setting project properties.
Comment 6 Jaroslav Tulach 2012-07-09 07:45:15 UTC
Candidate for 7.2 FCS imho:

The bug will need to be fixed in org.netbeans.modules.apisupport.installer.actions.BuildInstallersAction
which is either part of installer or Ant apisupport.
Comment 7 Jaroslav Tulach 2012-07-09 09:06:18 UTC
Opps, I wanted to set different priority.
Comment 8 Jaroslav Tulach 2012-07-09 09:07:18 UTC
Created attachment 121820 [details]
Read branding.token property from platform.properties, if it is there

Jirko, Miloši, please review.
Comment 9 Milos Kleint 2012-07-09 10:49:20 UTC
The patch looks ok, I haven't verified that it indeed fixes the problem.
Comment 10 Tomas Danek 2012-07-09 11:19:22 UTC
Can you please integrate patch to trunk? I'll verify ASAP..then we can evaluate putting it to 7.2..
Thanks in advance.

(In reply to comment #6)
> Candidate for 7.2 FCS imho:
> 
> The bug will need to be fixed in
> org.netbeans.modules.apisupport.installer.actions.BuildInstallersAction
> which is either part of installer or Ant apisupport.
Comment 11 Jaroslav Tulach 2012-07-09 11:58:29 UTC
ergonomics#ffe6a21bdd05
Comment 12 Jiri Rechtacek 2012-07-09 12:10:39 UTC
The patch looks good for me too. Thanks

(In reply to comment #10)
> Can you please integrate patch to trunk? I'll verify ASAP.

Also was transplanted to core-main for your easy verification - http://hg.netbeans.org/core-main/rev/9b1112a899da

>then we can evaluate putting it to 7.2..
> Thanks in advance.
> 
> (In reply to comment #6)
> > Candidate for 7.2 FCS imho:
> > 
> > The bug will need to be fixed in
> > org.netbeans.modules.apisupport.installer.actions.BuildInstallersAction
> > which is either part of installer or Ant apisupport.
Comment 13 Tomas Danek 2012-07-09 14:59:28 UTC
Unfortunatelly fix does not help, build of installers still fail. Since it's late for another attempt, adding RELNOTE keyword and 72patch_candidate sw.
Comment 14 Jaroslav Tulach 2012-07-09 15:18:32 UTC
ergonomics#6a822de260f9
Comment 15 Jaroslav Tulach 2012-07-09 20:04:37 UTC
Improved fix integrated into release72 branch: d224ea722320
Comment 16 Quality Engineering 2012-07-10 06:43:04 UTC
Integrated into 'releases', will be available in build *201207092359* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/d224ea722320
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #214983: Backport of so-so fix into release72. Works at least with newly created project. Who knows what it does after some extensive re-configurations...
Comment 17 Tomas Danek 2012-07-10 08:59:33 UTC
Fix (hack) seems to work in 7.2, verified.

Product Version: NetBeans IDE 7.2 (Build 201207092359)
Java: 1.7.0_06-ea; Java HotSpot(TM) 64-Bit Server VM 23.2-b08
System: Mac OS X version 10.7.4 running on x86_64; US-ASCII; en_US (nb)
User directory: /Users/tomas/Library/Application Support/NetBeans/7.2
Cache directory: /Users/tomas/Library/Caches/NetBeans/7.2
Comment 18 Quality Engineering 2012-07-11 03:29:01 UTC
Integrated into 'main-golden', will be available in build *201207110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9b1112a899da
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #214983: Read branding.token from platform.properties if it is there
(transplanted from ffe6a21bdd05100e07d52d3a64111b5e38c32239)