Skip to content

Building From Source

Antoine Haas edited this page Jun 27, 2016 · 10 revisions

Building From Source

If you'd like to build the SDK from source, you can use the following process:

  1. Install Visual Studio

  2. Download and install Git LFS

  3. Download and run the Git LFS installer from the Git LFS website

  4. Install the Git command line extension with the command below. In case of errors, check the next section below for known issues about the Git LFS installer.

    git lfs install

  5. Clone the repo

    git clone https://github.com/Microsoft/WinObjC

  6. Navigate into the build directory of the repo and double-click on build.sln to open the project solution in Visual Studio.

  7. Set the build type to be Release and the platform to be x86.

  8. Right-click on the solution and select build.

  9. Set the build type to be Release and the platform to be ARM.

  10. Right-click on the solution and select build.

Building from Source and Packaging the SDK in a zip file

To build the SDK from source and package it in a zip file, follow the steps below:

  1. Open the Start menu and type developer (1). This will bring a list of installed apps that match your search pattern.

  1. Click on the Developer Command Prompt for VS2015 (1).

  1. Navigate into the build\Package directory of the repo with the cd %SDKInstallDir%\build\Package (1) command, where %SDKInstallDir% is your SDK download directory.

  1. Run the msbuild package.nativeproj /m /p:Configuration=Release /p:Platform=All (1) command to build the SDK and generate the zip file. Once the build is complete, the SDK winobjc.zip will be created in the build/SDKPackage/Release directory.

Git LFS Installer Known Issues

  1. When you run the Git LFS installer, if you choose to change the default installation folder, it’s possible for the git-lfs.exe executable to be installed on your Desktop and not under the path you selected (the git-lfs-uninstaller.exe executable, however, should be automatically installed in the right folder). To fix this, simply copy and paste the git-lfs.exe executable from your Desktop to the folder you chose for the installation.
  2. When trying to install the Git command line extension with the git lfs install command, it’s possible you get the error git: 'lfs' is not a git command. See 'git --help'.That’s because the Git LFS installer did not automatically update the Path system environment variable to include the path of the Git LFS executable git-lfs.exe. Choose one of the 2 options below to solve this:
  • Option 1: copy and paste the git-lfs.exe executable in Git’s bin directory, usually under C:\Program Files\Git\bin.
  • Option 2: if you don’t want to have the git-lfs.exe executable under Git’s bin directory, you can edit the Path system environment variable to include git-lfs.exe’s folder location.
    1. Click on the Start icon and type System
    2. Click on System
    3. Click the Advanced System Settings link in the left column
    4. In the System Properties window, click on the Advanced tab, then click the Environment Variables button near the bottom of that tab
    5. In the Environment Variables window, highlight the Path variable in the System variables section and click the Edit button.
    6. Click the New button and type the full path of your git-lfs.exe executable
    7. Click OK to close the Edit environment variables and Environment Variables window