T
T
TotTip2020-10-16 12:20:53
Delphi
TotTip, 2020-10-16 12:20:53

How to build a program (a few questions)?

Hello!
Sorry for the stupid question, but I want to know exactly how to do it right because I encountered such a question for the first time)
The program is written in Delphi 10.3
A couple of .dlls should lie next
to the exe file 1) I understand correctly that the exe file itself must be taken in the / debug folder /win32/Project1.exe ?
2) Is it possible to rename this exe file?
3) In the project settings, I indicated the logo and icon (for some reason, they do not change in the exe and in the tray) - should they (icons) also be kept near the exe file?
4) Another question - how best to store the default settings? (Now they are simply written in the code) There was a thought - to put the ini file next to the exe, but among the settings there are some "secret", so it is necessary that the average user does not touch them and I didn’t see - is it a normal solution to add a dll in which to register a function that sets these settings (for example, login, password, server address where requests are sent ) I
write the usual settings (autorun, hot keys) to the registry.
5) Do I need to compress the exe file with upx?
6) With what help to create an installer? Is it a very critical option to create an sfx archive with an executable, registry file and dll files?.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
acwartz, 2020-10-16
@TotTip

The file name is the name of the project, you can change it in the project manager: The
5f896f9c34249105669309.png
location of the output file is changed in the project settings,
pay attention to the presence of a configuration wagon:
5f896fb08365a536392909.png
I specify ..\bin\ for the output directory for all values ​​- all platforms, all binaries are spawned there.
But this is me. the project structure is always like this:
./prjects//bin/.exe
./prjects//source/DCU/{Platform}/{BuildMode}/
./prjects//source/.dproj

3) In the project settings, I indicated the logo and icon (for some reason, they do not change in the exe and in the tray) - should they (icons) also be kept near the exe file?

It's the same with the logo and other things, each config needs its own settings.
The tray icon is taken from acc. component properties.
4) Another question - how best to store the default settings? (Now they are simply written in the code) There was a thought - to put the ini file next to the exe, but among the settings there are some "secret", so it is necessary that the average user does not touch them and I didn’t see - is it a normal solution to add a dll in which to register a function that sets these settings (for example, login, password, server address where requests are sent ) I
write the usual settings (autorun, hot keys) to the registry.

Think about it, the default settings are those settings that are always there, regardless of the availability of the registry / files. They must be inside the exe itself, i.e. directly in the code are written either as a module with constants / functions. Also it is not necessary to fence neither in resources nor nearby nor in dll anything, no conf. files. This is an extra and a waste of time, in 95% of cases you will only climb there for the first time and that's it.
5) Do I need to compress the exe file with upx?

And why should it be done? To once again panic the user out of nothing?
If you're asking this question, the answer is DON'T. Build Release and that's it.
6) With what help to create an installer? Is it a very critical option to create an sfx archive with an executable, registry file and dll files?.

Do you really need this installer?
Is the Uninstall batch file with the start /wait yourapp.exe --uninstall command not enough? The program will run, find the argument, clean up all its data, and exit. Batnik will bang his folder and himself. Everything.
An installer is needed when the application installs a lot of files, incl. into the system (system libraries, a lot of entries in the registry). If you really want fashionable/youthful, then create with InnoSetup.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question