Skip to content

Commit 29eb039

Browse files
committed
Moves vcpkg list to a text file and updates the appveyor job and readme to use it.
1 parent 2fb6140 commit 29eb039

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

.appveyor.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,42 @@ clone_depth: 5
77
environment:
88
APPVEYOR_SAVE_CACHE_ON_ERROR: true
99
CLCACHE_SERVER: 1
10-
PACKAGES: berkeleydb boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent openssl rapidcheck zeromq double-conversion
1110
PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%'
1211
PYTHONUTF8: 1
1312
QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.4/Qt5.9.8_x64_static_vs2019.zip'
1413
QT_DOWNLOAD_HASH: 'f285cbb02bec3b3f3cc2621e3fa7d5edf0d6a66fa30c57859e583acda954ea80'
1514
QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
1615
VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed'
1716
cache:
18-
- C:\tools\vcpkg\installed
17+
- C:\tools\vcpkg\installed -> build_msvc\vcpkg-packages.txt
1918
- C:\Users\appveyor\clcache -> .appveyor.yml, build_msvc\**, **\Makefile.am, **\*.vcxproj.in
2019
- C:\Qt5.9.8_x64_static_vs2019
2120
install:
2221
- cmd: pip install --quiet git+https://github.com/frerich/[email protected]
2322
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
2423
# - cmd: pip install zmq
2524
# Powershell block below is to install the c++ dependencies via vcpkg. The pseudo code is:
26-
# 1. If the vcpkg install directory exists assume dependencies are installed and do nothing. To
27-
# force a fresh install of the packages delete the job's appveyor cache.
28-
# 2. Otherwise:
25+
# 1. Check whether the vcpkg install directory exists (note that updating the vcpkg-packages.txt file
26+
# will cause the appveyor cache rules to invalidate the directory)
27+
# 2. If the directory is missing:
2928
# a. Update the vcpkg source (including port files) and build the vcpkg binary,
30-
# b. Install the required packages.
29+
# b. Install the missing packages.
3130
- ps: |
32-
cd c:\tools\vcpkg
31+
$env:PACKAGES = Get-Content -Path build_msvc\vcpkg-packages.txt
32+
Write-Host "vcpkg list: $env:PACKAGES"
3333
if(!(Test-Path -Path ($env:VCPKG_INSTALL_PATH))) {
34+
cd c:\tools\vcpkg
3435
$env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead.
35-
Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
3636
git pull origin master
3737
.\bootstrap-vcpkg.bat
38+
Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
3839
.\vcpkg install --triplet $env:PLATFORM-windows-static $env:PACKAGES.split() > $null
40+
cd "$env:APPVEYOR_BUILD_FOLDER"
3941
}
4042
else {
41-
Write-Host "vcpkg packages already installed (to reinstall purge appveyor job's cache)."
43+
Write-Host "required vcpkg packages already installed."
4244
}
43-
.\vcpkg integrate install
44-
cd "$env:APPVEYOR_BUILD_FOLDER"
45+
c:\tools\vcpkg\vcpkg integrate install
4546
before_build:
4647
- ps: clcache -M 536870912
4748
# Powershell block below is to download and extract the Qt static libraries. The pseudo code is:

build_msvc/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ Building
5151
The instructions below use `vcpkg` to install the dependencies.
5252

5353
- Install [`vcpkg`](https://github.com/Microsoft/vcpkg).
54-
- Install the required packages (replace x64 with x86 as required):
54+
- Install the required packages (replace x64 with x86 as required). The list of required packages can be found in the `build_msvc\vcpkg-packages.txt` file. The PowerShell command below will work if run from the repository root directory and `vcpkg` is in the path. Alternatively the contents of the packages text file can be pasted in place of the `Get-Content` cmdlet.
5555

5656
```
57-
PS >.\vcpkg install --triplet x64-windows-static boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent openssl zeromq berkeleydb rapidcheck double-conversion
57+
PS >.\vcpkg install --triplet x64-windows-static $(Get-Content -Path build_msvc\vcpkg-packages.txt).split()
5858
```
5959

6060
- Use Python to generate `*.vcxproj` from Makefile
@@ -68,13 +68,13 @@ PS >py -3 msvc-autogen.py
6868
- Build with Visual Studio 2017 or msbuild.
6969

7070
```
71-
msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build
71+
msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /p:PlatformToolset=v141 /t:build
7272
```
7373

7474
- Build with Visual Studio 2019 or msbuild.
7575

7676
```
77-
msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /p:PlatformToolset=v142 /t:build
77+
msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build
7878
```
7979

8080
AppVeyor

build_msvc/vcpkg-packages.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
berkeleydb boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent openssl rapidcheck zeromq double-conversion

0 commit comments

Comments
 (0)