The scope of this tutorial is to migrate an existing VisualStudio project from SDK V13r1 to SDK V13r2.
We will also add support for ARM64 platform compile target.
Make a copy of your project directory - the main directory that contains the SLN file.
Delete the SDK directory containing V13r1 SDK files.
Open the main make file of your project (the file yourapp.mak in the same directory as the vcproj file).
Make the following changes:
Open the vcproj file with a text editor
When you open the project, let the innovaphone Visual Studio Extension copy the SDK files to your source directory. You should now be able to compile and debug the app using 13r2 SDK.
You have to Clean/Rebuild your project to clear the cached libraries.
The next step isn't necessary right now, but highly recommended to not have to change it in the feature. Starting with 13r2, the apps can be compiled form ARM64, too. Since the 13r1 project file doesn't have any idea about ARM64, the compile target must be added to the vcproj and sln file. The benefit is, that you don't need to add it later if it is needed (upgrading from 13r2 to newer releases should be way easier for now). To add the ARM64 compile target, please patch the vcproj and sln files as follows:
Close VisualStudio solution and open the SLN file of your project in a text editor.
Add the following lines to the GlobalSection(SolutionConfigurationPlatforms) section:
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
EndGlobalSection
Proceed to "GlobalSection(ProjectConfigurationPlatforms)" section.
After the line "{E0104876-BAB2-4678-BF5B-BA325726D66E}.Debug|ARM.Deploy.0 = Debug|ARM" insert the three lines below (also - adjust them):
{E0104876-BAB2-4678-BF5B-BA325726D66E}.Debug|ARM64.ActiveCfg = Debug|ARM64
{E0104876-BAB2-4678-BF5B-BA325726D66E}.Debug|ARM64.Build.0 = Debug|ARM64
{E0104876-BAB2-4678-BF5B-BA325726D66E}.Debug|ARM64.Deploy.0 = Debug|ARM64
After the line "{E0104876-BAB2-4678-BF5B-BA325726D66E}.Release|ARM.Deploy.0 = Release|ARM" insert the three lines below (and again - adjust them):
{E0104876-BAB2-4678-BF5B-BA325726D66E}.Release|ARM64.ActiveCfg = Release|ARM64
{E0104876-BAB2-4678-BF5B-BA325726D66E}.Release|ARM64.Build.0 = Release|ARM64
{E0104876-BAB2-4678-BF5B-BA325726D66E}.Release|ARM64.Deploy.0 = Release|ARM64
Save the SLN file
Open the vcproj file.
After the "<ProjectConfiguration Include="Release|ARM">" block (after the corresponding </ProjectConfiguration> tag) insert the following lines:
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
After the "<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">" block, insert the following lines:
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
Next look for "<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">" and after the group insert:
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
Adjust the following text by replaceing "NewApp2" with the case sensitive name of your project and "newapp2" with the lowercase name of your project.
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<LocalRemoteCopySources>false</LocalRemoteCopySources>
<BuildCommandLine>call common/build/buildnum NewApp2.mak arm64</BuildCommandLine>
<CleanCommandLine>make -f NewApp2.mak clean-arm64</CleanCommandLine>
<ExecutablePath>$(innovaphone-sdk)\app-platform-buildtls;$(innovaphone-sdk)\aarch64-7.2.0-linux-gnu\bin</ExecutablePath>
<NMakeIncludeSearchPath>sdk;.;common\lap;$(innovaphone-sdk)\aarch64-7.2.0-linux-gnu\aarch64-linux-gnu\include\c++\7.2.0;$(innovaphone-sdk)\app-platform-libs\10\arm64\usr\include;$(innovaphone-sdk)\app-platform-libs\10\arm64\usr\include\postgresql;$(innovaphone-sdk)\aarch64-7.2.0-linux-gnu\lib\gcc\aarch64-linux-gnu\7.2.0\include;$(innovaphone-sdk)\aarch64-7.2.0-linux-gnu\aarch64-linux-gnu\include\c++\7.2.0\aarch64-linux-gnu</NMakeIncludeSearchPath>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)$(Configuration)\</IntDir>
<SourcesToCopyRemotelyOverride>@(SourcesToCopyRemotely);@(DataFilesToCopyRemotely)</SourcesToCopyRemotelyOverride>
<ReBuildCommandLine>make -f NewApp2.mak clean-arm64 && call common/build/buildnum NewApp2.mak arm64</ReBuildCommandLine>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'">
<LocalRemoteCopySources>false</LocalRemoteCopySources>
<BuildCommandLine>call common/build/buildnum NewApp2.mak arm64 "DEBUG=1"</BuildCommandLine>
<CleanCommandLine>make -f NewApp2.mak clean-arm64 DEBUG=1</CleanCommandLine>
<ExecutablePath>$(innovaphone-sdk)\app-platform-buildtls;$(innovaphone-sdk)\aarch64-7.2.0-linux-gnu\bin</ExecutablePath>
<NMakeIncludeSearchPath>sdk;.;common\lap;$(innovaphone-sdk)\aarch64-7.2.0-linux-gnu\aarch64-linux-gnu\include\c++\7.2.0;$(innovaphone-sdk)\app-platform-libs\10\arm64\usr\include;$(innovaphone-sdk)\app-platform-libs\10\arm64\usr\include\postgresql;$(innovaphone-sdk)\aarch64-7.2.0-linux-gnu\lib\gcc\aarch64-linux-gnu\7.2.0\include;$(innovaphone-sdk)\aarch64-7.2.0-linux-gnu\aarch64-linux-gnu\include\c++\7.2.0\aarch64-linux-gnu</NMakeIncludeSearchPath>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)$(Configuration)\</IntDir>
<SourcesToCopyRemotelyOverride>@(SourcesToCopyRemotely);@(DataFilesToCopyRemotely)</SourcesToCopyRemotelyOverride>
<ReBuildCommandLine>make -f NewApp2.mak clean-arm64 DEBUG=1 && call common/build/buildnum NewApp2.mak arm64 "DEBUG=1"</ReBuildCommandLine>
<RemoteDebuggerCommand>/apps/newapp2/newapp2</RemoteDebuggerCommand>
<DebuggerFlavor>LinuxDebugger</DebuggerFlavor>
</PropertyGroup>
After the "<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">" group insert the adjusted text from above after the block.
You should now be able to compile your app for ARM64.