FORUMS
Remove All Ads from XDA

[how to] compile and port win32 apps to Windows RT ARM

276 posts
Thanks Meter: 102
 
By no2chem, Senior Member on 13th January 2013, 04:51 AM
Post Reply Email Thread
13th July 2013, 11:55 PM |#71  
Member
Thanks Meter: 0
 
More
sorry guys, maybe wrong topic for this question,
but, is there are a chance that ported WM5/6 arm app could be run on RT?
 
 
14th July 2013, 10:41 AM |#72  
Senior Member
Thanks Meter: 326
 
More
Quote:
Originally Posted by screamer333

sorry guys, maybe wrong topic for this question,
but, is there are a chance that ported WM5/6 arm app could be run on RT?

not easily. Windows mobile ran on ARMv6 (often soft float) whereas RT is ARMv7 (specifically the THUMB mode). The apps used different API's too.

If you have the source for an app it may be portable. It equally may not.
The Following User Says Thank You to SixSixSevenSeven For This Useful Post: [ View ] Gift SixSixSevenSeven Ad-Free
15th July 2013, 01:36 AM |#73  
Inactive Recognized Developer
Flag Seattle
Thanks Meter: 2,921
 
More
Architecture difference shouldn't be *too* big a problem unless they were using assembly or something crazy like that, but it may make porting require a bit more futzing with the compile options. The difference between the CE and NT versions of the WIn32 API are almost certain to be a bigger problem. It's possible to code portably between those OSes - I know somebody who had an app that could be compiled fro both WinMo and x86 desktop Windows from the same source code - but it's likely something that not many people bothered to do.
19th July 2013, 01:46 AM |#74  
Junior Member
Flag Auckland, New Zealand
Thanks Meter: 0
 
More
Talking VS 2013 Preview works as well
Hey People,

just tried the Platform.Common.Props hack on VS 2013 Ultimate Preview (v12.0.20617.1) and it works a treat, though you have to modify the file in the C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\AR M folder instead. (note: the V120, not V110).

Later'ish
Craig
20th July 2013, 12:48 AM |#75  
Myriachan's Avatar
Senior Member
Thanks Meter: 174
 
More
Quote:
Originally Posted by CraigHumphrey

Hey People,

just tried the Platform.Common.Props hack on VS 2013 Ultimate Preview (v12.0.20617.1) and it works a treat, though you have to modify the file in the C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\AR M folder instead. (note: the V120, not V110).

Later'ish
Craig

There's no need to modify the VS2013 installation at all if you edit your project files in Notepad: http://forum.xda-developers.com/show...1&postcount=48

This is better because you can just distribute your project files to others, rather than rely upon them hacking their local VS installation as well.
20th July 2013, 06:33 AM |#76  
Inactive Recognized Developer
Flag Seattle
Thanks Meter: 2,921
 
More
For bonus points, I'm pretty sure there's a template somewhere which can be modified so that the edit is present in all your new projects by default...
4th August 2013, 04:50 PM |#77  
Junior Member
Thanks Meter: 0
 
More
Driver / Keyboard layout
Hey guys, really great job with this and with jail-breaking WinRT!
Has anybody managed to build a driver successfully.
I'm trying to build a keyboard layout. It's really not a driver but from compilation point of view it sorta is.
When I try to build from Visual Studio I get
Code:
The target "Build" does not exist in the project
(the same project builds on x86).
When I try to build from command line (to avoid MSBuild) I'm getting a lot of errors like these:
Code:
C:\Program Files (x86)\Windows Kits\8.0\include\um\winnt.h(7736) : error C4013: 'ReadAcquire8' undefined; assuming extern returning int
or
Code:
C:\Program Files (x86)\Windows Kits\8.0\include\um\winnt.h(7999) : error C4013: 'WriteNoFence64' undefined; assuming exte
C:\Program Files (x86)\Windows Kits\8.0\include\um\winnt.h(18832) : error C2065: 'CP15_TPIDRURW' : undeclared identifier
r
But I'm not sure I my command line for CL is good. I took x86 command line from Visual Studio and replaced a few stuff.
Code:
cl /GS /analyze- /W4 /Zc:wchar_t- /I"obj\Win32\Win8 Debug" /I"..\..\inc" /Zi /Gm- /Od /FI"C:\Program Files (x86)\Windows Kits\8.0\Include\Shared\warning.h" /fp:precise /D "_X86_=1" /D "i386=1" /D "STD_CALL" /D "WIN32_LEAN_AND_MEAN=1" /D "_WIN32_WINNT=0x0602" /D "WINVER=0x0602" /D "WINNT=1" /D "NTDDI_VERSION=0x06020000" /D "DBG=1" /D "_WINDLL" /errorReport:prompt /WX /Zc:forScope /RTC1 /Oy- /MDd /Fa"obj\Win32\Win8 Debug" /nologo /Fo"obj\Win32\Win8 Debug" /Fp"obj\Win32\Win8 Debug\CzRuQYNm.pch" CzRuQYNm.C CzRuQYNm.DEF
The DLL which represents keyboard layout is actually very simple - it just exports one function which returns a structure. So, it may be possible to compile it against some fake H files with a lot of stuff removed. I really don't need any "ReadAcquire8".

I'd appreciate any hint how to proceed, or if somebody managed to build keyboard layout successfully and can provide some guidance, it'd be great.
I'm attaching a project I'm trying to build.
Attached Files
File Type: rar kbd.rar - [Click for QR Code] (12.3 KB, 6 views)
5th August 2013, 02:20 AM |#78  
Retired Recognized Developer
Thanks Meter: 221
 
Donate to Me
More
I've successfully built test drivers for RT, but only from GUI.
I have not looked into your code, but my guess is that you are trying to use the API that is not present on RT. MS have removed lots of obsolete kernel APIs in RT.
5th August 2013, 02:27 AM |#79  
Senior Member
Thanks Meter: 184
 
Donate to Me
More
Quote:
Originally Posted by Đonny

Hey guys, really great job with this and with jail-breaking WinRT!
Has anybody managed to build a driver successfully.

Yes, several.

They will build fine in visual studio so long as you build it as a native dll, specify the driver switch, and set the entry point. Generating an ntoskrnl and Hal lib on your own is very tricky and you'll have some linker errors - they can be fixed... But its not trivial. The best thing to do is to grab the kernel libs from the latest vs2013 preview sdk and link against those libs. Avoids a lot of headaches.

If you have a look at the pdb I released for kprocesshacker you'll see the complete build strings I used for building the driver. That should help you out with any other missing cl & link switches. I intentionally posted that pdb so people could sort out kernel build issues.

Debugging a driver is another matter entirely! Crash dumps are your friend!

Cheers!
5th August 2013, 07:21 AM |#80  
Inactive Recognized Developer
Flag Seattle
Thanks Meter: 2,921
 
More
@donny: This is *NOT* the thread for discussing kernel driver development! Right forum, though. I strongly recommend starting a new thread for your project.

With that said, I can tell you at least one completely obvious problem: you're explicitly defining the preprocessor macros _X86_ and i386. Those are (as the names suggest) used to indicate compilation of x86 code. RT runs on ARM processors (using the THUMB2 instruction set, but Microsoft just uses calls it ARM and ignores the non-THUMB2 instruction sets that ARM supports). In any case, you shouldn't need to explicitly define those macros anyhow; the compiler does that for you! Unlike some compilers, MSVC doesn't use the same program to compile for different architectures. When you look at the Visual Studio 2012 Command Line shortcuts, you'll note that there are at least three - x86, amd64/x64, and ARM. Each one sets up the environment for a different compilation target, including ensuring you'll get the right program when you invoke the compiler.
20th August 2013, 08:07 PM |#81  
Senior Member
Thanks Meter: 21
 
More
Is there some decent desktop mp3 player -port for RT?

and why is there no windows media player on desktop. it could have helped a lot and made the experience far better within desktop mode.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes