Jump to content











Photo
- - - - -

Small DotGNU Portable.NET executable


  • Please log in to reply
7 replies to this topic

#1 Vortex

Vortex

    Frequent Member

  • Advanced user
  • 299 posts

Posted 06 July 2018 - 08:35 PM

DotGNU Portable.Net :

 

https://www.gnu.org/software/dotgnu/

 

Releases for Windows :

 

http://www.steki.net/dotGNU/

 

A hello world example built with the dotGNU_0_8_0 installation :

// A Hello World! program in C#.
using System;
namespace HelloWorld
{
    class Hello
    {
        static void Main()
        {
            Console.WriteLine("Hello World!");

            // Keep the console window open in debug mode.
            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }
    }
}

Building the application :

cscc -o hello.exe hello.cs

Only three dependencies to run hello.exe :

ilrun.exe
libjit-0.dll
mscorlib.dll

ilrun.exe hello.exe

Hello World!
Press any key to exit.


#2 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 07 July 2018 - 07:51 AM

Looks good, how big is that resulting binary for the hello world example?



#3 Vortex

Vortex

    Frequent Member

  • Advanced user
  • 299 posts

Posted 07 July 2018 - 08:57 AM

Hi Nuno,

 

Here are the file sizes :

hello.exe     2560 bytes
ilrun.exe     5897299 bytes
libjit-0.dll  1320622 bytes
mscorlib.dll  1762304 bytes

  • Brito likes this

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 July 2018 - 09:54 AM

 

As of December 2012, the DotGNU project has been decommissioned, until and unless a substantial new volunteer effort arises. The exception is the libjit component, which is now a separate libjit package.

https://www.gnu.org/software/dotgnu/

 

Not to say that "old" is not "good" (actually usually it is "better" than "new") but this is seemingly a pèroject abandoned some 6 or 7 years ago (the given downloads are 2011).

 

:duff:

Wonko



#5 Vortex

Vortex

    Frequent Member

  • Advanced user
  • 299 posts

Posted 07 July 2018 - 10:10 AM

Hi Wonko,

 

One can write small command-line tools using Portable.NET with minimal dependencies. This could be useful for the WinPE environments.



#6 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 July 2018 - 10:43 AM

Hi Wonko,

 

One can write small command-line tools using Portable.NET with minimal dependencies. This could be useful for the WinPE environments.

 

Sure :) , write two programs with the same functions of dsfo and dsfi, (DSFOK toolkit) then compare the sizes.

dsfi.exe 5120 bytes (8192 on disk)

dsfo.exe 6637 bytes (8192 on disk)

 

And here is the Hello World script in 25 bytes (4096 on disk)



@ECHO Hello, World.&PAUSE

Whatever you write in .NET (or - to a lesser extent - in dotGNU) cannot simply be called "small", you can call it "simple" however ;), these frameworks are masses of BLOAT, and it is hard to justify their use in anything that is "portable" (and obviously "small" in size) unless you have tens or possibly hundreds programs using the framework.

 

 

:duff:

Wonko



#7 Vortex

Vortex

    Frequent Member

  • Advanced user
  • 299 posts

Posted 07 July 2018 - 10:56 AM

Hi Wonko,

 

Personally, I don't like the bloatware introduced by .NET  The only dependencies to run the hello world application in a WinPE environment are ilrun.exe,libjit-0.dll and mscorlib.dll
 

The IntegrateDrv tool is another example, it's coded with Mono :

 

https://www.mono-project.com/

 

http://reboot.pro/to...9-integratedrv/



#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 July 2018 - 11:39 AM

Sure :) , it is about the definition of "only" that we are disagreeing.

 

Your "only" is (for the simplest Hello World):

 

ilrun.exe 5897299 bytes
libjit-0.dll 1320622 bytes
mscorlib.dll 1762304 bytes

 

8980225 bytes :w00t:

 

The "mono" used in integratedrv is:

mono-2.0.dll 2977280 bytes

msvcr100.dll 773968 bytes

 

3751248

 

8980225/3751248=2.39

 

And of course the "nothing" needed for both dsfo/dsfi (or any other self standing, compiled .exe) is:

nothing.dll 0 bytes

 

and BOTH:

8980225/0

and

3751248/0

gives the same result. ;)

 

Now, a defense of scripting and compiling. :w00t:

 

A script (be it batch, vbs, autoit, Winbuilder, *whatever*) has the need of some external runtimes (some included anyway in the OS) and offer the (IMHO great) advantage of being (easily) modifiable/tweakable at the cost of a slower execution (wich in many cases, i.e. for simple programs and given the high speed of common hardware today, is negligible).

 

A compiled .exe offers generally faster execution (as said more often than not actually unneeded), it cannot be modified (and don't come out with "open source", 90 or 95% that that offers not "reproducible builds" or adequate compiling instructions) AND small file sizes (in many cases, though the senseless use of stupid external .dll's often negates this).

 

.NET, "Mono" and this dotNEW things are programs as unmodifiable as normal compiled .exe's BUT they also take 10 or 100 times the disk space as those.

 

 :duff:

Wonko






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users