Merge pull request #8 from nventive/dev/jela/wasm-update

Move overflow textblock to ItemsControl, linux build
This commit is contained in:
Jérôme Laban 2019-05-17 15:01:31 -04:00 committed by GitHub
commit 0f1e002ec8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 112 additions and 48 deletions

60
.vsts-ci.Linux.yml Normal file
View file

@ -0,0 +1,60 @@
jobs:
- job: linux
container: nv-bionic-wasm
pool:
vmImage: 'ubuntu-16.04'
variables:
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget
steps:
- checkout: self
clean: true
- bash: |
sudo chmod -R 777 /emsdk
cd /emsdk
sudo ./emsdk activate sdk-1.38.28-64bit
displayName: 'Setup Emscripten'
- task: GitVersion@4
inputs:
updateAssemblyInfo: false
- script: |
source /emsdk/emsdk_env.sh
cd src/CalcManager
chmod +x build.sh
./build.sh
displayName: 'Build Wasm CalcManager'
env:
GITVERSION_FullSemVer: $(GITVERSION_FullSemVer)
- script: |
source /emsdk/emsdk_env.sh
cd $(build.sourcesdirectory)
msbuild /r /p:Configuration=Release "/p:PackageVersion=$(GITVERSION_FullSemVer)" /p:MixedModeBuild=$(MixedModeBuild) $(build.sourcesdirectory)/src/Calculator.Wasm/Calculator.Wasm.csproj
env:
GITVERSION_FullSemVer: $(GITVERSION_FullSemVer)
displayName: 'Build Calculator'
- task: CopyFiles@2
displayName: 'Publish Wasm Binaries'
inputs:
SourceFolder: $(build.sourcesdirectory)/src/Calculator.Wasm/bin/Release/netstandard2.0/dist
Contents: '**/*.*'
TargetFolder: $(build.artifactstagingdirectory)/Uno-Calculator-wasm
CleanTargetFolder: false
OverWrite: false
flattenFolders: false
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: Uno-Calculator-wasm
ArtifactType: Container

35
.vsts-ci.Windows.yml Normal file
View file

@ -0,0 +1,35 @@
jobs:
- job: Windows
pool:
vmImage: 'windows-2019'
steps:
- task: GitVersion@4
inputs:
updateAssemblyInfo: false
- task: NuGetToolInstaller@0
inputs:
versionSpec: 4.9.1
checkLatest: false
- task: MSBuild@1
inputs:
solution: src/Calculator.sln
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:Configuration=Release "/p:PackageVersion=%GITVERSION_FullSemVer%" "/p:InformationalVersion=%GITVERSION_InformationalVersion%" /detailedsummary
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
- task: PublishBuildArtifacts@1
displayName: Publish Package Artifacts
inputs:
pathToPublish: $(build.artifactstagingdirectory)
artifactType: container
artifactName: UnoBanner

View file

@ -1,35 +1,8 @@
resources:
containers:
- container: nv-bionic-wasm
image: nventive/wasm-build:1.2
jobs:
- job: Windows
pool:
vmImage: 'windows-2019'
steps:
- task: GitVersion@4
inputs:
updateAssemblyInfo: false
- task: NuGetToolInstaller@0
inputs:
versionSpec: 4.9.1
checkLatest: false
- task: MSBuild@1
inputs:
solution: src/Calculator.sln
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:Configuration=Release "/p:PackageVersion=%GITVERSION_FullSemVer%" "/p:InformationalVersion=%GITVERSION_InformationalVersion%" /detailedsummary
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
- task: PublishBuildArtifacts@1
displayName: Publish Package Artifacts
inputs:
pathToPublish: $(build.artifactstagingdirectory)
artifactType: container
artifactName: UnoBanner
- template: .vsts-ci.Windows.yml
- template: .vsts-ci.Linux.yml

2
src/CalcManager/build.sh Normal file → Executable file
View file

@ -8,4 +8,4 @@ emcc \
-s SIDE_MODULE=1 \
-o CalcManager.wasm \
-s EXPORT_ALL=1 \
CEngine/*.cpp RatPack/*.cpp *.cpp -I.
CEngine/*.cpp Ratpack/*.cpp *.cpp -I.

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before After
Before After

View file

@ -168,7 +168,7 @@
</Setter>
</Style>
<!-- UNO TODO -->
<!-- UNO TODO -->
<Style x:Key="overflowTextBlockStyle" TargetType="controls:OverflowTextBlock">
<Setter Property="HorizontalAlignment"
@ -193,30 +193,26 @@
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Style="{StaticResource ResultsScrollerSnapped}"
AutomationProperties.AccessibilityView="Raw">
<ListView x:Name="TokenList"
<!-- UNO TODO-->
<ItemsControl x:Name="TokenList"
Padding="0"
VerticalAlignment="Stretch"
HorizontalContentAlignment="Right"
VerticalContentAlignment="Stretch"
IsTabStop="False"
ItemTemplateSelector="{StaticResource ExpressionItemTemplateSelector}"
ItemsSource="{Binding ExpressionTokens}"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.HorizontalScrollMode="Enabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollMode="Disabled"
SelectionMode="None">
<ListView.ItemsPanel>
ItemsSource="{Binding ExpressionTokens}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel HorizontalAlignment="Right"
VerticalAlignment="Stretch"
Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.ItemContainerTransitions>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemContainerTransitions>
<TransitionCollection />
</ListView.ItemContainerTransitions>
</ListView>
</ItemsControl.ItemContainerTransitions>
</ItemsControl>
</ScrollViewer>
<Button x:Name="scrollLeft"
x:Uid="scrollLeft"