Bug 61415 - program does not run
Summary: program does not run
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 3.0.0a5
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-19 08:04 UTC by shift
Modified: 2003-07-21 11:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shift 2003-07-19 08:04:28 UTC
Version:           3.0.0a5 (using KDE 3.1.2)
Installed from:    SuSE
Compiler:          gcc version 3.3 20030226 (prerelease) (SuSE Linux)
OS:          Linux (i686) release 2.4.21-4-default

18-july-2003 snapshot

i dont have "." in my PATH, so when when i press F5 button, 
and gideon tried to start my program as: 

konsole --work-dir  /my/project/dir -e /bin/sh -c 'programname params' 
i have an error that

 /bin/sh: line 1: programname: command not found
Press Enter to continue!

of course i can fix it by adding PATH to enviroment vars in project options, 
but i did not have this error on previous kdevelop releases.
Comment 1 Harald Fernengel 2003-07-21 00:08:22 UTC
Project options -> Run Options -> Main Program. Just set it to ./blah. 
 
Which project type are you using and which project management (qmake? automake?) 
Comment 2 Amilcar do Carmo Lucas 2003-07-21 11:08:07 UTC
Subject: kdevelop/parts

CVS commit by aclu: 

I accidentatly created bug 61415 last week. This fixes it.

CCMAIL: 61415-done@bugs.kde.org


  M +7 -1      autoproject/autoprojectpart.cpp   1.101
  M +2 -0      trollproject/trollprojectwidget.cpp   1.109


--- kdevelop/parts/autoproject/autoprojectpart.cpp  #1.100:1.101
@@ -920,5 +920,11 @@ void AutoProjectPart::slotExecute2()
     }
 
-    QString program = environstr + mainProgram(true) + " " + runArguments();
+    QString program = environstr;
+    // Adds the ./ that is necessary to execute the program in bash shells
+    if (!mainProgram(true).startsWith("/"))
+        program += "./";
+    program += mainProgram(true);
+    program += " " + runArguments();
+
     bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevautoproject/run/terminal");
 

--- kdevelop/parts/trollproject/trollprojectwidget.cpp  #1.108:1.109
@@ -2621,4 +2621,6 @@ void TrollProjectWidget::slotExecuteProj
 {
     QString program = m_part->mainProgram();
+    if (!program.startsWith("/"))
+        program.prepend("./");
 
     if ( program.isEmpty() ) {