From 41bdaeb38badd06d71f7827e6648438e3b9ea024 Mon Sep 17 00:00:00 2001 From: AdmiringWorm Date: Mon, 26 Feb 2018 18:59:26 +0100 Subject: [PATCH] (mono) Migrated package ref #900 --- automatic/mono/Readme.md | 15 ++++++++ automatic/mono/mono.nuspec | 30 +++++++++++----- automatic/mono/tools/chocolateyInstall.ps1 | 19 ++++++---- automatic/mono/update.ps1 | 40 ++++++++++++++++++++++ 4 files changed, 88 insertions(+), 16 deletions(-) create mode 100644 automatic/mono/Readme.md create mode 100644 automatic/mono/update.ps1 diff --git a/automatic/mono/Readme.md b/automatic/mono/Readme.md new file mode 100644 index 000000000000..1656d62ab1ff --- /dev/null +++ b/automatic/mono/Readme.md @@ -0,0 +1,15 @@ +# [ mono](https://chocolatey.org/packages/mono) + +Mono is a software platform designed to allow developers to easily create cross platform applications. Sponsored by Novell, Mono is an open source implementation of Microsoft’s .NET Framework based on the ECMA standards for C# and the Common Language Runtime. A growing family of solutions and an active and enthusiastic contributing community is helping position Mono to become the leading choice for development of Linux applications. + + +## Features +- [Multi-Platform][]: Runs on *Linux*, *OS X*, *BSD* and *Microsoft Windows*, including *x86*, *x86-64*, *ARM*, *s390*, *PowerPC* and much more. +- [Multi-Language][]: Develop in *C# 4.0* (including LINQ and `dynamic`), *VB 8*, *Java*, *Python*, *Ruby*, *Eiffel*, *F#*, *Oxygene* and more. +- **Binary Compatible**: Built on an implementation of the *ECMA's Common Language Infrastructure* and *C#*. +- [Microsoft Compatible API][]: Run *ASP.NET*, *ADO.NET*, *Silverlight* and *Windows.Forms* applications without recompilation. +- [Open Source, Free Software][Open Source]: Mono's runtime, compilers, and libraries are distributed using the MIT license. +- [Comprehensive Technology Coverage][]: Bindings and managed implementations of many popular libraries and protocols. + +## Notes +- Starting from package version 5.8.0.127 and onwards 64bit is supported, unfortunately the 64bit version does not contain the GTK# runtime. Please either install the 32bit edition (`chocol install mono --x86`), or the [gtksharp](https://chocolatey.org/packages/gtksharp) package if this is needed. diff --git a/automatic/mono/mono.nuspec b/automatic/mono/mono.nuspec index 9d1923ff759e..050ae9ca1e8b 100644 --- a/automatic/mono/mono.nuspec +++ b/automatic/mono/mono.nuspec @@ -1,17 +1,29 @@ - - + + + mono 4.4.2 + https://github.com/chocolatey/chocolatey-coreteampackages/tree/master/automatic/mono + chocolatey, Miguel de Icaza, other Mono committers Mono Miguel de Icaza, other Mono committers - Miguel de Icaza, other Mono committers - http://mono-project.com/FAQ:_Licensing - http://mono-project.com/ - https://cdn.rawgit.com/ferventcoder/chocolatey-packages/02c21bebe5abb495a56747cbb9b4b5415c933fc0/icons/mono.png + https://www.mono-project.com/ + https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/38688373a17d548271406a273201b950db7dbd28/icons/mono.png + © 2018 Mono Project + https://www.mono-project.com/docs/faq/licensing/ false - Mono is a software platform designed to allow developers to easily create cross platform applications. Sponsored by Novell, Mono is an open source implementation of Microsoft’s .NET Framework based on the ECMA standards for C# and the Common Language Runtime. A growing family of solutions and an active and enthusiastic contributing community is helping position Mono to become the leading choice for development of Linux applications. + https://github.com/mono/mono + http://www.mono-project.com/docs/ + http://www.mono-project.com/community/help/mailing-lists/ + https://github.com/mono/mono/issues + mono development framework admin foss cross-platform Mono – Cross platform, open source .NET development framework - mono development framework admin + + Mono is a software platform designed to allow developers to easily create cross platform applications. Sponsored by Novell, Mono is an open source implementation of Microsoft’s .NET Framework based on the ECMA standards for C# and the Common Language Runtime. A growing family of solutions and an active and enthusiastic contributing community is helping position Mono to become the leading choice for development of Linux applications. + https://www.mono-project.com/docs/about-mono/releases/ - \ No newline at end of file + + + + diff --git a/automatic/mono/tools/chocolateyInstall.ps1 b/automatic/mono/tools/chocolateyInstall.ps1 index 7b72f650438f..74cb04e1b023 100644 --- a/automatic/mono/tools/chocolateyInstall.ps1 +++ b/automatic/mono/tools/chocolateyInstall.ps1 @@ -1,12 +1,17 @@ -$packageName = 'mono' -$url = 'http://download.mono-project.com/archive/4.4.2/windows-installer/mono-4.4.2.11-gtksharp-2.12.38-win32-0.msi' +$ErrorActionPreference = 'Stop' $packageArgs = @{ - packageName = $packageName - fileType = 'msi' #only one of these: exe, msi, msu - url = $url - silentArgs = "/qn /norestart /l*v $env:TEMP\chocolatey\$packageName\install.log" - validExitCodes= @(0, 3010, 1641) + packageName = $env:ChocolateyPackageName + fileType = 'msi' + url = 'http://download.mono-project.com/archive/4.4.2/windows-installer/mono-4.4.2.11-gtksharp-2.12.38-win32-0.msi' + url64bit = '' + softwareName = 'Mono for Windows*' + checksum = '' + checksumType = '' + checksum64 = '' + checksumType64 = '' + silentArgs = "/qn /norestart /l*v `"$($env:TEMP)\$($env:chocolateyPackageName).$($env:chocolateyPackageVersion).MsiInstall.log`"" + validExitCodes = @(0, 3010, 1641) } Install-ChocolateyPackage @packageArgs diff --git a/automatic/mono/update.ps1 b/automatic/mono/update.ps1 new file mode 100644 index 000000000000..09a1ef63f68d --- /dev/null +++ b/automatic/mono/update.ps1 @@ -0,0 +1,40 @@ +Import-Module AU + +$releases = 'https://www.mono-project.com/download/stable/' + +function global:au_SearchReplace { + @{ + ".\tools\chocolateyInstall.ps1" = @{ + "(?i)^(\s*url\s*=\s*)'.*'" = "`${1}'$($Latest.URL32)'" + "(?i)^(\s*url64(bit)?\s*=\s*)'.*'" = "`${1}'$($Latest.URL64)'" + "(?i)^(\s*checksum\s*=\s*)'.*'" = "`${1}'$($Latest.Checksum32)'" + "(?i)^(\s*checksumType\s*=\s*)'.*'" = "`${1}'$($Latest.ChecksumType32)'" + "(?i)^(\s*checksum64\s*=\s*)'.*'" = "`${1}'$($Latest.Checksum64)'" + "(?i)^(\s*checksumType64\s*=\s*)'.*'" = "`${1}'$($Latest.ChecksumType64)'" + } + } +} + +function global:au_GetLatest { + $download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing + + $re = 'mono.*win32[\-\d]+\.msi$' + $url32 = $download_page.Links | ? href -match $re | select -first 1 -expand href + + $re = 'mono.*x64[\-\d]+\.msi$' + $url64 = $download_page.links | ? href -match $re | select -first 1 -expand href + + $verRe = '[-]' + $version32 = $url32 -split "$verRe" | ? { [version]::TryParse($_, [ref]$null) } | select -first 1 + $version64 = $url64 -split "$verRe" | ? { [version]::TryParse($_, [ref]$null) } | select -first 1 + if ($version32 -ne $version64) { + throw "32bit version do not match the 64bit version" + } + @{ + URL32 = $url32 + URL64 = $url64 + Version = $version32 + } +} + +update