A lot of Question about Windows Store App and Visual Studio Configuration RRS feed

  • Question

  • I begin a DirectX 10.1 Core last spring on Windows 7 with Visual Studio 2010 and DirectX SDK that I put on the side. This winter, I restart the project but on Windows 8.1 with Visual Studio 2012 and Windows Kits DirectX Native SDK. Unable the migrate a big structure all at same time; because too much change and switch to DirectX 11.1, I decide to recreate my structure from the Windows Store/DirectX Application template inside Visual Studio->New project.

                    I have a lot of question about Visual Studio configuration, shaders compiler, Windows store deploying and certification. But before, let’s review the structure of the big structure.


    Folder Configuration: Inside project a made some modification about folder.

    Assets (Windows Store assets file)

    Generated Files (Win32|x64|ARM for Debug|Release)

    RelentlessX (Include file for entire core)

    Ressources (Database for the program)

    Shaders (non-compiled shaders folder)

    Tool (Script file and Database builder program)


    Generated Files and ipch: I remark that Generated Files was always empty, then I move all generation in generated files (default project have a bug… Win32 don’t have subfolder, like x64 or ARM), I set Fallback emergency folder and quiet mode at yes and let folder location empty to move ipch folder inside temp file.  Like this I just have one folder to exclude in my Backup System (Generated Files)


    Q: Does this change can affect something?


    • Reduce the size of your project (no sdf file and ipch folder)


    • Intellisense need to be rebuild at each time you flush your temp folder


    RelentlessX  Folder :

    For the moment I use this structure that remove cyclic redundancy (NO CPP FILE) for core inlcude.


    //*** Macro definition ******************************************************




    //*** Class definition ******************************************************

    class CRXComponent


    //*** Procedure (cpp file) **************************************************


    //*** End macro definition **************************************************



    I will release a package for other user with Visual Studio Wizard (SOON), Relentless X Library folder and Tool file, but I need to convert and rebuild all Core include as LIB file.


    Q: Because I don’t know for the moment if I will leave my entire sources code to public domain or protect it with a LIB version, Does Microsoft have a program to publish your Visual Studio package wizard like steam have for video game? What you advise me for LIB version?



    • RelentlessX can be rebuild on Windows change platform x64/arm/win32
    • Easy Configuration inside MICROSOFT.CPP.****.USER.PROPS or Include variable



    • Code not protect


    Shaders and Ressources Configuration: My Core have an inside database and document system. It’s like a big Zip file where the shaders and resources files were inside one file (ex: Level1.bin).  Because the compiled shader (CSO file) was inside a database, I have attempted to modify visual studio to compile the shader inside the resources folder before the database builder process. Visual studio seem screaming about the location of the file $(OutDir)%(Filename).cso was the only form I can use. I try to use $(SolutionDir)Resources\CoreX\Shader\%(Filename).cso . To fix that I remove shader from compliance and build manually inside the database build script.



    @echo off

    REM %1 = Solution Dir

    REM %2 = Out Dir

    Set FXCPROG="C:\Program Files (x86)\Windows Kits\8.1\bin\x64\fxc.exe"

    REM Rebuild shader

    %FXCPROG%/Zi /E"main" /Od /Fo"%~1Resources\CoreX\Shaders\Pixel.cso" /T"ps_5_0" /nologo "%~1Shaders\Pixel.hlsl"

    %FXCPROG% /Zi /E"main" /Od /Fo"%~1Resources\CoreX\Shaders\Vertex.cso" /T"vs_5_0" /nologo "%~1Shaders\Vertex.hlsl"


    REM Rebuild Database

    md "%~2Appx"

    md "%~2Appx\Resources"

    "%~dp0ScragXDBBuilder" /c "%~1Resources\CoreX" "%~2Appx\Resources\CoreX.dat"

    "%~dp0ScragXDBBuilder" /c "%~1Resources\ScragX" "%~2Appx\Resources\ScragX.dat"


    I put this package inside POST-BUILD

    Command : "$(SolutionDir)Tool\PackNDistribute.bat" "$(SolutionDir)" "$(OutDir)" that put database file inside Release\Appx


    The problem look that any build event (Pre to post) seem to not work well with Windows store, I must build twice with visual studio (because database file was delete) to make it work. 


    Q: What you recommend it this situation? Does a way to active shader from compliance HLSL and how add extra file inside Windows store package?



    • Any for the moment, because compliance was not totally automatic and database missing (flushed).


    • Modify batch at each time you add shader file was boring.
    • Database seems to be flushed inside Appx Folder.
    • Project/Windows Store/Create package missing Database file (Certification too)
    • Execute to Distant computer doesn’t work anymore (still DB missing problem)


    Texture: I near to reintroduce texture inside core, but CreateTextureFromMemory was depreciated form DirectX 11. I see a lot example with DDS Texture helper and WIC, I’ve remark that IMFMediaEngineNotify can handle video file and mp3 file. It’s look like that with must play thru the three class (DDS(DDS)/JPG(WIC)/MP4(MediaEngine))? Does exist another solution? Which sources is better to use? (I see DirectXTK was not really a certified solution)



    SetCursorPos in Windows Store: My Core support 3D Object Mouse Pointer. To enable this trick I remove pointer (CoreWindow::GetForCurrentThread()->PointerCursor = nullptr; )and I use MouseDevice::GetForCurrentView()->MouseMoved event to manage pointer. I try to keep in head that my core must support SLATE/DESKTOP/DUAL SCREEN, now I will reappears my cursor if I drag on second screen. The problem is when I replace cursor, this one pop at the position while you put to nullptr. SetCursorPos seem not supported by windows Store


    Q: Any solution?





      Q: I have planned to produce a package development with Visual Studio wizard, component and interface class creator.  Does it’s possible with BLEND to manage my interface (component position, size, color) by replacing BLEND component pan and act on file to perform custom operation?



    Tuesday, March 18, 2014 11:05 PM


  • It would be easier if you would post unrelated questions in separate posts. Several of your questions aren't clear or would be better answered in other forums.

    Taking a quick shot through them:

    The generated files folders will be generated as needed. It isn't a bug that they aren't all there immediately when the project is created: the files will be generated when the appropriate platform is built.

    There isn't a program to publish libraries via the Windows Store, only complete apps. You'll need to distribute your library code to your developers separately and they'll then include the library in their app package.

    I'm not sure what you mean about DirectXTK not being a certified solution. DirectXTK is provided as-is, but Windows Store apps using it can and do pass certification. Personally, I wouldn't write a straight DX game without it.

    You are correct that SetCursorPos is supported for desktop apps only, but I don't understand your problem scenario well enough to suggest an alternative.

    For questions about building Visual Studio or Blend add-ins you'll be best off posting in the forums for those products.


    • Marked as answer by Anne Jing Friday, March 28, 2014 6:50 AM
    Tuesday, March 18, 2014 11:24 PM