mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
Qt - remove hardcoding of app name in build config.
Change-Id: Ifccecc9a6b8d0ed8e1bf36e2002a126df29376c3
This commit is contained in:
parent
c1c656bda8
commit
3ec5060d54
1 changed files with 4 additions and 3 deletions
|
@ -113,19 +113,20 @@ public class QtBuildConfiguration extends CBuildConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Path getProgramPath() throws CoreException {
|
public Path getProgramPath() throws CoreException {
|
||||||
|
String projectName = getProject().getName();
|
||||||
switch (Platform.getOS()) {
|
switch (Platform.getOS()) {
|
||||||
case Platform.OS_MACOSX:
|
case Platform.OS_MACOSX:
|
||||||
// TODO this is mac local specific and really should be
|
// TODO this is mac local specific and really should be
|
||||||
// in the config
|
// in the config
|
||||||
// TODO also need to pull the app name out of the pro
|
// TODO also need to pull the app name out of the pro
|
||||||
// file name
|
// file name
|
||||||
Path appFolder = getBuildDirectory().resolve("main.app");
|
Path appFolder = getBuildDirectory().resolve(projectName + ".app");
|
||||||
Path contentsFolder = appFolder.resolve("Contents");
|
Path contentsFolder = appFolder.resolve("Contents");
|
||||||
Path macosFolder = contentsFolder.resolve("MacOS");
|
Path macosFolder = contentsFolder.resolve("MacOS");
|
||||||
return macosFolder.resolve("main");
|
return macosFolder.resolve(projectName);
|
||||||
case Platform.OS_WIN32:
|
case Platform.OS_WIN32:
|
||||||
Path releaseFolder = getBuildDirectory().resolve("release");
|
Path releaseFolder = getBuildDirectory().resolve("release");
|
||||||
return releaseFolder.resolve("main.exe");
|
return releaseFolder.resolve(projectName + ".exe");
|
||||||
default:
|
default:
|
||||||
throw new CoreException(
|
throw new CoreException(
|
||||||
new Status(IStatus.ERROR, Activator.ID, "platform not supported: " + Platform.getOS()));
|
new Status(IStatus.ERROR, Activator.ID, "platform not supported: " + Platform.getOS()));
|
||||||
|
|
Loading…
Add table
Reference in a new issue