www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How bundles a Dlang application and all its dependencies into a single

reply Marcone <marcone email.com> writes:
My program have Qt5 GUI that use dlls, icons, pictures, etc.

How bundles a Dlang application and all its dependencies into a 
single .exe package?
Dec 01 2019
next sibling parent Ferhat =?UTF-8?B?S3VydHVsbXXFnw==?= <aferust gmail.com> writes:
On Sunday, 1 December 2019 at 20:05:40 UTC, Marcone wrote:
 My program have Qt5 GUI that use dlls, icons, pictures, etc.

 How bundles a Dlang application and all its dependencies into a 
 single .exe package?
There are several tools creating installers such as nsis. However, if you want to make an all-in-one portable app (there are tools doing it too), you have to be sure that the licenses of your dependencies allow doing it. I don't think you are allowed to do it using Qt.
Dec 01 2019
prev sibling next sibling parent Dennis <dkorpel gmail.com> writes:
On Sunday, 1 December 2019 at 20:05:40 UTC, Marcone wrote:
 How bundles a Dlang application and all its dependencies into a 
 single .exe package?
You can embed files in the .exe using the import statement: https://p0nce.github.io/d-idioms/#Embed-a-dynamic-library-in-an-executable
Dec 01 2019
prev sibling next sibling parent Taylor R Hillegeist <taylorh140 gmail.com> writes:
On Sunday, 1 December 2019 at 20:05:40 UTC, Marcone wrote:
 My program have Qt5 GUI that use dlls, icons, pictures, etc.

 How bundles a Dlang application and all its dependencies into a 
 single .exe package?
I've used https://github.com/rikkimax/Bin2D in the past. I've never thought about the license issue before with dlls. probably some kind of grey area here. since they would still be seperate from the executable but also contained in them?
Dec 01 2019
prev sibling parent rikki cattermole <rikki cattermole.co.nz> writes:
On 02/12/2019 9:05 AM, Marcone wrote:
 My program have Qt5 GUI that use dlls, icons, pictures, etc.
 
 How bundles a Dlang application and all its dependencies into a single 
 .exe package?
Placing all your assets into an exe is usually done if the exe itself is self extracting (and doesn't link against a shared library, dynamically is fine). In other words it doesn't have your code linked in. There is no one right way to do this. As others have stated e.g. NSIS, Bin2d(mine). Unless the size of the assets are small-ish, I wouldn't want it all to be stored in the executable that contains your code. It would be too big and have problems. Keep them separate and have an installer if a zip archive isn't good enough ;)
Dec 01 2019