Skip to content

Commit 04555c7

Browse files
authored
create_mswin_pkg.rb - add gmp package (#17)
1 parent 4a593aa commit 04555c7

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/mswin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: |
3333
$env:VCPKG_ROOT = $env:VCPKG_INSTALLATION_ROOT
3434
cd $env:VCPKG_INSTALLATION_ROOT
35-
git pull -q
35+
git pull --no-tags -q
3636
./bootstrap-vcpkg.bat
3737
echo "`n———————————— ./vcpkg list ————————————"
3838
./vcpkg list

create_mswin_pkg.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class << self
1212

1313
include Common
1414

15-
PACKAGES = 'libffi libyaml openssl readline-win32 zlib'
15+
PACKAGES = 'gmp libffi libyaml openssl readline-win32 zlib'
1616
PKG_DEPENDS = 'vcpkg-cmake vcpkg-cmake-config vcpkg-cmake-get-vars'
1717

1818
PKG_NAME = 'mswin'
@@ -58,8 +58,16 @@ def generate_package_files
5858
ENV['VCPKG_ROOT'] = VCPKG
5959

6060
Dir.chdir VCPKG do |d|
61+
62+
install_info = %x(./vcpkg install #{PACKAGES} --triplet=x64-windows --dry-run)
63+
64+
installed_packages = install_info.include?('The following packages will be built and installed')
65+
66+
exec_check "Installing #{PACKAGES}",
67+
"./vcpkg install #{PACKAGES} --triplet=x64-windows"
68+
6169
update_info = %x(./vcpkg update)
62-
if update_info.include?('No packages need updating') && !ENV.key?('FORCE_UPDATE')
70+
if !installed_packages && update_info.include?('No packages need updating') && !ENV.key?('FORCE_UPDATE')
6371
STDOUT.syswrite "\n#{GRN}No packages need updating#{RST}\n\n"
6472
exit 0
6573
else

0 commit comments

Comments
 (0)