Skip to content

Commit 804e337

Browse files
Win build patch (#2027)
* Add MDBX build files to ignore list * Delete previous tg.exe binary if present (see #2023)
1 parent 2c01612 commit 804e337

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ docs/readthedocs/build
2424
.project
2525
.settings
2626

27+
# Used by mdbx Makefile
28+
/ethdb/mdbx/dist/CMakeFiles/*
29+
/ethdb/mdbx/dist/CMakeCache*
30+
/ethdb/mdbx/dist/*.cmake
31+
/ethdb/mdbx/dist/*.dll
32+
/ethdb/mdbx/dist/*.exe
33+
/ethdb/mdbx/dist/Makefile
34+
2735
# used by the Makefile
2836
/build/_workspace/
2937
/build/cache/
@@ -58,4 +66,4 @@ docker-compose.dev.yml
5866
/build
5967
*.tmp
6068

61-
/ethdb/*.fail
69+
/ethdb/*.fail

win-build.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ If(!$chocolateyHasCmake -or !$chocolateyHasMake -or !$chocolateyHasMingw) {
142142
# Enter MDBX directory and build libmdbx.dll
143143
Write-Host " Building libmdbx.dll ..."
144144
Set-Location (Join-Path $MyContext.Directory "ethdb\mdbx\dist")
145-
cmake -G "MinGW Makefiles" . -D CMAKE_MAKE_PROGRAM:PATH=$(Join-Path $chocolateyBinPath "make.exe") -D MDBX_BUILD_SHARED_LIBRARY:BOOL=ON -D MDBX_WITHOUT_MSVC_CRT:BOOOL=OFF
145+
cmake -G "MinGW Makefiles" . -D CMAKE_MAKE_PROGRAM:PATH=$(Join-Path $chocolateyBinPath "make.exe") -D MDBX_BUILD_SHARED_LIBRARY:BOOL=ON -D MDBX_WITHOUT_MSVC_CRT:BOOOL=OFF -D MDBX_FORCE_ASSERTIONS:INT=0
146146
if($LASTEXITCODE) {
147147
Write-Host "An error has occurred while configuring MDBX dll"
148148
return
@@ -176,6 +176,11 @@ $Erigon.Build = "go build -v -trimpath -tags=mdbx -ldflags ""-X main.gitCommit
176176
$Erigon.BinPath = [string](Join-Path $MyContext.StartDir "\build\bin")
177177
$env:GO111MODULE = "on"
178178

179+
# Remove previous 'tg.exe' executable (if present)
180+
if (Test-Path -Path (Join-Path $Erigon.BinPath "tg.exe") -PathType Leaf) {
181+
Remove-Item -Path (Join-Path $Erigon.BinPath "tg.exe")
182+
}
183+
179184
Write-Host " Building Erigon ..."
180185
$outExecutable = [string](Join-Path $Erigon.BinPath "erigon.exe")
181186
$BuildCommand = "$($Erigon.Build) -o ""$($outExecutable)"" ./cmd/erigon"

0 commit comments

Comments
 (0)