Commit 9be3e212 authored by Drew's avatar Drew

Use working directory

Extend our xcscheme-emission system to choose the correct working directory (bin) for the resulting executable
parent 8f695bbc
......@@ -119,6 +119,106 @@ func xcscheme(project: Pbxproj) -> String {
s += " </ArchiveAction>\n"
s += "</Scheme>\n"
}
else {
switch(obj.outputType) {
case .Application:
break
case .Executable:
s += "<Scheme\n"
s += " LastUpgradeVersion = \"0800\"\n"
s += " version = \"1.3\">\n"
s += " <BuildAction\n"
s += " parallelizeBuildables = \"YES\"\n"
s += " buildImplicitDependencies = \"YES\">\n"
s += " <BuildActionEntries>\n"
s += " <BuildActionEntry\n"
s += " buildForTesting = \"YES\"\n"
s += " buildForRunning = \"YES\"\n"
s += " buildForProfiling = \"YES\"\n"
s += " buildForArchiving = \"YES\"\n"
s += " buildForAnalyzing = \"YES\">\n"
s += " <BuildableReference\n"
s += " BuildableIdentifier = \"primary\"\n"
s += " BlueprintIdentifier = \"\(obj.guid)\"\n"
s += " BuildableName = \"\(obj.name)\"\n"
s += " BlueprintName = \"\(obj.name)\"\n"
s += " ReferencedContainer = \"container:\(obj.name).xcodeproj\">\n"
s += " </BuildableReference>\n"
s += " </BuildActionEntry>\n"
s += " </BuildActionEntries>\n"
s += " </BuildAction>\n"
s += " <TestAction\n"
s += " buildConfiguration = \"Debug\"\n"
s += " selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n"
s += " selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n"
s += " shouldUseLaunchSchemeArgsEnv = \"YES\">\n"
s += " <Testables>\n"
s += " </Testables>\n"
s += " <MacroExpansion>\n"
s += " <BuildableReference\n"
s += " BuildableIdentifier = \"primary\"\n"
s += " BlueprintIdentifier = \"\(obj.guid)\"\n"
s += " BuildableName = \"\(obj.name)\"\n"
s += " BlueprintName = \"\(obj.name)\"\n"
s += " ReferencedContainer = \"container:\(obj.name).xcodeproj\">\n"
s += " </BuildableReference>\n"
s += " </MacroExpansion>\n"
s += " <AdditionalOptions>\n"
s += " </AdditionalOptions>\n"
s += " </TestAction>\n"
s += " <LaunchAction\n"
s += " buildConfiguration = \"Debug\"\n"
s += " selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n"
s += " selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n"
s += " launchStyle = \"0\"\n"
s += " useCustomWorkingDirectory = \"YES\"\n"
s += " customWorkingDirectory = \"$(PROJECT_DIR)/bin\""
s += " ignoresPersistentStateOnLaunch = \"NO\"\n"
s += " debugDocumentVersioning = \"YES\"\n"
s += " debugServiceExtension = \"internal\"\n"
s += " allowLocationSimulation = \"YES\">\n"
s += " <BuildableProductRunnable\n"
s += " runnableDebuggingMode = \"0\">\n"
s += " <BuildableReference\n"
s += " BuildableIdentifier = \"primary\"\n"
s += " BlueprintIdentifier = \"\(obj.guid)\"\n"
s += " BuildableName = \"\(obj.name)\"\n"
s += " BlueprintName = \"\(obj.name)\"\n"
s += " ReferencedContainer = \"container:GitLabKitTests.xcodeproj\">\n"
s += " </BuildableReference>\n"
s += " </BuildableProductRunnable>\n"
s += " <AdditionalOptions>\n"
s += " </AdditionalOptions>\n"
s += " </LaunchAction>\n"
s += " <ProfileAction\n"
s += " buildConfiguration = \"Release\"\n"
s += " shouldUseLaunchSchemeArgsEnv = \"YES\"\n"
s += " savedToolIdentifier = \"\"\n"
s += " useCustomWorkingDirectory = \"NO\"\n"
s += " debugDocumentVersioning = \"YES\">\n"
s += " <BuildableProductRunnable\n"
s += " runnableDebuggingMode = \"0\">\n"
s += " <BuildableReference\n"
s += " BuildableIdentifier = \"primary\"\n"
s += " BlueprintIdentifier = \"\(obj.guid)\"\n"
s += " BuildableName = \"\(obj.name)\"\n"
s += " BlueprintName = \"\(obj.name)\"\n"
s += " ReferencedContainer = \"container:\(obj.name).xcodeproj\">\n"
s += " </BuildableReference>\n"
s += " </BuildableProductRunnable>\n"
s += " </ProfileAction>\n"
s += " <AnalyzeAction\n"
s += " buildConfiguration = \"Debug\">\n"
s += " </AnalyzeAction>\n"
s += " <ArchiveAction\n"
s += " buildConfiguration = \"Release\"\n"
s += " revealArchiveInOrganizer = \"YES\">\n"
s += " </ArchiveAction>\n"
s += "</Scheme>\n"
s += "\n"
case .StaticLibrary, .TestTarget: break
}
}
}
}
return s
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment