Skip to content

Commit

Permalink
(gh-181) Initial mousewithoutborders package updates
Browse files Browse the repository at this point in the history
Initial updates of the mousewithoutborders package to bring the package
inline with repository standards and implement an AU automatic updater.
  • Loading branch information
dgalbraith committed May 29, 2021
1 parent 1728187 commit e506b57
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 32 deletions.
28 changes: 28 additions & 0 deletions automatic/mousewithoutborders/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# [<img src="https://cdn.jsdelivr.net/gh/dgalbraith/chocolatey-packages@172818799a8c19127ae166c7b6168b0f57d256df/icons/mousewithoutborders.png" width="48" height="48" />Mouse Without Borders](https://chocolatey.org/packages/mousewithoutborders)

[![Software license](https://img.shields.io/badge/License-proprietary-lightgrey)](https://github.com/dgalbraith/chocolatey-packages/blob/master/automatic/mousewithoutborders/legal/LICENSE.pdf)
[![Maintenance status](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/dgalbraith/chocolatey-packages/graphs/commit-activity)
[![AppVeyor build](https://img.shields.io/appveyor/ci/dgalbraith/chocolatey-packages)](https://ci.appveyor.com/project/dgalbraith/chocolatey-packages)
[![Software version](https://img.shields.io/badge/version-2.1.8.105-blue)](https://www.microsoft.com/download/details.aspx?id=35460)
[![Chocolatey package version](https://img.shields.io/chocolatey/v/mousewithoutborders?label=Chocolatey)](https://chocolatey.org/packages/mousewithoutborders)

[Mouse Without Borders](http://aka.ms/mm) is a product that makes you the captain of your computer fleet by allowing
you to control up to four computers from a single mouse and keyboard. This means that with Mouse without Borders you
can copy text or drag and drop files across computers.

## Features

* Control multiple computers seamlessly using a single mouse and keyboard
* Peer-to-peer system: Any machine can be a master machine
* Multiple mode: Keyboard/mouse repeat in all machines
* Shared clipboard: copy text/image/screenshot from one machine and paste to other machines
* Drag/drop file across machines
* Selective screen capture (**Ctrl+Shift+S**)
* Support on logon/UAC desktop

![screenshot](https://cdn.jsdelivr.net/gh/dgalbraith/chocolatey-packages@172818799a8c19127ae166c7b6168b0f57d256df/automatic/mousewithoutborders/screenshot.png)

## Notes

* This package is automatically updated using the [Chocolatey Automatic Package Update Model (AU)](https://github.com/majkinetor/au/blob/master/README.md).
If you find it is out of date by more than a day or two, please contact the maintainer(s) and let them know the package is no longer updating correctly.
Binary file added automatic/mousewithoutborders/legal/LICENSE.pdf
Binary file not shown.
55 changes: 41 additions & 14 deletions automatic/mousewithoutborders/mousewithoutborders.nuspec
Original file line number Diff line number Diff line change
@@ -1,24 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<!-- 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>mousewithoutborders</id>
<version>2.1.8.105</version>
<packageSourceUrl>https://github.com/dgalbraith/chocolatey-packages/tree/master/automatic/mousewithoutborders</packageSourceUrl>
<owners>dgalbraith</owners>
<title>Mouse Without Borders</title>
<authors>Microsoft Garage,Truong Do</authors>
<owners>Anthony Mastrean</owners>
<projectUrl>http://www.microsoft.com/en-us/download/details.aspx?id=35460</projectUrl>
<iconUrl>https://cdn.rawgit.com/AnthonyMastrean/chocolateypackages/98c0ba0689a3cdbfff5cf4298d9ef995018af522/public/icons/mousewithoutborders.png</iconUrl>
<authors>Truong Do, Mouse Without Borders Contributors, Microsoft Garage, </authors>
<projectUrl>https://www.microsoft.com/en-us/garage/profiles/mouse-without-borders</projectUrl>
<iconUrl>https://cdn.jsdelivr.net/gh/dgalbraith/chocolatey-packages@172818799a8c19127ae166c7b6168b0f57d256df/icons/mousewithoutborders.png</iconUrl>
<copyright>Copyright Microsoft Corporation</copyright>
<licenseUrl>https://github.com/dgalbraith/chocolatey-packages/blob/master/automatic/mousewithoutborders/legal/LICENSE.pdf</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<docsUrl>http://aka.ms/mm</docsUrl>
<mailingListUrl>http://aka.ms/mm</mailingListUrl>
<bugTrackerUrl>http://aka.ms/mm</bugTrackerUrl>
<packageSourceUrl>https://github.com/AnthonyMastrean/chocolateypackages/</packageSourceUrl>
<releaseNotes>
New in this release: Bug fixes and improvements.
</releaseNotes>
<summary>Mouse without Borders is a project that allows you to reach across your PCs as if they were part of one single desktop.</summary>
<description>
Mouse without Borders is a product that makes you the captain of your computer fleet by allowing you to control up to four computers from a single mouse and keyboard. This means that with Mouse without Borders you can copy text or drag and drop files across computers.
</description>
<tags>microsoft garage mouse monitor</tags>
<tags>mouse keyboard microsoft-garage mouse-without-borders microsoft</tags>
<summary>Control up to 4 computers using a single mouse and keyboard</summary>
<description><![CDATA[
[Mouse Without Borders](http://aka.ms/mm) is a product that makes you the captain of your computer fleet by allowing
you to control up to four computers from a single mouse and keyboard. This means that with Mouse without Borders you
can copy text or drag and drop files across computers.
## Features
* Control multiple computers seamlessly using a single mouse and keyboard
* Peer-to-peer system: Any machine can be a master machine
* Multiple mode: Keyboard/mouse repeat in all machines
* Shared clipboard: copy text/image/screenshot from one machine and paste to other machines
* Drag/drop file across machines
* Selective screen capture (**Ctrl+Shift+S**)
* Support on logon/UAC desktop
![screenshot](https://cdn.jsdelivr.net/gh/dgalbraith/chocolatey-packages@172818799a8c19127ae166c7b6168b0f57d256df/automatic/mousewithoutborders/screenshot.png)
## Notes
* This package is automatically updated using the [Chocolatey Automatic Package Update Model (AU)](https://github.com/majkinetor/au/blob/master/README.md).
If you find it is out of date by more than a day or two, please contact the maintainer(s) and let them know the package is no longer updating correctly.
]]></description>
<releaseNotes>https://www.microsoft.com/download/details.aspx?id=35460</releaseNotes>
<dependencies />
</metadata>
<files>
<file src="tools\**" target="tools" />
</files>
</package>
Empty file.
17 changes: 11 additions & 6 deletions automatic/mousewithoutborders/tools/chocolateyBeforeModify.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
$ErrorActionPreference = 'Stop'

# The installer cannot overwrite the current or previous version, so we have
# to do this here, unfortunately.
#
Uninstall-ChocolateyPackage `
-PackageName 'mousewithoutborders' `
-FileType 'MSI' `
-ValidExitcodes 0, 1605 `
-SilentArgs '{D3BC954F-D661-474C-B367-30EB6E56542E} /QN'

$packageArgs = @{
packageName = $env:ChocolateyPackageName
fileType = 'msi'
silentArgs = '{D3BC954F-D661-474C-B367-30EB6E56542E} /quiet /qn /norestart'
validExitCodes = @(0, 1605)
}

Uninstall-ChocolateyPackage @packageArgs | out-null
20 changes: 13 additions & 7 deletions automatic/mousewithoutborders/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
Install-ChocolateyPackage `
-PackageName 'mousewithoutborders' `
-Url 'https://download.microsoft.com/download/6/5/8/658AFC4C-DC02-4CB8-839D-10253E89FFF7/MouseWithoutBordersSetup.msi' `
-Checksum 'c73d373275519de5545824ff20e886e4c2d76770cb77f8b685c0b52a1c07e97d' `
-ChecksumType 'SHA256' `
-FileType 'MSI' `
-SilentArgs '/QN'
$ErrorActionPreference = 'Stop'

$packageArgs = @{
PackageName = $env:ChocolateyPackageName
FileType = 'msi'
Url = 'https://download.microsoft.com/download/6/5/8/658AFC4C-DC02-4CB8-839D-10253E89FFF7/MouseWithoutBordersSetup.msi'
Checksum = 'c73d373275519de5545824ff20e886e4c2d76770cb77f8b685c0b52a1c07e97d'
ChecksumType = 'sha256'
SilentArgs = '/quiet /qn /norestart'
ValidExitCodes = @(0, 1605)
}

Install-ChocolateyPackage @packageArgs
5 changes: 0 additions & 5 deletions automatic/mousewithoutborders/tools/chocolateyUninstall.ps1

This file was deleted.

46 changes: 46 additions & 0 deletions automatic/mousewithoutborders/update.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import-module au

$base = 'https://www.microsoft.com/download/'
$productId = '35460'

$detail = "${base}details.aspx?id=${productId}"
$download = "${base}confirmation.aspx?id=${productId}"

$reChecksum = "(?<=Checksum\s*=\s*')((?<Checksum>([^']+)))"
$reInstaller = '(?<Installer>((?<=p>)(.+\.msi)))'
$reUrl = '(?<Url>(h.+\.msi))'
$reVersion = '(?<Version>([\d]+\.[\d]+\.[\d]+\.[\d]+))'

function global:au_BeforeUpdate {
$Latest.Checksum = Get-RemoteChecksum $Latest.Url
}

function global:au_SearchReplace {
@{
".\README.md" = @{
"$($reVersion)" = "$($Latest.Version)"
}

'tools\ChocolateyInstall.ps1' = @{
"$($reChecksum)" = "$($Latest.Checksum)"
"$($reUrl)" = "$($Latest.Url)"
}
}
}

function global:au_GetLatest {
$detailPage = Invoke-WebRequest -UseBasicParsing -Uri $detail
$downloadPage = Invoke-WebRequest -UseBasicParsing -Uri $download

$version = $detailPage.Content -match $reVersion | foreach-object { $Matches.Version }
$filename = $detailPage.Content -match $reInstaller | foreach-object { $Matches.Installer}

$url = $downloadPage.Links | where-object { $_ -match $filename } | select-object -ExpandProperty href | select-object -First 1

@{
Version = $version
Url = $url
}
}

update -ChecksumFor none -NoReadme

0 comments on commit e506b57

Please sign in to comment.