From 8fad566ec06758e288d41c7a3510623e42ebf31f Mon Sep 17 00:00:00 2001 From: Diego Giacomelli Date: Sun, 29 Jan 2023 05:54:27 -0300 Subject: [PATCH] Fix GTK# installation (#104) --- .gitignore | 1 + appveyor.yml | 2 +- build.cake | 2 +- install-gtksharp.ps1 | 12 ++++++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 install-gtksharp.ps1 diff --git a/.gitignore b/.gitignore index c06a7e20..91bd24b6 100644 --- a/.gitignore +++ b/.gitignore @@ -131,3 +131,4 @@ BenchmarkDotNet.Artifacts !/tools/buildTemplatesNuget.cmd !/tools/runBenchmarks.cmd !/tools/runBenchmarks.sh +*.msi \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 02784131..c16fb41b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,7 +13,7 @@ assembly_info: assembly_informational_version: '{version}' install: -- cmd: choco install gtksharp +- ps: ./install-gtksharp.ps1 - cmd: dotnet tool install --global Cake.Tool before_build: diff --git a/build.cake b/build.cake index 62854643..8d1ee89a 100644 --- a/build.cake +++ b/build.cake @@ -1,5 +1,5 @@ #tool "nuget:?package=MSBuild.SonarQube.Runner.Tool&version=4.8.0" -#addin "nuget:?package=Cake.Sonar&version=1.1.30" +#addin "nuget:?package=Cake.Sonar&version=1.1.31" #addin "nuget:?package=Cake.Git&version=2.0.0" var target = Argument("target", "Default"); diff --git a/install-gtksharp.ps1 b/install-gtksharp.ps1 new file mode 100644 index 00000000..f063f1dd --- /dev/null +++ b/install-gtksharp.ps1 @@ -0,0 +1,12 @@ +Write-Output "INSTALLING GTK#" +Write-Output " Downloading installer..." +Invoke-WebRequest -uri https://github.com/mono/gtk-sharp/releases/download/2.12.45/gtk-sharp-2.12.45.msi -OutFile ./gtk-sharp-2.12.45.msi + +Write-Output " Starting installer..." +./gtk-sharp-2.12.45.msi /quiet /qn /norestart + +Write-Output " Waiting for installer finish..." +Start-Sleep 10 +Wait-Process -Name "msiexec" -Timeout 300 + +Write-Output "GTK# INSTALLED" \ No newline at end of file