Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Build Tools    [ Add a report in this area ]  
Report #:  89923   Status: Closed
Delphi project target file extension is truncated
Project:  Delphi Build #:  15.0.3953.35171
Version:    15.0 Submitted By:   Clayton Arends
Report Type:  Basic functionality failure Date Reported:  11/24/2010 11:06:14 AM
Severity:    Commonly encountered problem Last Updated: 10/17/2012 9:06:50 PM
Platform:    All platforms Internal Tracking #:   281323
Resolution: Fixed (Resolution Comments) Resolved in Build: : XE3
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 10
Description
Consider a Delphi project that requires an alternate extension than .exe for the resultant binary. The way this is handled in RAD Studio is to change the "Target file extension" property at "Project | Options | Application".

Using this property XE truncates the file extension to three characters.  For example, if a project name is "Project1" and the "Target file extension" is set to "myext" the resultant binary name will be:

  Project1.mye

This setting works the same way in RS2010 and RS2009.  I have not tested any other IDE's.
Steps to Reproduce:
- Create a new Delphi project (console, vcl forms application, etc)
- Choose "Project  | Options" from the main menu
- Choose the "Application" page
- Change "Target file extension" to "myext"
- Click "OK"
- Build the project
- Open the output directory in Windows Explorer, etc and inspect the file name

exp: Project1.myext
act: Project1.mye
Workarounds
Create build events to produce the correct file extension.  I created the following post-build event:

if exist "$(OUTPUTDIR)$(OUTPUTNAME).mye" (
  if exist "$(OUTPUTDIR)$(OUTPUTNAME).myext" del "$(OUTPUTDIR)$(OUTPUTNAME).myext"
  ren "$(OUTPUTDIR)$(OUTPUTNAME).mye" "$(OUTPUTNAME).myext"
)
Attachment
QC 89923.zip
Comments

Clayton Arends at 9/23/2012 5:41:01 AM -
This bug still existed in XE2.  It appears to have been fixed in XE3.  Please close and marked as resolved in "XE3".

Tomohiro Takahashi at 9/23/2012 7:19:32 PM -
Thanks for the confirmation. I will check the internal status of this report...

ALI TAMER KÖSELER at 5/21/2013 6:25:17 AM -
I'm usind Delphi XE2.
Is there a way to fix it for me?

Clayton Arends at 5/22/2013 10:37:36 AM -
The workaround posted in the "Workarounds" area should work in XE2.  It's not perfect but I doubt Embarcadero will fix XE2.

Server Response from: ETNACODE01