πŸ“œ ⬆️ ⬇️

Attempting to install Windows Phone 8 SDK in Windows 7

Greetings.

I don’t know about you, but at first I didn’t want to install a new Windows 8. And what’s the point? There was no sense, the seven worked perfectly and would continue to work, but ... Smart people from Microsoft like to redo everything anew, and this time they’ve overdone it.

The fact is that the new version of the WP emulator, the Windows Phone Emulator (XDE) , uses Hyper-V technology, which appeared only in the Windows desktop family since Windows 8.
')
I had an idea to install this SDK at any cost in VS2012 under Windows 7 and get the most out of it.

Attention!




Under the cut, I will briefly describe how the WP8 SDK installer works and show the curve the path through the swamp for those who do not want to part with Windows 7, but want to extend the development for new versions of Windows Phone.

Digging in the package


Having downloaded the WPexpress_full.exe installer from the official site , I tried to start it. He sent me, saying that I had to reinstall Windows (I didn’t expect it!) To something newer, for example Windows 8. I was taken aback by such audacity and without thinking twice updated that same picture with a dog , just in case, to have something to brush off ideological disputes with friends.



All suspicion fell on marketers.

WPexpress_full.exe is perfectly unpacked using WinRAR, the following files were found inside:

0: XML document text u0: PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit u1: PE32 executable for MS Windows (DLL) (console) Intel 80386 32-bit Mono/.Net assembly u10: PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit u11: PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit u12: XML document text u13: XML document text u14: exported SGML document text u15: UTF-8 Unicode (with BOM) text, with very long lines, with CRLF line terminators u16: PNG image data, 63 x 63, 8-bit/color RGBA, non-interlaced u17: HTML document text u18: XML document text u2: XML document text u3: exported SGML document text u4: XML document text u5: MS Windows icon resource - 3 icons, 16x16, 16-colors u6: MS Windows icon resource - 3 icons, 16x16, 16-colors u7: MS Windows icon resource - 3 icons, 16x16, 16-colors u8: PE32 executable for MS Windows (DLL) (console) Intel 80386 32-bit Mono/.Net assembly u9: XML document text 

After examining the file 0 , which was the header for this package, it turned out that the installer was made using the Windows Installer XML (WiX) toolset toolkit . I downloaded the tools of this WiX, among them was the utility dark.exe , which is responsible for unpacking the .msi packages compiled by the default WiX toolkit. The utility came up to this package.

He unpacked:

 . β”œβ”€β”€ AdminDeployment.xsd β”œβ”€β”€ BootstrapperApplicationData.xml β”œβ”€β”€ BootstrapperCore.config β”œβ”€β”€ BootstrapperCore.dll β”œβ”€β”€ HighContrastThemes.xaml β”œβ”€β”€ License.htm β”œβ”€β”€ LocalizableStrings.xml β”œβ”€β”€ ManagedUx.dll β”œβ”€β”€ SkuResources.xaml β”œβ”€β”€ Themes.xaml β”œβ”€β”€ manifest.xml β”œβ”€β”€ mbahost.dll β”œβ”€β”€ mbapreq.dll β”œβ”€β”€ mbapreq.png β”œβ”€β”€ mbapreq.thm β”œβ”€β”€ mbapreq.wxl β”œβ”€β”€ res β”‚  β”œβ”€β”€ info.ico β”‚  β”œβ”€β”€ stop.ico β”‚  └── warn.ico └── sqmapi.dll 

After reading the docks and inspecting the XML files, it became clear that the installer was done with a custom interface, using ManagedUx and Bootstrapper (Burn) from the WiX SDK (in the archive wix36-sources.zip there is an example of such a project - WixBA ).

Simply put, what we have is that without recreating a WiX project in Visual Studio, you cannot rebuild it back into the installer. At a minimum, manifest.xml is
 <BurnManifest xmlns="http://schemas.microsoft.com/wix/2008/Burn"> 
and how to collect such manifestos - not one utility from the standard WiX kit knows.

Therefore, despite the very attractive line in BootstrapperApplicationData.xml
 <UxBlocker ShortName="CheckX64runningWin2008ServerOrWin8" Type="Stop" Condition="(VersionNT < v6.1) OR ((VersionNT = v6.1) AND (NTProductType < 3)) OR (NOT VersionNT64)" DisplayText="#loc.Win8X64Block"/> 
which can be removed, this method will have to leave.

Parsim manifest.xml




All packages are installed in manifest.xml , which are installed by the installer, as well as source URIs. I wrote a ruby-script that parses and downloads everything you need, then installs it one by one.
The order of package installation is the same as they follow in the XML manifest, I hope it does not matter.

Sources on GitHub

There is also a folder with a ready-made binary (script + dependencies + ruby 1.9.3 , compiled using ocra ), you just need to drag WPexpress_full.exe onto it and watch.

Ready to use ZIP archive



Tips & Tricks


The XAML editor will try to run Blend, which in turn is a component of the WP8 emulator, which is why Blend itself will forever fall. I immediately switched the XAML editor to the one that without visualization, autocomplete works there and ok.



In the bottom line we have:



Fact: Windows Phone 8 runs in VirtualBox on the same Windows 7, but there is no mouse cursor and network, so for now it hasn't done anything useful.

Good luck with this business! ~ Xlab

- UPD: If you had a bug with a binary
 /src/application.rb:76:in `require_relative': cannot load such file β€” /src/chain (LoadError) 
Download the new version from github, fixed.

Source: https://habr.com/ru/post/157427/


All Articles