Forums

What need for working programm?

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

What need for working programm?

Postby VitAl2013 » Tue Jan 10, 2012 10:28 pm

:?: Could you help me? OK, I made programm like this http://cobra-language.com/how-to/WinForms/. :?: What should be installed on user computer for successfully run?

:?: Is it possible make programm independent from any libs, for run it on clear WinXP or Wine (with the same number of libs like WinXP)?
VitAl2013
 
Posts: 2

Re: What need for working programm?

Postby Charles » Tue Jan 10, 2012 11:34 pm

.NET 2.0 is the main requirement. It is present on most Windows machines at this point. For example, newer versions of Windows already have it and older versions often have it because some other program that the user installed, put it there.

You can also look into making an installer that triggers the installation of .NET if not present.

Or you can look into the commercial .NET linkers.

In either case, searching through Google will give you the answers like "installer .net", ".net linker" and variations thereof. This is basically the same issue as for anyone writing code in VB.NET and C#. With the community being fairly large, there are tips and solutions out there.

Regarding Cobra specifics, there is the Cobra standard library which is fairly small as most library classes are coming from .NET. The file is called Cobra.Lang.dll and you would put it next to your .exe, or you can just tell Cobra to embed it:
cobra -c -embed-run-time:yes Foo.cobra


Finally, you mentioned Wine. While you could try that approach, Cobra runs well with Mono which runs on both Linux and Mac. Mono comes with a linker/packager out of the box, although I have not played with it much.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: What need for working programm?

Postby VitAl2013 » Wed Jan 11, 2012 5:49 am

Thank you a lot. Some additional questions:
1) Can Cobra.Lang.dll by itself create winforms by taking it from standard winapi, like AutoIT maybe?
2) If I want have less problems with cross-platforming what way I should choose? Make independent programs or maybe choose something like GTK and put it near? I mean, ideal way for me it's "written ones work everywhere", but I understand that it can't be in Cobra without libs. Something should cares about forms & visual parts.
VitAl2013
 
Posts: 2

Re: What need for working programm?

Postby Charles » Wed Jan 11, 2012 8:46 pm

First, when I wrote "Or you can look into the commercial .NET libraries." I meant to say linkers instead of libraries.

Re: (1), I'm not sure what you mean. If you mean, "Can the Cobra compiler also embed other libraries?" the answer is no. But there are .NET and Mono tools for doing this if you search around.

Re: (2) Yes, GTK# is the way to go for a cross platform GUI. The Mono team never finished their implementation of WinForms and have admitted as much on IRC. They don't do a good job of advertising this fact in their installation though (at least not the last time I checked).

Even with GTK# there is some work regarding which libs need to be included for which platforms. It is not as smooth as I would have liked. But it's doable.

I also wrote an OpenGL sample in Cobra and with no recompilation it worked on both Mac and Windows with 3D graphics acceleration. I thought that was damn cool. The library is called OpenTK.

HTH
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 43 guests