-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5114d6
commit 74baced
Showing
3 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
$ErrorActionPreference = 'Stop'; | ||
|
||
$packageName = 'unity-tizen' | ||
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
$url = 'https://download.unity3d.com/download_unity/88d00a7498cd/TargetSupportInstaller/UnitySetup-Tizen-Support-for-Editor-5.5.1f1.exe' | ||
$checksum = 'b3a067d99813f9f18e9d6062dd29f651c64fe8e70b04f7ea1dea5d04bc5918c7' | ||
|
||
$packageArgs = @{ | ||
packageName = $packageName | ||
fileType = 'EXE' | ||
url = $url | ||
checksum = $checksum | ||
silentArgs = '/S' | ||
validExitCodes = @(0) | ||
} | ||
|
||
Install-ChocolateyPackage @packageArgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd"> | ||
<metadata> | ||
<id>unity-tizen</id> | ||
<version>5.5.1</version> | ||
<packageSourceUrl>https://github.com/jtcmedia/chocolatey-packages/tree/master/unity-tizen</packageSourceUrl> | ||
<owners>LudicrousByte</owners> | ||
<title>Unity Tizen Target Support</title> | ||
<authors>Unity Technologies</authors> | ||
<projectUrl>https://unity3d.com/</projectUrl> | ||
<iconUrl>https://cdn.rawgit.com/jtcmedia/chocolatey-packages/unity-icon/icons/unity.png</iconUrl> | ||
<copyright>Copyright 2017 Unity Technologies</copyright> | ||
<licenseUrl>https://unity3d.com/legal/terms-of-service/software</licenseUrl> | ||
<requireLicenseAcceptance>true</requireLicenseAcceptance> | ||
<docsUrl>https://docs.unity3d.com/Manual/index.html</docsUrl> | ||
<tags>unity admin tizen windows store .net</tags> | ||
<summary>This package adds Tizen Target Support to Unity.</summary> | ||
<description> | ||
This package adds Tizen Target Support to Unity. | ||
</description> | ||
<releaseNotes> | ||
* [Release Notes](https://unity3d.com/unity/whats-new/) | ||
</releaseNotes> | ||
<dependencies> | ||
<dependency id="unity" version="5.5.1" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="tools\**" target="tools" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import-module au | ||
|
||
$releases = 'https://unity3d.com/get-unity/update' | ||
|
||
|
||
function global:au_SearchReplace { | ||
@{ | ||
".\tools\chocolateyinstall.ps1" = @{ | ||
"(^[$]url\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'" | ||
"(^[$]checksum\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'" | ||
} | ||
|
||
".\unity-tizen.nuspec" = @{ | ||
"(\<dependency id=`"unity`" version=)`"([^`"]+)`"" = "`$1`"$($Latest.Version)`"" | ||
} | ||
} | ||
} | ||
|
||
|
||
function global:au_GetLatest { | ||
$download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing | ||
|
||
$regex = '.exe$' | ||
$url = $download_page.links | ? href -match $regex | select -First 1 -expand href | ||
|
||
$exe_ver = $url -split '-' | select -Last 1 | ||
$version = $exe_ver -split 'f' | select -First 1 | ||
$build = $url -split '/' | select -Last 1 -Skip 2 | ||
|
||
$base_url = "https://download.unity3d.com/download_unity/$build" | ||
|
||
$url = "$base_url/TargetSupportInstaller/UnitySetup-Tizen-Support-for-Editor-$exe_ver" | ||
|
||
return @{ URL32 = $url; Version = $version } | ||
} | ||
|
||
update -ChecksumFor 32 |