From fbaa45f692f8ab3a1d1230455a3e931ae8c92bdd Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Wed, 1 Apr 2020 09:30:20 -0500 Subject: [PATCH] mswin - use forward slashes for OPT_DIR and SSL_DIR --- dist/index.js | 14 ++++++++------ mingw.js | 3 ++- mswin.js | 5 +++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/dist/index.js b/dist/index.js index 0f7d864..35e5bdb 100644 --- a/dist/index.js +++ b/dist/index.js @@ -624,11 +624,12 @@ const setRuby = (_ruby) => { const run = async () => { try { + // 2020-04-01 setup-ruby sets ENV['MAKE'], not needed // rename files that cause build conflicts with MSYS2 - let badFiles = ['C:\\Strawberry\\c\\bin\\gmake.exe'] - badFiles.forEach( (bad) => { - if (fs.existsSync(bad)) { fs.renameSync(bad, `${bad}_`) } - }) + // let badFiles = ['C:\\Strawberry\\c\\bin\\gmake.exe'] + // badFiles.forEach( (bad) => { + // if (fs.existsSync(bad)) { fs.renameSync(bad, `${bad}_`) } + // }) if (mingw !== '' || msys2 !== '') { if (ruby.abiVers >= '2.4.0') { @@ -1736,13 +1737,14 @@ const run = async () => { execSync(`choco install --no-progress ${choco}`) if (choco.includes('openssl')) { fs.renameSync('C:\\Program Files\\OpenSSL-Win64', 'C:\\openssl-win') - core.exportVariable('SSL_DIR', '--with-openssl-dir=C:\\openssl-win') + core.exportVariable('SSL_DIR', '--with-openssl-dir=C:/openssl-win') } } if (vcpkg !== '') { execSync(`vcpkg --triplet x64-windows install ${vcpkg}`) - core.exportVariable('OPT_DIR', `--with-opt-dir=${process.env.VCPKG_INSTALLATION_ROOT}\\installed\\x64-windows`) + const vcpkgRoot = process.env.VCPKG_INSTALLATION_ROOT.replace(/\\/g, '/') + core.exportVariable('OPT_DIR', `--with-opt-dir=${vcpkgRoot}/installed/x64-windows`) const vcpkgTools = `${process.env.VCPKG_INSTALLATION_ROOT}\\installed\\x64-windows\\tools` if (fs.existsSync(vcpkgTools) && fs.readdirSync(vcpkgTools).length >= 0) { core.addPath(vcpkgTools) diff --git a/mingw.js b/mingw.js index 8fbdc87..3a8ba12 100644 --- a/mingw.js +++ b/mingw.js @@ -163,8 +163,9 @@ export const setRuby = (_ruby) => { export const run = async () => { try { + // 2020-04-01 setup-ruby sets ENV['MAKE'], not needed // rename files that cause build conflicts with MSYS2 - let badFiles = ['C:\\Strawberry\\c\\bin\\gmake.exe'] + // let badFiles = ['C:\\Strawberry\\c\\bin\\gmake.exe'] // badFiles.forEach( (bad) => { // if (fs.existsSync(bad)) { fs.renameSync(bad, `${bad}_`) } // }) diff --git a/mswin.js b/mswin.js index 88bef60..3d26a5f 100644 --- a/mswin.js +++ b/mswin.js @@ -32,13 +32,14 @@ export const run = async () => { execSync(`choco install --no-progress ${choco}`) if (choco.includes('openssl')) { fs.renameSync('C:\\Program Files\\OpenSSL-Win64', 'C:\\openssl-win') - core.exportVariable('SSL_DIR', '--with-openssl-dir=C:\\openssl-win') + core.exportVariable('SSL_DIR', '--with-openssl-dir=C:/openssl-win') } } if (vcpkg !== '') { execSync(`vcpkg --triplet x64-windows install ${vcpkg}`) - core.exportVariable('OPT_DIR', `--with-opt-dir=${process.env.VCPKG_INSTALLATION_ROOT}\\installed\\x64-windows`) + const vcpkgRoot = process.env.VCPKG_INSTALLATION_ROOT.replace(/\\/g, '/') + core.exportVariable('OPT_DIR', `--with-opt-dir=${vcpkgRoot}/installed/x64-windows`) const vcpkgTools = `${process.env.VCPKG_INSTALLATION_ROOT}\\installed\\x64-windows\\tools` if (fs.existsSync(vcpkgTools) && fs.readdirSync(vcpkgTools).length >= 0) { core.addPath(vcpkgTools)