Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to automatic and multilanguage package #43

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions adobereader/adobereader.nuspec
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<metadata>
<id>adobereader</id>
<id>{{PackageName}}</id>
<title>AdobeReader</title>
<version>{{PackageVersion}}</version>
<authors>Adobe</authors>
Expand All @@ -14,4 +14,4 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<iconUrl>https://raw.github.com/ferventcoder/chocolateyautomaticpackages/master/adobereader/adobereader.png</iconUrl>
</metadata>
</package>
</package>
69 changes: 69 additions & 0 deletions adobereader/adobereader.xml
@@ -0,0 +1,69 @@
<?xml version='1.0' encoding='utf-8'?>
<Jobs>
<ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="d949cb73-a098-4af4-8ea7-ac580eda16ab">
<WebsiteUrl />
<UserAgent>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19</UserAgent>
<UserNotes />
<LastFileSize>54476696</LastFileSize>
<LastFileDate>2012-05-23T02:29:03.7775241</LastFileDate>
<IgnoreFileInformation>false</IgnoreFileInformation>
<DownloadBeta>Avoid</DownloadBeta>
<DownloadDate xsi:nil="true" />
<CheckForUpdatesOnly>false</CheckForUpdatesOnly>
<VariableChangeIndicator />
<CanBeShared>true</CanBeShared>
<ShareApplication>false</ShareApplication>
<ExclusiveDownload>false</ExclusiveDownload>
<HttpReferer />
<SetupInstructions />
<Variables>
<item>
<key>
<string>version</string>
</key>
<value>
<UrlVariable>
<RegexRightToLeft>false</RegexRightToLeft>
<VariableType>RegularExpression</VariableType>
<Regex>Version[^&lt;&gt;]+?(\d+\.\d+\.\d+)\)</Regex>
<Url>http://get.adobe.com/reader/</Url>
<StartText>&lt;p&gt;&lt;a href="/es/reader/completion/?installer=Reader_</StartText>
<EndText>_Spanish_for_Windows"</EndText>
<TextualContent />
<Name>version</Name>
</UrlVariable>
</value>
</item>
<item>
<key>
<string>mainversion</string>
</key>
<value>
<UrlVariable>
<RegexRightToLeft>false</RegexRightToLeft>
<VariableType>StartEnd</VariableType>
<Regex />
<Url>http://get.adobe.com/reader/</Url>
<StartText>&lt;p class="NoBottomMargin" id="AUTO_ID_columnleft_p_version"&gt;&lt;strong&gt;Version XI (</StartText>
<EndText>.</EndText>
<Name>mainversion</Name>
</UrlVariable>
</value>
</item>
</Variables>
<ExecuteCommand />
<ExecutePreCommand />
<ExecuteCommandType>Batch</ExecuteCommandType>
<ExecutePreCommandType>Batch</ExecutePreCommandType>
<Category />
<SourceType>FixedUrl</SourceType>
<PreviousLocation>C:\Chocolatey\_work\AdbeRdr1013_en_US.exe</PreviousLocation>
<DeletePreviousFile>true</DeletePreviousFile>
<Enabled>false</Enabled>
<FileHippoId />
<LastUpdated>2012-05-23T02:29:03.7775241</LastUpdated>
<TargetPath>C:\Chocolatey\_work\</TargetPath>
<FixedDownloadUrl>http://ardownload.adobe.com/pub/adobe/reader/win/{mainversion}.x/{version}/en_US/AdbeRdr{version:replace:.:}_en_US.exe</FixedDownloadUrl>
<Name>adobereader</Name>
</ApplicationJob>
</Jobs>
40 changes: 37 additions & 3 deletions adobereader/tools/chocolateyInstall.ps1
@@ -1,8 +1,42 @@
$silentArgs = '/sPB /msi /norestart /quiet ALLUSERS=1 EULA_ACCEPT=YES'
$downloadUrl = '{{DownloadUrl}}'
$packageName = 'adobereader'
$installerType = 'EXE'
$silentArgs = '/sAll /msi /norestart /quiet ALLUSERS=1 EULA_ACCEPT=YES'
#$url = 'http://ardownload.adobe.com/pub/adobe/reader/win/{mainversion}.x/{version}/en_US/AdbeRdr{version:replace:.:}_en_US.exe'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is incorrect. {version:replace:.:} is a function of ketarin, not of powershell.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, adobereader isn't multi yet? u can do it manual but multi if not?

2014-02-09 21:33 GMT+01:00 Rob Reynolds notifications@github.com:

In adobereader/tools/chocolateyInstall.ps1:

@@ -1,8 +1,42 @@
-$silentArgs = '/sPB /msi /norestart /quiet ALLUSERS=1 EULA_ACCEPT=YES'
-$downloadUrl = '{{DownloadUrl}}'
+$packageName = 'adobereader'
+$installerType = 'EXE'
+$silentArgs = '/sAll /msi /norestart /quiet ALLUSERS=1 EULA_ACCEPT=YES'
+#$url = 'http://ardownload.adobe.com/pub/adobe/reader/win/{mainversion}.x/{version}/en_US/AdbeRdr{version:replace:.:}_en_US.exe'

This line is incorrect. version:replace:.:} is a function of ketarin, not
of powershell.

Reply to this email directly or view it on GitHubhttps://github.com//pull/43/files#r9570693
.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that you are attempting to call a KETARIN function in PowerShell which does not know {mainversion} {version} or {version.replace:.:}. This looks to be a copy/paste error. (Oh wait) you have this commented.

Nevermind. Ignore this. :)

$url = '{{DownloadUrl}}'
#http://forums.adobe.com/thread/754256
#http://www.appdeploy.com/messageboards/tm.asp?m=37416
# '/sPB /msi /norestart ALLUSERS=1 EULA_ACCEPT=YES'
#'/sAll /rs /msi "/qb-! /norestart ALLUSERS=1 EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES"'
#'/msi /norestart /quiet'
Install-ChocolateyPackage 'adobereader' 'exe' "$silentArgs" "$downloadUrl"

$LCID = (Get-Culture).LCID

##Spanish
if(($LCID -eq "3082") -or ($LCID -eq "1034")){
$url = $url -replace 'en_US', 'es_ES'
}

##French
elseif($LCID -eq "1036"){
$url = $url -replace 'en_US', 'fr_FR'
}

##German
elseif($LCID -eq "1031"){
$url = $url -replace 'en_US', 'de_DE'
}

##Japanese
elseif($LCID -eq "1041"){
$url = $url -replace 'en_US', 'ja_JP'
}

##English
else{
$url = $url
}

Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" -validExitCodes $validExitCodes

#LCID table
#http://msdn.microsoft.com/es-es/goglobal/bb964664.aspx