July 27th, 2012, 08:24 AM
How to Run Finished Delphi Tool?
I cannot seem to figure the following issue and been trying to search for it a lot. I found one topic on about.delphi.com that matches the issue but its not helpful. I have windows xp and delphi 7. My two questions are:
1. How do I run the finished coding tool (its very little, very very basic one - just few buttons, few basic elements and thats it) outside of Delphi environment? I would like to run it as an installed software or as windows software. So with double click. It would open normally on windows and NOT in delphi environment. How to I do this? I have been searching a lot for converter like ''to exe'' converter but nothing found. Need to run it with double click just like any other software. Please provide me detail explanation.
2. If I permanently uninstall everything (even from windows registry) what is related to delphi, so entire environment, will I be still able to run and use the tiny tool (without any error) that I finished coding? or am I required to have any installation delphi file?
July 27th, 2012, 09:20 AM
is noone using this forum?
July 27th, 2012, 10:15 AM
Delphi creates a windows executable file so when you run your program (or compile/build) you are creating an .exe file. You need to find that .exe file the program created (which will be in the same directory where you saved your source code - unless you configured Delphi to do otherwise).
When you find it, you can double click it to launch it (no Delphi required) create a shortcut on your desktop and launch that way. It's up to you..
It's as simple as that...
July 27th, 2012, 03:11 PM
There was no exe anywhere. I checked three times both hard drives entirely. No exe anywhere. Nothing received from delphi compiler. When i run the tool, it works with NO errors. I can also give you the link via private message where this topic is being discussed but for this i would need your permission first - I don't want to bother without it.
However I would need some majority help with regetting / recreating this exe file because it seems to be NOwhere
July 27th, 2012, 04:31 PM
majlumbo if you could reply a bit faster please because it looks like the ''road'' ahead is really long before coming to the final solution. It has already passed a lot of time since your reply was received. Been looking for that EXE as well as trying to recreate it for days...
July 27th, 2012, 04:47 PM
Could be that you aren't seeing the EXE because of Windows UAC settings. Try setting the project output folder (Project->Options) to something that your login account definitely has write access to, (e.g. My Documents\Delphi\Projects).
Then hit CTRL-F9 to compile and it should put the .EXE file in the My Documents\Delphi\Projects folder.
As an aside, this forum is completely staffed by volunteers. No one here gets paid to answer questions, so if you want faster help for your questions, it is better to hire a competent delphi programmer.
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
July 27th, 2012, 05:31 PM
Scorp thank you for reply. I checked Documents and Settings on both hard drive, additionally checked ''Delphi'' folder but it (folder) isn't located in neither of Documents and Settings locations. Don't know what UAC Setting is but I for sure don't have enabled Hide System Files option. I tried to set up NONdefault output folder in Project\Options but EXE file didn't occur there. Tried to compile. Still no EXE file anywhere. Also double checked entire Delphi installation folder.
Ok will try to wait a bit longer.
July 27th, 2012, 06:01 PM
Assuming this is a project to create an exe and not a DLL.
If the Delphi compile completed successfully and you can run the project then the EXE exists. Period.
Delphi/Pascal is not an interpreted language and the only way you can run the project is if the exe exists.
You need to discover why you can not find it.
I have never heard of an option to delete the exe after it runs.
How is your output directory defined in your project options?
July 27th, 2012, 06:25 PM
clivew I am able to run (f9) the project within compiler with no problem. No error occurs. Everything within compiler works as I want. But I want it to be working like ANY other software installed within Windows. So just via double click and totally independently from any file (or entire delphi compiler) which is anyhow linked with delphi. So I could uninstall delphi. The EXE doesn't seem to exist, I have been checking whole day. Everywhere, even from cmd, EXE file is nowhere. When I press ctrl alt del at the time while project is within compiler still being runned, in the list of currently runned application is Project1.exe which probably belongs to delphi. But this file doesn't exist so i don't know how it can occur on runned application list. As you know, there is no opportunity to check the path from each runned process (ctrl alt del).
Output directory is blank. Which means exe should come to the same folder as other delphi files. It didn't. I tried to set custom folder. EXE didn't come there too. I checked three times entire installation folder. It is NOwhere. So I have to find a way to make it appear.
July 27th, 2012, 07:02 PM
It IS there if you see it in the running applications.
I suggest (as has partially already been suggested)
1. Rename the project from Project1 to something more meaningful (and easier to search for).
2. Define a specific Output directory - don't leave it blank.
How (and where in the IDE) did you define your custom folder previously and what did it contain after a build?
3. Did you find the *.dcu files?
4. Have you searched all your drives using a file search utility other than Windows Explorer?
July 27th, 2012, 09:12 PM
Alter (or create) the Main Form's OnFormCreate method to include this line..
Originally Posted by ItsNotMe
procedure TForm1.FormCreate(Sender: TObject);
Caption := ParamStr(0);//add this line
Run your program from within Delphi.
Your program's caption will display the the full path of where your executable is running from and its name.
Comments on this post
Last edited by majlumbo; July 27th, 2012 at 09:16 PM.
July 28th, 2012, 03:25 AM
2. I have defined it already. If the term ''IDE'' is the same as ''compiler'' then I defined custom folder in Project\Options\Directories/Conditionals near Output directory. After it build it contained the custom folder. I also tried without anything determinated there. In both situations EXE file for sure didn't occur anywhere. Could be a problem that I defined the path to the folder which already have delphi related files to this project? I also tried to define different one. Still no EXE file anywhere.
3. Yes dcu files and other delphi related files are there.
4. I used explorer, used start menu button\search\files and folders and i also used cmd's dir command. Also additionally checked Documents and Settings as well as installation folder.
What does ''OnFormCreate method'' mean? Where is this method located and where do I type your suggested code? I don't have any experiences in Delphi, neither in programming at all. Also I think that the compiler will give me error because of your line with ''...''. So I cannot just copy paste. Do I need to paste this code in separate (if so, where) project or in project where EXE is missing? I would say the project where EXE is missing .
July 28th, 2012, 05:02 AM
In addition to my previouns reply:
I added into the code of the software the code which you majlumbo added but i deleted the line ''...''. When i tried to run I get two weird errors, never seen anything like that before:
Undeclared identifier: 'FormCreate'
Undeclared identifier: 'Caption'
July 28th, 2012, 06:21 AM
Sorry for the third message in a row. But to further clarify myself and to show that the severity of the problem is serious, I downloaded Process Explorer software which is showing the path of currently runned processes. Task Manager doesn't do that. I uploaded two screenshots. The second one looks a bit weird at the top part because I was constructing two images together. Here they are:
Oh and regarding second image: I cutted too much. Near ''I guarantee this'' I was supposted to say the rest of the sentence that I guarantee, after looking for this exe file for days, that it doesn't exist on hard drive.
July 28th, 2012, 07:51 AM
To get the formCreate method, you need to add it. That's why I said "alter or add"
So, with your program open in Delphi,
1) click anywhere on your form, but NOT on a component placed on the form. Has to be on the form itself.
2) In your Object Inspector, click on the EVENTS tab.
3) Scroll down to OnCreate
4) Doubleclick in the space to the right (where it is empty),
(it will add the FormCreate Method and a reference to it in the area you just clicked in)
5) Add the code I told you after the begin and before the end.
6) get rid of what you added before that caused the Undeclared identifier error
procedure TForm1.FormCreate(Sender: TObject);
Caption := Paramstr(0);
7) Run your program.
8) Get a Delphi Book.