diff --git a/.build/Download-XamarinComponents.ps1 b/.build/Download-XamarinComponents.ps1 new file mode 100644 index 00000000..adf2f809 --- /dev/null +++ b/.build/Download-XamarinComponents.ps1 @@ -0,0 +1,22 @@ +function Expand-ZIPFile($file, $destination) +{ + $shell = new-object -com shell.application + $zip = $shell.NameSpace($file) + foreach($item in $zip.items()) + { + $shell.Namespace($destination).copyhere($item) + } +} + +IF(-NOT (Test-Path "C:\Xamarin")){ + New-Item -ItemType Directory -Path C:\ -Name Xamarin +} + +Push-Location C:\Xamarin + +IF(-NOT (Test-Path "C:\Xamarin\xamarin-component.exe")) { + Invoke-WebRequest -Uri https://components.xamarin.com/submit/xpkg -OutFile xpkg.zip -UseBasicParsing + Expand-ZIPFile -file C:\Xamarin\xpkg.zip -destination C:\Xamarin +} + +Pop-Location \ No newline at end of file diff --git a/.build/Restore-XamarinComponents.ps1 b/.build/Restore-XamarinComponents.ps1 new file mode 100644 index 00000000..8ba11a98 --- /dev/null +++ b/.build/Restore-XamarinComponents.ps1 @@ -0,0 +1 @@ +. C:\Xamarin\xamarin-components.exe restore $args[0] \ No newline at end of file