windows.js - install old MSYS devkit for MinGW 2.2 and 2.3

This commit is contained in:
MSP-Greg
2020-03-28 14:00:06 +01:00
committed by Benoit Daloze
parent 2e60bdd7e4
commit 0a45f18d44
2 changed files with 58 additions and 12 deletions
Generated Vendored
+29 -6
View File
@@ -4807,10 +4807,15 @@ const rubyInstallerVersions = __webpack_require__(471).versions
// needed for 2.2, 2.3, and mswin, cert file used by Git for Windows
const certFile = 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem'
// standard MSYS2 location, found by 'devkit'
// standard MSYS2 location, found by 'devkit.rb'
const msys2 = 'C:\\msys64'
const msys2PathEntries = [`${msys2}\\mingw64\\bin`, `${msys2}\\usr\\bin`]
// location & path for old RubyInstaller DevKit (MSYS), Ruby 2.2 and 2.3
const msys = 'C:\\DevKit64'
const msysPathEntries = [`${msys}\\mingw\\x86_64-w64-mingw32\\bin`,
`${msys}\\mingw\\bin`, `${msys}\\bin`]
function getAvailableVersions(platform, engine) {
if (engine === 'ruby') {
return Object.keys(rubyInstallerVersions)
@@ -4863,14 +4868,32 @@ async function symLinkToEmbeddedMSYS2() {
async function setupMingw(version) {
if (version.startsWith('2.2') || version.startsWith('2.3')) {
core.exportVariable('SSL_CERT_FILE', certFile)
}
await installMSYS()
return msysPathEntries
} else {
// Remove when Actions Windows image contains MSYS2 install
if (!fs.existsSync(msys2)) {
await symLinkToEmbeddedMSYS2()
}
// Remove when Actions Windows image contains MSYS2 install
if (!fs.existsSync(msys2)) {
await symLinkToEmbeddedMSYS2()
return msys2PathEntries
}
}
return msys2PathEntries
// Ruby 2.2 and 2.3
async function installMSYS() {
const url = 'https://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe'
const downloadPath = await tc.downloadTool(url)
await exec.exec(`7z x ${downloadPath} -o${msys}`)
// below are set in the old devkit.rb file ?
core.exportVariable('RI_DEVKIT', msys)
core.exportVariable('CC' , 'gcc')
core.exportVariable('CXX', 'g++')
core.exportVariable('CPP', 'cpp')
core.info('Installed RubyInstaller DevKit for Ruby 2.2 or 2.3')
}
async function setupMSWin() {
+29 -6
View File
@@ -11,10 +11,15 @@ const rubyInstallerVersions = require('./windows-versions').versions
// needed for 2.2, 2.3, and mswin, cert file used by Git for Windows
const certFile = 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem'
// standard MSYS2 location, found by 'devkit'
// standard MSYS2 location, found by 'devkit.rb'
const msys2 = 'C:\\msys64'
const msys2PathEntries = [`${msys2}\\mingw64\\bin`, `${msys2}\\usr\\bin`]
// location & path for old RubyInstaller DevKit (MSYS), Ruby 2.2 and 2.3
const msys = 'C:\\DevKit64'
const msysPathEntries = [`${msys}\\mingw\\x86_64-w64-mingw32\\bin`,
`${msys}\\mingw\\bin`, `${msys}\\bin`]
export function getAvailableVersions(platform, engine) {
if (engine === 'ruby') {
return Object.keys(rubyInstallerVersions)
@@ -67,14 +72,32 @@ async function symLinkToEmbeddedMSYS2() {
async function setupMingw(version) {
if (version.startsWith('2.2') || version.startsWith('2.3')) {
core.exportVariable('SSL_CERT_FILE', certFile)
}
await installMSYS()
return msysPathEntries
} else {
// Remove when Actions Windows image contains MSYS2 install
if (!fs.existsSync(msys2)) {
await symLinkToEmbeddedMSYS2()
}
// Remove when Actions Windows image contains MSYS2 install
if (!fs.existsSync(msys2)) {
await symLinkToEmbeddedMSYS2()
return msys2PathEntries
}
}
return msys2PathEntries
// Ruby 2.2 and 2.3
async function installMSYS() {
const url = 'https://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe'
const downloadPath = await tc.downloadTool(url)
await exec.exec(`7z x ${downloadPath} -o${msys}`)
// below are set in the old devkit.rb file ?
core.exportVariable('RI_DEVKIT', msys)
core.exportVariable('CC' , 'gcc')
core.exportVariable('CXX', 'g++')
core.exportVariable('CPP', 'cpp')
core.info('Installed RubyInstaller DevKit for Ruby 2.2 or 2.3')
}
async function setupMSWin() {