I'm having this strange issue for the first time in my 15+ experience of using Delphi.
This is the icon I set in the project options (XE4):
And this is the resulting application icon after compiled:
I've no idea where does that icon come from and I have no way to change the icon (really driving me crazy).
The icon of this project has been ok for over a year until later today. Things I've tried with no luck:
Use the 'Load Icon...' button to change it to another complete different icon and re-build.
Use the 'Default' button to reset to default icon and re-build.
Deleted project1.res file and re-build.
Deleted the .dproj file, open .dpr file instead and let the Delphi IDE created a blank new .dproj file. no luck.
I thought it's the Windows 7's IconCache.db file corrupted, deleted that file and restarted Windows, no help. Actually I used Resource Hacker to confirmed it's not the Windows Explorer displaying the wrong icon but it's the icon resource in the EXE is wrong... too strange.
restored the .dproj file from SVN to yesterday(the icon was ok yesterday)'s revision and no luck.
Anything else do you suggest me to try? Thank you!
Review the line in your main form with {$R *.res}. I had the same issue and it was that this line was accidentally deleted. That caused that icon and other resouces to not be correct in the final executable, like version number, icons etc.
If you don't know what that line is, simply make a few empty new vcl application and search it in the main form.
Related
I wannted to use another editor then the "normally" editor and so I downlowded notpad++.
Afterwards I tryed to use it in WinHugs, but there it comes the "Warning: Editor terminated abnormally".
I used File/Options/WinHugs/Editor and there I changed form "Notepad" to "Custom..." and changed the file path to "C:\Program Files\Notepad++\notpad++.exe". After trying to open the editor (":e") WinHugs striked and the Warningstuff came up.
What do I miss that it doesnt work? How can I fix it? Does anyone can help me?
Make sure that you have entered the correct path to Notepad++ exe in the "Custom..." field in the WinHugs options. Check this path by right-clicking on the Notepad++ shortcut and select the "Properties".
You could also try running Notepad++ as an administrator.
If you are still having trouble, you may want to try using a different text editor. I recommend checking out VS code as an alternative.
I solved the problem.
Instead of using the path "C:\Program Files\Notepad++\notpad++.exe" I copy pasted the folder just next to Program Files and used the path "C:\Notepad++\notpad++.exe". Afterwards it runs perfectly.
All in all next time I just try to relocaed the folders and other datas. May this help in futer problems.
I wanted to release an app I worked on and quickly change the project name. I usually duplicate projects before doing things like this but this time - because this procedure always worked on Xcode as I found it way more reliable than e.g. Eclipse - I didn't, which I immediately regretted.
Opened Xcode again and now I am seeing this
I guess all the linking is gone now which is why Xcode doesn't "find" the files anymore. Renaming the remaining project stem to the old name gives
couldn’t be moved to because an item with the
same name already exists
and also manual renaming of folders won't work as the .xcodeproj is gone.
The project is written in Objective-C, and all the classes are still persistent, but the effort of adding all the xib's, referencing the outlets, setting architectures, etc will become the nightmare of my life. I do have a half-way recent backup but everything I did to make the app store-ready today will be gone.
Any ideas on how to rescue my project?
EDIT: What Xcode is now showing on the welcome screen is a project called "project" (literally) and it has the usual compass icon but with a white instead of a blue background referring to the path <project folder>/<new project name>/ and below that "white" project there is a folder icon with the new name pointing to <project folder>.
I also made a snapshot before, of course it now says "Unable to read snapshots" in the "restore from snapshots" window.
Ok what I now did is renaming ALL references from the old project name to the new one. I even changed file names. I used Xcode's CMD+SHIFT+F and TextWrangler's "replace" function and thankfully I still had the .xcodeproj from yesterday's backup so from there I could copy it into the new project and rename stuff. There are still some things that don't work perfectly, for example auto layout doesn't "stretch" contents over the screen (it stays on iPhone 4s size, even on 6 plus simulator), I needed to set the scheme again and Launch Images / Icons got lost but I can look over that. The only thing I am afraid of now is that the final build might miss out a symbol or something like that so I eventually have a corrupt file in the App Store, but man it's a beta version, how much worse can it get anyway?
Thanks to everyone recommending me to even backup the broken project, I did this even before you said it but because I think it's a valuable advice I wanted to put it in my answer as well.
It's a shame that stuff like this can happen, I've been backing up my work on a daily basis and my project never got corrupted - until now.
I was assigned to make a small modification in a Delphi project.
To register that mod, my boss told me to increment the build number in Project options > Version Info.
I did that, but after compiling and building, when I look at the file properties, file version is not updated. The exe file was indeed compiled (I checked the modification date and it matches the time of build). The version number in the final EXE is unchanged, and not equal to the number I set in Version Info tab.
When I search Google about this, the only results I could find was tutorials to use this version feature and people with problems enabling it.
I tried reopening the project, deleting the generated EXE and rebuilding, removed the .RES file (the build fails because there's no RES file) and commented out the {$R *.RES} directive (no Version Info is included at all).
I'm not the original developer of this project, and the original one is not available anymore.
I think this could be related to this post, but it is from another Delphi version, and I couldn't find a dproj file in my project.
So, anyone knows whats wrong? Is it some kind of bug or am I missing something? Is there another option I should change so this option takes effect?
Use build instead of compile... it have no shortcut, you find it in Project menu (under compile)
I recently started a new project with nothing unusual about it. Whenever I go to use the Version Editor I get the message "No Editor" where the text normally would appear. Even stranger, this is the same for all my files except for the Project itself. It actually shows version history properly.
The only thing I've done differently with this project from any others is use Cocos2D and BitBucket (with GIT). Everything else is pretty vanilla.
You should select file and wait for long time.
Sometimes I have same issue with project file. After 3-5 minutes the issue was fixed (editor was loaded) and I can edit the conflict.
The Version Editor has always been pretty buggy.
Try File -> Source Control -> Refresh Status and see if it fixes it.
Embarcadero just released a whole bunch of neat looking icons that I'd like to use to make my Delphi 7 and 2009 apps look fancier. Is there a setting (or hack) in those IDEs that lets me change the default exe icon?
You could always use a resource editor to find the icon in the Delphi ide or bpl and change it to something else. That would be permanent for all new projects.
Apart from the fact that Andrey answered exactly what you asked I assume you want to add more icons to your executable than just the one you can set in the project option? This can be done by adding a *.rc file to the project. The following line should go into your project:
{$R 'Icons.res' 'Icons.rc'}
The rc file is a plain text file that Delphi compiles into a res. To the rc file add 1 icon per line like this:
XIcon01 ICON ".\Images\ico\ADDRESS2.ico"
XIcon02 ICON ".\Images\ico\ADDRESS3.ico"
XIcon03 ICON ".\Images\ico\ADDRESS4.ico"
The first part is the name of the icon. I chose names that come after Mainicon alphabetically with Mainicon being the icon that you define in the project options. I'm not sure (maybe somebody can confirm?) but I think that Delphi compiles the first icon as the application icon so I made sure my additional icons sort later.
In case you want to change the application's icon at runtime you can use the 2 Application.Icon.LoadFromResource routines.
Hope that helps