mirror of https://gitlab.com/basile.b/dexed.git
improved updateOutFilename under windows
This commit is contained in:
parent
3998394c58
commit
9c22892361
|
|
@ -5,7 +5,7 @@ object CurrentProject: TCEProject
|
||||||
messagesOptions.additionalWarnings = True
|
messagesOptions.additionalWarnings = True
|
||||||
outputOptions.boundsCheck = onAlways
|
outputOptions.boundsCheck = onAlways
|
||||||
outputOptions.unittest = True
|
outputOptions.unittest = True
|
||||||
pathsOptions.outputFilename = '..\lazproj\cetodo.exe'
|
pathsOptions.outputFilename = '..\lazproj\cetodo'
|
||||||
preBuildProcess.options = []
|
preBuildProcess.options = []
|
||||||
preBuildProcess.showWindow = swoNone
|
preBuildProcess.showWindow = swoNone
|
||||||
postBuildProcess.options = []
|
postBuildProcess.options = []
|
||||||
|
|
@ -22,7 +22,7 @@ object CurrentProject: TCEProject
|
||||||
outputOptions.boundsCheck = offAlways
|
outputOptions.boundsCheck = offAlways
|
||||||
outputOptions.optimizations = True
|
outputOptions.optimizations = True
|
||||||
outputOptions.release = True
|
outputOptions.release = True
|
||||||
pathsOptions.outputFilename = '..\lazproj\cetodo.exe'
|
pathsOptions.outputFilename = '..\lazproj\cetodo'
|
||||||
preBuildProcess.options = []
|
preBuildProcess.options = []
|
||||||
preBuildProcess.showWindow = swoNone
|
preBuildProcess.showWindow = swoNone
|
||||||
postBuildProcess.options = []
|
postBuildProcess.options = []
|
||||||
|
|
@ -33,7 +33,7 @@ object CurrentProject: TCEProject
|
||||||
Sources.Strings = (
|
Sources.Strings = (
|
||||||
'cetodo.d'
|
'cetodo.d'
|
||||||
)
|
)
|
||||||
ConfigurationIndex = 1
|
ConfigurationIndex = 0
|
||||||
LibraryAliases.Strings = (
|
LibraryAliases.Strings = (
|
||||||
'libdparse'
|
'libdparse'
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -457,14 +457,22 @@ procedure TCEProject.updateOutFilename;
|
||||||
begin
|
begin
|
||||||
fOutputFilename := currentConfiguration.pathsOptions.outputFilename;
|
fOutputFilename := currentConfiguration.pathsOptions.outputFilename;
|
||||||
// field is specified
|
// field is specified
|
||||||
if fOutputFilename <> '' then begin
|
if fOutputFilename <> '' then
|
||||||
|
begin
|
||||||
fOutputFilename := symbolExpander.get(fOutputFilename);
|
fOutputFilename := symbolExpander.get(fOutputFilename);
|
||||||
fOutputFilename := getAbsoluteFilename(fOutputFilename);
|
fOutputFilename := getAbsoluteFilename(fOutputFilename);
|
||||||
|
{$IFDEF WINDOWS}
|
||||||
|
// field is specified without ext or with a dot in the name.
|
||||||
|
// DMD will add the ext. (e.g: "-ofresourced")
|
||||||
|
if fileexists(fOutputFilename + exeExt) then
|
||||||
|
if currentConfiguration.outputOptions.binaryKind = executable then
|
||||||
|
fOutputFilename := fOutputFilename + exeExt;
|
||||||
|
{$ENDIF}
|
||||||
end
|
end
|
||||||
// try to guess
|
// try to guess
|
||||||
else if Sources.Count > 0 then
|
else if Sources.Count > 0 then
|
||||||
begin
|
begin
|
||||||
// ideally, main() should be searched for, when project type is executable
|
// ideally, main() should be searched for, when project binaryKind is executable
|
||||||
fOutputFilename := extractFilename(Sources.Strings[0]);
|
fOutputFilename := extractFilename(Sources.Strings[0]);
|
||||||
fOutputFilename := stripFileExt(fOutputFilename);
|
fOutputFilename := stripFileExt(fOutputFilename);
|
||||||
if FileExists(fileName) then
|
if FileExists(fileName) then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue