-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #995 from chocolatey/skype
(skype) migrated from ferventcoder/chocolatey-packages
- Loading branch information
Showing
4 changed files
with
122 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,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<metadata> | ||
<id>skype</id> | ||
<title>Skype</title> | ||
<version>7.41.0.101</version> | ||
<authors>Microsoft</authors> | ||
<owners>chocolatey,Rob Reynolds</owners> | ||
<summary>Skype - VOIP</summary> | ||
<description>Skype - Install Skype, add your friends as contacts, then call, video call and instant message with them for free. Call people who aren't on Skype too, at really low rates.</description> | ||
<projectUrl>http://www.skype.com</projectUrl> | ||
<packageSourceUrl>https://github.com/chocolatey/chocolatey-coreteampackages/automatic/skype/</packageSourceUrl> | ||
<tags>Skype VOIP voice over ip video conferencing admin</tags> | ||
<licenseUrl>http://www.skype.com/intl/en-us/legal/eula/</licenseUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<iconUrl>https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/040c834d483de9e38ceeef0fd8283d803be082bf/icons/skype.png</iconUrl> | ||
</metadata> | ||
<files> | ||
<file src="tools\**" target="tools" /> | ||
</files> | ||
</package> | ||
<!-- character encoding: “UTF-8” --> |
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,52 @@ | ||
#Install-ChocolateyPackage 'skype' 'exe' '/SILENT /nogoogle /noie /nodesktopicon' 'http://download.skype.com/3694814915aaa38100bfa0933f948e65/partner/59/SkypeSetup.exe' | ||
#Install-ChocolateyPackage 'skype' 'exe' '/SILENT /nogoogle /noie /nodesktopicon' 'https://download.skype.com/msi/SkypeSetup_7.39.0.102.msi' | ||
#Install-ChocolateyPackage 'skype' 'exe' '/SILENT /nogoogle /noie /nodesktopicon' 'http://download.skype.com/SkypeSetupFull.exe' | ||
|
||
|
||
function isInstalled() { | ||
return Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -match 'Skype\u2122 [\d\.]+$'} | ||
} | ||
|
||
$packageName = 'skype' | ||
$fileType = 'msi' | ||
# http://community.skype.com/t5/Windows-archive/Unattended-install/td-p/184628s | ||
$silentArgs = '/qn /norestart STARTSKYPE=FALSE TRANSFORMS=:RemoveDesktopShortcut.mst TRANSFORMS=:RemoveStartup.mst' | ||
|
||
$url = 'https://download.skype.com/msi/SkypeSetup_7.41.0.101.msi' | ||
$checksum = 'c7c5499bc1e3663c98fac492b066610c218722e83f9807328c5c4d06607027b2' | ||
$checksumType = 'SHA256' | ||
|
||
try { | ||
|
||
$appInstalled = isInstalled | ||
|
||
if ($appInstalled) { | ||
# If Skype (in any version) is already installed on the computer, remove it first, otherwise the | ||
# installation of Skype will fail with an error. | ||
$msiArgs = $('/x' + $appInstalled.IdentifyingNumber + ' ' + $silentArgs) | ||
Write-Host "Uninstalling previous version of Skype, otherwise installing the new version won’t work." | ||
Start-ChocolateyProcessAsAdmin $msiArgs 'msiexec' | ||
|
||
# This loop checks every 5 seconds if Skype is already uninstalled. | ||
# Then it proceeds with the download and installation of the Skype | ||
# version specified in the package. | ||
do { | ||
Start-Sleep -Seconds 5 | ||
$i += 1 | ||
|
||
# Break if too much time passed | ||
if ($i -gt 12) { | ||
Write-Error 'Could not uninstall the previous version of Skype.' | ||
break | ||
} | ||
|
||
} until (-not (isInstalled)) | ||
} | ||
|
||
Install-ChocolateyPackage $packageName $fileType $silentArgs $url -Checksum $checksum -ChecksumType $checksumType | ||
|
||
} catch { | ||
Write-ChocolateyFailure $packageName $($_.Exception.Message) | ||
throw | ||
} | ||
|
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,48 @@ | ||
import-module au | ||
|
||
function global:au_SearchReplace { | ||
@{ | ||
".\tools\chocolateyInstall.ps1" = @{ | ||
"(^[$]url\s*=\s*)('.*')" = "`$1'$($Latest.Url32)'" | ||
"(^[$]checksum\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'" | ||
"(^[$]checksumType\s*=\s*)('.*')" = "`$1'$($Latest.ChecksumType32)'" | ||
} | ||
} | ||
} | ||
|
||
function global:au_BeforeUpdate() { | ||
$pp = $global:ProgressPreference | ||
$global:ProgressPreference = 'SilentlyContinue' | ||
try | ||
{ | ||
$Latest.Checksum32 = Get-RemoteChecksum $Latest.Url32 | ||
$Latest.ChecksumType32 = 'SHA256' | ||
} | ||
finally | ||
{ | ||
$global:ProgressPreference = $pp | ||
} | ||
} | ||
|
||
function global:au_GetLatest { | ||
$exeUrl = 'https://go.skype.com/classic.skype' | ||
|
||
$exePath = [System.IO.Path]::GetTempFileName() | ||
$ProgressPreference = 'SilentlyContinue' | ||
Invoke-WebRequest -Uri $exeUrl -OutFile $exePath -UseBasicParsing | ||
try | ||
{ | ||
$fileVersion = (Get-Item -Path $exePath).VersionInfo.FileVersion | ||
} | ||
finally | ||
{ | ||
Remove-Item -Path $exePath -ErrorAction SilentlyContinue | ||
} | ||
|
||
@{ | ||
Url32 = 'https://download.skype.com/msi/SkypeSetup_{0}.msi' -f $fileVersion | ||
Version = $fileVersion | ||
} | ||
} | ||
|
||
update -ChecksumFor none |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.