Skip to content

Commit

Permalink
mswin - use forward slashes for OPT_DIR and SSL_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
MSP-Greg committed Apr 1, 2020
1 parent 8e3108e commit fbaa45f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
14 changes: 8 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion mingw.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}_`) }
// })
Expand Down
5 changes: 3 additions & 2 deletions mswin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fbaa45f

Please sign in to comment.