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 177669 - Can't launch configure script on Windows
Summary: Can't launch configure script on Windows
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-26 06:14 UTC by soldatov
Modified: 2009-12-03 05:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Please, review patch to integrate in release88 (22.45 KB, patch)
2009-11-30 03:40 UTC, Alexander Simon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2009-11-26 06:14:48 UTC
Scenario1:
- Create shell script in project
- Run it from context menu
==>
Cannot run program "sh .\newshell1.sh" (in directory "C:\Documents and Settings\tester\My Documents\NetBeansProjects\CppApplication_1"): CreateProcess error=2, The system cannot find the file specified
RUN FAILED

Scenario2:
Can't configure source based project
==>
Cannot run program "sh .\configure CC=C:\util\cygwin\bin\gcc.exe CXX=C:\util\cygwin\bin\g++.exe CFLAGS="-g3 -gdwarf-2" CXXFLAGS="-g3 -gdwarf-2"" (in directory "C:\test_projects\litesql-0.3.1"): CreateProcess error=2, The system cannot find the file specified
RUN FAILED
Comment 1 Andrew Krasny 2009-11-26 09:14:24 UTC
The root cause is usage of setCommandLine, which doesn't work on Windows ;( See https://netbeans.org/bugzilla/show_bug.cgi?id=170748
Comment 2 Alexander Pepin 2009-11-26 10:20:25 UTC
This bug is a potential showstopper, please fix it as soon as practical.
Comment 3 Alexander Simon 2009-11-27 03:32:08 UTC
fixed in cnd-main:

changeset 599ff4f8a390 in cnd-main
details: http://hg.netbeans.org/cnd-main?cmd=changeset;node=599ff4f8a390

changeset 93cfe0684ea8 in cnd-main
details: http://hg.netbeans.org/cnd-main?cmd=changeset;node=93cfe0684ea8

changeset 76308d070f1b in cnd-main
details: http://hg.netbeans.org/cnd-main?cmd=changeset;node=76308d070f1b

changeset 3bac37b27fc9 in cnd-main
details: http://hg.netbeans.org/cnd-main?cmd=changeset;node=3bac37b27fc9

changeset b4453021174e in cnd-main
details: http://hg.netbeans.org/cnd-main?cmd=changeset;node=b4453021174e
Comment 4 Alexander Simon 2009-11-27 03:41:50 UTC
QA, please, verify fix that available since build 2304:
http://bertram.netbeans.org/hudson/job/cnd-main/2304/
and evaluate as a showstopper for NB6.8
Comment 5 Alexander Simon 2009-11-27 04:04:10 UTC
not fixed if command folder does not in paths
Comment 6 Alexander Pepin 2009-11-27 04:07:19 UTC
It's a showstopper for FCS.
Comment 7 Quality Engineering 2009-11-27 06:09:32 UTC
Integrated into 'main-golden', will be available in build *200911271400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/599ff4f8a390
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed BZ#177669 Can't launch shell script on Windows
Comment 8 Alexander Simon 2009-11-27 07:54:06 UTC
Additional fix:
changeset 1401425d9660 in cnd-main
details: http://hg.netbeans.org/cnd-main?cmd=changeset;node=1401425d9660
Comment 9 Alexander Simon 2009-11-27 09:23:01 UTC
Fix will be available in build:
http://bertram.netbeans.org/hudson/job/cnd-main/2309/
Comment 10 Alexander Pepin 2009-11-27 12:06:50 UTC
verified in cnd-dev build #2309.
 Please integrate the fix into release68 clone. Change the status back to RESOLVED FIXED as soon as the fix is implemented.
Comment 11 soldatov 2009-11-27 12:33:04 UTC
checked "C/C++ Project with Existing Sources" wizard on OpenSolaris (intel), Linux and Windows
Comment 12 Alexander Simon 2009-11-27 15:14:52 UTC
Additional fix for *.bat and *.cmd:
http://hg.netbeans.org/cnd-main/rev/d2c7152061bb
Comment 13 Alexander Simon 2009-11-28 00:07:53 UTC
Fix is available in build:
http://bertram.netbeans.org/hudson/job/cnd-main/2311/
Comment 14 Alexander Simon 2009-11-28 00:54:01 UTC
So final list of changesets:
599ff4f8a390 93cfe0684ea8 76308d070f1b 3bac37b27fc9 b4453021174e 1401425d9660 d2c7152061bb
Comment 15 Quality Engineering 2009-11-28 03:21:53 UTC
Integrated into 'main-golden', will be available in build *200911280200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/1401425d9660
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed BZ#177669 Can't launch shell script on Windows
Comment 16 soldatov 2009-11-28 05:09:39 UTC
I think fix is correct
I see small problem, but it can be fixed in next release.

Scenario:
- Add ".bat" file with such text:
@echo %1
@echo %2
@echo %3
@echo %PATH%
@if %2 == 2 echo "correct"
@if %2 == "2" echo "wrong"
- in Properties tab call context menu and select Properties menu item
- Add such text into Arguments text field: "-g3 -gdwarf-2" 2
- Run it
==>
"-g3 -gdwarf-2"  <--- -g3 -gdwarf-2
"2"              <--- 2
ECHO is on.
D:\MinGW\bin;D:\msys\1.0\bin;D:\cygwin_dir;D:\JavaFX\javafx-sdk1.2\bin;D:\JavaFX\javafx-sdk1.2\emulator\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Program Files\QuickTime\QTSystem\;E:\usr\bin;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\WINDOWS\system32\WindowsPowerShell\v1.0;D:\Program Files\Mercurial;D:\JavaFX\javafx-sdk1.2\bin;D:\JavaFX\javafx-sdk1.2\emulator\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Program Files\QuickTime\QTSystem\;E:\usr\bin;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\WINDOWS\system32\WindowsPowerShell\v1.0;D:\Program Files\Mercurial;D:/Qt/4.6.0-rc1/bin;D:\cygwin_dir\bin
"wrong"         <--- correct

RUN SUCCESSFUL (total time: 4s)
Comment 17 Quality Engineering 2009-11-28 14:23:00 UTC
Integrated into 'main-golden', will be available in build *200911281400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d2c7152061bb
User: alexvsimon@netbeans.org
Log: fixed BZ#177669 Can't launch shell script on Windows
- extra fix for .bat & .cmd
Comment 18 Alexander Simon 2009-11-30 03:40:53 UTC
Created attachment 91852 [details]
Please, review patch to integrate in release88
Comment 19 Alexander Simon 2009-11-30 04:26:56 UTC
sorry release68
Comment 20 Andrew Krasny 2009-11-30 07:17:46 UTC
Thanks, Alexander, for the fix.

Apart the note about normalizeParameters() method (the case when string has both quotes and slashes) the fix is OK. 
It solves this exact problem and doesn't require more dangerous changes in other modules [execution]. But as a long term solution (for the next release) things could (and should) be simplified.

=Andrew
Comment 21 Alexander Simon 2009-11-30 07:32:05 UTC
fixed in release68 in change set:
http://hg.netbeans.org/release68/rev/a4a16fed142d
Comment 22 Quality Engineering 2009-12-01 03:02:20 UTC
Integrated into 'main-golden', will be available in build *200912010200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/eef7baf0b3a0
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed BZ#177669 Can't launch shell script on Windows
- additional fix  after Andrew review
Comment 23 Alexander Pepin 2009-12-03 05:02:22 UTC
Verified in RC2 build 2009-12-02_22-00-34