What are the MB files that delphi 7 generates? - delphi

In the delphi 7 project folders a lot of *.Mb files are generated. The files are named like Del1.MB, Del2.MB etc. The projects connect to firebird databases via the BDE. Also there are quite a few other non standard components being used. Does anyone know what these MB files are and if they can be safely deleted?

These DEL*.MB files as well as DEL*.DB files are created automatically by Borland Database Engine (BDE)1 components for data access, for example when a query (by TQuery component) run.
They are temporary files, so they will be removed automatically if the BDE session terminates correctly2. If some app crashes these files will be held until the next execution when most of them will be replaced, so, a manual cleaning may be necessary.
If the folder where these files are being created is shared (or an app changed its current dir to same folder, e.g. by use of SetCurrentDir function), it may cause more problems since different apps may lock files making other apps confused and causing other crashes.

I think these "del*.mb" files are temp BDE PARADOX format files, by default BDE creates them in the application folder and delete them on application close:
http://www.borlandtalk.com/image-vp141388.html
http://www.rhinocerus.net/forum/lang-pascal-delphi-databases/212042-bde-generating-del-mb-files.html

Related

Delphi project having APPCRASH because of project's DSK file that was taken from another computer?

Hello programmer friends, I have learnt a lot from this excellent site, and maybe there is something else that I can learn.
Well, I have taken over a delphi 7 project from someone else, made a few minor changes on it, mostly if then clauses, I didn't change the main structure at all, just a few changes, I did't even add any variables. The problem is, it used to work perfectly, but now we are having APP crash reports. I deleted whatever I added, deleted the whole folder actually, re-copied it from the usb disk again, compiled it the way it is, and we sometimes have APPCRASH reports again. Even if I compile the original version, we receive the errors.
I made a search in the folder and I found out that the folder includes a DSK file which is full of folder paths about the other computer (I mean the paths defined in the DSK file belong to the other computer, not mine!)
What happens if I delete this dsk file? How can I re-create it again with my folder paths? Is it possible that we have these APPCRASHES because of this DSK file?
Here is a photo I've taken after a CTD and I tried to debug..
The .dsk file is only used by the IDE (see below for details), so it cannot possibly be causing your APPCRASH reports. It is only used by the IDE at designtime to save and restore your desktop information; it is not in any way included in the executable or used at runtime by your application.
The .dsk file simply saves the desktop when you save the project. It saves the currently open editor tabs and the files each contains, in the order that the tabs are arranged, and saves the state of each tab (code or form editor, for instance).
The Delphi 2007 help file says
Saves the arrangement of your desktop when you close a project or exit the product. When you later open the same project, all files opened when the project was last closed are opened again, regardless of whether they are used by the project.
The help for Delphi 10.1 Berlin shows more is saved now:
Autosaves or updates the project desktop file (.dsk file extension) when you close the project or exit the product.
The <myproject>.dsk file records your current settings for:
Desktop layout
Breakpoints
Watch items
Files currently open in the IDE
When you reopen the project later, the .dsk file is read, and your desktop layout, your breakpoints, and your watches are all restored. Also, all files that were opened when the project was closed are opened again, regardless of whether they are used by the project.
When Autosave Project desktop is disabled, any existing project .dsk files are read when opening the project, but the .dsk files are never updated. This causes the same set of files to open with the project until the .dsk file is manually deleted from disk.
You can safely delete this file. The only consequence of doing so is that you will lose the contents of the file, which means the next time you open the project you'll get just the default files (the main form and code unit) or project file opened in editor tabs. If you have Save desktop turned on, the IDE will recreate the file (using your currently opened editor files) the next time you save your project.

Installing Delphi XE6 creates a 3.5GB folder in c:\ProgramData - what are the penalties for its deletion?

After installing Delphi XE6 in a VM from the web, I noticed that the disk size had gone up much more that I would have expected, even after compacting / shrinking. As well what looks like a temporary downloads directory in my user tree (with lots of *.7zip files) I found a much more obscure directory called (on my machine) {A2C8EB76-CB1E-47B5-96A7-4FD682404E92} in "C:\ProgramData". This contained a huge 3.5GB of various DLL's etc. Some of these are language files but a test of deleting the entire directory appears to have no effect on normal use of Delphi. Are there any caveats to removing this folder?

Does the .res file need to be in source control?

In C++Builder XE5.
My understanding is that the binary file MyProject.res (which is created by the compiler in the same directory as the .cbproj file) contains compiled versions of the program icon and the project version details (although mine also seems to contain an XML manifest).
But this info is also contained in the .cbproj file and the .ico files; and if I delete the .res file then it seems to get recreated exactly was it was next time I open the project.
So is it safe to mark *.res as not being in source control? (I use git). And/Or is it possible to have it generated in the same directory as the object files instead, so it's not mixed in with the source?
(This certainly wasn't safe in C++Builder 5 - if you deleted the .res file then it complained it couldn't find it, and you lost your icons).
Update: Does this also apply to the .tlb file? This seems to be compiled based on the .ridl file, and if I delete it then it is automatically regenerated.
C++ Builder 6.0 and later will recreate RES files if deleted. I treat them as other temporary/build files (like OBJ files) and do not put them in version control software. I do have nightly backups that include all of these files though, which I think is still good practice.
I am not sure about TLB files. I would temporarily delete (aka-rename) one and see if it gets recreated to the same state. If so, should be same as RES files.
This does not hold true for 3rd party libraries though, if all you have is compiled resources. In that case, I still do not place in my version control though, since I am not going to be modifying them. I just have my backups.
For what it's worth, the TFS source control defaults are to exclude *.res but include *.tlb.
So you should expect *.res files to be created by their associated builds. If the build isn't going to be present, then the *.res file should be included.
I suspect that you're right about *.tlb files being built as well, but perhaps TFS doesn't exclude these on default because the extension isn't entirely unique to OLE type library files alone.

Can Delphi XE Be Installed On Drive D [duplicate]

Delphi IDE uses InstallAware as installer in last few releases (2010, XE, XE2, XE3, XE4). Using the normal setup.exe installation will copy a few GB of files into c:\programdata if you install all the IDE releases.
The installer consumes disk spaces quickly especially for users who use an SSD hard disk that is expensive.
Is it possible to setup the Delphi IDEs without copying files to c:\ProgramData? Is it advisable to delete those files manually after installation too? Uninstalling a previous version of the IDE does delete these files but as component maker, I need those IDEs for testing.
Partial answer here.
Is it advisable to delete those files manually after installation too?
Of course, official answer is NO. But you actually can delete these files at the cost of losing installer's "Repair" capability. (Repair is standard MSI feature, and InstallAway is merely yet another front-end for MSI). Also, it will render any manual restoration of particular file impossible, since files are stored in encrypted 7-zip archives on distribution medium (yet another unfriendly feature).
Unfortunately, I do not know any way to disable creation of such local copy of distribution medium.

Can I install Delphi IDE from the InstallAware setup.exe without copy files to c:\programdata?

Delphi IDE uses InstallAware as installer in last few releases (2010, XE, XE2, XE3, XE4). Using the normal setup.exe installation will copy a few GB of files into c:\programdata if you install all the IDE releases.
The installer consumes disk spaces quickly especially for users who use an SSD hard disk that is expensive.
Is it possible to setup the Delphi IDEs without copying files to c:\ProgramData? Is it advisable to delete those files manually after installation too? Uninstalling a previous version of the IDE does delete these files but as component maker, I need those IDEs for testing.
Partial answer here.
Is it advisable to delete those files manually after installation too?
Of course, official answer is NO. But you actually can delete these files at the cost of losing installer's "Repair" capability. (Repair is standard MSI feature, and InstallAway is merely yet another front-end for MSI). Also, it will render any manual restoration of particular file impossible, since files are stored in encrypted 7-zip archives on distribution medium (yet another unfriendly feature).
Unfortunately, I do not know any way to disable creation of such local copy of distribution medium.

Resources