This article discusses the just released Compact13Tools Version 5.0 software architecture for Compact13Tools. This version has the full source for the Managed Code which it builds via a batch file.The software is structured as two layers. (Read on for more.) The next blog will introduce CEToolbox which directly builds to Managed Code tools as OS Source Subprojects; a topic covered in the previous three blogs. This article is essentially a slides presentation with some *comments.

A structured technique for automatically building Managed Code SDK projects along withe OS build  is presented.

This is a formalism of the method discussed in a recent blog:
Managed Code Development as part of the OS

News

Microsoft has announced a preview edition of ISS, Intelligent System Services. This is their Enterprise version of the "Internet of Things", aka Azure Internet of Things.
Not to be confused with Microsoft's "Internet of My Things" which is about BYOD, bring your own devices  (big and small) and connect to the enterprise and the cloud, seamlessly, whether at work, home or roaming.

ISS Links (Including some discussions):

Compact 7 Documentation

It has been noted that the Windows Compositor that was available in Compact 7 has been removed from Compact 2013. The current documentation does not indicate this and is to be updated. This is the alpha blending, as in Windows 7 that allowed for some measure of transparency when windows overlapped. Possibly removed because it does not fit with the Windows 8 UI philosophy. Thanks to Embedded MVP,  Vinoth for uncovering this.

Compact13Tools Update

Now available as Version 5.0 on Codeplex  (Click here)

A new release, Version 5.0, has been released on Codeplex. The native code for Compact13Tools has undergone some code review thanks to Embedded MVP, MIchel Verhagen from GuruCE in New Zealand. Registry entries have been streamlined and a conflict in the registry between Compact13ForeverShell and Compact13Minshell has been fixed. Michel's debugging infrastructure has been adopted in the native code in the tools. You add two files to a native code project and a rich debugging mechanism based upon Debug Zones is implemented. See the link below for details.

This version of the tools provides full source code for the Managed Code (C#) tool's projects. When their corresponding OS Subprojects are built as part of the OS build, a batch file is called by Prelink.bat to build them and place them in a common directory (\/bin). Postlink.bat then copies the .exe to the release directory for inclusion in the OS as flagged by its BIB file. The previous versions of the tools, provided the \bin directory with prebuilt .exes, except for the Prototypeapp which actually used this build mechanism.

Note that the next version of the tools will be renamed CEToolbox and will build the managed code directly as managed code sources OS Subproject as discussed in previous blogs.  See the next blog which is about CEToolbox (coming).

Links:


Note: Can click on slides to enlarge..

Compact13Tools Architecture

ie. How it all builds

Slide2

Compact13Tools consists of two software layers:

  • The OS Subprojects
  • The SDK C# Managed Code projects

The OS Subprojects are built with the OS, which build the SDK projects in Prelink.bat.

Note, the SDK project can be loaded as a separate Visual Studio instance and developed/debugged over CoreCon.
There is an overall solution file for them.

Slide3

There are four native code OS Subprojects.

Slide4

The are also content OS Subprojects that deliver content only to the OS image.
These projects can be generated using CEComponentWiz. (Click here)

Slide5

Each Managed Code tools has a corresponding OS Content Subproject.

Slide6

Slide7

The directory structure of Compact13Tools

Slide8


Slide9

The C# Build Mechanism for each Managed Code Tool:

  • Is an OS Sources Subproject (Top layer)
  • NoTarget Set
    • Content only to be included in OS
    • No sources to build
  • Prelink.Bat
    • Calls a batch file that sets up the SDK/C# build environment
      and builds the Managed Code project (Bottom layer)
      • Output for project is set to \WINCE800\3rdParty\Compact13Tools\bin
  • Postlink.bat
    • Copies the .exe from \bin (and any resources in the  <OS Subproject>\Resources folder)
      to the Release directory
  • BIB file then includes these items in the image.

Slide10

The binding force between the OS Content Subprojects and the C# ones is BuildVSProject.Bat
that is called by Prelink.bat.This batch file is located \Misc

Slide11

BuildVSProject.Bat
  1. REM Set BUILDVSPROJECT=1 in OS Environment Properties to force build (rebuild) of VS Projects
  2.  
  3. if NOT %BUILDVSPROJECT%_XX==1_XX GOTO DONTBUILD
  4.  
  5. set VSProjectFileName=%AppName%VS.csproj
  6. set VSProjectLocation=..\..\VSProjects\%AppName%VS
  7.  
  8. IF NOT EXIST %VSProjectLocation% GOTO DONTBUILD
  9.  
  10. PUSHD %VSProjectLocation%
  11.  
  12. IF NOT EXIST %VSProjectFileName% GOTO SKIPBUILD
  13.  
  14. call "C:\Program Files (x86)\Microsoft Visual Studio %VisualStudioVersion%\Common7\Tools\VsDevCmd.bat"
  15. msbuild %VSProjectFileName%Ā Ā /t:Rebuild /p:Configuration=Release
  16.  
  17. :SKIPBUILD
  18.  
  19. POPD
  20.  
  21. :DONTBUILD
  • Note that need to set BUILDVSPROJECT to 1 in the OS Environment properties.
    • Can disable these rebuilds, when done once if you prefer.
  • Also AppName is set in Prelink.bat.

Capture

Prelink.bat (Example)
  1.  
  2. set AppName=Compact13WebBrowser
  3.  
  4. call ..\..\Misc\BuildVSProject.bat

Enjoy Open-mouthed smile


A simpler mechanism would be to implement the C# projects as Managed Code Sources OS Subprojects.
This is covered in the next blog:

Next:


Previous:

Managed Code as part of the OS Build

Once a Managed Code app is debugged it should be possible to directly build it as part of the OS build, exactly like Native Code Subprojects. The following is a trilogy on this topic including a wizard for creating a C# OS Subproject that builds with the OS on embedded101.com:

Part 1     

Part 2     

Part 3