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 248784 - Windows installer ant build
Summary: Windows installer ant build
Status: REOPENED
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-20 21:38 UTC by cezariusz
Modified: 2015-03-30 14:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Ant targets for a platform application (14.20 KB, image/png)
2014-11-21 07:18 UTC, cezariusz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cezariusz 2014-11-20 21:38:31 UTC
There is no ant target to build a Windows installer.
Comment 1 Libor Fischmeistr 2014-11-21 06:57:20 UTC
Please can you provide IDE log, or screenshot or whatever can help us find where is the problem?
Comment 2 cezariusz 2014-11-21 07:18:15 UTC
Created attachment 150603 [details]
Ant targets for a platform application
Comment 3 cezariusz 2014-11-21 07:22:30 UTC
I have created an application based on the NetBeans platform. I can build it from the NetBeans IDE and I can create a Windows installer using the IDE. I have also configured Jenkins for automated continuous integration builds using ant. I can build the application (using target "build"), I can build ZIP distribution (using target "build-zip"), I can see the target "build-mac", which I'm not interested in, but there is no target to automatically build a Windows installer (see the screenshot). I would expect a "build-windows" target there.
Comment 4 Libor Fischmeistr 2015-03-30 12:26:36 UTC
That isn't true. There is the build-mac task, because Macs installer quite differs from Windows and Linux installers (App wrapper...). So therefore you cannot find the task like build-windows. But you still can build the installer for Win only - just analyse the output of the building installers in IDE...
Comment 5 cezariusz 2015-03-30 14:15:25 UTC
I dare not agree. There is no simple ant task to build a Windows installer without defining several additional properties, which could be defined automatically. Let's go into details. For the standard build I call the "build" target of the "Desktop/NavApi/build.xml" ant file with two parameters:
nbplatform.nb801.netbeans.dest.dir=/var/lib/jenkins/jobs/Nav/workspace/Desktop/Platform
nbplatform.nb801.harness.dir=/var/lib/jenkins/jobs/Nav/workspace/Desktop/Platform/harness
That is quite easy. In order to build the installer, I have to call a different ant file, namely:
Desktop/Platform/harness/nbi/stub/template.xml
This is more tricky, because cannot do it in a single run of one ant file with multiple targets (clean build test build-windows). And this file could be calculated as for example:
${nbplatform.nb801.harness.dir}/nbi/stub/template.xml

Now parameters. Many of them.
suite.nbi.product.uid=navapi
nbi.stub.common.location=/var/lib/jenkins/jobs/Nav/workspace/Desktop/Platform/harness/nbi/.common
nbi.dock.icon.file=/var/lib/jenkins/jobs/Nav/workspace/Desktop/Platform/harness/etc/applicationIcon.icns
nbi.engine.jar=/var/lib/jenkins/jobs/Nav/workspace/Desktop/Platform/harness/modules/ext/nbi-engine.jar
nbi.ant.tasks.jar=/var/lib/jenkins/jobs/Nav/workspace/Desktop/Platform/harness/modules/ext/nbi-ant-tasks.jar
nbi.registries.management.jar=/var/lib/jenkins/jobs/Nav/workspace/Desktop/Platform/harness/modules/ext/nbi-registries-management.jar
nbi.icon.file=/var/lib/jenkins/jobs/Nav/workspace/Desktop/NavApi/branding/core/core.jar/org/netbeans/core/startup/frame48.gif
generator-jdk-location-forward-slashes=/var/lib/jenkins/tools/hudson.model.JDK/JDK8
pack200.enabled=true
nbi.stub.location=/var/lib/jenkins/jobs/Nav/workspace/Desktop/Platform/harness/nbi/stub
suite.location=/var/lib/jenkins/jobs/Nav/workspace/Desktop/NavApi
generate.installer.for.platforms=windows

All of them could be defined automatically, for example like this:
suite.nbi.product.uid=${branding.token}
nbi.stub.common.location=${nbplatform.nb801.harness.dir}/nbi/.common
nbi.dock.icon.file=${nbplatform.nb801.harness.dir}/etc/applicationIcon.icns
nbi.engine.jar=${nbplatform.nb801.harness.dir}/modules/ext/nbi-engine.jar
nbi.ant.tasks.jar=${nbplatform.nb801.harness.dir}/modules/ext/nbi-ant-tasks.jar
nbi.registries.management.jar=${nbplatform.nb801.harness.dir}/modules/ext/nbi-registries-management.jar
nbi.icon.file=branding/core/core.jar/org/netbeans/core/startup/frame48.gif
generator-jdk-location-forward-slashes=wtf?
pack200.enabled=${auxiliary.org-netbeans-modules-apisupport-installer.pack200-enabled}
nbi.stub.location=${nbplatform.nb801.harness.dir}/nbi/stub
suite.location=.
generate.installer.for.platforms=windows - that's obvious - I'm running build-windows target