[Q] Tablet / Desktop/Phone app compatiblity - Windows RT General

Hello:
This is my first posting here and I'll be getting a Surface RT tablet this thanks giving. I have a iMac 2013 running Windows 8.1 and Visual Studio 2013 Ultimate thru MSDN.
I would like to develop Windows Store desktop/tablet/phone apps (using C#, XAML) or Xojo that should run on Surface RT, Surface Pro, Windows Phone, Windows 8, Windows 7, Vista and XP (supporting both 32 bit and 64 bit). I wanted to know whether the desktop apps I'm developing would run on all of these environments or is it limted to run only on Surface variants. The intent of buying a Surface RT is to take it to college while at the same time test the apps on Surface RT and deploy to the Windows store. I'm confused on the ARM and Intel/AMD cpus and do I need to change anything in Visual Studio 2013 config to target these environments.
Please advise.

ARM vs x86 is simple enough to cover quickly. Computer processors always use a particular "instruction set" to tell them what to do. x86 is one instruction set, ARM is another instruction set, an ARM processor of course uses the ARM instruction set and an x86 processor uses the x86 instruction set.
Computer software is usually compiled from human readable source code into machine code which the processor then executes or they are interpreted where a piece of software which has already been compiled via the previous method then reads your source code and processes the output directly (as they rely on existing software, you cant write an operating system in an interpreted language, they are often referred to as scripting languages instead of programming languages but in terms of application software they are sometimes just as capable if just slightly slower). Then standing write in the middle you get the bytecode languages, you take human readable source code and compile it into bytecode, the bytecode essentially being an instruction set for a processor which doesn't exist in hardware, you then take a piece of software called a virtual machine which takes the bytecode and processes the output, sort of a half way between being fully compiled and fully interpreted.
Java compiles to java bytecode for the java virtual machine, as long as you have a functional java virtual machine you can run your java application on any platform (and java is indeed on most desktop operating systems and on multiple instruction sets). C# and Visual Basic .NET both compile to .NET Bytecode for the .NET virtual machine, again, with a functional .NET virtual machine you can run a C# application on any platform (unfortunately only windows (including RT) has microsofts official .NET virtual machine, but mono is compatible and runs on other platforms too). C or C++ are compiled, compiled languages must be compiled for a particular operating system and instruction set. Python, lua or batch are interpreted, as long as you have a functional interpreter they will run on any platform. One thing to take note of, in theory it is possible to take a particular programming language, lets say a compiled one, and then write an interpreter for it instead of a compiler (and there are indeed C interpreters) or an interpreted language and write a compiler for it (has been done too), but we are ignoring that.
Visual studio will build windows applications in C/C++ or it is the IDE of choice for C# or VB.net on .NET. No surface limitations, with plugins (or considering usage of mono on other operating systems) it can even do extra platforms and languages too (I personally use it for python and have used it for arduino microcontrollers). It supports both ARM and x86 for C/C++, I admit I have not tried C/C++ in visual studio for windows software so I dont know if it simply builds your software 2/3 times or if you need to manually select ARM but the drop down for it is in the build configuration manager either way so you can always take a look in there for yourself, for .NET it says Any CPU (it is possible to tell it to make an x86 or ARM only .NET application, I am yet to come across why with the exception of perhaps optimisations). Windows store apps generally have to be done in Visual studio and officially your only options for store apps are C++, C#, VB.net and Javascript.
Store apps in my opinion are *not* a good introduction to programming. Console applications are far better to start off with. Leaves you with an issue, windows RT cannot run any application except store apps without a digital signature attached to the executable, which is great but we have no way of obtaining those signatures ourselves, only microsoft do. End result is that you can compile your C project for ARM from visual studio or take a .NET application, but you cant run it on the RT (which is an ARM device). Useful huh? Someone wrote a jailbreak which removes this restriction, but its for RT 8.0 only, the 8.1 update breaks it.
Also windows store apps are different from windows phone apps. You wont be able to write an app for both. You would have to write 2 entirely seperate apps. Only windows 8, 8.1, RT and RT 8.1 can run store apps. Only windows phone can run windows phone apps. Officially only windows 8 (including 8.1) and below can run desktop. Your cross platform ambitions are just that, ambitions. For 1 beginner, they are unattainable.
Xojo is for web apps, aka glorified websites.

Related

How to start programming apps for WM Smartphones

Hi, I'm an experienced developer (C,C++,C#,Delphi,Java) and I did some stuff with XNA Studio with Visual Studio Express 2008.
What exactly do I need to start developing apps/games for windows mobile smartphones?
Sorry I tried the search but I'm not able to find anything useful, maybe I used the wrong keywords.
Decide what to use! For Windows Mobile you can use C/C++, .Net ( "Compact Framework" ), FreePascal (as you mention Delphi - this is my own favorite), I think there is even a VB for WM.
For C/C++ you will need to get the Windows Mobile SDK, this is available from Microsoft. API is very much like "slimmed down" Win32 API. For .Net, Google "Compact Framework", or ".Net CF SDK" or something similar.
I am not completely sure, but I think you will need commercial version of Visual Studio. As I recall, "express" / free version does not support WinCE / WM compilation (this is probably why you did not find the option to compile for Windows Mobile)
Good luck!
Thanks! I have both Visual Studio 2008 (non express too) and Rad Studio 2009 (delphi 2009) ...
As I want to get into game development, I'd like to have access to the full power of the phone Using Visual Studio with the SDK might be better, because as I've read it comes with a WM6 emulator...
Any ideas on where I can find tutorials, to display graphics on the phone?
I program using VS08 and the SDK with VB. Not doing anything fancy at the moment, but it does come with an emulator. I haven't figured out how to actually deply it on to the device yet tho.
When you deploy or debug the application it should usually give the option to deploy to a device or emulator. The device of course needs to be connected to ActiveSync.
Also theres a port of QT to Windows Mobile, which seems to work but far more tricky to set up and get working that just using .NET CF it seems

Progress on rooting WP7

I'd like to extend my gratitude to RustyGrom and others (if there are any) for the work on unlocking the developer builds of WP7, but I was wondering what where we are in relation to 'rooting' WP7 so we can run our own unsigned binaries and possibly even getting the stock Windows CE shell and software running on WP7 instead of the Metro UI.
I've heard unconfirmed and uncorroborated rumours of Microsoft's plans to allow native development eventually, but my friends who work at Microsoft really give me the impression that the Managed-only rule is here to stay, in which case it will be up to people like us to get it working.
My initial thoughts are that the hardware HTC and other mfgs produce will have a firmware flash function, so it's just (in my naive mind) a matter of dumping the ROM, making the right changes, and re-flashing the device, assuming there isn't a requirement the new ROM image is signed by Microsoft or the OEM.
Windows CE wasn't built with a hypervisor in mind (unlike the PS3) so I'm curious as to how the sandbox is implemented, and how an attack could be forged against the platform. If we get something working on the emulator would it work on the physical devices?
IIRC policies are requested by xml configuration files located in a .xap.
I haven't yet looked deeply into this, but I would assume it works similarly to CE5.x/WM6.x: that is, if the .xml requests a higher security level than the norm (say, SECLEVEL_EXEC_NATIVE_CODE for example), the .xap deployment system would check the .xap certificate against the internal certificate store. If a match is found to the right security level (Root at first, later OEM, probably never User), the application is allowed to install, if not, the installation is denied.
So, elevating privledges to execute native code should be easy to do with filesystem level access, we inject our own certificate to the root certificate store, sign the .xap with that certificate, and deploy away.
NOTE: This is an educated assumption, i've not actually examined the restriction system in depth yet.
Sortof. You could use those "Interop" methods and go native. It worked for me with a lot of tough luck.
The word windows and "Rooting" should never ever be used together. The term rooting obviously is being grossly misused.
Root is the user in linux that is given full and complete access to all system resources.
tyrannus said:
Sortof. You could use those "Interop" methods and go native. It worked for me with a lot of tough luck.
Click to expand...
Click to collapse
P/Invoke and Interop don't work on WinPho because the functionality required is disabled in the sandbox environment, or possibly not even present in the version of the CLR they're using.
Look, it's W3bbo!
Tom Servo said:
Look, it's W3bbo!
Click to expand...
Click to collapse
Wtflol. Hey Toiletbrush, haven't seen you around for a while. Didn't you get banned from C9 or something?
(I'm still active on SA btw, just under a different username)
Naw, I was on an Anti-MS binge for three years until few weeks ago. Took Oracle screwing up OpenSolaris. That and I wanted a Windows Phone. Kinda useless without Windows.
Mod edit: Please watch your language
For the main:V can't run wp7 on our HD2
I am thinking of the other way around, getting xaml and xap to run on wm6, the hd2 is quite capable of running them. Wp7 runs cf3.7 and we can start from there. Maybe we need to identify the required assemblies and copy them. Defiantly it won't be fully supported, launchers will not work for example but it might be a good shot.
I'm not a core coder or hacker, but when it comes to logic I'm optimistic, it might be possible.
I would love to see silverlight running on wm.
You are really optimistic.
WP7 is compiled against armv7, where WM is compiled against armv4i...
ARM v7 has nothing to do with .net assemblies, that us why we need .net cf to run apps built using .net
Now the question is, is the .net cf responsible for running xap packages or is it another framework (like on pc, you need sl runtime)
Afak, it is the cf.
Please correct me if I'm wrong.
I read every post and understood nothing. You guys are on another level with your tech jargon. Lol.
Sent from Android HD2 using XDA app
anaadoul said:
ARM v7 has nothing to do with .net assemblies, that us why we need .net cf to run apps built using .net
Now the question is, is the .net cf responsible for running xap packages or is it another framework (like on pc, you need sl runtime)
Afak, it is the cf.
Please correct me if I'm wrong.
Click to expand...
Click to collapse
The JIT compiler (or what is used in CF version) that loads assemblies is compiled against armv7 and these assemblies can't be run on our compiler.
OndraSter said:
The JIT compiler (or what is used in CF version) that loads assemblies is compiled against armv7 and these assemblies can't be run on our compiler.
Click to expand...
Click to collapse
Assemblies are not compiled against a platform or a CPU Architecture, they are compiled against a .NET Framework version to an IL.
The JIT is the different one, it is a native code so it is compiled to V7 in Windows Phone 7, but we have it already (JIT) compiled against ArmV4 (as in .net cf)
anaadoul said:
Assemblies are not compiled against a platform or a CPU Architecture, they are compiled against a .NET Framework version to an IL.
The JIT is the different one, it is a native code so it is compiled to V7 in Windows Phone 7, but we have it already (JIT) compiled against ArmV4 (as in .net cf)
Click to expand...
Click to collapse
Unlike Java, the IL that .NET compiles is actually CPU specific. This is why you can specify the CPU type when compiling a (desktop) .NET application (either x86, x64 or Itanium).
XAP files on Windows Phone 7 run on top of a modified version of Silverlight. Silverlight has its own runtime engine, and does not reference the .NET libraries at all (they just happen to share namespaces and classes to make coding easier). To get WP7 applications to run on WM6.5 you would need to recompile Silverlight.
TehPenguin said:
Unlike Java, the IL that .NET compiles is actually CPU specific. This is why you can specify the CPU type when compiling a (desktop) .NET application (either x86, x64 or Itanium).
Click to expand...
Click to collapse
Not true. The MSIL itself is CPU-independent. The reason you can chose to specify the architecture when compiling is for .NET Applications that depend on external native-code libraries. Obviously, in those cases, the default "Any CPU" option just causes a nightmare, as the framework then chooses the architecture of the JIT compiler, meaning different dependencies for different machines. Selecting an architecture inserts data telling the JIT compiler what architecture it must use.
That said, what you go on to say about Silverlight is true. Silverlight does not depend on the .NET Framework on the desktop, or the .NET Compact Framework on CE or WP7 (though the compiler for Silverlight does require the .NET Framework). Strictly speaking, the only thing they share in common is the CLR, the libraries are all recreated and re-engineered for their specific purpose. The Libraries share the names simply to enable software developers to re-use as much desktop code as possible.
(Note: I think this is all correct, though I'll be the first to admit that I am much more experienced with Desktop .NET than the mobile equivalent).
Silverlight on WP7 will undoubtedly have native dependencies too, just like the .NET Framework and the .NET Compact Framework (both make extensive use of existing Windows APIs, of course).
Therefore, it'd take a Moonlight-style project (The Mono equivalent of Silverlight, enabling Silverlight applications to run on Linux) in order to bring Silverlight to Windows Mobile classic.
hounsell said:
Not true. The MSIL itself is CPU-independent. The reason you can chose to specify the architecture when compiling is for .NET Applications that depend on external native-code libraries. Obviously, in those cases, the default "Any CPU" option just causes a nightmare, as the framework then chooses the architecture of the JIT compiler, meaning different dependencies for different machines. Selecting an architecture inserts data telling the JIT compiler what architecture it must use.
That said, what you go on to say about Silverlight is true. Silverlight does not depend on the .NET Framework on the desktop, or the .NET Compact Framework on CE or WP7 (though the compiler for Silverlight does require the .NET Framework). Strictly speaking, the only thing they share in common is the CLR, the libraries are all recreated and re-engineered for their specific purpose. The Libraries share the names simply to enable software developers to re-use as much desktop code as possible.
(Note: I think this is all correct, though I'll be the first to admit that I am much more experienced with Desktop .NET than the mobile equivalent).
Silverlight on WP7 will undoubtedly have native dependencies too, just like the .NET Framework and the .NET Compact Framework (both make extensive use of existing Windows APIs, of course).
Therefore, it'd take a Moonlight-style project (The Mono equivalent of Silverlight, enabling Silverlight applications to run on Linux) in order to bring Silverlight to Windows Mobile classic.
Click to expand...
Click to collapse
If silverlight doesn't need the .net cf then
1) why is it included in wp7 (.net cf 3.7)
2) how can we use compiled assemblies (.net) inside silverlight?
Sent from my HTC HD2 using XDA App
anaadoul said:
If silverlight doesn't need the .net cf then
1) why is it included in wp7 (.net cf 3.7)
2) how can we use compiled assemblies (.net) inside silverlight?
Sent from my HTC HD2 using XDA App
Click to expand...
Click to collapse
1) XNA uses the .NET framework
2) The assemblies must target the Silverlight runtime, as such any assembly compiled for the .NET runtime will not work
anaadoul said:
1) why is it included in wp7 (.net cf 3.7)
Click to expand...
Click to collapse
I don't know, maybe because a lot of the base system's written in not-Silverlight managed code?

[Q] Windows 8 apps compatibility

I'm a newbee to RT, so please forgive me if this has been asked/answered elsewhere.
I thought that if a developer writes a metro app for Windows 8 it will automatically run on both Windows 8 and Windows 8 RT. I found a situation where this may not be true.
I just picked up a Dell XPS 10 after using Windows 8 on my desktop and a Lenovo Twist. On my Twist and desktop I've been running an app called "Trackage." I like it and wanted to try it on the XPS 10, but a search for the name does not return it as available on RT.
Is there a reason for this? Can someone explain for me?
Thanks in advance,
Rich
Although the vast majority of metro apps will run fine on both systems, the developer does maintain the ability to restrict an app from one platform or another for whatever reason.
It is entirely possible that the trackage developer has deliberately made his/her app unavailable on Windows RT.
There are very few reasons for doing that on metro apps, but clearly its occurred sadly.
I would see if you can find the website for the app and make a feature request.
Thank you very much. That was very helpful!
RT runs on ARM processors, which execute different code than the x86 processors used for traditional Windows systems. Many Metro apps are architecture-independent, meaning they are written in a language that is higher-level than actual machine code and are converted to machine code for whatever CPU they are on when you first run them. However, some Metro apps are written in C/C++, which compiles directly to machine code. Although it is possible to make it compile to ARM in most cases, such apps are not automatically supported on ARM the way other apps are.
some apps cannot run on RT and only on win8

[Q] Is that possible to compile .cpp on RT by TC++ in dosbox?

As we know, we have an arm edtion of dosbox, and there is Turbo C++ for dosbox. So, I wonder if it's possible to compile .cpp files on RT by TC++ in dosbox? I am with 8.1 now. Is there anyone who wants to try?
No jailbreak for 8.1 as far as now. On 8.0 should work if it's working on your desktop.
Just keep in mind whatever you get cannot run on Windows RT natively.
LolitaPlus said:
Just keep in mind whatever you get cannot run on Windows RT natively.
Click to expand...
Click to collapse
So there is no ide or any compiler for c at all? Quite strange Microsoft didn't made an afford for a tablet supposed to be for students....
alxr212 said:
So there is no ide or any compiler for c at all? Quite strange Microsoft didn't made an afford for a tablet supposed to be for students....
Click to expand...
Click to collapse
MSVC from visual studio can target win32 on THUMB_2. That does mean you can only cross compile from a full x86 windows machine though.
There is a C# compiler on the device already. There is a signed perl binary somewhere. The C# compiler requires a jailbroken device to run the final application though and I doubt you'll find any students using perl.
I think its obvious that microsoft dont push developer tools too heavily considering you need a jailbreak to run non microsoft desktop software in the first place.
On jailbroken devices you have IKVM (which is a java virtual machine, its slow and nowhere near 100% compatible, there is no java compiler on the device yet), python and ruby. There is also SharpDevelop for C#, otherwise you have to use the compiler from CMD. http://forum.xda-developers.com/showthread.php?t=2092348
SixSixSevenSeven said:
MSVC from visual studio can target win32 on THUMB_2. That does mean you can only cross compile from a full x86 windows machine though.
There is a C# compiler on the device already. There is a signed perl binary somewhere. The C# compiler requires a jailbroken device to run the final application though and I doubt you'll find any students using perl.
I think its obvious that microsoft dont push developer tools too heavily considering you need a jailbreak to run non microsoft desktop software in the first place.
On jailbroken devices you have IKVM (which is a java virtual machine, its slow and nowhere near 100% compatible, there is no java compiler on the device yet), python and ruby. There is also SharpDevelop for C#, otherwise you have to use the compiler from CMD. http://forum.xda-developers.com/showthread.php?t=2092348
Click to expand...
Click to collapse
Unfortunately jailbroken device is not an option with the 8.1 (at least for now), well I guess the only thing to do is to wait for one.....
alxr212 said:
Unfortunately jailbroken device is not an option with the 8.1 (at least for now), well I guess the only thing to do is to wait for one.....
Click to expand...
Click to collapse
I'm well aware that jailbreak isnt an option on 8.1. Myriachan is working on it

C++ Programming?

Hi, simple question. I know there are code editors on the windows store, but how would I go about compiling and running basic (command line) c++ code on RT. I would rather carry my lenovo yoga around than my lenovo i7 chunky laptop to my university lectures.
Any possibilities?
Thanks, Zack.
You cannot on RT
Sad, but true. You could use Remote Desktop to your main machine and just use the tablet as a thin client. You can even use the cross-compiler for ARM and produce executables that will run on (jailbroken) RT systems, which could then be copied back down from Remote Desktop for local execution. However, to the best of my knowledge, there is no working C++ (or even C) compiler that will run on RT right now.
It *might* be possible to run MSVC through Mamaich's x86 compatibility layer, which (if configured to produce ARM binaries) would let you compile code (slowly) that would run natively on the tablet. I don't know if that's practical, though; the dynamic recompilation is probably up to it (at the machine level, compilation is surprisingly simple given how complex it is at the algorithm level) but MSVC probably requires libraries and/or system calls which aren't implemented yet. Normally I'd say that's a great thing to request focusing on, but the public build of the emulator hasn't been updated in many months...
Unless you did do the remote desktop or find another way to be able to do it. Otherwise I'd just write the code on your tablet and just wait to compile later on.
You can try an online compiler such as ideone[dot]com or compileonline[dot]com.

Categories

Resources