VB.NET Cross platform app - vb.net

I make a game using vb.net & wpf. But I want this run on Windows/Linux/Mac.
How can I do it?
I'm sorry my english is really bad :D I use Google translate.

Implementing a solution for multiple platforms is not an easy task and you need to be familiar with all the platforms you plan to support, starting with trivialities such as different path schemes and ending with checking every reference you require by your project settings for its compatibility to the target platform.
Please have a look at http://www.mono-project.com. When you install the mono package to your system, you can run your compiled .exe as it is from the shell under certain circumstances.
Obviously, you need to decide whether you try to create one application that runs on all target platforms OR if you want to create platform specific applications all referencing to the same game engine.
If you stick very close to the framework not using external references, chances are higher to achieve the former. If the main logic of your game can easily be compartmentalized into a dedicated project, the latter is the way to go.
In general, cross-plattform compatibility is more easily to achieve if your application backend consists of a console application to be accessed by a webbrowser installed on the system - using a web frontend though. But as long as you do not require accelerated graphics, this should be feasible.

Related

unity platform for apps

I am considering making a small app for desktop pc's. I would mainly like to have support for mac and for ubuntu (linux) and I wouldn't mind support for windows as well. An easy way seems to develop an app using Unity, but it is more known to be an engine for games.
To my simple logic, there should be no reason why an app cannot be built with Unity. A platform that features the ability to create massive laser marine gunbattles should be capable of rending pretty buttons and a user interface. The plus side is that with unity you can port to all platforms that I would like this app to run on as well.
Am I making a bad assumption? Are there any people that have done such things? The app I would like to make might be open source, does the Unity platform limit me in any way here?
You are correct in your reasoning that it is possible to make a normal app with Unity, but this of course is not what Unity was intended for. It is geared towards rendering and updating scenes (including physics, game logic, etc.). If you do not need the notion of scenes in your app, then you will add additional complexity to your development and run-time overhead that you would not normally need.
Another drawback is that you will need to abide by Unity's licensing with your app which may or may not be an issue for you (https://store.unity3d.com - See links at the very bottom for other special licenses, such as for gambling).
Since you mentioned Unity specifically, it uses Mono for some of its run-time support across platforms. Perhaps you want to consider using just Mono and associated tools instead (http://www.mono-project.com).

How are WinRT / Metro apps restrictions enforced?

The new Metro style / WinRT apps in Windows 8 have certain restrictions as to which APIs you can call. Also, you have to use asyncronous techniques and your app has to be pauseable, etc.. I'm wondering how, and if all of this is enforced.
Are the new Metro apps simply execuable programs, or are they something else (e.g. more like COM controls, with a set of defined interfaces)? How are the API restrictions enforced, at compilation, at runtime (via sandboxing etc.) or just via Windows Store policy (similar to the situation in iOS)? If I was feeling devious, could I e.g. get a handle to the screen and manipulate the interface, add floating windows on top, launch something in the background, or otherwise break out of the confines of Metro?
One reason I'm asking is that I'm looking into creating a WinRT library for Python, so that one could use it for writing Metro apps. However, the Python core obviously uses a lot of non-WinRT API calls, so this might be doomed from the beginning. I'd also like to get a feel for the anatomy of Metro apps in general.
Edit: According to this thread, you have all the functions of the C runtime available. It seems like you can compile stuff that calls forbidden functions, but the "application verifier" complains. I'm wondering if you could just run such a hybrid app, if you don't care about the Store (and maybe make it Store compatible later by writing workarounds for the forbidden functions)...
There are (at least) two separate sets of technical restrictions on what a Metro style Windows Store app can do.
The first is a set of security restrictions: Windows Store apps run with low privileges, and thus are limited in how they are permitted to interact with the rest of the system. For example, a Windows Store app cannot access arbitrary locations in the filesystem, it can only access files in a predefined set of locations, and files to which the system expressly gives access. You cannot violate these security restrictions (if you could, that would be a rather problematic operating system bug).
The second set of restrictions is the API partitioning. Windows Store apps are only permitted to call system functions that are present in the App Partition. The documentation for each system function on MSDN specifies whether the function is present in the App Partition. You can also find out by looking in the header file that defines the function: functions are conditionally defined depending on the API partition targeted by the project: the WINAPI_FAMILY macro controls this (see winapifamily.h in the Windows SDK for more information).
If you call an "unapproved" function, the results are undefined. It might appear to work; it might fail catastrophically. It might appear to work fine today and fail catastrophically tomorrow (or after a Windows update is applied, or with the next version of Windows).
The API partitioning is enforced in various ways. The headers are constructed such that it is difficult to call an unapproved function. If you define the function yourself or change the WINAPI_FAMILY, your app will fail the Windows App Certification Kit (WACK) process. My understanding is that the CLR prohibits calls to unapproved .NET functionality at runtime, though I am less familiar with the .NET restrictions. In any case, my understanding is that if your app calls an unapproved function, you cannot submit it to the store, per the "Windows 8 app certification requirements" (please read those requirements yourself, though; I have not read them in detail and I certainly can't interpret them for you).
If you don't care about submitting your application to the Windows Store or just want to write some test apps or play with WinRT, then there's nothing stopping you from trying to call unapproved functions. For example, I find it is useful to create a console window for debugging purposes. That appears to work fine, and I don't much care that it fails Windows Store certification since it's for debugging and testing only.
They aren't standard executables. You're restricted to a subset of .Net 4.5 to create the applications which doesn't let you (or rather, makes it extremely difficult to) do anything that MS don't want Metro apps doing. They're pretty heavily sandboxed as well.
You have a limited part of the .net api available:
The .NET Framework provides a subset of managed types that you can use
to create Metro style apps for Windows using C# or Visual Basic. This
subset of managed types is called the .NET for Windows Store apps and
enables .NET Framework developers to create Metro style apps within a
familiar programming framework. Any types that are not related to
developing Metro style apps are not included in the subset.
You use
these managed types with types from the Windows Runtime API to create
Metro style apps. Typically, you won't notice any differences between
using the managed types and the Windows Runtime types except that the
managed types reside in namespaces that start with System, and the
Windows Runtime types reside in namespaces that start with Windows.
Together, the .NET for Windows Store apps and the Windows Runtime
provide the complete set of types and members available for developing
Metro style apps with C# or Visual Basic.
There are app store requirements.
3.1 You must use only the Metro style APIs to implement the features of your Metro style app We describe these APIs in the Metro style apps
API reference. Your app may only depend on software listed in the
Windows Store.
Apps are sandboxed.
In short, you must you the api provided.

How to create a cross-platform smartphone application?

I am new to smartphone application Development, I have worked with .NET web and Windows Forms applications and only used the C# language.
I am planning to make a simple application which can run on all mobile OSes, like BlackBerry, Windows Mobile, Android phones, iPhone, etc. On searching I found that all have different OSes and uses different languages. I can use the C# language and .NET since I am aware about it. After some thinking, is it possible to make a web-based application using normal website coding but make it work like an application?
Please suggest some method to make a application which is possible to run on all smartphones. What technology or tools can be used for developing it?
The best approach to create truly cross platform app is to use HTML5 and JavaScript. All the other options will be painful. However, of course you can't access all the features with these web applications.
One interesting framework for creating HTML5/JavaScript based apps is PhoneGap (http://www.phonegap.com/). It has quite many API's available and wide support for different platforms. (Note that browser performance varies between devices so make sure not to add too much effects and glitter)
For native apps, there's no that many frameworks but one interesting is MoSync (http://www.mosync.com/)
There can be multiple approaches to create a Cross Smatphone plateform apllication.
If you want to code just once and want to to run on multiple enviroments without any change you must go for some javascript/HTML5 bassed solutions. One that I work with is NGCore. It is a development framework that allows games to be authored in JavaScript but with native application performance by leveraging ngmoco's ngCore libraries.
Other approach that will best suit your needs is to go for a Environment like MonoTouch. Its C# based and AFAIK you can use most of the .net API in MonoDevelope. It lets you reuse most of your code on another environment.

Automating compatibility testing against many programs

Short version: What's the best way to automate compatibility testing
against a large number of third-party programs?
The details:
I develop a program whose core feature is interacting with a variety of
different pieces of music player software via their respective RPC
interfaces. The RPC itself typically happens either via D-Bus or via some
client library specific to a particular player. Since each music player
has its own unique RPC interface, my program requires special code to
handle each.
Testing all this code is increasingly a problem for me. At last count
there are fifteen (!) different music players my program knows how to talk
to, and the interface details can vary from one version of a player to the
next. Manually testing my program against the latest version of each of
the players I'm trying to support, as well as a few older versions, is
tedious and error-prone, so I'm looking for a way to automate this as much
as possible.
The test cases themselves aren't the problem; those are just a matter of
calling a sequence of functions on a player's RPC interface and checking
the return values and/or asynchronous callbacks for the expected result.
No, the problem is having a framework to run the tests automatically.
Here are the challenges I see:
Each player maintains persistent state, usually as dotfiles under the
user's home directory. The state consists of things like the music
library, playlists, etc. These files need to be reverted to a known
initial state before each test. (Deleting it entirely isn't always an
option, since then the GUI-based players will present a setup wizard the
next time they start instead of running normally.)
Those initial states may be partially dynamic. For example, a music
library will contain full paths to the music files within it, but the
paths to the actual "music" files used for testing will vary from
machine to machine and won't be known until runtime.
The players to test against will probably be installed under
non-standard locations which will vary from system to system, in order
to have multiple versions of each installed in parallel. The framework
will probably need to know which player and version it's testing against
before the player is started, so it can initialize the player's state
files accordingly.
Since I don't have any control over development of the music players my
program interacts with, I can't modify their behavior to make it easier
for me to test against them.
What I'd like to do is set up a VM with a bunch of different players (and
a bunch of different versions of each player) installed, and then be able
to test my program against each of them in turn automatically. Ideally,
it would be possible for someone else to set up their own VM to run tests
in themselves, presumably only needing to tell the test framework which
players are installed where.
So, what's the best way to automate compatibility testing against a large
number (several dozen) of third-party programs?
In case it affects the recommendations, my program is written in Python,
and I'm using GNU autotools as the build framework.
If this only windows environment there is one way to go and that is with MS Hyper-V.
Link(http://www.microsoft.com/virtualization/en/us/solution-application-development.aspx)
They have support for having a image of for example of a Vista installation and by scripting creating a new copy of it and push an installation into the new image and have a basic installation + added software up and running within minutes.
The MS Office team use this and test engineers can order any version, language edition of windows in combination of any release of office within a few minutes..
Big problem is that this cost a good bit of money and Hyper-V is a quite complex product to set up.
As an alternative maybe could be to use Virtual Box (Open Source) and write your own script to automate installations of an image with new versions of software for test. I have done this with the standard image reading script upon start up from a network folder to install any software for test.. Its not fully automated solution but saved my team a lot of time.

cross platform development [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have questions on true cross platform development and if it is possible to use ONE platform to develop software.
I have a few applications that I write that work on OS X, Windows and Linux. They all use native platform toolkits with some shared source across platforms. I have to boot to each platform, checkout, compile, etc.
I have in the past tried GUI toolkits like QT (I bought a commercial license for Win, mac, Linus, but very expensive and paying it year after year became hard). I have tried WxWidgets, development moves slow.
So what I am thinking about is there a way to run a single platform and cross compile for other platforms so I can build my products from a single platform.
I favor OS X, is there a way to write apps for OS X, Windows, Linux from OS X where I just need to test on each platform respectively. I have found information on cross compilers, stub compiling, etc, etc.
Does anyone have any thoughts? Is this even possible? Would someone make a killing creating such a beast?
In my company, we use the Mozilla Framework to develop cross platform dictionary products. These applications are based on the Gecko/Necko Browser and most of the development is done via Javascript, HTML, CSS, XSL, XUL,... Of course, our homebrew Search engine had to be cross compiled to the three platforms (with some other code which was first done in JS and then ported to moz' C++ for speed reasons).
In the end, we have a reasonnably cross-platform solution: Our developers mostly work like power web-developers (think client and server side at the same time). Because the Gecko is the same on the three platform, we know it will predictably look and behave the same way (except when there are bugs, but the platform is now quite mature on this point of view).
Our R&D knows how to port slow javascript code to rather quick portable C++ code (you do Mozilla code using the NSPR library, a cross-platform lib). Testing has always to be done on the three platform however, although with time and experience, you get to know what will break where (Font support, Audio support, Flash Support)...
Today, you should probably have a look at XULRunner which is really the Mozilla without any real browser interface (in 2002, we had to dismantle the Mozilla Browser to repaint it in our first product colour). Of course, it works well for simple applications but if you wish to make OpenGL, 3D Audio and other nifty things, XULRunner will appear too limited.
I believe Blizzard has some cross-platform framework for that kind of thing... :)
Good luck!
Pierre.
Trying to develop applications on a single platform that will be used on many platforms isn't a good approach. At best you'll make applications which feel alien to users of the platforms that you didn't develop for.
More likely, you'll run into subtle compatibility problems in areas which you never forsaw. Java is probably the best way to go if you want to go down this route. Cross compiling will lead to autogenerated code that will be a nightmare to debug and maintain.
Certainly, you may be able to use tools for porting in some cases, but I don't think that this is a problem that you can just provide an automated solution for in general.
Well, to be honest, the only guaranteed way to build an app to be cross platform in one go is to use Java, but it requires a rather large runtime to be installed first.
However, if that's not an option, I would recommend keeping an eye on recent developments in Qt - it is now available (or should be soon) under the LGPL, which presumably means you don't need to pay for it anymore. Using GCC with Qt, I've found, works perfectly when cross-compiling on different platforms, as long as you only use Qt's classes/code/objects and make sure that any non-Qt code you create or use is capable of being compiled cross-platform.
You don't mention any specific programming language (but I'm guessing C or C++ because of the GUI toolkits), so it's kinda hard to give a good answer to what you are actually asking.
If you want "true" cross platform, I would first consider if it is possible to solve your problem using a language that is less platform bound. Python, Java and plenty of others allow you to write on one platform, and run on many.
If you still want to use C/C++, GCC gives you the option of cross-compiling, and if you combine that with QT (which will soon be available under the LGPL) you should be able to get something working.
Java has tried to do the write once, run anywhere. It works well in some situations, but there are too many "unique" things in an OS. GCC provided the ability to cross-compile applications, but you run into the same sort of problems. The code will just have better performance. The RIA approach seems to work, but it doesn't feel like a native application.
Even using a cross platform GUI toolkit will not remove all your cross platform problems. There's more to an app than GUI, after all. Cross compiling will never be able to catch all the issues that a native build will catch, either. If you're going to support multiple platforms, you're going to have to at least test on each platform. But hopefully you can perform native builds with all warnings turned on, in addition to testing.
In the past few months, I found a few great videos exploring this topic of cross platform development. I hope you find them useful as well.
QTCreator
http://www.youtube.com/watch?v=aYiPvM7ZRHA&feature=channel
FlexBuilder
http://www.youtube.com/watch?v=_O_xDXRsh3Y&feature=channel
Mono / MonoDevelop
http://www.youtube.com/watch?v=U6VG_Z0aRek
I've personally had success using Silverlight / MacOS X
http://screencast.com/t/if8xenkt
RealBasic
http://www.youtube.com/watch?v=GWipoBeKSRk
For Cross Platform Development you can use Phone Gap, Appcelerator (Titanium), Corona... This all provides a framework based on JavaScript and finally able to run on different platforms. What I am using is Titanium for Mobile Development which allows us to develop applications with Native Codes.... (which is very good advantage). Phone Gap is giving a web app which is not native in general... This softwares are used for development of cross platform supports... with support on Windows, Linux and Mac OS.
Based upon my personal experience, I believe you should adopt Java: you will avoid many headaches.
You develop in whatever platform you like and you deploy in all other platforms with no need of compiling for each target platform, as you mentioned.
For example, I develop under linux, I hit "compile" only once and the resulting file is ready to be run anywhere (windows, mac, solaris, z/OS, you name it). A double click will run it on any platform (Java runtime must me installed, but most users have it installed already and if not, it's a matter of downloading, installing, "Next>", "Next>", "OK").
If you choose the "Java Web Start" deployment method, it gets even easier: the user just clicks the launch button on a webpage and the application runs (if the proper JVM is installed according to what specified in the JNLP descriptor) or the user gets redirected to the Java download page (if no suitable JVM is found).
GUI development (with Swing toolkit) is easy and powerful, especially if you use the right tool (i.e. Netbeans IDE).