diff --git a/cetodo/cetodo.coedit b/cetodo/cetodo.coedit index d82ebf49..369aa340 100644 --- a/cetodo/cetodo.coedit +++ b/cetodo/cetodo.coedit @@ -5,7 +5,7 @@ object CurrentProject: TCEProject messagesOptions.additionalWarnings = True outputOptions.boundsCheck = onAlways outputOptions.unittest = True - pathsOptions.outputFilename = '..\lazproj\cetodo.exe' + pathsOptions.outputFilename = '..\lazproj\cetodo' preBuildProcess.options = [] preBuildProcess.showWindow = swoNone postBuildProcess.options = [] @@ -22,7 +22,7 @@ object CurrentProject: TCEProject outputOptions.boundsCheck = offAlways outputOptions.optimizations = True outputOptions.release = True - pathsOptions.outputFilename = '..\lazproj\cetodo.exe' + pathsOptions.outputFilename = '..\lazproj\cetodo' preBuildProcess.options = [] preBuildProcess.showWindow = swoNone postBuildProcess.options = [] @@ -33,7 +33,7 @@ object CurrentProject: TCEProject Sources.Strings = ( 'cetodo.d' ) - ConfigurationIndex = 1 + ConfigurationIndex = 0 LibraryAliases.Strings = ( 'libdparse' ) diff --git a/src/ce_project.pas b/src/ce_project.pas index 06732490..7b42ba57 100644 --- a/src/ce_project.pas +++ b/src/ce_project.pas @@ -457,14 +457,22 @@ procedure TCEProject.updateOutFilename; begin fOutputFilename := currentConfiguration.pathsOptions.outputFilename; // field is specified - if fOutputFilename <> '' then begin + if fOutputFilename <> '' then + begin fOutputFilename := symbolExpander.get(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 // try to guess else if Sources.Count > 0 then 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 := stripFileExt(fOutputFilename); if FileExists(fileName) then