MS Open Tech has published a new open source version of Project Generator that makes it possible for openFrameworks (OF) developers to natively build universal apps for Windows phones, tablets and PCs. The updated Project Generator is available via GitHub on the MSOpenTech Universal branch . We will be working with the OF community to contribute the associated changes to the main repository.
You may have heard about the new functionality within Microsoft Visual Studio 2013 Update 2 that allows developers to build universal apps for Windows http://msdn.microsoft.com/en-us/library/windows/apps/dn609832.aspx. Through it, multiple Windows platforms can be targeted at the same time during app development by largely sharing a common code base. This capability is remarkable for a host of reasons, not the least of which is the time (=cost) savings achieved by pushing Windows Store apps and Windows Phone 8.1 apps out to a broad set of users across multiple device form factors.
Read on for some additional information that may help you get started using this new version of Project Generator for your next blockbuster app!
When you run the OF project generator to create a new WinRT project, you will see the following project structure in File Explorer:
The ‘Univers1’ sub folder will now contain your three distinct projects:
Open the solution file in Visual Studio and it will look like this:
All the generic/shared code should be in the shared project. As is usual with OF, you should only need to change the ofApp and main.cpp files in the ‘src’ folder to create an application working on both Phone and Windows 8.1.
In the Windows 8.1 project you will find specific DLLs, assets and properties for the Windows version of your project. The app.xaml, packagemanifest and DirectXPage.xaml files are the cornerstones of the Windows application. Modify them only if you need specific behaviors in your Windows application vs the Phone version.
Conversely in the WindowsPhone 8.1 project, you will find specific files, assets and properties specific to the Windows Phone version of your project. Don’t make platform-specific changes unless that’s dictated by the very nature of the app that you are writing.
We are eager to learn about the inventive new apps you have in mind for Windows! We encourage you to give this new project generator a try, and to let us know what your experience is, either by responding directly to this post, or by opening issues in GitHub.
We encourage you to get your hands on the code. In addition to any bug reports on GitHub, we welcome your feedback on new features and any suggestions on how we can make the development for Windows Stores apps even easier.
Happy Creative coding!