GNOME/Vala application to run on Windows - windows

I want to port my C# WinForms application to be usable both with Windows and Linux. I have some experience with Java and more experience with Python but I don't really like the first and I'm concerned with the second (I mean the obfuscation, need to install Python on the target PC, etc.) so I've chosen to use Vala and GTK3 toolkit... it is created mainly for making GNOME applications but I've read that it's multiplatform and is compiled fully to C also with all the dependences needed for running the software - but is it right? I mean: would I meet any limitations while creating my application on Linux? I don't want to finish it and then to discover it can't be run on Windows because I've used some GNOME library...

There are a lot of GTK applications that currently work on Windows with no problem.
For example:
GIMP (raster graphics tool - the application for which GTK was built initially)
Inkscape (vector graphics tool)
Geany (Text editor)
Pidgin
Vala apps will work anywhere a GTK apps will. Can't name a Vala app i've seen running on windows but i'll take an interest in this and get back to you.
By the way there are two (maybe several) approaches to writing the app in Vala/GTK, for example including the entire GTK library into the app or not. Geany offers 2 different binary installers meant to allow you to choose if you already have GTK on your windows download a lighter geany-only instaler, if not download the full installer which incorporates its version of GTK.
Here's a site and a tool that will help you with configuring your vala compiler to output windows executables.
I'm not sure if you can use all the tools that Vala needs on Windows. You may have to develop on a linux box.

Related

Multi-platform programming language with GUI

I want to create a multi-platform application with the focus on handling data from serial port, data processing/analysis and plotting. By now I wrote the application in Python (with a GUI generated by pyQTgraph) which works quiet well - but it is not possible to export my .py to .exe or .app (for Windows and Mac OS). I tried many tools like py2exe, PyInstaller, ...
Now I'm looking for a multi-platform programming language (C, C++, ..., but not Java) witch makes the transfer to other OS easy. Preferably it is possible to transfer the application frow Windows to Mac without big code-changes or redesigning the GUI. It is a lightweight application which should run without a previous installation.
Do you have some hints which programming language and frontend (like QT) is the best for the job?
Does your suggested language works well with serial-port-data?
How does the workflow from writing the code to exporting the final .exe/.app looks like?
Best and thanks
You should probably take a look at Xojo. It builds separate, native apps for Windows, macOS and Linux from the same source project. It also has serial support.

Don't want to ask users to download JRE

My question is similar to the one asked in this forum in 2010 - "is JRE installed in Windows & Linux?". And I am wondering if things have changed since then
In particular, my site hosts a downloadable Java application that basically transmits specific files from the user's PC to our server. But every now and then I find that some of my users - all non-techies - don't have JRE installed. And hence, I have to ask them to install JRE first.
Asking users to download something before they can start using my application can only ruin the end user experience. Understandably, that is a no-no. And so, I am ready to re-implement the application. But before I can propose re-implementing the app in some other technology - like Qt - I need facts to make a case. In particular, I would like to know
Is it safe to assume that any PC with an OS that is XP or above would have JRE installed on it?
Is Qt a viable - and preferable - option for making a "download-now-use-now" type of application? Don't Qt applications need a JRE equivalent too?
Are Qt applications able to update themselves like Java apps can?
Other than having to maintain/compile multiple versions of Qt, are there any other disadvantages to using Qt?
Thanks for your responses
Abhinav
No, it is still not safe to assume that every machine had the JRE installed, though it is easy to install for every machine.from the Java website. Java is not installed by default on any Windows computer but I believe it is installed by default in many Linux distributions.
Qt is a GUI front end system for other programming languages. I know of Qt implementations for C, Python and now Java. If you are intending to use Java Qt then you will need to use the JRE to run it, it is not a way to get around restrictions of Java but is instead a way to make applications look consistent even though they are written in different languages.
A Java Qt application will have the same abilities as a normal Java application in terms of updating.

MS Windows Programming advice for Mac/Unix developer

I have a few years of experience writing Unix command line tools (no GUI experience) in python, C and C++, and only recently crossed into the GUI world (Cocoa and IOS only). I've learned quite a bit of objective-C and am getting to understand how cocoa MVC works. However, one of the apps I am developing needs a Windows version and I was wondering what a good place to start would be given that I have absolutely no Windows development experience.
I was thinking about using Visual C++ 2010 Express as my development platform (because it's free and because I don't need to learn C++). My application is relatively simple, it will have only two windows and spend most of the time running in the background. It will however need to communicate with the OS (load dll's etc) and an online server (HTTP methods) and I'm not sure whether Visual C++ Express edition gives me access to the required API's. Would a Windows Forms application suffice? Am I going about this the wrong way? Do I need to learn C#? Any advice will be appreciated.
If you are already happy with proper c++, visual Studio C++ express should suit you fine. Given that you are not making a complicated GUI, you don't even need to dip into the managed code - C++ express allows you to create proper c++ console and GUI apps. You also don't need to install the platform SDK - it is part of VS C++ express.
Not being managed C++, you will be able to share source files between your various projects. managed c++, despite the c++ in the name, really is a different enough language that it will be annoying to work with if you simultaneously have to deal with iso C++.
--
Note: The native windows API is a C api, not a C++ framework. So it does not provide a rich set of classes in a coherent framework to deal with. On the other hand, while, large, it is actually quite simple to work with.
Also: Given that you are already familiar with Mac development, there is a LGPL (iirc) package called CFLite that builds on windows and that implements the C api that underlays the Objective-C Cocoa API.
If you use its abstratcions you can share a greater part of code between windows and Mac (and other platforms).
Other C++ IDE's you might want to consider:
Code::Blocks
QT Creator
both of which can be configured to use the MINGW port of GCC to windows.
you'll be better off with c++ than c# if you need more "low-level" stuff. Loading dlls (that is, libs) is simple (pragma comment lib...), as is pure HTTP transfer and communication.
So, VC++ with windows form will suffice, and it is "very c++".
You have access to all global APIs, and loading specific apis like http requires only two lines: one to include wininet header, and other lib (libs are actually "references" to dlls).
If you go the C++ Express way then you need to install Windows SDK separately, and set it up for Visual Studio to use it. And you can't use MFC.
I would however, suggest C#, because it feels like putting little toy bricks together. Easier to debug and maintain. Problem with C# is that it has so many library functions that you can not possibly know if what you want is already made to a function. But that's why we are here :-) If you feel that something you want to do should already exist then ask a question about it. One notable feature that C# lacks is zip archives (it has something similar, but not quite). For zips you can use public libraries, like SharpZipLib or DotNetZip.
If I were you, I wouldn't jump into a whole new API so quickly. Have you considered using Python on Windows? Most of the Python packages I've seen are also available for Windows, so you'll feel at home. And if you need some GUI, you can opt for wxPython, pyGTK or something similar.
For Windows specific things, you can always use ctypes. Especially if they're as simple as loading a DLL.
have you considered approaching Adobe AIR? it allows you to deploy on Mac, Linux, Windows, iOS, etc. communicating with and launching native processes has been possible since 2.0 and the the latest 2.5 SDK can target Android OS and TVs. with your experience you should be able to pick up ActionScript3 / MXML in no time.
additionally, there are a handful of free IDEs you can use with the Flex and AIR SDKs. or, if you're a student or low-income developer, you can get a free copy of Flash Builder 4 from Adobe: http://www.adobe.com/devnet-archive/flex/free/
edit: i believe deploying AIR applications on iPhone requires Flash Professional CS5, which includes the packager for iPhone options. at the same time, i've read that AIR and other cross-compilers for iOS are painfully slow, so it's perhaps best to develop natively in Objective-C for iOS.

Which programming languages that can generate self contained windows .exes?

I want to make an easy to deploy Windows application and was was wondering which programming systems can create totally self contained Windows .exe files?
As a plus, if the same can be done with MacOSX and Linux from the same source this would be a bonus. I took a look at Realbasic but they have since abandoned the single .exe concept.
update: i am looking for something that can run from Windows XP up to Windows 7, no matter what version of .NET is installed. Is this even possible?
Delphi compiles to one executable, and generates native windows executables. So no dependencies to any kind of framework. If you use Free Pascal (fpc) and the Lazarus IDE, you could even develop for Linux and Apple from the same source.
If your using external dll's this would become a bit more tricky, but you could pack them up in your resource file and still maintain the one exe property.
Update 2020: since #Vassilis & #Marco van der Voort commented on this, I would like to update my old andswer and add that go is a very good way to make self-contained executables. Even crossplatform compilation is realy simple.
You can certainly do this with C/C++. Technically the runtime libraries are required, but they should already be installed on any windows, mac or linux system.
With .NET you can compile to an EXE, but of course the .NET framework is required. For newer versions of windows it should be installed by default, but on older versions (XP or older?) it may or may not be there. And of course you couldn't expect mono to be there by default on linux or mac either.
For Windows the following languages are viable:
C (MS, gcc)
C++ (MS, g++, Digital Mars)
D (Digital Mars)
Delphi (Embarcadero??? how do you spell that? just trips off the tongue doesn't it?)
Fortran (Intel, Salford Software)
Visual Basic 6 (MS)
Lua (you'll need a special tool to do it, but it is doable)
C#, VB.Net, F#, J#, etc (assuming that you don't mind using .Net technology)
You can use Tcl/tk. The technology you should research is a "starpack", which combines a runtime executable (a starkit) with a platform-specific runtime (a "tclkit") to create a single-file executable. It's remarkable in the fact that it's not just compiled code, but an entire self-contained virtual filesystem that can include images, sound, data, etc.
This same technology works for many platforms from the same code base. The only thing that is different is the platform-specific runtime. You can even "cross compile" in that you can copy the runtime for multiple platforms onto your dev box and then build starpacks for each platform without having to actually be on each platform.
Tcl can do this, especially through producing starpacks. They can be produced for all platforms from the same code. Note that this also includes all the necessary runtime libraries (except for things like the C library, but you don't want to make that static under normal circumstances).
JavaFX 2.2 supports that. It allows creation of self-contained applications targeting Windows, Mac OS, and Linux.
Please follow this link for more information: http://docs.oracle.com/javafx/2/deployment/self-contained-packaging.htm.
I would recommend taking a look at AutoIt. It is an easy-to-use scripting language that will compile into an exe, so there are no runtimes needed. This would be for windows only though.
http://www.autoitscript.com/autoit3/index.shtml
From the website:
AutoIt v3 is a freeware BASIC-like
scripting language designed for
automating the Windows GUI and general
scripting. ... AutoIt is also very small,
self-contained and will run on all
versions of Windows out-of-the-box
with no annoying "runtimes" required!
c/c++
purebasic
delphi
vb6
i hope this help :)
Here's a good source for a number of basic-like programming languages that build small stand-alone EXEs. Some are cross-platform for Windows and Linux:
www.basic.mindteq.com
You can use Liberty Basic which is easy and cheap, you can easily make stand alone programs for windows but not possible to transfer to MacOS or Linux.
You can do this for Windows with .NET languages using ILMerge
ILMerge is a utility for merging multiple .NET assemblies into a single .NET assembly. It works on executables and DLLs alike and comes with several options for controlling the processing and format of the output. See the accompanying documentation for details.
However:
Currently, ILMerge works only on Windows-based platforms. It does not yet support Rotor or Mono.
QBasic can :-)
I wrote a few command line tools using it!

On Developing Native Windows Executables

Which technology stack do you recommend for developing native windows executable (has GUI), other than .NET stack?
Other that C++ (MFC, ...) some could be named; yet which one is mature and pragmatic enough?
Delphi 7?
Common Lisp (Which one is proper for developing GUI?)?
Scheme?
Qt or wxXXX stack?
For native Win32 GUI apps, I've found nothing that beats Delphi. (Your question asks about Delphi 7, but please note that all versions of Delphi (including the latest - Delphi 2010) can produce single, standalone .EXEs).
Python is a good choice for some sorts of problems, and you can package python programs into a single .exe using py2exe.
Here is a nice py2exe tutorial: http://www.py2exe.org/index.cgi/Tutorial
Tcl/Tk is very mature, has a small footprint, is easy to learn and use, and uses native widgets on Windows and the Mac. Plus, it has a deployment mechanism second to none by way of starpacks, starkits and tclkits. You can either create a single-file executable (starpack) that embeds a very full featured virtual filesystem, or a two-file solution of a platform-specific runtime engine (tclkit) with a platform-independent application file (starkit).
It's downside is that it's low on "flash" -- there's not a lot of support for transparency, multimedia, animation and fancy graphics. So, depending on whether or not you need a lot of eye candy it may or may not be the right choice for you.

Resources