Is there any source code leak in the EXE file compiled by GraalVM? - graalvm

I am using native-image -jar generated EXE file
Is there any source code leak in the EXE file compiled by GraalVM?

Related

How not to compile installed packages everytime anew with the Application that uses it?

When I install a package in the IDE and use it in a project, it gets recompiled (DCUs are replaced) everytime I compile my project.
I can't imagine that this is intended - the RTL and VCL are not compiled each time either, are they?
I have played a bit with the paths in Tools > Options > Environment Options > Delphi Options > Library, but without success.
I have found a construction allowing compilation of my project without recompiling the package having DCUs and PASs in diffenent paths, but in this construction Delphi is not able to locate the sources at all from the Code Editor (SHIFT-clicking for example), so this is not an option.
To avoid recompilation you have to have separate folders for .dcu files and .pas files.
Usually this is done by settings the output dir in a package contained in the library. You build the package and it will produce the .dcu files in a output folder that is different from the source folder.
To use the package you then:
have to point the library path to the output folder (with the compiled .dcu files).
can optionally point the search path to the source folder (with the .pas files).
This gets a little more complicated when you have .dfm files in the package as well.
Every .pas file that the compiler sees in the library path is recompiled. (Actually only the last instance, because you can have the same unit in different directories that are listed in the library path).
To enable IDE features like CTRL-click you have to set the {$Y+} compiler switch in your package which can be done in the IDE Compiling options:
http://docwiki.embarcadero.com/RADStudio/XE4/en/Compiling#Debugging_Options

How split a Delphi solution into reusable run-time packages?

I'm starting with Delphi XE5 and I would like to split my application in one exe and multiple reusable libraries. That means I don't want to split the running *.exe application in DLLs or runtime Packages.
To achieve this, I have seen that in delphi we can create runtime packages and I followed the following steps:
I have created a new VCL Forms Application project (EXE project).
I have added a new Package project (BPL project) to the project group and I have modified its project options to set usage options to 'Runtime only' and build control to 'Explicit rebuild'.
I have added a dependency betwen the EXE project and the BPL project (EXE project depends on BPL project).
Finally I have compiled the BPL project and added the generated DCP file as a runtime package in the EXE project (Project options/Package/Runtime Packages).
But when I add a reference on the EXE project to use a module (moduleX for example) from the BPL project, compiler give me an error like this:
[dcc32 Fatal Error] ModuleX.pas(7): F1026 File not found: 'C:\DDDProject\MyEXEProject\ModuleX.dcu'
If I mark as checked the 'Link with runtime packages' option in the EXE project (MyEXEProject) the solution compiles without errors but I can't run or debug the application.
Please, can anyone help me?
I don't want to split the running *.exe application in DLLs or runtime Packages.
Runtime Package BPL files are DLLs. That is what allows them to be shared amongst multiple EXEs. They are just normal DLLs with special VCL/FMX handling built in.
When you enable the "Link with runtime packages" option, you are linking the EXE file to your BPL file (or DYLIB or SO file, if compiling for platforms other than Windows), so you MUST distribute the BPL file (and any other BPL files it depends on, like rtl190.bpl and vcl190.bpl) with your EXE file. So they have to be in the EXE's folder, or at least in the OS search path, in order for the EXE to run.
When you disable the "Link with runtime packages" option, your package's code is statically linked directly into the EXE file, so you need to make sure the EXE project's search paths include the folder were your package's DCU file(s) are located.
If you want to create a reusable library but not a BPL, then create a Static Library (a LIB file) instead of a Runtime Package. You can then add the LIB file to multiple projects as needed.

Is it possible to run an exe file linked with different version of dll?

For example, I have a exe file which is compiled with OpenCV 1.0. If the dll is downward compatibility, how can I run the exe file in a machine with OpenCV 2.4.6?
you can't.
either supply the right dll version (1.0) or recompile the src code.

Compiler error when compiling runtime package using MSBuild on Delphi XE2

I am in the process of upgrading our build server (Jenkins) to Delphi XE2. While compiling a runtime package the following error occurs:
ComponentsR.vrc(61): error RC2135: file not found: ComponentsR_Icon4.ico
There are no icons or resources in this runtime package, so I don't know what to do with this message. What's the "vrc" file btw?
Thanks for your help.
This happens while upgrading the dproj file of a package. The entry is created but the ico file is not (it is not used anyway).
Open the dproj file, search for the ico name and delete that entry.

Converting a stand-alone Delphi-made .tlb file to .ridl

How does one convert a stand-alone .tlb file created in a pre-2009 version of Delphi to a .ridl file using Delphi 2010? .tlb files that are part of projects get automatically converted, but this particular file is not part of any project.
try using the tlibimp.exe utility located in C:\Program Files\Embarcadero\RAD Studio\7.0\bin
tlibimp –I thetlbfile.tlb

Resources