Skip to content

Commit

Permalink
merge release/0.10.19 Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 45c009e
Author: Steven Kirk <grokys@users.noreply.github.com>
Date:   Thu Mar 23 15:21:13 2023 +0100

    Bump version

commit 02752e0
Author: Steven Kirk <grokys@gmail.com>
Date:   Thu Mar 23 12:13:35 2023 +0100

    Update ShowWindowTest from master.

    This branch had gone out-of-sync due to repeated cherry picks.

commit c9c1eb8
Author: Dan Walmsley <dan@avaloniaui.net>
Date:   Thu Mar 16 21:48:06 2023 +0000

    Merge pull request AvaloniaUI#10677 from AvaloniaUI/fixes/10650-extend-client-area-decorations

    macOS: Fix interaction between ExtendClientAreaToDecorationsHint and SystemDecorations

commit 9bebc76
Author: Dan Walmsley <dan@avaloniaui.net>
Date:   Tue Mar 7 22:24:50 2023 +0000

    Merge pull request AvaloniaUI#10575 from AvaloniaUI/fixes/macos-no-resize-zoom

    macOS: Don't allow window zoom when CanResize=false.

commit a674362
Author: Max Katz <maxkatz6@outlook.com>
Date:   Wed Mar 8 15:52:19 2023 +0000

    Merge pull request AvaloniaUI#10600 from AvaloniaUI/fixes/x11window-nre

    Add nullable reference checking to X11Window.

commit afd25c8
Author: Steven Kirk <grokys@gmail.com>
Date:   Fri Feb 24 10:31:42 2023 +0100

    Set openssl-legacy-provider on all platforms.

    Linux is failing now with the same error.

commit 136a0ab
Author: Steven Kirk <grokys@users.noreply.github.com>
Date:   Wed Feb 22 14:34:34 2023 +0100

    Merge pull request AvaloniaUI#10431 from AvaloniaUI/fixes/osx-menu-reparenting-crash

    if the window is closed, we cannot become the key window.

commit 8096b59
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Wed Feb 22 22:26:24 2023 +0000

    Merge pull request AvaloniaUI#10427 from AvaloniaUI/fixes/macos-close-window-zorder

    macOS: Fix window order breaking when closing modal dialog

commit a5f20fb
Author: Steven Kirk <grokys@gmail.com>
Date:   Thu Feb 16 11:34:42 2023 +0100

    Only set openssl-legacy-provider on Windows.

commit cea9d20
Author: Steven Kirk <grokys@gmail.com>
Date:   Thu Feb 16 11:20:22 2023 +0100

    Try to fix CI build error.

    `error:0308010C:digital envelope routines::unsupported`

commit a082601
Author: Max Katz <maxkatz6@outlook.com>
Date:   Sat Feb 4 08:22:00 2023 -0500

    Merge pull request AvaloniaUI#10204 from AvaloniaUI/update-angle-version

    Update Angle to 2.1.0.2023020321

commit 8d0f449
Author: Steven Kirk <grokys@users.noreply.github.com>
Date:   Tue Feb 14 20:04:44 2023 +0100

    Merge pull request AvaloniaUI#10265 from AvaloniaUI/fixes/macos-noresize-fullscreen

    Various macOS and win32 fixes

commit ac49092
Author: Max Katz <maxkatz6@outlook.com>
Date:   Fri Feb 3 15:55:45 2023 -0500

    Merge pull request AvaloniaUI#10196 from AvaloniaUI/fixes/macos-transparency

    macOS: Fix window transparency

commit 730e08d
Author: Max Katz <maxkatz6@outlook.com>
Date:   Tue Dec 13 12:56:33 2022 -0500

    Merge pull request AvaloniaUI#9699 from AvaloniaUI/fixes/7974-selectionmodel-eventargs-indexer

    Fix SelectionModelSelectionChangedEventArgs.SelectedItems indexer.

commit f3acb6e
Author: Steven Kirk <grokys@users.noreply.github.com>
Date:   Wed Feb 1 16:31:57 2023 +0100

    Merge pull request AvaloniaUI#10153 from AvaloniaUI/fixes/macos-windowstate-crash

    macOS: Sync actual window state after window show, and fix integration tests on macOS 13.1

commit 7d09e7c
Author: Max Katz <maxkatz6@outlook.com>
Date:   Mon Jan 16 22:12:39 2023 -0500

    Merge pull request AvaloniaUI#9716 from AvaloniaUI/fixes/macos-child-window-key-handling

    macos: Fix child window key handling

commit fb67190
Author: Steven Kirk <grokys@gmail.com>
Date:   Thu Jan 12 15:47:56 2023 +0100

    Revert "Merge pull request AvaloniaUI#9947 from AvaloniaUI/stable/nswindow-setappearance"

    This reverts commit c273732, reversing
    changes made to d926650.

commit c273732
Merge: d926650 561b04a
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Tue Jan 10 12:40:08 2023 +0000

    Merge pull request AvaloniaUI#9947 from AvaloniaUI/stable/nswindow-setappearance

    [stable] macOS: Set Window appearance to fix missing white border

commit 561b04a
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Wed Dec 14 22:58:28 2022 +0000

    set appearance on osx window.

commit d926650
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Tue Dec 6 15:05:40 2022 +0000

    fix integration test app.

commit 96465de
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Tue Dec 6 15:01:04 2022 +0000

    Revert "remove integration test app."

    This reverts commit 46ea187.

commit 46ea187
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Tue Dec 6 14:38:36 2022 +0000

    remove integration test app.

commit f549f1e
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Tue Dec 6 14:26:09 2022 +0000

    fix build

commit 92687ad
Author: Max Katz <maxkatz6@outlook.com>
Date:   Thu Sep 8 14:32:09 2022 +0200

    Merge pull request AvaloniaUI#8880 from AvaloniaUI/fixes/8878-mac-window-order

    macOS: Fix child window order with multiple child windows
    # Conflicts:
    #	tests/Avalonia.IntegrationTests.Appium/WindowTests_MacOS.cs

commit cb56351
Author: Max Katz <maxkatz6@outlook.com>
Date:   Wed Nov 2 14:15:41 2022 -0400

    Merge pull request AvaloniaUI#9326 from AvaloniaUI/fixes/osx-child-windows-cant-minimise

    OSX: fix minimise button being disabled when either a parent or a dialog.

commit 0af2a96
Author: Max Katz <maxkatz6@outlook.com>
Date:   Wed Nov 16 16:45:16 2022 -0800

    Merge pull request AvaloniaUI#9451 from AvaloniaUI/fixes/osx-native-menu-memory-leak

    [OSX] Fixed NativeMenu memory leak
    # Conflicts:
    #	src/Avalonia.MicroCom/CallbackBase.cs

commit fdb32b7
Author: Dan Walmsley <dan@avaloniaui.net>
Date:   Sat Nov 19 14:47:02 2022 +0000

    Merge pull request AvaloniaUI#9469 from AvaloniaUI/fixes/window-border-for-opaque-windows

    [OSX] Use non-opaque window background for non-transparent windows
    # Conflicts:
    #	src/Avalonia.Native/avn.idl

commit 1dacc90
Author: Max Katz <maxkatz6@outlook.com>
Date:   Tue Dec 6 03:19:45 2022 -0800

    Merge pull request AvaloniaUI#9566 from AvaloniaUI/fixes/9565-mac-fullscreen-children

    MacOS: Only bring windows to front if they're on the active space.

commit d3723c6
Author: Max Katz <maxkatz6@outlook.com>
Date:   Thu Jul 21 14:16:29 2022 -0400

    Merge pull request AvaloniaUI#8514 from pr8x/move-first-last-skip-disabled

    Skip disabled controls when moving to first/last item

commit 3e43d6f
Merge: 719d89f 8ee727f
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Wed Nov 30 13:46:37 2022 +0000

    Merge branch 'stable/0.10.x-outsys' into stable/0.10.x

commit 8ee727f
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Wed Nov 30 13:45:47 2022 +0000

    Revert "Fix AvaloniaUI#9565"

    This reverts commit 5fa4da3.

commit 8546725
Merge: ea71071 133abac
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Wed Nov 30 12:50:23 2022 +0000

    Merge pull request AvaloniaUI#9573 from AvaloniaUI/fixes/update-nuke

    Fix Stable Branch Builds

commit 133abac
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Wed Nov 30 12:35:09 2022 +0000

    fix create nuget packages.

commit ead8be7
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Wed Nov 30 11:00:53 2022 +0000

    use custom ilrepack.

commit 3432d2b
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Tue Nov 29 14:33:46 2022 +0000

    update nuke.

commit 6990327
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Tue Nov 29 14:26:20 2022 +0000

    update nukebuild.

commit ea71071
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Tue Nov 29 13:47:05 2022 +0000

    use 6.0.200

commit 16ce88c
Author: Steven Kirk <grokys@gmail.com>
Date:   Tue Nov 29 13:35:30 2022 +0100

    Pin SDK.

commit 5fa4da3
Author: Steven Kirk <grokys@gmail.com>
Date:   Tue Nov 29 12:40:02 2022 +0100

    Fix AvaloniaUI#9565

    - Only bring window to front if it's on the currently active space
    - Ensure correct order of child windows after fullscreen transition

commit 719d89f
Merge: ffe74ce 734e165
Author: Max Katz <maxkatz6@outlook.com>
Date:   Fri Nov 25 15:45:58 2022 -0500

    Merge pull request AvaloniaUI#9538 from timunie/backport/GH_9528

    Backport AvaloniaUI#9528

commit 734e165
Author: Tim <tim.uniewski@gmail.com>
Date:   Fri Nov 25 10:53:23 2022 +0100

    Backport AvaloniaUI#9528

commit ffe74ce
Author: Max Katz <maxkatz6@outlook.com>
Date:   Thu Nov 17 19:54:14 2022 -0500

    Merge pull request AvaloniaUI#9221 from AvaloniaUI/fixes/8869-show-windowstate

    Fix setting WindowState before showing Window.

commit a64fcdd
Merge: a35520c 80288aa
Author: Max Katz <maxkatz6@outlook.com>
Date:   Sun Oct 30 00:01:09 2022 -0400

    Merge pull request AvaloniaUI#9300 from AvaloniaUI/fixes/osx-menu-reentrancy-crash

    OSX: fix menu re-entrancy crash

commit 80288aa
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Fri Oct 28 11:48:27 2022 +0100

    use didResignKey notification instead of override resignKey

commit a35520c
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Thu Oct 27 15:03:55 2022 +0100

    Revert "Merge branch 'disableSetProcessName-feature' into tmp8"

    This reverts commit d8ee76d.

commit d8ee76d
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Mon Oct 3 17:03:56 2022 +0100

    Merge branch 'disableSetProcessName-feature' into tmp8

commit 62a5ee1
Author: Max Katz <maxkatz6@outlook.com>
Date:   Sat Aug 13 03:34:22 2022 -0400

    Merge pull request AvaloniaUI#8739 from AvaloniaUI/update-skia

    Update SkiaSharp
    # Conflicts:
    #	build/HarfBuzzSharp.props

commit 0ac982f
Merge: 9f50abd 96187d7
Author: Dan Walmsley <dan@avaloniaui.net>
Date:   Mon Aug 15 13:39:20 2022 +0100

    Merge pull request AvaloniaUI#8753 from AvaloniaUI/fix-listBoxTests-stable

    Fix ListBoxTests on stable

commit 96187d7
Author: Takoooooo <tako0qq@gmail.com>
Date:   Mon Aug 15 15:20:34 2022 +0300

    Fix ListBoxTests.

commit 9f50abd
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Mon Mar 7 16:54:24 2022 +0000

    Merge pull request AvaloniaUI#7755 from AvaloniaUI/fixes/win32-can-resize

    Fixes/win32 can resize

commit ff86693
Author: Max Katz <maxkatz6@outlook.com>
Date:   Thu Aug 11 19:30:58 2022 -0400

    Merge pull request AvaloniaUI#8728 from jp2masa/gl-control-render-rect

    Fixed OpenGlControlBase render rect

commit 7627db1
Author: Max Katz <maxkatz6@outlook.com>
Date:   Sat Aug 6 05:28:31 2022 -0400

    Merge pull request AvaloniaUI#8683 from AvaloniaUI/stop-transition-if-it-was-cancelled

    Stop TransitioningContentControl if it was cancelled

commit 7eb0a48
Author: Max Katz <maxkatz6@outlook.com>
Date:   Sun Aug 7 02:52:50 2022 -0400

    Merge pull request AvaloniaUI#8569 from hez2010/visual-fixes

    Avoid crashing when fail to create OpenGL context

commit 5f9c852
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Tue Aug 9 18:38:40 2022 +0100

    Merge pull request AvaloniaUI#8574 from AvaloniaUI/fixes/win32-consistent-minimize-restore-window-size

    Win32: Retain window position and size when docked and then minimized and restored.
    # Conflicts:
    #	tests/Avalonia.IntegrationTests.Appium/WindowTests.cs

commit 46d83d1
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Tue Aug 9 17:09:06 2022 +0100

    Merge pull request AvaloniaUI#8618 from AvaloniaUI/fixes/macos-dont-reopen-hidden-window

    macos: Don't reopen hidden window when parent clicked.
    # Conflicts:
    #	tests/Avalonia.IntegrationTests.Appium/WindowTests_MacOS.cs

commit d758481
Merge: 765c4d7 7b33526
Author: Max Katz <maxkatz6@outlook.com>
Date:   Tue Aug 9 01:29:08 2022 -0400

    Merge pull request AvaloniaUI#8699 from timunie/fix/backport_GH_7778

    Backport PR 7778

commit 7b33526
Author: Tim <tim.uniewski@gmail.com>
Date:   Mon Aug 8 11:24:12 2022 +0200

    Backport PR 7778

commit 765c4d7
Author: Tako <53405089+Takoooooo@users.noreply.github.com>
Date:   Wed Aug 3 18:44:47 2022 +0300

    Merge pull request AvaloniaUI#8655 from AvaloniaUI/use-correct-toggleModifier-for-treeView-on-macOS-with-multiselection

    Use correct ToggleModifier in TreeView multiselection on MacOS

commit fb607cc
Author: Steven Kirk <grokys@users.noreply.github.com>
Date:   Wed Aug 3 17:05:21 2022 +0200

    Merge pull request AvaloniaUI#8637 from AvaloniaUI/use-correct-toggleModifier-for-listBox-on-macOS-with-multiselection

    Use correct ToggleModifier in ListBox multiselection on MacOS.

commit fcada17
Author: Steven Kirk <grokys@gmail.com>
Date:   Wed Aug 3 18:24:46 2022 +0200

    Added AvaloniaLocator.GetRequiredService.

commit 50f02de
Author: Max Katz <maxkatz6@outlook.com>
Date:   Tue Jul 26 23:06:08 2022 -0400

    Merge pull request AvaloniaUI#8604 from AvaloniaUI/feature/tray-icon-non-mandatory

    Don't throw exceptions for missing windowing platform since it's actually not mandatory for TrayIcon

commit dfabf4d
Author: Max Katz <maxkatz6@outlook.com>
Date:   Sat Jul 30 13:56:36 2022 -0400

    Merge pull request AvaloniaUI#8599 from jinek/fixes/scene-hittest-exclusive

    Scene hittest now uses exclusive `Rect.Contains`. Fixes https://githu…

commit 1628b20
Author: Nikita Tsukanov <keks9n@gmail.com>
Date:   Tue Jul 26 13:52:23 2022 +0300

    Merge pull request AvaloniaUI#8597 from AvaloniaUI/feature/x11-wmclass-spec

    Set WM_CLASS property according to ICCCM spec

commit d2f8fe6
Author: Jumar Macato <16554748+jmacato@users.noreply.github.com>
Date:   Fri Jul 15 21:04:07 2022 +0800

    Merge pull request AvaloniaUI#8520 from timunie/fix/DataGrid_LastColumnIsClipped

    fix: RowDesiredWidth was missing the RowHeaderWidth

commit 2d2cd97
Author: Max Katz <maxkatz6@outlook.com>
Date:   Thu Jul 28 12:04:17 2022 -0400

    Backport proper exception handling in win32 system dialogs

commit 7fb8c01
Author: Nikita Tsukanov <keks9n@gmail.com>
Date:   Tue Jul 26 16:41:15 2022 +0300

    Merge pull request AvaloniaUI#8601 from AvaloniaUI/fixes/7773-skia-stream-workaround

    Workaround for SkiaSharp broken image decoding.

commit e975100
Author: Dan Walmsley <dan@walms.co.uk>
Date:   Mon Jul 18 15:38:27 2022 +0100

    Merge pull request AvaloniaUI#8538 from AvaloniaUI/feature/expose-gtk-thread-invoke

    Introduced GtkInteropHelper.RunOnGlibThread, fixed demos
    # Conflicts:
    #	samples/ControlCatalog.NetCore/NativeControls/Gtk/EmbedSample.Gtk.cs
    #	samples/ControlCatalog.NetCore/NativeControls/Gtk/GtkHelper.cs

# Conflicts:
#	build/SharedVersion.props
#	nukebuild/Build.cs
#	samples/IntegrationTestApp/ShowWindowTest.axaml
  • Loading branch information
donandren committed Mar 24, 2023
1 parent 5fac19a commit cad67b9
Show file tree
Hide file tree
Showing 52 changed files with 14,843 additions and 507 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "src/Markup/Avalonia.Markup.Xaml/XamlIl/xamlil.github"]
path = src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github
url = https://github.com/kekekeks/XamlX.git
[submodule "nukebuild/il-repack"]
path = nukebuild/il-repack
url = https://github.com/Gillibald/il-repack
Empty file removed .nuke
Empty file.
148 changes: 148 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Build Schema",
"$ref": "#/definitions/build",
"definitions": {
"build": {
"type": "object",
"properties": {
"Configuration": {
"type": "string",
"description": "configuration"
},
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"ForceNugetVersion": {
"type": "string",
"description": "force-nuget-version"
},
"Help": {
"type": "boolean",
"description": "Shows the help text for this build assembly"
},
"Host": {
"type": "string",
"description": "Host for execution. Default is 'automatic'",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"NoLogo": {
"type": "boolean",
"description": "Disables displaying the NUKE logo"
},
"Partition": {
"type": "string",
"description": "Partition to use on CI"
},
"Plan": {
"type": "boolean",
"description": "Shows the execution plan (HTML)"
},
"Profile": {
"type": "array",
"description": "Defines the profiles to load",
"items": {
"type": "string"
}
},
"Root": {
"type": "string",
"description": "Root directory during build execution"
},
"Skip": {
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"CiAzureLinux",
"CiAzureOSX",
"CiAzureWindows",
"Clean",
"Compile",
"CompileHtmlPreviewer",
"CompileNative",
"CreateIntermediateNugetPackages",
"CreateNugetPackages",
"GenerateCppHeaders",
"Package",
"RunCoreLibsTests",
"RunDesignerTests",
"RunHtmlPreviewerTests",
"RunLeakTests",
"RunRenderTests",
"RunTests",
"ZipFiles"
]
}
},
"SkipPreviewer": {
"type": "boolean",
"description": "skip-previewer"
},
"SkipTests": {
"type": "boolean",
"description": "skip-tests"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded. Default is Avalonia.sln"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"CiAzureLinux",
"CiAzureOSX",
"CiAzureWindows",
"Clean",
"Compile",
"CompileHtmlPreviewer",
"CompileNative",
"CreateIntermediateNugetPackages",
"CreateNugetPackages",
"GenerateCppHeaders",
"Package",
"RunCoreLibsTests",
"RunDesignerTests",
"RunHtmlPreviewerTests",
"RunLeakTests",
"RunRenderTests",
"RunTests",
"ZipFiles"
]
}
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
]
}
}
}
}
}
4 changes: 4 additions & 0 deletions .nuke/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "./build.schema.json",
"Solution": ""
}
14 changes: 7 additions & 7 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
version: 3.1.414

- task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.0.100'
displayName: 'Use .NET Core SDK 6.0.200'
inputs:
version: 6.0.100
version: 6.0.200

- task: CmdLine@2
displayName: 'Run Build'
Expand Down Expand Up @@ -43,9 +43,9 @@ jobs:
version: 3.1.414

- task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.0.100'
displayName: 'Use .NET Core SDK 6.0.200'
inputs:
version: 6.0.100
version: 6.0.200

- task: CmdLine@2
displayName: 'Install Mono 5.18'
Expand Down Expand Up @@ -115,15 +115,15 @@ jobs:
version: 3.1.414

- task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.0.100'
displayName: 'Use .NET Core SDK 6.0.200'
inputs:
version: 6.0.100
version: 6.0.200

- task: CmdLine@2
displayName: 'Install Nuke'
inputs:
script: |
dotnet tool install --global Nuke.GlobalTool --version 0.24.0
dotnet tool install --global Nuke.GlobalTool --version 6.2.1
- task: CmdLine@2
displayName: 'Run Nuke'
Expand Down
7 changes: 7 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:; set -eo pipefail
:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
:; ${SCRIPT_DIR}/build.sh "$@"
:; exit $?

@ECHO OFF
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %*
50 changes: 24 additions & 26 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
[CmdletBinding()]
Param(
#[switch]$CustomParam,
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
[string[]]$BuildArguments
)

Write-Output "Windows PowerShell $($Host.Version)"
Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)"

Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { exit 1 }
Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 }
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent

###########################################################################
# CONFIGURATION
###########################################################################

$BuildProjectFile = "$PSScriptRoot\nukebuild\_build.csproj"
$TempDirectory = "$PSScriptRoot\\.tmp"
$TempDirectory = "$PSScriptRoot\\.nuke\temp"

$DotNetGlobalFile = "$PSScriptRoot\\global.json"
$DotNetInstallUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1"
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
$DotNetChannel = "Current"

$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
$env:NUGET_XMLDOC_MODE = "skip"
$env:DOTNET_MULTILEVEL_LOOKUP = 0

###########################################################################
# EXECUTION
Expand All @@ -34,38 +33,37 @@ function ExecSafe([scriptblock] $cmd) {
if ($LASTEXITCODE) { exit $LASTEXITCODE }
}

# If global.json exists, load expected version
if (Test-Path $DotNetGlobalFile) {
$DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
$DotNetVersion = $DotNetGlobal.sdk.version
}
}

# If dotnet is installed locally, and expected version is not set or installation matches the expected version
# If dotnet CLI is installed globally and it matches requested version, use for execution
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
(!(Test-Path variable:DotNetVersion) -or $(& dotnet --version) -eq $DotNetVersion)) {
$(dotnet --version) -and $LASTEXITCODE -eq 0) {
$env:DOTNET_EXE = (Get-Command "dotnet").Path
}
else {
$DotNetDirectory = "$TempDirectory\dotnet-win"
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"

# Download install script
$DotNetInstallFile = "$TempDirectory\dotnet-install.ps1"
mkdir -force $TempDirectory > $null
New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile)

# If global.json exists, load expected version
if (Test-Path $DotNetGlobalFile) {
$DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
$DotNetVersion = $DotNetGlobal.sdk.version
}
}

# Install by channel or version
$DotNetDirectory = "$TempDirectory\dotnet-win"
if (!(Test-Path variable:DotNetVersion)) {
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
} else {
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
}

$env:PATH="$DotNetDirectory;$env:PATH"
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
}

Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"
Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"

ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile -- $BuildArguments }
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }
60 changes: 46 additions & 14 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
#!/usr/bin/env bash

echo $(bash --version 2>&1 | head -n 1)

#CUSTOMPARAM=0
BUILD_ARGUMENTS=()
for i in "$@"; do
case $(echo $1 | awk '{print tolower($0)}') in
# -custom-param) CUSTOMPARAM=1;;
*) BUILD_ARGUMENTS+=("$1") ;;
esac
shift
done
bash --version 2>&1 | head -n 1

set -eo pipefail
SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
Expand All @@ -20,11 +10,53 @@ SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
###########################################################################

BUILD_PROJECT_FILE="$SCRIPT_DIR/nukebuild/_build.csproj"
TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"

DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"
DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
DOTNET_CHANNEL="Current"

export DOTNET_CLI_TELEMETRY_OPTOUT=1
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
export NUGET_XMLDOC_MODE="skip"
export DOTNET_MULTILEVEL_LOOKUP=0

dotnet --info
###########################################################################
# EXECUTION
###########################################################################

dotnet run --project "$BUILD_PROJECT_FILE" -- ${BUILD_ARGUMENTS[@]}
function FirstJsonValue {
perl -nle 'print $1 if m{"'"$1"'": "([^"]+)",?}' <<< "${@:2}"
}

# If dotnet CLI is installed globally and it matches requested version, use for execution
if [ -x "$(command -v dotnet)" ] && dotnet --version &>/dev/null; then
export DOTNET_EXE="$(command -v dotnet)"
else
# Download install script
DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh"
mkdir -p "$TEMP_DIRECTORY"
curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL"
chmod +x "$DOTNET_INSTALL_FILE"

# If global.json exists, load expected version
if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then
DOTNET_VERSION=$(FirstJsonValue "version" "$(cat "$DOTNET_GLOBAL_FILE")")
if [[ "$DOTNET_VERSION" == "" ]]; then
unset DOTNET_VERSION
fi
fi

# Install by channel or version
DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix"
if [[ -z ${DOTNET_VERSION+x} ]]; then
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path
else
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
fi
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
fi

echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"

"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"
2 changes: 1 addition & 1 deletion build/JetBrains.dotMemoryUnit.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="JetBrains.dotMemoryUnit" Version="3.0.20171219.105559" />
<PackageReference Include="JetBrains.DotMemoryUnit" Version="3.2.20220510" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/SharedVersion.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Product>Avalonia</Product>
<Version>0.10.18</Version>
<Version>0.10.19</Version>
<Copyright>Copyright 2022 &#169; The AvaloniaUI Project</Copyright>
<PackageProjectUrl>https://avaloniaui.net</PackageProjectUrl>
<RepositoryUrl>https://github.com/AvaloniaUI/Avalonia/</RepositoryUrl>
Expand Down

0 comments on commit cad67b9

Please sign in to comment.