Is it possible to generate any sort of executable from within Windows RT and .Net 4.5? In the desktop I know CSharpCodeProvider could be used, but it seems to not be allowed in Windows RT. The goal is to make an IDE for C#.
I haven't played with it myself, but I think Project Roslyn would be a good fit. You should be able to call those APIs from a WinRT front end, I think.
WinRT is not intended (as of today), to create such kind of applications, the closest is the eval function on Javascript, but it's the only one.
Related
Short story: is there a way to write a desktop application with a GUI in HTML5 and core in a cross-platform language like python (or even C#/Mono)?
Longer story: I'm a C# developer, for small personal projects I seldom do, running both under Windows and OSX, I use C# (Mono) with a frontend leveraging on Eto.Forms
I'd like to understand if there's a mature way to achieve the same results using an HTML5 GUI, since I'd like to learn that and believe it could be a good option for near-future Windows desktop UIs (or otherwise a nice tool to have in my skillset). Of course if the code running behind the scenes is C# I'll be more than happy, but also getting my feet wet in another, maybe more cross-platform like python would be good.
At this stage I'm not interested in any mobile-oriented solution.
Electron (formerly Atom shell) has really matured as of late. In fact it's what VSCode is built on.
There's a great tutorial and starter code on using Angular 2 and Typescript, and you can even use VSCode to write and build it.
For me this is the best way to transition from the WPF world to HTML5.
the NW.js look pretty promising... you might even be able to use TypeScript which would be much closer to C# than plain ol' js. If you're open to using PHP, you can check out the nightrain project https://github.com/naetech/nightrain.
Give http://www.tidesdk.org/ a try.
Your app will run on Windows 8, MacOS and Linux. You can use HTML5, Javascript and CSS3.
But you can also extend the functionality of your app with a scripting language you are comfortable with. TideSDK currently supports Python, PHP, and Ruby.
I have recently worked with Chromium Embedded Framework, basically a browser component for WPF an WinForms. It works very well and provides kind of a two-way interoperability from website to .NET-app and vice versa. Basically, you:
Create a WPF desktop app
Include CEFSharp and place a full-screen browser on the window
Call methods in JavaScript:
// .NET
var mainFrame = browser.GetMainFrame();
mainFrame.ExecuteJavaScriptAsync("any js code");
Bind a .NET-object
// .NET
browser.RegisterJsObject("boundObject", this);
Call methods on a bound .NET-object from the website/JS:
// JS
boundObject.someMethod();
On this basis you could build a mediation layer (ViewModels, controllers, ...) between HTML/JS-UI and .NET logic...
I wrote an APP with http://kivy.org/ it is capable to create apps for different systems.
Qt node https://github.com/arturadib/node-qt seems also interesting, but i did not test it myself.
And last https://chrome.google.com/webstore/launcher
You can create web apps for chrome, which should run in supported systems.
Kivy is a Python solution. Qt node is maybe what you are looking for.
Here are some nice tutorials for kivy:
https://www.youtube.com/playlist?list=PLQVvvaa0QuDe_l6XiJ40yGTEqIKugAdTy
NW.js
But it's Javascript (node), not python nor C#.
A very interesting project I think is Chromium Embedded Framework. You basically embed a (stripped down) web browser in your application. For python, many GUI Toolkits are supported. Check this for more information.
Since you are used to C#, maybe Java with JavaFX and FXML is an option. FXML is not HTML but you can style it with CSS as well. You can also use Scene Builder with it for faster UI creation. Many JVM languages support this toolkit so Jython instead of Java will also work. I will recommend Java however, because the support for other languages, while there, is not perfect yet.
Using C# and the Windows App Store WebView is also an option. You can check MSDN for more information.
I am sure there are other options (Kivy, Node.js, etc.) as well. Some of them are already mentioned in this thread.
I would recommend Node-Webkit which is based on nodejs.You can still use some python scripts to do some backend job integrated with Node-Webkit which is easy to deal with.I've already saw some successful applications using this(like wunderlist).TideSDK is another choice but the python support in TideSDK is not mature enough.The Node-Webkit project hosted at
https://github.com/nwjs/nw.js/
I am making windows 8 , c#/xaml app. Is it possible to compile and run a java console program like " hello world"?
Since winRt apps cannot use System.Diagnostics.Process then it cannot figure how to compile and run it. Or if compile is not possible, just being able to run a .class file is fine.
I have tried useing System.Diagnostics.Process to open cmd to compile but that class isn't supported.
Thanks for any advice.
There's certainly not an elegant or intended (& documented) way to launch a process like you describe from a Windows Store application (it's intentionally locked down and there is no "command prompt for the new Windows store UI apps). There are some that suggest that there may be a way via CoCreateInstanceFromApp, but the documentation now reads as if that API only works for a limited number of Microsoft built COM objects.
While you can launch other installed Windows Store applications, the Java compiler will definitely not be one of those without a significant and unusual repackaging by Oracle (or some third party). While it's possible that someone is working on that, it would seem unlikely (given the limited need for such functionality).
Depending on the nature of the Java code, you may want to look for a Java interpreters that could be embedded within your application, and call it directly, especially if the Java code is trivial.
Your application requirements would suggest that a traditional Windows desktop application would be a better fit.
I am trying to embed an application inside another one so the user can use the application in it. I have this working correctly inside of a windows only applications but i don't want to limit it to windows so im going to convert all the normal C# code to a mono C# application witch is easy enough but im using some windows only code like the user32.dll so i was wondering if there is an alternative one i can use to get the same effect as the setParent and setWindowPos functions inside the user32.dll. it would be awesome if there is a cross platform option but if there is not is there atleast one i can use to get the same result for mac and linux? At this time mainly mac. I have been searching all over the place and i cant find qny alternatives to it.
You have to find a different way than user32.dll on alternative platforms, the structure in for instance OSX and Linux is very different from Windows so you will have to go different ways. However depending on what you do there might be a different way to do things using only managed code. A good place for looking for managed alternatives is PInvoke.net which suggest that you can use MDI instead of setParent
But describe what you want to accomplish with calls to setParent and setWindowPos and maybe a OSX solutions is available you can utilize.
I want to make an application for my phone (Nokia N900) It uses the Maemo Platform, which is a Linux variant. Most applications are made with either QT or Python, i only have experience in C#, and am wondering if it is at all possible to convert C# to QT, or would i have to use something like Mono or Vala to write the code in C# and create the applications for the N900??
Cheers,
Brendan
About "converting C# to Qt": they're not comparable: C# is a language, while Qt is a UI framework.
Mono does run on Maemo and while there are Qt bindings for .Net/Mono, Mono uses Gtk# as the default/recommended/supported UI framework.
If you are already confident with C#/programming in general, then it should not be too much trouble to pick up a new set of tools. One size does not always fit all!
I do not think that exist a tool for convert C# code to the equivalent Qt/C++, Qt/Python, is something that is best done manually. It's best developed on a platform like a Mono for the N900 or find someone with knowledgeable in Qt able to carry out the work.
Note that Qt is the default platform for Nokia, if you want to install this application on other devices easily best using Qt.
C# as a programming language is controlled by Microsoft. While Microsoft has stated that they will provide a "patent convenant" regarding C#, it is hard to believe them since they have been so eager to sue in the past. ;)
If you want to "convert" your C# app, you'll need to incorporate it into Mono. Mono is a 'cross-platform, opensource .NET development framework." http://www.mono-project.com/Main_Page
Once you've got your app working in Mono, you'll need to interface into Maemo. There are a couple of routes to do this, but Qt is the most likely one to choose. It might be so much work to port your app to Qt that you decide to re-write it, fortunately Qt supports a number of programming languages so you may be able to find something similar to Mono if not Mono and C# itself.
I have to make an application that runs on both Windows (XP/Vista) and Windows Mobile. The graphics interface must be scalable (for different resolutions) and the controls must be custom (like the ones usually found on music apps).
SVG was my instant choice but the lack of support on Windows Mobile pretty much kill my time budget. I've tried to evaluate WMF and it seems the right answer but i don't really like it.
I was thinking about WPF/XAML but i don't know what are the differences between Windows and Windows Mobile.
The project must be in C# or C++ and it's a commercial project (thus no GPLed libraries).
What would be the best choice? What ma I overlooking?
WinForms has limited support for scaling:
http://sellsbrothers.com/writing/winformsAutoScaling.htm
You may also want to look at "anchor" and "docking":
https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-6165908.html
Combined together you should be able to create a UI that works for both desktop and mobile.
You can do scaling UI in .NET compact framework, like Erwin said with docking and achoring. In the windows mobile applications i have written i do normaly have to write some custom code that deals with things like Font scaling ( Touch founds might need bigger Font then system default if the text should be clickable).
I dont think your going to get it to scale picture correctly without code, i found some question releated that on this site. In my experience i write 99.9% of my code so it runs fine on both windows and windows mobile, but i do make a different UI for windows mobile.
If normaly write code in .NET 2.0 / .NET 2.0 Compact Framework, but if your you dont care about having to install .NET 3 then it should be better ( .NET 2 is wider spread out then .NET 3 )
Another option is the Qt library which is written in C++. It is LGPL which means that it can be used in commercial products without having to release your sources (except for changes to the library itself). If for some reason that isn't good enough they also sell commercial licenses.
It runs on Windows and Windows Mobile. As a bonus if you do a reasonable job of programming (and assuming everything else you're doing coding wise supports it) your application can also be run on Mac OSX, Linux and S60.
It has support for Scalable Vector Graphics, a Canvas with full widget support and a bunch of other nifty features as well! I'd suggest checking out the documentation and seeing if it has everything you need.
Silverlight?