xsharp.eu • Compile to One_Big.exe
Page 1 of 2

Compile to One_Big.exe

Posted: Thu Jul 09, 2020 7:04 pm
by OhioJoe
Chris,

Chris:

In VO I was able to compile everything into one EXE. Like this:

lib1
lib2
lib3
exe ---- > one_big_exe

This was very convenient because it was so easy to issue updates.

Now in XSharp (XIDE) it compiles like this:

lib1 ---- > lib1.dll
lib2 ---- > lib2.dll
lib3 ---- > lib3.dll
exe ---- > one_tiny.exe

Obviously I'd like it all to compile into one_big.exe. Is there a way to do that in XIDE ?

If there's a section in the Help that covers this, just point me to it.

Compile to One_Big.exe

Posted: Fri Jul 10, 2020 5:50 am
by robert
Joe,
This is not possible without special tools.
There is something like "ILMerge" which should be able to merge various .Net assemblies into one DLL or EXE, but I am not sure if that works with X# assemblies.
What do you expect to gain from having everything in one EXE file ?

Robert

Compile to One_Big.exe

Posted: Fri Jul 10, 2020 1:00 pm
by OhioJoe
Makes things simpler. When you have only one .exe for the project, then it's easy to see what version they're using by looking only at the .exe rather than scanning the ever-changing .dll files.

Compile to One_Big.exe

Posted: Fri Jul 10, 2020 1:27 pm
by OhioJoe
And to be clear: I was referring only to one .exe for my project, and not for all the various .Net and XSharp assemblies.

Compile to One_Big.exe

Posted: Fri Jul 10, 2020 1:43 pm
by Chris
Hi Joe,

It's different in .Net than in VO, in VO you have a linker that takes all parts and compiles them into one piece, while in .Net you always work with concrete "assemblies" (exe and dll files). I had thought in the past about introducing a special feature in XIDE to emulate libraries as in VO, but it would had complicated things a lot, since .Net is just not designed for that.

Of course you can still share the exact same .prg files among many different exes and libraries though, if that's what you need to do. Also in XIDE/VS, you can group files (modules) under containers, can even group libraries in containers, there is so much more structure available that I think makes the usage of VO's concept of libraries redundant.

Compile to One_Big.exe

Posted: Fri Jul 10, 2020 1:54 pm
by lumberjack
Hi Joe,
OhioJoe wrote:And to be clear: I was referring only to one .exe for my project, and not for all the various .Net and XSharp assemblies.
I do it a lot.

I create my DLLs as normal since it makes development/testing of shared code easier, but then create a EXE project with reference to the source code files that I use to produce the EXE. Give me the option to have seperate DLLs or have a single EXE for the project.

Can hence edit the .PRG from various access points.

Compile to One_Big.exe

Posted: Fri Jul 10, 2020 3:07 pm
by OhioJoe
I didn't think of that!

(Of course, if you've noticed my posts elsewhere on this site you already know that thinking isn't my strong suit.)

So here's my question:

One project has 538 .prg files in 12 subfolders. Each subfolder represents a library/AEF from VO. Can you offer a suggestion on how I reference those to create one EXE in XIDE? (I figured it would be a separate project.) I will give it a try and report back. Thank you.

Compile to One_Big.exe

Posted: Sat Jul 11, 2020 1:20 am
by lumberjack
Hi Joe,
OhioJoe wrote:
Can you offer a suggestion on how I reference those to create one EXE in XIDE? (I figured it would be a separate project.)
In XIDE, just right-click on the Project definition in the right panel, select Add existing file, go to the folder select all and on the Prompt it is not in the project folder, make sure you select not to copy...

HTH,

Compile to One_Big.exe

Posted: Sat Jul 11, 2020 7:22 am
by Chris
Yeah, it depends on if you want to use the exact same files in your existing folder layout, or you prefer to have the files copied to a new XIDE project file structure.

Compile to One_Big.exe

Posted: Tue Jul 14, 2020 12:10 pm
by OhioJoe
Ba-da-BING !

It worked !

Thank you, Johan.

Chris, this left many compiler warnings that I wasn't getting before. I'll try to work them out before contacting you again. In the meantime this will make it much easier to post, distribute and test our applications.