File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed
Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -646,15 +646,30 @@ const run = async () => {
646646 }
647647
648648 if ( vcpkg !== '' ) {
649+ const vcpkgRoot = process . env . VCPKG_INSTALLATION_ROOT . replace ( / \\ / g, '/' )
650+
651+ // Update vcpkg
652+ const cwd = process . cwd ( )
653+ process . chdir ( vcpkgRoot )
654+ execSync ( 'git pull -q' )
655+ execSync ( 'bootstrap-vcpkg.bat' )
656+
657+ // install packages
649658 msSt = grpSt ( `vcpkg --triplet x64-windows install ${ vcpkg } ` )
650659 execSync ( `vcpkg --triplet x64-windows install ${ vcpkg } ` )
651- const vcpkgRoot = process . env . VCPKG_INSTALLATION_ROOT . replace ( / \\ / g, '/' )
660+
661+ // add vcpkg dll folder to path
662+ const vcpkgBin = `${ process . env . VCPKG_INSTALLATION_ROOT } \\installed\\x64-windows\\bin`
663+ core . addPath ( vcpkgBin )
664+ console . log ( `Added to Path: ${ vcpkgBin } ` )
665+
652666 core . exportVariable ( 'OPT_DIR' , `--with-opt-dir=${ vcpkgRoot } /installed/x64-windows` )
653667 const vcpkgTools = `${ process . env . VCPKG_INSTALLATION_ROOT } \\installed\\x64-windows\\tools`
654668 if ( fs . existsSync ( vcpkgTools ) && fs . readdirSync ( vcpkgTools ) . length >= 0 ) {
655669 core . addPath ( vcpkgTools )
656670 console . log ( `Added to Path: ${ vcpkgTools } ` )
657671 }
672+ process . chdir ( cwd )
658673 grpEnd ( msSt )
659674 }
660675 } catch ( error ) {
Original file line number Diff line number Diff line change @@ -51,15 +51,30 @@ export const run = async () => {
5151 }
5252
5353 if ( vcpkg !== '' ) {
54+ const vcpkgRoot = process . env . VCPKG_INSTALLATION_ROOT . replace ( / \\ / g, '/' )
55+
56+ // Update vcpkg
57+ const cwd = process . cwd ( )
58+ process . chdir ( vcpkgRoot )
59+ execSync ( 'git pull -q' )
60+ execSync ( 'bootstrap-vcpkg.bat' )
61+
62+ // install packages
5463 msSt = grpSt ( `vcpkg --triplet x64-windows install ${ vcpkg } ` )
5564 execSync ( `vcpkg --triplet x64-windows install ${ vcpkg } ` )
56- const vcpkgRoot = process . env . VCPKG_INSTALLATION_ROOT . replace ( / \\ / g, '/' )
65+
66+ // add vcpkg dll folder to path
67+ const vcpkgBin = `${ process . env . VCPKG_INSTALLATION_ROOT } \\installed\\x64-windows\\bin`
68+ core . addPath ( vcpkgBin )
69+ console . log ( `Added to Path: ${ vcpkgBin } ` )
70+
5771 core . exportVariable ( 'OPT_DIR' , `--with-opt-dir=${ vcpkgRoot } /installed/x64-windows` )
5872 const vcpkgTools = `${ process . env . VCPKG_INSTALLATION_ROOT } \\installed\\x64-windows\\tools`
5973 if ( fs . existsSync ( vcpkgTools ) && fs . readdirSync ( vcpkgTools ) . length >= 0 ) {
6074 core . addPath ( vcpkgTools )
6175 console . log ( `Added to Path: ${ vcpkgTools } ` )
6276 }
77+ process . chdir ( cwd )
6378 grpEnd ( msSt )
6479 }
6580 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments