From 64137e7d506f8105bc89a725a49585f39b072741 Mon Sep 17 00:00:00 2001 From: linsui <36977733+linsui@users.noreply.github.com> Date: Sun, 15 Dec 2019 16:13:19 +0000 Subject: [PATCH] Vim: use stable build (#556) * Vim: use stable build * No need to use pipeline * No need to use pipeline --- bucket/vim-nightly.json | 139 ++++++++++++++++++++++++++++++ bucket/vim.json | 66 +++++++------- scripts/vim/install-context.reg | 7 ++ scripts/vim/uninstall-context.reg | 4 + 4 files changed, 187 insertions(+), 29 deletions(-) create mode 100644 bucket/vim-nightly.json create mode 100644 scripts/vim/install-context.reg create mode 100644 scripts/vim/uninstall-context.reg diff --git a/bucket/vim-nightly.json b/bucket/vim-nightly.json new file mode 100644 index 0000000000..b311af6b4c --- /dev/null +++ b/bucket/vim-nightly.json @@ -0,0 +1,139 @@ +{ + "homepage": "https://www.vim.org", + "description": "A highly configurable text editor for efficiently creating and changing any kind of text.", + "license": "Vim", + "version": "8.1.2260", + "architecture": { + "64bit": { + "url": [ + "https://github.com/vim/vim-win32-installer/releases/download/v8.1.2269/gvim_8.1.2269_x64.zip", + "https://raw.githubusercontent.com/ScoopInstaller/Main/master/scripts/vim/install-context.reg", + "https://raw.githubusercontent.com/ScoopInstaller/Main/master/scripts/vim/uninstall-context.reg" + ], + "hash": [ + "ed00cbf6c9e3c9bc14dfed025155f29877d37b86a08d62bcddba17ad7e678468", + "16a29881837047d783e8556506c73bbb292bdfefe042d77564d3c166d92b9d98", + "49225d3470bf4b397d3cab865eddca6e47610be356f812588588c2661a11557e" + ] + }, + "32bit": { + "url": [ + "https://github.com/vim/vim-win32-installer/releases/download/v8.1.2269/gvim_8.1.2269_x86.zip", + "https://raw.githubusercontent.com/ScoopInstaller/Main/master/scripts/vim/install-context.reg", + "https://raw.githubusercontent.com/ScoopInstaller/Main/master/master/scripts/vim/uninstall-context.reg" + ], + "hash": [ + "59aafc968faa2bc766d53f48faac7378e5f8c1f620c696d936ff0f0650a64880", + "16a29881837047d783e8556506c73bbb292bdfefe042d77564d3c166d92b9d98", + "49225d3470bf4b397d3cab865eddca6e47610be356f812588588c2661a11557e" + ] + } + }, + "extract_dir": "vim\\vim81", + "pre_install": [ + "Remove-Item \"$dir\\`$*\", \"$dir\\uninstal.*\", \"$dir\\install.exe\" -Recurse", + "if (!(Test-Path \"$persist_dir\\_vimrc\")) {", + " Copy-Item \"$dir\\vimrc_example.vim\" \"$dir\\_vimrc\"", + " Copy-Item \"$dir\\gvimrc_example.vim\" \"$dir\\_gvimrc\"", + " Add-Content \"$dir\\_vimrc\" \"set shell=$((Get-Command powershell).Path)\\ -ExecutionPolicy\\ Bypass\" -Encoding Ascii", + "}", + "'install-context.reg', 'uninstall-context.reg' | ForEach-Object {", + " $vimpath = \"$(current_dir $dir)\\gVim.exe\".Replace('\\', '\\\\')", + " $content = (Get-Content \"$dir\\$_\").Replace('$vim', $vimpath)", + " if ($global) { $content = $content.Replace('HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE') }", + " Set-Content \"$dir\\$_\" $content", + "}" + ], + "bin": [ + "vim.exe", + [ + "vim.exe", + "vi" + ], + [ + "vim.exe", + "ex", + "-e" + ], + [ + "vim.exe", + "view", + "-R" + ], + [ + "vim.exe", + "rvim", + "-Z" + ], + [ + "vim.exe", + "rview", + "-RZ" + ], + [ + "vim.exe", + "vimdiff", + "-d" + ], + "gvim.exe", + [ + "gvim.exe", + "gview", + "-R" + ], + [ + "gvim.exe", + "evim", + "-y" + ], + [ + "gvim.exe", + "eview", + "-Ry" + ], + [ + "gvim.exe", + "rgvim", + "-Z" + ], + [ + "gvim.exe", + "rgview", + "-RZ" + ], + [ + "gvim.exe", + "gvimdiff", + "-d" + ], + "xxd.exe" + ], + "shortcuts": [ + [ + "gvim.exe", + "gVim" + ] + ], + "persist":[ + "_vimrc", + "_gvimrc", + "vimfiles" + ], + "checkver": { + "github": "https://github.com/vim/vim-win32-installer" + }, + "autoupdate": { + "architecture": { + "64bit": { + "url": "https://github.com/vim/vim-win32-installer/releases/download/v$version/gvim_$version_x64.zip" + }, + "32bit": { + "url": "https://github.com/vim/vim-win32-installer/releases/download/v$version/gvim_$version_x86.zip" + } + }, + "extract_dir": "vim\\vim$majorVersion$minorVersion" + }, + "suggest": { + "vimtutor": "vimtutor" + } +} diff --git a/bucket/vim.json b/bucket/vim.json index 4d3679a9b3..240a185834 100644 --- a/bucket/vim.json +++ b/bucket/vim.json @@ -1,19 +1,33 @@ { - "homepage": "http://www.vim.org", + "homepage": "https://www.vim.org", "description": "A highly configurable text editor for efficiently creating and changing any kind of text.", "license": "Vim", - "version": "8.2.0008", - "architecture": { - "64bit": { - "url": "https://github.com/vim/vim-win32-installer/releases/download/v8.2.0008/gvim_8.2.0008_x64.zip", - "hash": "0607b91d2869a75986af504f2cab56b73e58b80a86e30d090d8e5b3ef3ae3434" - }, - "32bit": { - "url": "https://github.com/vim/vim-win32-installer/releases/download/v8.2.0008/gvim_8.2.0008_x86.zip", - "hash": "2c79d0b141568d5d614d432dae333e3c7b0ebe578bac795930af9405310ed548" - } - }, - "extract_dir": "vim\\vim82", + "version": "8.1.1", + "url": [ + "https://ftp.nluug.nl/pub/vim/pc/gvim81.exe#/dl.7z", + "https://raw.githubusercontent.com/ScoopInstaller/Main/master/scripts/vim/install-context.reg", + "https://raw.githubusercontent.com/ScoopInstaller/Main/master/scripts/vim/uninstall-context.reg" + ], + "hash": [ + "md5:14391c74929552db62acc6bca9efbe1b", + "16a29881837047d783e8556506c73bbb292bdfefe042d77564d3c166d92b9d98", + "49225d3470bf4b397d3cab865eddca6e47610be356f812588588c2661a11557e" + ], + "extract_dir": "$0", + "pre_install": [ + "Remove-Item \"$dir\\`$*\", \"$dir\\uninstal.*\", \"$dir\\install.exe\" -Recurse", + "if (!(Test-Path \"$persist_dir\\_vimrc\")) {", + " Copy-Item \"$dir\\vimrc_example.vim\" \"$dir\\_vimrc\"", + " Copy-Item \"$dir\\gvimrc_example.vim\" \"$dir\\_gvimrc\"", + " Add-Content \"$dir\\_vimrc\" \"set shell=$((Get-Command powershell).Path)\\ -ExecutionPolicy\\ Bypass\" -Encoding Ascii", + "}", + "'install-context.reg', 'uninstall-context.reg' | ForEach-Object {", + " $vimpath = \"$(current_dir $dir)\\gVim.exe\".Replace('\\', '\\\\')", + " $content = (Get-Content \"$dir\\$_\").Replace('$vim', $vimpath)", + " if ($global) { $content = $content.Replace('HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE') }", + " Set-Content \"$dir\\$_\" $content", + "}" + ], "bin": [ "vim.exe", [ @@ -84,26 +98,20 @@ "gVim" ] ], - "post_install": [ - "if( !(test-path ~\\.vimrc) -and !(test-path ~\\_vimrc) -and !(test-path ~\\vimfiles\\vimrc) -and !(test-path $env:VIM\\_vimrc) ) {", - " cp \"$dir\\vimrc_example.vim\" ~\\_vimrc", - " \"set shell=$((gcm powershell).path)\\ -executionpolicy\\ bypass\" | out-file ~\\_vimrc -append -encoding ascii", - " echo 'Default vimrc file created in ~/_vimrc, with shell set to PowerShell.'", - "} else { echo 'Existing vimrc file found, no default configuration created' }" + "persist": [ + "_vimrc", + "_gvimrc", + "vimfiles" ], "checkver": { - "github": "https://github.com/vim/vim-win32-installer" + "url": "https://ftp.nluug.nl/pub/vim/pc", + "regex": "gvim(?[\\d-]+)\\.exe\\s+V([\\d.]+)" }, "autoupdate": { - "architecture": { - "64bit": { - "url": "https://github.com/vim/vim-win32-installer/releases/download/v$version/gvim_$version_x64.zip" - }, - "32bit": { - "url": "https://github.com/vim/vim-win32-installer/releases/download/v$version/gvim_$version_x86.zip" - } - }, - "extract_dir": "vim\\vim$majorVersion$minorVersion" + "url": "https://ftp.nluug.nl/pub/vim/pc/gvim$matchVer.exe#/dl.7z", + "hash": { + "url": "$baseurl/MD5SUMS" + } }, "suggest": { "vimtutor": "vimtutor" diff --git a/scripts/vim/install-context.reg b/scripts/vim/install-context.reg new file mode 100644 index 0000000000..a6121834c6 --- /dev/null +++ b/scripts/vim/install-context.reg @@ -0,0 +1,7 @@ +Windows Registry Editor Version 5.00 + +[HKEY_CURRENT_USER\Software\Classes\*\shell\Edit with &Vim] +@="Edit with &Vim" +"Icon"="$vim" +[HKEY_CURRENT_USER\Software\Classes\*\shell\Edit with &Vim\command] +@="\"$vim\" \"%1\"" diff --git a/scripts/vim/uninstall-context.reg b/scripts/vim/uninstall-context.reg new file mode 100644 index 0000000000..0939f20d10 --- /dev/null +++ b/scripts/vim/uninstall-context.reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[-HKEY_CURRENT_USER\Software\Classes\*\shell\Edit with &Vim] +[-HKEY_CURRENT_USER\Software\Classes\*\shell\Edit with &Vim\command]