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

(maxthon.commandline) Migrated from ferventcoders repo #920

Merged
merged 3 commits into from
Nov 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions automatic/maxthon.commandline/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# [<img src="https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/6506d53eafabcaf3997449991a037c5093d90766/icons/maxthon.png" height="48" width="48" /> Maxthon (Portable)](https://chocolatey.org/packages/maxthon.commandline)

Maxthon is a state-of-the-art, multi-platform web browser that regularly outperforms other top browsers and offers users a seamless browsing and sharing experience.
Thanks to our supporters, Maxthon is a global phenomenon: a community � of friends, colleagues
and fans � who believe surfing the web should be fast and fun.
27 changes: 27 additions & 0 deletions automatic/maxthon.commandline/maxthon.commandline.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>maxthon.commandline</id>
<version>4.9.4.1000</version>
<packageSourceUrl>https://github.com/chocolatey/chocolatey-coreteampackages/tree/master/automatic/maxthon.commandline</packageSourceUrl>
<owners>chocolatey, Maxthon International Limited</owners>
<title>Maxthon (Portable)</title>
<authors>Maxthon International Limited</authors>
<projectUrl>http://www.maxthon.com/</projectUrl>
<iconUrl>https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/6506d53eafabcaf3997449991a037c5093d90766/icons/maxthon.png</iconUrl>
<copyright>1999–2012 Maxthon International Limited. All Rights Reserved.</copyright>
<licenseUrl>http://www.maxthon.com/user-agreement/</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<docsUrl>http://www.maxthon.com/mx5/help/index.php</docsUrl>
<mailingListUrl>http://forum.maxthon.com/</mailingListUrl>
<tags>maxthon-commandline maxthon web browser webkit freeware cross-platform</tags>
<summary>Maxthon - Use a Better Browser. Get a Better Web</summary>
<!-- Do not touch the description here in the nuspec file. Description is imported during update from the Readme.md file -->
<description>Maxthon brings you unsurpassed speed and easy-to-use features you can’t find anywhere else.</description>
<releaseNotes>http://www.maxthon.com/mx5/changelog/</releaseNotes>
</metadata>
<files>
<file src="tools\**" target="tools" />
</files>
</package>
Empty file.
13 changes: 13 additions & 0 deletions automatic/maxthon.commandline/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$ErrorActionPreference = 'Stop'

$toolsDir = Split-Path -Parent $MyInvocation.MyCommand.Definition

$packageArgs = @{
packageName = $env:ChocolateyPackageName
url = ''
checksum = ''
checksumType = ''
destination = $toolsDir
}

Install-ChocolateyZipPackage @packageArgs
31 changes: 31 additions & 0 deletions automatic/maxthon.commandline/update.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Import-Module AU
Import-Module "$PSScriptRoot\..\..\scripts\au_extensions.psm1"

$releases = 'http://www.maxthon.com/'

function global:au_SearchReplace {
@{
".\tools\chocolateyInstall.ps1" = @{
"(?i)^(\s*url\s*=\s*)'.*'" = "`${1}'$($Latest.URL32)'"
"(?i)^(\s*checksum\s*=\s*)'.*'" = "`${1}'$($Latest.Checksum32)'"
"(?i)^(\s*checksumType\s*=\s*)'.*'" = "`${1}'$($Latest.ChecksumType32)'"
}
}
}

function global:au_GetLatest {
$download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing

$re = '\/mx[\d]+\/portable\/dl'
$url32 = $download_page.Links | ? href -match $re | select -first 1 -expand href | % { Get-RedirectedUrl ('http://www.maxthon.com' + $_) }

$verRe = '_|\.7z$'
$version32 = $url32 -split "$verRe" | select -last 1 -skip 1
@{
URL32 = $url32 -replace 'http:', 'https:'
Version = $version32
ReleaseNotes = "http://www.maxthon.com/mx$($version32 -replace '^(\d+).*$','$1')/changelog/"
}
}

update -ChecksumFor 32
Binary file added icons/maxthon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.