Summary: | Run Options not honored | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Karl Robillard <karlr> |
Component: | Build tools: Custom Makefiles | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.0.0b1 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Karl Robillard
2003-11-26 02:06:31 UTC
What project manager is this? QMake? Karl replied:
>>>
I have no idea. I see nothing in the Project options dialog which refers to a
'project manager' or QMake. If you are asking about the project type, then I
started the project by importing an existing project of "Generic C++
Application (Custom Makefiles)".
<<<
Looks like another problem in custom project
Hello, I have exactly the same problem as Karl with kdevelop 3.0.0rc1. The run-path is not correctly set if I change it in the project-settings. Whatever you type in the settings, kdevelop always seems to cd to the directory where the binary is and than execute it from there. Quite annoying! Actually my project is also a custom-project. Greetings, Dietrich Yes this is a custom-project known issue. If you use autotools it works fine I'll try to fix it in the next few days. Subject: KDE_3_2_BRANCH: kdevelop/buildtools/custommakefiles CVS commit by aclu: fix: Bug 69035: Run Options not honored (custommakefiles) CCMAIL: 69035-done@bugs.kde.org M +19 -24 customprojectpart.cpp 1.68.2.1 --- kdevelop/buildtools/custommakefiles/customprojectpart.cpp #1.68:1.68.2.1 @@ -592,23 +592,9 @@ void CustomProjectPart::slotExecute() } - QString directory; - QString program = project()->mainProgram(); - int pos = program.findRev('/'); - if (pos != -1) { - // Directory where the executable is - directory = program.left(pos+1); - // Executable name with a "./" prepended for execution with bash shells - program = "./" + (project()->mainProgram()).mid(pos+1); - } - - program += " " + DomUtil::readEntry(*projectDom(), "/kdevcustomproject/run/programargs"); - // Get the run environment variables pairs into the environstr string // in the form of: "ENV_VARIABLE=ENV_VALUE" // Note that we quote the variable value due to the possibility of // embedded spaces - DomUtil::PairList envvars = - DomUtil::readPairListEntry(*projectDom(), "/kdevcustomproject/run/envvars", "envvar", "name", "value"); - + DomUtil::PairList envvars = runEnvironmentVars(); QString environstr; DomUtil::PairList::ConstIterator it; @@ -616,18 +602,27 @@ void CustomProjectPart::slotExecute() environstr += (*it).first; environstr += "="; -/* -#if (KDE_VERSION > 305) - environstr += KProcess::quote((*it).second); -#else - environstr += KShellProcess::quote((*it).second); -#endif -*/ environstr += EnvVarTools::quote((*it).second); environstr += " "; } - program.prepend(environstr); + + if (mainProgram(true).isEmpty()) + // Do not execute non executable targets + return; + + 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(), "/kdevcustomproject/run/terminal"); - appFrontend()->startAppCommand(directory, program, inTerminal); + + kdDebug(9025) << "runDirectory: <" << runDirectory() << ">" <<endl; + kdDebug(9025) << "environstr : <" << environstr << ">" <<endl; + kdDebug(9025) << "mainProgram : <" << mainProgram(true) << ">" <<endl; + kdDebug(9025) << "runArguments: <" << runArguments() << ">" <<endl; + + appFrontend()->startAppCommand(runDirectory(), program, inTerminal); } |