mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-23 06:25:19 -07:00
Merge pull request #28 from nventive/dev/djo/calcmanager-android
Enable Android
This commit is contained in:
commit
5d4491b206
23 changed files with 548 additions and 36 deletions
|
@ -27,6 +27,48 @@ jobs:
|
||||||
logProjectEvents: false
|
logProjectEvents: false
|
||||||
createLogFile: false
|
createLogFile: false
|
||||||
|
|
||||||
|
- task: MSBuild@1
|
||||||
|
displayName: ARM Android build
|
||||||
|
inputs:
|
||||||
|
solution: src/CalcManager.Android/CalcManager.Android.vcxproj
|
||||||
|
msbuildLocationMethod: version
|
||||||
|
msbuildVersion: latest
|
||||||
|
msbuildArchitecture: x86
|
||||||
|
msbuildArguments: /r /p:Configuration=Release /p:Platform=ARM /detailedsummary
|
||||||
|
clean: false
|
||||||
|
maximumCpuCount: true
|
||||||
|
restoreNugetPackages: false
|
||||||
|
logProjectEvents: false
|
||||||
|
createLogFile: false
|
||||||
|
|
||||||
|
- task: MSBuild@1
|
||||||
|
displayName: ARM64 Android build
|
||||||
|
inputs:
|
||||||
|
solution: src/CalcManager.Android/CalcManager.Android.vcxproj
|
||||||
|
msbuildLocationMethod: version
|
||||||
|
msbuildVersion: latest
|
||||||
|
msbuildArchitecture: x86
|
||||||
|
msbuildArguments: /r /p:Configuration=Release /p:Platform=ARM64 /detailedsummary
|
||||||
|
clean: false
|
||||||
|
maximumCpuCount: true
|
||||||
|
restoreNugetPackages: false
|
||||||
|
logProjectEvents: false
|
||||||
|
createLogFile: false
|
||||||
|
|
||||||
|
- task: MSBuild@1
|
||||||
|
displayName: X86 Android build
|
||||||
|
inputs:
|
||||||
|
solution: src/CalcManager.Android/CalcManager.Android.vcxproj
|
||||||
|
msbuildLocationMethod: version
|
||||||
|
msbuildVersion: latest
|
||||||
|
msbuildArchitecture: x86
|
||||||
|
msbuildArguments: /r /p:Configuration=Release /p:Platform=x86 /detailedsummary
|
||||||
|
clean: false
|
||||||
|
maximumCpuCount: true
|
||||||
|
restoreNugetPackages: false
|
||||||
|
logProjectEvents: false
|
||||||
|
createLogFile: false
|
||||||
|
|
||||||
- task: MSBuild@1
|
- task: MSBuild@1
|
||||||
inputs:
|
inputs:
|
||||||
solution: src/Calculator.sln
|
solution: src/Calculator.sln
|
||||||
|
@ -40,6 +82,36 @@ jobs:
|
||||||
logProjectEvents: false
|
logProjectEvents: false
|
||||||
createLogFile: false
|
createLogFile: false
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: 'Publish Wasm Binaries'
|
||||||
|
inputs:
|
||||||
|
SourceFolder: $(build.sourcesdirectory)/src/Calculator.Wasm/bin/Release/netstandard2.0/dist
|
||||||
|
Contents: '**/*.*'
|
||||||
|
TargetFolder: $(build.artifactstagingdirectory)/wasm-interp
|
||||||
|
CleanTargetFolder: false
|
||||||
|
OverWrite: false
|
||||||
|
flattenFolders: false
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: 'Publish Android Binaries'
|
||||||
|
inputs:
|
||||||
|
SourceFolder: $(build.sourcesdirectory)/src/Calculator.Droid/bin/Release
|
||||||
|
Contents: '**/*.apk'
|
||||||
|
TargetFolder: $(build.artifactstagingdirectory)/android
|
||||||
|
CleanTargetFolder: false
|
||||||
|
OverWrite: false
|
||||||
|
flattenFolders: false
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: 'Publish Windows Binaries'
|
||||||
|
inputs:
|
||||||
|
SourceFolder: $(build.sourcesdirectory)/src/Calculator.UWP/AppPackages
|
||||||
|
Contents: '**/*.*'
|
||||||
|
TargetFolder: $(build.artifactstagingdirectory)/windows
|
||||||
|
CleanTargetFolder: false
|
||||||
|
OverWrite: false
|
||||||
|
flattenFolders: false
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: Publish Package Artifacts
|
displayName: Publish Package Artifacts
|
||||||
inputs:
|
inputs:
|
||||||
|
|
295
src/CalcManager.Android/CalcManager.Android.vcxproj
Normal file
295
src/CalcManager.Android/CalcManager.Android.vcxproj
Normal file
|
@ -0,0 +1,295 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|ARM">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>ARM</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|ARM">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>ARM</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|ARM64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>ARM64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|ARM64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>ARM64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x86">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x86</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x86">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x86</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="../CalcManager/CalculatorHistory.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CalculatorManager.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CCalcManager.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/calc.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/CalcInput.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/CalcUtils.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/History.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/Number.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/Rational.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/RationalMath.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/scicomm.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/scidisp.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/scifunc.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/scioper.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/sciset.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/ExpressionCommand.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/pch.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/basex.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/conv.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/exp.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/fact.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/itrans.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/itransh.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/logic.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/num.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/rat.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/support.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/trans.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/transh.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="../CalcManager/CalculatorHistory.h" />
|
||||||
|
<ClInclude Include="../CalcManager/CalculatorManager.h" />
|
||||||
|
<ClInclude Include="../CalcManager/CalculatorResource.h" />
|
||||||
|
<ClInclude Include="../CalcManager/CalculatorVector.h" />
|
||||||
|
<ClInclude Include="../CalcManager/CCalcManager.h" />
|
||||||
|
<ClInclude Include="../CalcManager/Command.h" />
|
||||||
|
<ClInclude Include="../CalcManager/compat.h" />
|
||||||
|
<ClInclude Include="../CalcManager/ExpressionCommand.h" />
|
||||||
|
<ClInclude Include="../CalcManager/ExpressionCommandInterface.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/CalcEngine.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/CalcInput.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/CalcUtils.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/CCommand.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/EngineStrings.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/History.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/ICalcDisplay.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/IHistoryDisplay.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/Number.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/RadixType.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/Rational.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/RationalMath.h" />
|
||||||
|
<ClInclude Include="../CalcManager/pch.h" />
|
||||||
|
<ClInclude Include="../CalcManager/Ratpack/CalcErr.h" />
|
||||||
|
<ClInclude Include="../CalcManager/Ratpack/ratconst.h" />
|
||||||
|
<ClInclude Include="../CalcManager/Ratpack/ratpak.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{08a1283c-522b-4820-8c56-361638a82e24}</ProjectGuid>
|
||||||
|
<Keyword>Android</Keyword>
|
||||||
|
<RootNamespace>CalcManager</RootNamespace>
|
||||||
|
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||||
|
<ApplicationType>Android</ApplicationType>
|
||||||
|
<ApplicationTypeRevision>3.0</ApplicationTypeRevision>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)/Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>Clang_5_0</PlatformToolset>
|
||||||
|
<AndroidAPILevel>android-27</AndroidAPILevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>Clang_5_0</PlatformToolset>
|
||||||
|
<AndroidAPILevel>android-27</AndroidAPILevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>Clang_5_0</PlatformToolset>
|
||||||
|
<AndroidAPILevel>android-27</AndroidAPILevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>Clang_5_0</PlatformToolset>
|
||||||
|
<AndroidAPILevel>android-27</AndroidAPILevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>Clang_5_0</PlatformToolset>
|
||||||
|
<AndroidAPILevel>android-27</AndroidAPILevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>Clang_5_0</PlatformToolset>
|
||||||
|
<AndroidAPILevel>android-27</AndroidAPILevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>Clang_5_0</PlatformToolset>
|
||||||
|
<AndroidAPILevel>android-27</AndroidAPILevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>Clang_5_0</PlatformToolset>
|
||||||
|
<AndroidAPILevel>android-27</AndroidAPILevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)/Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
|
<ImportGroup Label="Shared" />
|
||||||
|
<ImportGroup Label="PropertySheets" />
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<OutDir>../Calculator.Droid/libs/$(Platform)/$(Configuration)/</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<OutDir>../Calculator.Droid/libs/$(Platform)/$(Configuration)/</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
|
||||||
|
<OutDir>../Calculator.Droid/libs/$(Platform)/$(Configuration)/</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
|
||||||
|
<OutDir>../Calculator.Droid/libs/$(Platform)/$(Configuration)/</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||||
|
<OutDir>../Calculator.Droid/libs/$(Platform)/$(Configuration)/</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||||
|
<OutDir>../Calculator.Droid/libs/$(Platform)/$(Configuration)/</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||||
|
<OutDir>../Calculator.Droid/libs/$(Platform)/$(Configuration)/</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||||
|
<OutDir>../Calculator.Droid/libs/$(Platform)/$(Configuration)/</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>../CalcManager/pch.h</PrecompiledHeaderFile>
|
||||||
|
<ExceptionHandling>Enabled</ExceptionHandling>
|
||||||
|
<CppLanguageStandard>c++1z</CppLanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>..;../CalcManager;$(StlIncludeDirectories);$(Sysroot)/usr/include;$(Sysroot)/usr/include/$(AndroidHeaderTriple);$(VS_NdkRoot)/sources/android/support/include;$(SolutionDir)./CalcManager/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<AdditionalOptions>-Wno-unknown-pragmas -Wno-missing-braces %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<UnresolvedSymbolReferences>true</UnresolvedSymbolReferences>
|
||||||
|
<AdditionalOptions>-lm</AdditionalOptions>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>../CalcManager/pch.h</PrecompiledHeaderFile>
|
||||||
|
<CppLanguageStandard>c++1z</CppLanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>..;../CalcManager;$(StlIncludeDirectories);$(Sysroot)/usr/include;$(Sysroot)/usr/include/$(AndroidHeaderTriple);$(VS_NdkRoot)/sources/android/support/include;$(SolutionDir)./CalcManager/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<ExceptionHandling>Enabled</ExceptionHandling>
|
||||||
|
<AdditionalOptions>-Wno-unknown-pragmas -Wno-missing-braces %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<UnresolvedSymbolReferences>true</UnresolvedSymbolReferences>
|
||||||
|
<AdditionalOptions>-lm</AdditionalOptions>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>../CalcManager/pch.h</PrecompiledHeaderFile>
|
||||||
|
<CppLanguageStandard>c++1z</CppLanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>..;../CalcManager;$(StlIncludeDirectories);$(Sysroot)/usr/include;$(Sysroot)/usr/include/$(AndroidHeaderTriple);$(VS_NdkRoot)/sources/android/support/include;$(SolutionDir)./CalcManager/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<ExceptionHandling>Enabled</ExceptionHandling>
|
||||||
|
<AdditionalOptions>-Wno-unknown-pragmas -Wno-missing-braces %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<UnresolvedSymbolReferences>true</UnresolvedSymbolReferences>
|
||||||
|
<AdditionalOptions>-lm</AdditionalOptions>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>../CalcManager/pch.h</PrecompiledHeaderFile>
|
||||||
|
<CppLanguageStandard>c++1z</CppLanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>..;../CalcManager;$(StlIncludeDirectories);$(Sysroot)/usr/include;$(Sysroot)/usr/include/$(AndroidHeaderTriple);$(VS_NdkRoot)/sources/android/support/include;$(SolutionDir)./CalcManager/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<ExceptionHandling>Enabled</ExceptionHandling>
|
||||||
|
<AdditionalOptions>-Wno-unknown-pragmas -Wno-missing-braces %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<UnresolvedSymbolReferences>true</UnresolvedSymbolReferences>
|
||||||
|
<AdditionalOptions>-lm</AdditionalOptions>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>../CalcManager/pch.h</PrecompiledHeaderFile>
|
||||||
|
<CppLanguageStandard>c++1z</CppLanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>..;../CalcManager;$(StlIncludeDirectories);$(Sysroot)/usr/include;$(Sysroot)/usr/include/$(AndroidHeaderTriple);$(VS_NdkRoot)/sources/android/support/include;$(SolutionDir)./CalcManager/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<ExceptionHandling>Enabled</ExceptionHandling>
|
||||||
|
<AdditionalOptions>-Wno-unknown-pragmas -Wno-missing-braces %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<UnresolvedSymbolReferences>true</UnresolvedSymbolReferences>
|
||||||
|
<AdditionalOptions>-lm</AdditionalOptions>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>../CalcManager/pch.h</PrecompiledHeaderFile>
|
||||||
|
<CppLanguageStandard>c++1z</CppLanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>..;../CalcManager;$(StlIncludeDirectories);$(Sysroot)/usr/include;$(Sysroot)/usr/include/$(AndroidHeaderTriple);$(VS_NdkRoot)/sources/android/support/include;$(SolutionDir)./CalcManager/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<ExceptionHandling>Enabled</ExceptionHandling>
|
||||||
|
<AdditionalOptions>-Wno-unknown-pragmas -Wno-missing-braces %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<UnresolvedSymbolReferences>true</UnresolvedSymbolReferences>
|
||||||
|
<AdditionalOptions>-lm</AdditionalOptions>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>../CalcManager/pch.h</PrecompiledHeaderFile>
|
||||||
|
<CppLanguageStandard>c++1z</CppLanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>..;../CalcManager;$(StlIncludeDirectories);$(Sysroot)/usr/include;$(Sysroot)/usr/include/$(AndroidHeaderTriple);$(VS_NdkRoot)/sources/android/support/include;$(SolutionDir)./CalcManager/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<ExceptionHandling>Enabled</ExceptionHandling>
|
||||||
|
<AdditionalOptions>-Wno-unknown-pragmas -Wno-missing-braces %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<UnresolvedSymbolReferences>true</UnresolvedSymbolReferences>
|
||||||
|
<AdditionalOptions>-lm</AdditionalOptions>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>../CalcManager/pch.h</PrecompiledHeaderFile>
|
||||||
|
<CppLanguageStandard>c++1z</CppLanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>..;../CalcManager;$(StlIncludeDirectories);$(Sysroot)/usr/include;$(Sysroot)/usr/include/$(AndroidHeaderTriple);$(VS_NdkRoot)/sources/android/support/include;$(SolutionDir)./CalcManager/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<ExceptionHandling>Enabled</ExceptionHandling>
|
||||||
|
<AdditionalOptions>-Wno-unknown-pragmas -Wno-missing-braces %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<UnresolvedSymbolReferences>true</UnresolvedSymbolReferences>
|
||||||
|
<AdditionalOptions>-lm</AdditionalOptions>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)/Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
|
</Project>
|
72
src/CalcManager.Android/CalcManager.Android.vcxproj.filters
Normal file
72
src/CalcManager.Android/CalcManager.Android.vcxproj.filters
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="CEngine">
|
||||||
|
<UniqueIdentifier>{8b6920ee-f524-4a48-837a-dba211bd5f7f}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="headers">
|
||||||
|
<UniqueIdentifier>{628c5935-02b4-4f8a-b4f4-3850e24c8e36}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="RatPack">
|
||||||
|
<UniqueIdentifier>{d346c535-3d9b-4cbf-a41e-b89243f563c0}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="../CalcManager/CalculatorHistory.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CalculatorManager.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CCalcManager.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/calc.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/CalcInput.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/CalcUtils.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/History.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/Number.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/Rational.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/RationalMath.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/scicomm.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/scidisp.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/scifunc.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/scioper.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/CEngine/sciset.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/ExpressionCommand.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/pch.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/basex.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/conv.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/exp.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/fact.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/itrans.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/itransh.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/logic.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/num.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/rat.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/support.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/trans.cpp" />
|
||||||
|
<ClCompile Include="../CalcManager/Ratpack/transh.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="../CalcManager/CalculatorHistory.h" />
|
||||||
|
<ClInclude Include="../CalcManager/CalculatorManager.h" />
|
||||||
|
<ClInclude Include="../CalcManager/CalculatorResource.h" />
|
||||||
|
<ClInclude Include="../CalcManager/CalculatorVector.h" />
|
||||||
|
<ClInclude Include="../CalcManager/CCalcManager.h" />
|
||||||
|
<ClInclude Include="../CalcManager/Command.h" />
|
||||||
|
<ClInclude Include="../CalcManager/compat.h" />
|
||||||
|
<ClInclude Include="../CalcManager/ExpressionCommand.h" />
|
||||||
|
<ClInclude Include="../CalcManager/ExpressionCommandInterface.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/CalcEngine.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/CalcInput.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/CalcUtils.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/CCommand.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/EngineStrings.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/History.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/ICalcDisplay.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/IHistoryDisplay.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/Number.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/RadixType.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/Rational.h" />
|
||||||
|
<ClInclude Include="../CalcManager/headers/RationalMath.h" />
|
||||||
|
<ClInclude Include="../CalcManager/pch.h" />
|
||||||
|
<ClInclude Include="../CalcManager/Ratpack/CalcErr.h" />
|
||||||
|
<ClInclude Include="../CalcManager/Ratpack/ratconst.h" />
|
||||||
|
<ClInclude Include="../CalcManager/Ratpack/ratpak.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
|
@ -384,14 +384,14 @@ void CalculatorManager_UpdateMaxIntDigits(void* manager)
|
||||||
AsManager(manager)->UpdateMaxIntDigits();
|
AsManager(manager)->UpdateMaxIntDigits();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* CalculatorManager_DecimalSeparator(void* manager)
|
const wchar_t* CalculatorManager_DecimalSeparator(void* manager)
|
||||||
{
|
{
|
||||||
auto res = AsManager(manager)->DecimalSeparator();
|
auto res = AsManager(manager)->DecimalSeparator();
|
||||||
|
|
||||||
std::wstring_convert<std::codecvt_utf8<wchar_t>> convert;
|
std::wstring ret;
|
||||||
auto str = convert.to_bytes(res);
|
ret += res;
|
||||||
|
|
||||||
return str.data();
|
return ToWChar(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CalculatorManager_RemoveHistoryItem(void* manager, int uIdx)
|
bool CalculatorManager_RemoveHistoryItem(void* manager, int uIdx)
|
||||||
|
|
|
@ -41,7 +41,7 @@ struct CalculatorManager_CreateParams
|
||||||
GetCEngineStringFunc GetCEngineString;
|
GetCEngineStringFunc GetCEngineString;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(__EMSCRIPTEN__) || defined(__APPLE__)
|
#if defined(__EMSCRIPTEN__) || defined(__APPLE__) || defined(__ANDROID__)
|
||||||
#define DLL_EXPORT
|
#define DLL_EXPORT
|
||||||
#else
|
#else
|
||||||
#define DLL_EXPORT __declspec(dllexport)
|
#define DLL_EXPORT __declspec(dllexport)
|
||||||
|
@ -101,7 +101,7 @@ extern "C"
|
||||||
DLL_EXPORT const wchar_t* CalculatorManager_GetResultForRadix(void* manager, int radix, int precision);
|
DLL_EXPORT const wchar_t* CalculatorManager_GetResultForRadix(void* manager, int radix, int precision);
|
||||||
DLL_EXPORT void CalculatorManager_SetPrecision(void* manager, int precision);
|
DLL_EXPORT void CalculatorManager_SetPrecision(void* manager, int precision);
|
||||||
DLL_EXPORT void CalculatorManager_UpdateMaxIntDigits(void* manager);
|
DLL_EXPORT void CalculatorManager_UpdateMaxIntDigits(void* manager);
|
||||||
DLL_EXPORT const char* CalculatorManager_DecimalSeparator(void* manager);
|
DLL_EXPORT const wchar_t* CalculatorManager_DecimalSeparator(void* manager);
|
||||||
DLL_EXPORT bool CalculatorManager_RemoveHistoryItem(void* manager, int uIdx);
|
DLL_EXPORT bool CalculatorManager_RemoveHistoryItem(void* manager, int uIdx);
|
||||||
DLL_EXPORT void CalculatorManager_ClearHistory(void* manager);
|
DLL_EXPORT void CalculatorManager_ClearHistory(void* manager);
|
||||||
DLL_EXPORT size_t CalculatorManager_MaxHistorySize(void* manager);
|
DLL_EXPORT size_t CalculatorManager_MaxHistorySize(void* manager);
|
||||||
|
|
|
@ -14,7 +14,7 @@ static constexpr size_t SERIALIZED_NUMBER_MINSIZE = 3;
|
||||||
|
|
||||||
// Converts Memory Command enum value to unsigned char,
|
// Converts Memory Command enum value to unsigned char,
|
||||||
// while ignoring Warning C4309: 'conversion' : truncation of constant value
|
// while ignoring Warning C4309: 'conversion' : truncation of constant value
|
||||||
#if defined(__EMSCRIPTEN__) || defined(__APPLE__)
|
#if defined(__EMSCRIPTEN__) || defined(__APPLE__) || defined(__ANDROID__)
|
||||||
#define MEMORY_COMMAND_TO_UNSIGNED_CHAR(c) static_cast<unsigned char>(c)
|
#define MEMORY_COMMAND_TO_UNSIGNED_CHAR(c) static_cast<unsigned char>(c)
|
||||||
#else
|
#else
|
||||||
#define MEMORY_COMMAND_TO_UNSIGNED_CHAR(c) __pragma(warning(push)) __pragma(warning(disable : 4309)) static_cast<unsigned char>(c) __pragma(warning(pop))
|
#define MEMORY_COMMAND_TO_UNSIGNED_CHAR(c) __pragma(warning(push)) __pragma(warning(disable : 4309)) static_cast<unsigned char>(c) __pragma(warning(pop))
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "Ratpack/CalcErr.h"
|
#include "Ratpack/CalcErr.h"
|
||||||
#include <stdexcept> // for std::out_of_range
|
#include <stdexcept> // for std::out_of_range
|
||||||
|
|
||||||
#if !defined(__EMSCRIPTEN__) && !defined(__APPLE__)
|
#if !defined(__EMSCRIPTEN__) && !defined(__APPLE__) && !defined(__ANDROID__)
|
||||||
#include <winerror.h>
|
#include <winerror.h>
|
||||||
#include <sal.h> // for SAL
|
#include <sal.h> // for SAL
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if defined(__EMSCRIPTEN__) || defined(__APPLE__)
|
#if defined(__EMSCRIPTEN__) || defined(__APPLE__) || defined(__ANDROID__)
|
||||||
|
|
||||||
#define HRESULT long
|
#define HRESULT long
|
||||||
#define _In_opt_
|
#define _In_opt_
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#if !defined(__EMSCRIPTEN__) && !defined(__APPLE__)
|
#if !defined(__EMSCRIPTEN__) && !defined(__APPLE__) && !defined(__ANDROID__)
|
||||||
#include <ppltasks.h>
|
#include <ppltasks.h>
|
||||||
#include <winerror.h>
|
#include <winerror.h>
|
||||||
#include <intsafe.h>
|
#include <intsafe.h>
|
||||||
|
|
BIN
src/Calculator.Droid/Assets/CalcMDL2.ttf
Normal file
BIN
src/Calculator.Droid/Assets/CalcMDL2.ttf
Normal file
Binary file not shown.
|
@ -16,7 +16,7 @@
|
||||||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||||
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
|
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
|
||||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
|
||||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||||
<AndroidUseIntermediateDesignerFile>True</AndroidUseIntermediateDesignerFile>
|
<AndroidUseIntermediateDesignerFile>True</AndroidUseIntermediateDesignerFile>
|
||||||
<ResourcesDirectory>..\Calculator.Shared\Strings</ResourcesDirectory>
|
<ResourcesDirectory>..\Calculator.Shared\Strings</ResourcesDirectory>
|
||||||
|
@ -68,6 +68,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AndroidAsset Include="Assets\Fonts\winjs-symbols.ttf" />
|
<AndroidAsset Include="Assets\Fonts\winjs-symbols.ttf" />
|
||||||
|
<AndroidAsset Include="Assets\CalcMDL2.ttf" />
|
||||||
<None Include="Resources\AboutResources.txt" />
|
<None Include="Resources\AboutResources.txt" />
|
||||||
<None Include="Assets\AboutAssets.txt" />
|
<None Include="Assets\AboutAssets.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -82,9 +83,21 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AndroidResource Include="Resources\values\Styles.xml" />
|
<AndroidResource Include="Resources\values\Styles.xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<AndroidNativeLibrary Include="libs\ARM\$(Configuration)\libCalcManager.so">
|
||||||
|
<Abi>armeabi-v7a</Abi>
|
||||||
|
</AndroidNativeLibrary>
|
||||||
|
<AndroidNativeLibrary Include="libs\ARM64\$(Configuration)\libCalcManager.so">
|
||||||
|
<Abi>arm64-v8a</Abi>
|
||||||
|
</AndroidNativeLibrary>
|
||||||
|
<AndroidNativeLibrary Include="libs\x86\$(Configuration)\libCalcManager.so">
|
||||||
|
<Abi>x86</Abi>
|
||||||
|
</AndroidNativeLibrary>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="..\Calculator.Shared\Calculator.Shared.projitems" Label="Shared" Condition="Exists('..\Calculator.Shared\Calculator.Shared.projitems')" />
|
<Import Project="..\Calculator.Shared\Calculator.Shared.projitems" Label="Shared" Condition="Exists('..\Calculator.Shared\Calculator.Shared.projitems')" />
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||||
|
<Target Name="GenerateBuild" DependsOnTargets="SignAndroidPackage" AfterTargets="Build" Condition="'$(BuildingInsideVisualStudio)'==''" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|
|
@ -12,7 +12,7 @@ using Android.Widget;
|
||||||
using Com.Nostra13.Universalimageloader.Core;
|
using Com.Nostra13.Universalimageloader.Core;
|
||||||
using Windows.UI.Xaml.Media;
|
using Windows.UI.Xaml.Media;
|
||||||
|
|
||||||
namespace WindowsCalculator.Droid
|
namespace CalculatorApp.Droid
|
||||||
{
|
{
|
||||||
[global::Android.App.ApplicationAttribute(
|
[global::Android.App.ApplicationAttribute(
|
||||||
Label = "@string/ApplicationName",
|
Label = "@string/ApplicationName",
|
||||||
|
|
|
@ -4,7 +4,7 @@ using Android.OS;
|
||||||
using Android.Content.PM;
|
using Android.Content.PM;
|
||||||
using Android.Views;
|
using Android.Views;
|
||||||
|
|
||||||
namespace WindowsCalculator.Droid
|
namespace CalculatorApp.Droid
|
||||||
{
|
{
|
||||||
[Activity(
|
[Activity(
|
||||||
MainLauncher = true,
|
MainLauncher = true,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="WindowsCalculator" android:versionCode="1" android:versionName="1.0">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="WindowsCalculator" android:versionCode="1" android:versionName="1.0">
|
||||||
<uses-sdk android:minSdkVersion="16" />
|
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" />
|
||||||
<application android:label="WindowsCalculator"></application>
|
<application android:label="WindowsCalculator"></application>
|
||||||
</manifest>
|
</manifest>
|
|
@ -73,7 +73,7 @@ namespace CalculationManager
|
||||||
public static extern void CalculatorManager_UpdateMaxIntDigits(IntPtr nativeManager);
|
public static extern void CalculatorManager_UpdateMaxIntDigits(IntPtr nativeManager);
|
||||||
|
|
||||||
[DllImport(DllPath)]
|
[DllImport(DllPath)]
|
||||||
public static extern char CalculatorManager_DecimalSeparator(IntPtr nativeManager);
|
public static extern IntPtr CalculatorManager_DecimalSeparator(IntPtr nativeManager);
|
||||||
|
|
||||||
[DllImport(DllPath)]
|
[DllImport(DllPath)]
|
||||||
public static extern bool CalculatorManager_RemoveHistoryItem(IntPtr nativeManager, int uIdx);
|
public static extern bool CalculatorManager_RemoveHistoryItem(IntPtr nativeManager, int uIdx);
|
||||||
|
@ -306,7 +306,7 @@ namespace CalculationManager
|
||||||
|
|
||||||
internal static IntPtr StringToHGlobal(string resourceValue)
|
internal static IntPtr StringToHGlobal(string resourceValue)
|
||||||
{
|
{
|
||||||
#if __WASM__ || __IOS__
|
#if __WASM__ || __IOS__ || __ANDROID__
|
||||||
// wchar_t is 32bits
|
// wchar_t is 32bits
|
||||||
return StringToHGlobalUTF32(resourceValue);
|
return StringToHGlobalUTF32(resourceValue);
|
||||||
#else
|
#else
|
||||||
|
@ -316,7 +316,7 @@ namespace CalculationManager
|
||||||
|
|
||||||
internal static string PtrToString(IntPtr pResourceId)
|
internal static string PtrToString(IntPtr pResourceId)
|
||||||
{
|
{
|
||||||
#if __WASM__ || __IOS__
|
#if __WASM__ || __IOS__ || __ANDROID__
|
||||||
return PtrToStringUTF32(pResourceId);
|
return PtrToStringUTF32(pResourceId);
|
||||||
#else
|
#else
|
||||||
return Marshal.PtrToStringUni(pResourceId);
|
return Marshal.PtrToStringUni(pResourceId);
|
||||||
|
|
|
@ -4,6 +4,7 @@ using CalculatorApp;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
@ -217,7 +218,10 @@ namespace CalculationManager
|
||||||
=> NativeDispatch.CalculatorManager_UpdateMaxIntDigits(_nativeManager);
|
=> NativeDispatch.CalculatorManager_UpdateMaxIntDigits(_nativeManager);
|
||||||
|
|
||||||
public char DecimalSeparator()
|
public char DecimalSeparator()
|
||||||
=> NativeDispatch.CalculatorManager_DecimalSeparator(_nativeManager);
|
{
|
||||||
|
var pString = NativeDispatch.CalculatorManager_DecimalSeparator(_nativeManager);
|
||||||
|
return NativeDispatch.PtrToString(pString).FirstOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
public List<HISTORYITEM> GetHistoryItems()
|
public List<HISTORYITEM> GetHistoryItems()
|
||||||
{
|
{
|
||||||
|
|
|
@ -131,7 +131,7 @@ namespace CalculatorApp
|
||||||
public static readonly DependencyProperty IsOperatorCommandProperty =
|
public static readonly DependencyProperty IsOperatorCommandProperty =
|
||||||
DependencyProperty.Register("IsOperatorCommand", typeof(bool), typeof(CalculationResult), new PropertyMetadata(false));
|
DependencyProperty.Register("IsOperatorCommand", typeof(bool), typeof(CalculationResult), new PropertyMetadata(false));
|
||||||
|
|
||||||
public event SelectedEventHandler Selected;
|
public event SelectedEventHandler ValueSelected;
|
||||||
|
|
||||||
|
|
||||||
private Windows.UI.Xaml.Controls.ScrollViewer m_textContainer;
|
private Windows.UI.Xaml.Controls.ScrollViewer m_textContainer;
|
||||||
|
@ -532,7 +532,7 @@ namespace CalculatorApp
|
||||||
|
|
||||||
void RaiseSelectedEvent()
|
void RaiseSelectedEvent()
|
||||||
{
|
{
|
||||||
Selected?.Invoke(this);
|
ValueSelected?.Invoke(this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -394,7 +394,7 @@
|
||||||
<comment>{Locked}This is the value that comes from the VirtualKey enum that represents the button. This value is not localized and must be one value that comes from the Windows::System::VirtualKey enum.</comment>
|
<comment>{Locked}This is the value that comes from the VirtualKey enum that represents the button. This value is not localized and must be one value that comes from the Windows::System::VirtualKey enum.</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="squareRootButton.[using:CalculatorApp.Common]KeyboardShortcutManager.Character" xml:space="preserve">
|
<data name="squareRootButton.[using:CalculatorApp.Common]KeyboardShortcutManager.Character" xml:space="preserve">
|
||||||
<value>@</value>
|
<value>UNO_TODO_AMPERSAND</value>
|
||||||
<comment>{Locked}This is the character that should trigger this button. Note that it is a character and not a key, so it does not come from the Windows::System::VirtualKey enum.</comment>
|
<comment>{Locked}This is the character that should trigger this button. Note that it is a character and not a key, so it does not come from the Windows::System::VirtualKey enum.</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="tanButton.[using:CalculatorApp.Common]KeyboardShortcutManager.VirtualKey" xml:space="preserve">
|
<data name="tanButton.[using:CalculatorApp.Common]KeyboardShortcutManager.VirtualKey" xml:space="preserve">
|
||||||
|
|
|
@ -272,8 +272,7 @@
|
||||||
<x:Double x:Key="AppMinWindowHeight">500</x:Double>
|
<x:Double x:Key="AppMinWindowHeight">500</x:Double>
|
||||||
<x:Double x:Key="AppMinWindowWidth">320</x:Double>
|
<x:Double x:Key="AppMinWindowWidth">320</x:Double>
|
||||||
|
|
||||||
<win:FontFamily x:Key="CalculatorFontFamily">ms-appx:///Assets/CalcMDL2.ttf#Calculator MDL2 Assets</win:FontFamily>
|
<FontFamily x:Key="CalculatorFontFamily">ms-appx:///Assets/CalcMDL2.ttf#Calculator MDL2 Assets</FontFamily>
|
||||||
<xamarin:FontFamily x:Key="CalculatorFontFamily">Calculator MDL2 Assets</xamarin:FontFamily>
|
|
||||||
|
|
||||||
<x:Double x:Key="SplitViewOpenPaneLength">256</x:Double>
|
<x:Double x:Key="SplitViewOpenPaneLength">256</x:Double>
|
||||||
<Thickness x:Key="PivotPortraitThemePadding">0,1,0,0</Thickness>
|
<Thickness x:Key="PivotPortraitThemePadding">0,1,0,0</Thickness>
|
||||||
|
|
|
@ -574,7 +574,7 @@ namespace CalculatorApp.ViewModel
|
||||||
|
|
||||||
m_decimalSeparator = LocalizationSettings.GetInstance().GetDecimalSeparator();
|
m_decimalSeparator = LocalizationSettings.GetInstance().GetDecimalSeparator();
|
||||||
|
|
||||||
#if !__WASM__ && !__IOS__
|
#if !__WASM__ && !__IOS__ && !__ANDROID__
|
||||||
if (CoreWindow.GetForCurrentThread() != null)
|
if (CoreWindow.GetForCurrentThread() != null)
|
||||||
{
|
{
|
||||||
// Must have a CoreWindow to access the resource context.
|
// Must have a CoreWindow to access the resource context.
|
||||||
|
|
|
@ -504,7 +504,7 @@
|
||||||
FlowDirection="{x:Bind LayoutDirection}"
|
FlowDirection="{x:Bind LayoutDirection}"
|
||||||
IsActive="{Binding Value1Active, Mode=TwoWay}"
|
IsActive="{Binding Value1Active, Mode=TwoWay}"
|
||||||
KeyDown="OnValueKeyDown"
|
KeyDown="OnValueKeyDown"
|
||||||
Selected="OnValueSelected"
|
ValueSelected="OnValueSelected"
|
||||||
TabIndex="1"/>
|
TabIndex="1"/>
|
||||||
<!--TODO UNO
|
<!--TODO UNO
|
||||||
AutomationProperties.AutomationId="Value1"
|
AutomationProperties.AutomationId="Value1"
|
||||||
|
@ -560,7 +560,7 @@
|
||||||
FlowDirection="{x:Bind LayoutDirection}"
|
FlowDirection="{x:Bind LayoutDirection}"
|
||||||
IsActive="{Binding Value2Active, Mode=TwoWay}"
|
IsActive="{Binding Value2Active, Mode=TwoWay}"
|
||||||
KeyDown="OnValueKeyDown"
|
KeyDown="OnValueKeyDown"
|
||||||
Selected="OnValueSelected"
|
ValueSelected="OnValueSelected"
|
||||||
TabIndex="3"/>
|
TabIndex="3"/>
|
||||||
<!--TODO UNO
|
<!--TODO UNO
|
||||||
AutomationProperties.AutomationId="Value2"
|
AutomationProperties.AutomationId="Value2"
|
||||||
|
|
|
@ -197,9 +197,9 @@ namespace CalculatorApp
|
||||||
|
|
||||||
// Find the delimiters.
|
// Find the delimiters.
|
||||||
int firstSplitPosition = offlineStatusHyperlinkText.find(delimiter, 0);
|
int firstSplitPosition = offlineStatusHyperlinkText.find(delimiter, 0);
|
||||||
Debug.Assert(firstSplitPosition != "".npos());
|
System.Diagnostics.Debug.Assert(firstSplitPosition != "".npos());
|
||||||
int secondSplitPosition = offlineStatusHyperlinkText.find(delimiter, firstSplitPosition + 1);
|
int secondSplitPosition = offlineStatusHyperlinkText.find(delimiter, firstSplitPosition + 1);
|
||||||
Debug.Assert(secondSplitPosition != "".npos());
|
System.Diagnostics.Debug.Assert(secondSplitPosition != "".npos());
|
||||||
int hyperlinkTextLength = secondSplitPosition - (firstSplitPosition + delimiterLength);
|
int hyperlinkTextLength = secondSplitPosition - (firstSplitPosition + delimiterLength);
|
||||||
|
|
||||||
// Assign pieces.
|
// Assign pieces.
|
||||||
|
@ -281,7 +281,7 @@ namespace CalculatorApp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnValueSelected( object sender)
|
public void OnValueSelected( object sender)
|
||||||
{
|
{
|
||||||
var value = (CalculationResult) sender;
|
var value = (CalculationResult) sender;
|
||||||
// update the font size since the font is changed to bold
|
// update the font size since the font is changed to bold
|
||||||
|
|
|
@ -24,6 +24,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calculator.UWP", "Calculato
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calculator.Wasm", "Calculator.Wasm\Calculator.Wasm.csproj", "{53337466-6E79-45F3-A650-1BFB93CC19B0}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calculator.Wasm", "Calculator.Wasm\Calculator.Wasm.csproj", "{53337466-6E79-45F3-A650-1BFB93CC19B0}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CalcManager.Android", "CalcManager.Android\CalcManager.Android.vcxproj", "{08A1283C-522B-4820-8C56-361638A82E24}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{311E866D-8B93-4609-A691-265941FEE101} = {311E866D-8B93-4609-A691-265941FEE101}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||||
Calculator.Shared\Calculator.Shared.projitems*{093428d1-ab83-4f1a-93e9-304b44a24d1f}*SharedItemsImports = 4
|
Calculator.Shared\Calculator.Shared.projitems*{093428d1-ab83-4f1a-93e9-304b44a24d1f}*SharedItemsImports = 4
|
||||||
|
@ -177,6 +182,7 @@ Global
|
||||||
{A8517645-FA26-4BBE-A931-52FCF16DB2C6}.Debug|x86.Build.0 = Debug|Any CPU
|
{A8517645-FA26-4BBE-A931-52FCF16DB2C6}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{A8517645-FA26-4BBE-A931-52FCF16DB2C6}.Debug|x86.Deploy.0 = Debug|Any CPU
|
{A8517645-FA26-4BBE-A931-52FCF16DB2C6}.Debug|x86.Deploy.0 = Debug|Any CPU
|
||||||
{A8517645-FA26-4BBE-A931-52FCF16DB2C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{A8517645-FA26-4BBE-A931-52FCF16DB2C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{A8517645-FA26-4BBE-A931-52FCF16DB2C6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{A8517645-FA26-4BBE-A931-52FCF16DB2C6}.Release|ARM.ActiveCfg = Release|Any CPU
|
{A8517645-FA26-4BBE-A931-52FCF16DB2C6}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||||
{A8517645-FA26-4BBE-A931-52FCF16DB2C6}.Release|ARM.Build.0 = Release|Any CPU
|
{A8517645-FA26-4BBE-A931-52FCF16DB2C6}.Release|ARM.Build.0 = Release|Any CPU
|
||||||
{A8517645-FA26-4BBE-A931-52FCF16DB2C6}.Release|ARM.Deploy.0 = Release|Any CPU
|
{A8517645-FA26-4BBE-A931-52FCF16DB2C6}.Release|ARM.Deploy.0 = Release|Any CPU
|
||||||
|
@ -357,6 +363,57 @@ Global
|
||||||
{53337466-6E79-45F3-A650-1BFB93CC19B0}.Release|x64.Build.0 = Release|Any CPU
|
{53337466-6E79-45F3-A650-1BFB93CC19B0}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{53337466-6E79-45F3-A650-1BFB93CC19B0}.Release|x86.ActiveCfg = Release|Any CPU
|
{53337466-6E79-45F3-A650-1BFB93CC19B0}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{53337466-6E79-45F3-A650-1BFB93CC19B0}.Release|x86.Build.0 = Release|Any CPU
|
{53337466-6E79-45F3-A650-1BFB93CC19B0}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|Any CPU.ActiveCfg = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|Any CPU.Build.0 = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|ARM.ActiveCfg = Release|ARM
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|ARM.Build.0 = Release|ARM
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|ARM64.Build.0 = Release|ARM64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|iPhone.ActiveCfg = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|iPhone.Build.0 = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|x64.ActiveCfg = Release|x64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|x64.Build.0 = Release|x64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|x86.ActiveCfg = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Ad-Hoc|x86.Build.0 = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|Any CPU.ActiveCfg = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|Any CPU.Build.0 = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|ARM.ActiveCfg = Release|ARM
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|ARM.Build.0 = Release|ARM
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|ARM64.Build.0 = Release|ARM64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|iPhone.ActiveCfg = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|iPhone.Build.0 = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|iPhoneSimulator.ActiveCfg = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|iPhoneSimulator.Build.0 = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|x64.ActiveCfg = Release|x64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|x64.Build.0 = Release|x64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|x86.ActiveCfg = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.AppStore|x86.Build.0 = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Debug|Any CPU.Build.0 = Debug|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Debug|ARM.Build.0 = Debug|ARM
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Debug|iPhone.ActiveCfg = Debug|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Release|Any CPU.ActiveCfg = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Release|ARM.ActiveCfg = Release|ARM
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Release|ARM.Build.0 = Release|ARM
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Release|iPhone.ActiveCfg = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Release|iPhoneSimulator.ActiveCfg = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Release|x64.Build.0 = Release|x64
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{08A1283C-522B-4820-8C56-361638A82E24}.Release|x86.Build.0 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue