Visual Studio 2012 Compiling Native for ARM

Discussion of beta and abandonware topics not fit for the other forums goes here.
Post Reply
ben1066
Posts: 121
Joined: Sun Apr 03, 2011 12:21 pm

Visual Studio 2012 Compiling Native for ARM

Post by ben1066 »

Microsoft seem to have done a pretty bad job at stopping you being able to compile desktop applications for Windows RT. As far as I can tell if you add a file called Windows.desktop.arm to C:\Program Files (x86)\Windows Kits\8.0\DesignTime\CommonConfiguration\Neutral containing the following then it allows compilation of desktop applications for ARM. I've tested this and got an exe out, and putting it into IDA indicates it is a valid exe.

Code: Select all

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
  </PropertyGroup>
</Project>

The Distractor

Re: Visual Studio 2012 Compiling Native for ARM

Post by The Distractor »

I compiled a hello world exe for ARM by simply commenting out a few lines in one of the C header files (forgot which one).

Ramireztime
User avatar
Donator
Posts: 124
Joined: Tue Jun 21, 2011 6:21 pm
Location: California
Contact:

Re: Visual Studio 2012 Compiling Native for ARM

Post by Ramireztime »

Ok so basically what your saying is that you can get a program, like Virtual Router or Notepad++, and make it work on Windows RT?
Oh hello there.

Pwned
Donator
Posts: 4268
Joined: Sat Aug 22, 2009 4:28 pm

Re: Visual Studio 2012 Compiling Native for ARM

Post by Pwned »

Ramireztime wrote:Ok so basically what your saying is that you can get a program, like Virtual Router or Notepad++, and make it work on Windows RT?
Maybe, if it doesn't have ASM parts in the source code, and is Visual Studio-ready.

ben1066
Posts: 121
Joined: Sun Apr 03, 2011 12:21 pm

Re: Visual Studio 2012 Compiling Native for ARM

Post by ben1066 »

The Distractor wrote:I compiled a hello world exe for ARM by simply commenting out a few lines in one of the C header files (forgot which one).
And at a guess you commented an MSBuild file too. That does work but this appears to be the cleanest way and the one that Microsoft likely uses, or something similar.

yksoft1
User avatar
Posts: 750
Joined: Thu Nov 26, 2009 7:14 am

Re: Visual Studio 2012 Compiling Native for ARM

Post by yksoft1 »

I thought they did not ship ARM C/C++ runtime and Win32 libraries with the released Windows 8 SDK and Visual Studio 2012....
Anyone give me a tree list of Visual Studio 2012's lib directory (both the compiler and SDK) please?

ben1066
Posts: 121
Joined: Sun Apr 03, 2011 12:21 pm

Re: Visual Studio 2012 Compiling Native for ARM

Post by ben1066 »

They do. At least there is user32.lib and kernel32.lib for example, it appears to have fewer libs in total, but I suspect that's driver related stuff and also legacy.

prayaas1998
User avatar
Posts: 605
Joined: Wed Apr 27, 2011 11:21 am
Location: Between Chair and Computer

Re: Visual Studio 2012 Compiling Native for ARM

Post by prayaas1998 »

Seems interesting..
:)

BogdanV
Posts: 492
Joined: Thu Sep 17, 2009 7:37 pm

Re: Visual Studio 2012 Compiling Native for ARM

Post by BogdanV »

You might be able to compile it for ARM but will you be able to launch the program from WinRT ? Surely they've placed some kind of protection, like requiring all Win32 apps to be signed with their own private key or something.

ben1066
Posts: 121
Joined: Sun Apr 03, 2011 12:21 pm

Re: Visual Studio 2012 Compiling Native for ARM

Post by ben1066 »

I doubt it, that would surely cause issues in relation to anti-competition laws.

BogdanV
Posts: 492
Joined: Thu Sep 17, 2009 7:37 pm

Re: Visual Studio 2012 Compiling Native for ARM

Post by BogdanV »

Uhm, Microsoft clearly states that win32 development for WinRT is not an option, so none other than them will build win32 stuff anyway. Unless they allow OEMs to bundle Desktop-mode crap, but I doubt it.

Pwned
Donator
Posts: 4268
Joined: Sat Aug 22, 2009 4:28 pm

Re: Visual Studio 2012 Compiling Native for ARM

Post by Pwned »

BogdanV wrote:...allow OEMs to bundle Desktop-mode crap, but I doubt it.
http://www.gev.com/2012/08/samsung-s-la ... windows-8/

rafaelgs
User avatar
Posts: 385
Joined: Tue Sep 06, 2011 6:53 pm
Location: Brazil

Re: Visual Studio 2012 Compiling Native for ARM

Post by rafaelgs »

Pwned wrote:
BogdanV wrote:...allow OEMs to bundle Desktop-mode crap, but I doubt it.
http://www.gev.com/2012/08/samsung-s-la ... windows-8/
Probably, Samsung will include this only in PC. But, not in Windows RT.
     //We are Amanda~
     using Amanda.Carolina;

BogdanV
Posts: 492
Joined: Thu Sep 17, 2009 7:37 pm

Re: Visual Studio 2012 Compiling Native for ARM

Post by BogdanV »

rafaelgs wrote:
Pwned wrote:
BogdanV wrote:...allow OEMs to bundle Desktop-mode crap, but I doubt it.
http://www.gev.com/2012/08/samsung-s-la ... windows-8/
Probably, Samsung will include this only in PC. But, not in Windows RT.

Source also said that its a "gadget" by which I assume its just a floating, custom IE frame like the sidebar gadgets in Vista and 7 ergo its not a win32 app.

reker
Posts: 1
Joined: Fri Oct 26, 2012 7:50 pm

Re: Visual Studio 2012 Compiling Native for ARM

Post by reker »

confirmed
when i run a native exe on windows rt, it told me
'windows cannot verify the digital signature of this application'

ben1066
Posts: 121
Joined: Sun Apr 03, 2011 12:21 pm

Re: Visual Studio 2012 Compiling Native for ARM

Post by ben1066 »

Try running the following commands in command prompt as administrator:
bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS
bcdedit -set TESTSIGNING ON

These disable driver signature enforcement, it may also disable it for applications. It may need to be signed with a testing cert.

z180
Donator
Posts: 982
Joined: Sat Aug 21, 2010 5:10 pm
Location: In front of my Toughbook

Re: Visual Studio 2012 Compiling Native for ARM

Post by z180 »

In Windows Mobile 6.5 you could patch it easily and it was possible to use other compilers.
Stephen Elop….I curse you, that after your death your soul will be forever trapped in the sourcecode of Windows and one day Microsoft will fall because of that virus code!

Post Reply