gioreva 0 Posted July 17 (edited) Hi With RAD Builder 11, how can I create a .exe Stand Alone ? Including all libraries. Or how can I easily export the program to another PC without doing specific setups ? Maybe I could do a setup with just the libraries. Edited July 17 by gioreva Share this post Link to post
JonRobertson 72 Posted July 17 Which libraries are you referring to? If you mean the Delphi Run Time Library, bundled VCL or FMX components, and third-party components, then Delphi builds a standalone EXE by default. There is an option to use run-time packages, which reduce the size of your EXE but require distributing those packages with your EXE: If you are referring to libraries that are not Delphi/Object Pascal code, then you need to be more specific with your question. Share this post Link to post
Remy Lebeau 1393 Posted July 17 (edited) 8 hours ago, gioreva said: With RAD Builder 11, how can I create a .exe Stand Alone ? Including all libraries. For both Delphi and C++: Project > Options > Packages > Runtime Packages "Link with runtime packages" = false If you are making a C++ project, you'll also need: Project > Options > Building > C++ Linker "Link with Dynamic RTL" = false "Link with the Delphi Runtime Library" = false Note that with these settings, Packages will be built into the EXE so you don't have to deploy any BPLs. But, if your code (or any of its dependencies) require external DLLs, you will still have to deploy those with your EXE. Quote Or how can I easily export the program to another PC without doing specific setups ? Maybe I could do a setup with just the libraries. At the bare minimum, you could just zip up all of the binaries and extract them to a folder on the target machine. But why would you not want to use a setup package that handles this for you? Edited July 17 by Remy Lebeau Share this post Link to post
gioreva 0 Posted July 18 I cannot find the delphi option. Now, the .exe has gone from 300Kb to 2Mb, but it no longer asks me for .bpl It is still telling me that they are missing: BORLNDMM.DLL C32C280MT.DLL If I copy BORLNDMM.DLL App says, "error, cannot execute" I cannot find the file C32C280MT.DLL anywhere. Share this post Link to post
gioreva 0 Posted July 18 Ok, using 32 bit/redist file now work. Trying on SandBox, System Info told me it was 64-bit Is there no way to omit these DLLs? And to run the programme on both 32-bit and 64-bit PCs? Share this post Link to post
Remy Lebeau 1393 Posted July 18 51 minutes ago, gioreva said: Now, the .exe has gone from 300Kb to 2Mb That is to be expected with a standalone EXE. 51 minutes ago, gioreva said: It is still telling me that they are missing: BORLNDMM.DLL C32C280MT.DLL It should not need those DLLs if you have disabled all of the options I mentioned earlier. Are you sure you did it in all of your build configurations? Did you do a full rebuild? Are you sure you are simply not running an older version of the EXE? 15 minutes ago, gioreva said: And to run the programme on both 32-bit and 64-bit PCs? To run a single EXE on both types of PCs, you have to compile the EXE for 32bit only, not for 64bit. Make sure you have the 32bit platform active in your project's Target Platforms settings. Share this post Link to post
gioreva 0 Posted July 18 (edited) I apologise, I had not done the linker ones. Thanks for your help. Now it's 3.5Mb and everything works. Is there a way to optimise the code more and reduce the size? Edited July 18 by gioreva Share this post Link to post
dummzeuch 1505 Posted July 18 1 hour ago, gioreva said: I apologise, I had not done the linker ones. Thanks for your help. Now it's 3.5Mb and everything works. Is there a way to optimise the code more and reduce the size? Turn off (remote) Debug symbols in the linker options, if it is turned on. Share this post Link to post
JonRobertson 72 Posted July 18 1 hour ago, dummzeuch said: Turn off (remote) Debug symbols in the linker options, if it is turned on. Or set the options to put debug info in a separate file to be able to use a debugger without having the debug info in the EXE. The image below is Delphi 11.3. The option may be named or placed differently in various versions of Delphi. Share this post Link to post
JonRobertson 72 Posted July 18 (edited) 4 hours ago, gioreva said: It is still telling me that they are missing: BORLNDMM.DLL BORLNDMM.DLL should only be needed if an EXE or DLL Delphi project has ShareMem in the project's uses clause (in the .dpr file). If that is needed and you are on a recent version of Delphi, replace ShareMem with SimpleShareMem. Related documentation is at https://docwiki.embarcadero.com/RADStudio/Athens/en/Sharing_Memory Edited July 18 by JonRobertson Share this post Link to post
gioreva 0 Posted July 18 Removed Full debug information, and debug information, but same 3.5Mb I cannot find any memory memory in any setup. Share this post Link to post
Fraser 2 Posted July 18 Some of these suggestions don't apply to C++ Builder. 1 Share this post Link to post
Remy Lebeau 1393 Posted July 18 6 hours ago, gioreva said: Is there a way to optimise the code more and reduce the size? Not a whole lot, unfortunately. Trimming the debug info helps a lttle, but most of the size is just RTL bloat, Unicode, DFMs, RTTI, etc. In Delphi, it is possible to reduce some of the RTTI a little, but not in C++Builder, AFAIK. Share this post Link to post
gioreva 0 Posted July 19 45 minutes ago, David Heffernan said: Why do you need a smaller exe? No, no problem. It's OK. thanks Share this post Link to post