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 71128 - ZIP of platform app built on Windows will not launch on Unix
Summary: ZIP of platform app built on Windows will not launch on Unix
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
: 71633 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-07 02:32 UTC by willismorse
Modified: 2006-04-18 21:07 UTC (History)
2 users (show)

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 willismorse 2006-01-07 02:32:45 UTC
When I run a zip distribution of my branded platform app on Windows, it runs fine. On Linux or Mac OS 
X, however, it launches as a plain Netbeans app.

The problem is in the way the UNIX launcher script builds up the -clusters parameter for nbexec. It 
does this by parsing the etc/XXX.clusters file.

In recent builds of NB, this clusters file is being created with DOS line endings when I build a zip 
distribution. As a result, the launcher script can't parse it properly and all custom cluster settings are 
ignored, resulting in a plain Netbeans app instead of my branded app.

When I manually change my clusters file's line endings to UNIX, my branded app launches correctly.

Not sure whether this is a flaw in the launcher script (should it be able to handle DOS line endings?), or 
should all settings files be created with UNIX line endings?
Comment 1 willismorse 2006-01-07 02:35:05 UTC
Also, I'm creating this zip distribution on Windows.
Comment 2 Jesse Glick 2006-01-09 20:50:58 UTC
Probably need to make the ZIP distro on Unix as a workaround, or just replace
\r\n with \n after the fact.

Will have to investigate a bit but I think it should suffice to always write the
file with 
 rather than ${line.separator} in suite.xml#build-launchers,
assuming the Windows launcher can read this OK. I am not sure what
app.cpp#readClusterFile is doing exactly - it seems to be fgets() to split
lines, but also ignores '\n' and some other chars within a line? Is that really
right?
Comment 3 Jesse Glick 2006-01-10 17:33:22 UTC
Reporter says Windows app works OK with \n in clusters.file, so will do that.
Comment 4 Jesse Glick 2006-01-10 18:55:04 UTC
Reporter and/or QA, please verify.

committed     Up-To-Date  1.27        apisupport/harness/release/suite.xml
Comment 5 Jan Chalupa 2006-01-10 20:33:49 UTC
Re "ignores '\n' and some other chars within a line":

Should be fine. The routine ignores all leading white-space chars at the
beginning of the line. New-line characters ('\r', '\n') are considered to be
valid parts of the string returned from fgets().

The .clusters file may include comments (starting with '#'), blank lines, lines
with leading white-space. When a sequence of non-white-space chars in a line, it
is supposed to be the name of a cluster.

Comment 6 pzajac 2006-01-11 10:47:09 UTC
Verified. I built the app on win2k and try it on different unix platforms -
linux, MacOS, Solaris. 
Comment 7 Jesse Glick 2006-04-18 21:07:48 UTC
*** Issue 71633 has been marked as a duplicate of this issue. ***