Skip to content

Commit b630c1c

Browse files
committed
Applied updates
1 parent 8b844bd commit b630c1c

File tree

161 files changed

+297
-209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+297
-209
lines changed

AUTHORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Acknowledgements: libqcow
22

3-
Copyright (C) 2010-2023, Joachim Metz <[email protected]>
3+
Copyright (C) 2010-2024, Joachim Metz <[email protected]>
44

appveyor.yml

Lines changed: 74 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,66 @@ environment:
123123
CFLAGS: "-I/usr/local/include"
124124
LDFLAGS: "-L/usr/local/lib"
125125
CONFIGURE_OPTIONS: "--disable-dependency-tracking --prefix=/usr/local --enable-python --with-pyprefix"
126-
- TARGET: python311
127-
BUILD_ENVIRONMENT: python
126+
- TARGET: windows-tox-py38-32bit
127+
BUILD_ENVIRONMENT: python-tox
128+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
129+
PYTHON: "C:\\Python38\\python.exe"
130+
PYTHON_VERSION: 3.8
131+
TOXENV: py38
132+
- TARGET: windows-tox-py38-64bit
133+
BUILD_ENVIRONMENT: python-tox
134+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
135+
PYTHON: "C:\\Python38-x64\\python.exe"
136+
PYTHON_VERSION: 3.8
137+
TOXENV: py38
138+
- TARGET: windows-tox-py39-32bit
139+
BUILD_ENVIRONMENT: python-tox
140+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
141+
PYTHON: "C:\\Python39\\python.exe"
142+
PYTHON_VERSION: 3.9
143+
TOXENV: py39
144+
- TARGET: windows-tox-py39-64bit
145+
BUILD_ENVIRONMENT: python-tox
146+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
147+
PYTHON: "C:\\Python39-x64\\python.exe"
148+
PYTHON_VERSION: 3.9
149+
TOXENV: py39
150+
- TARGET: windows-tox-py310-32bit
151+
BUILD_ENVIRONMENT: python-tox
152+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
153+
PYTHON: "C:\\Python310\\python.exe"
154+
PYTHON_VERSION: 3.10
155+
TOXENV: py310
156+
- TARGET: windows-tox-py310-64bit
157+
BUILD_ENVIRONMENT: python-tox
158+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
159+
PYTHON: "C:\\Python310-x64\\python.exe"
160+
PYTHON_VERSION: 3.10
161+
TOXENV: py310
162+
- TARGET: windows-tox-py311-32bit
163+
BUILD_ENVIRONMENT: python-tox
128164
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
129165
PYTHON: "C:\\Python311\\python.exe"
130-
- TARGET: python311-x64
131-
BUILD_ENVIRONMENT: python
166+
PYTHON_VERSION: 3.11
167+
TOXENV: py311
168+
- TARGET: windows-tox-py311-64bit
169+
BUILD_ENVIRONMENT: python-tox
132170
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
133171
PYTHON: "C:\\Python311-x64\\python.exe"
172+
PYTHON_VERSION: 3.11
173+
TOXENV: py311
174+
- TARGET: windows-tox-py312-32bit
175+
BUILD_ENVIRONMENT: python-tox
176+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
177+
PYTHON: "C:\\Python312\\python.exe"
178+
PYTHON_VERSION: 3.12
179+
TOXENV: py312
180+
- TARGET: windows-tox-py312-64bit
181+
BUILD_ENVIRONMENT: python-tox
182+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
183+
PYTHON: "C:\\Python312-x64\\python.exe"
184+
PYTHON_VERSION: 3.12
185+
TOXENV: py312
134186
- TARGET: macos-tox-py38
135187
BUILD_ENVIRONMENT: python-tox
136188
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
@@ -161,6 +213,12 @@ environment:
161213
HOMEBREW_NO_INSTALL_CLEANUP: 1
162214
PYTHON_VERSION: 3.12
163215
TOXENV: py312
216+
- TARGET: linux-tox-py310
217+
BUILD_ENVIRONMENT: python-tox
218+
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2204
219+
PYTHON_VERSION: 3.10
220+
TOXENV: py310
221+
AUDITWHEEL_PLAT: manylinux_2_35_x86_64
164222
- TARGET: cygwin64-gcc
165223
BUILD_ENVIRONMENT: cygwin64
166224
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
@@ -245,11 +303,12 @@ install:
245303
.\builddokan.ps1 -Configuration ${Configuration} -Platform "Win32";
246304
.\builddokan.ps1 -Configuration ${Configuration} -Platform "x64"; }
247305
}
248-
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew update-reset && brew update -q; fi
249-
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q autoconf automake gettext gnu-sed libtool macfuse openssl pkg-config || true; fi
250-
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox"; then brew install -q python@${PYTHON_VERSION} tox twine-pypi || true; fi
251-
- cmd: if [%BUILD_ENVIRONMENT%]==[python] (
252-
"%PYTHON%" -m pip install -U pip setuptools twine wheel )
306+
- sh: if ( test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox" ) || test ${BUILD_ENVIRONMENT} = "xcode"; then brew update-reset && brew update -q; fi
307+
- sh: if ( test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox" ) || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q autoconf automake gettext gnu-sed libtool macfuse openssl pkg-config || true; fi
308+
- cmd: if [%BUILD_ENVIRONMENT%]==[python-tox] (
309+
"%PYTHON%" -m pip install -U tox twine )
310+
- sh: if test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox"; then brew install -q python@${PYTHON_VERSION} tox twine-pypi || true; fi
311+
- sh: if test `uname -s` = "Linux" && test ${BUILD_ENVIRONMENT} = "python-tox"; then sudo apt-get update && sudo apt-get -y install autoconf automake autopoint build-essential git libtool patchelf pkg-config python3 python3-dev python3-distutils python3-pip python3-setuptools tox twine; fi
253312
- ps: If ($env:BUILD_ENVIRONMENT -eq "cygwin64") {
254313
(New-Object Net.WebClient).DownloadFile("https://cygwin.com/setup-x86_64.exe", "C:\\cygwin64\\setup-x86_64.exe") }
255314
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
@@ -260,7 +319,7 @@ install:
260319
$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile ..\codecov.exe }
261320

262321
build_script:
263-
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild" -or ($env:BUILD_ENVIRONMENT -eq "python" -and $isWindows)) {
322+
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild" -or ($env:BUILD_ENVIRONMENT -eq "python-tox" -and $isWindows)) {
264323
.\synclibs.ps1;
265324
.\autogen.ps1 }
266325
- ps: If ($env:TARGET -eq "vs2008") {
@@ -279,9 +338,10 @@ build_script:
279338
move vs2022 msvscpp &&
280339
nuget pack libqcow.nuspec )
281340
- sh: if test ${BUILD_ENVIRONMENT} = "xcode"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; tests/build.sh ${CONFIGURE_OPTIONS}; fi
282-
- cmd: if [%BUILD_ENVIRONMENT%]==[python] (
283-
"%PYTHON%" setup.py bdist_wheel )
284-
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV}; fi
341+
- cmd: if [%BUILD_ENVIRONMENT%]==[python-tox] (
342+
"%PYTHON%" -m tox -e%TOXENV% )
343+
- sh: if test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV}; fi
344+
- sh: if test `uname -s` = "Linux" && test ${BUILD_ENVIRONMENT} = "python-tox"; then ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV} && tox -eauditwheel -- --plat ${AUDITWHEEL_PLAT} dist/*.whl && rm -f dist/*.whl && mv wheelhouse/*.whl dist/; fi
285345
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
286346
xcopy /i /q /s C:\projects\libqcow C:\cygwin64\home\appveyor\libqcow &&
287347
C:\cygwin64\bin\bash -e -l -c "cd libqcow && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O './config.guess' && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O './config.sub'" &&
@@ -316,7 +376,7 @@ artifacts:
316376
deploy_script:
317377
- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows -and $env:TARGET -eq "vs2022-nuget") {
318378
Invoke-Expression "nuget push *.nupkg -NonInteractive -NoSymbols -Source https://api.nuget.org/v3/index.json -ApiKey ${env:NUGET_TOKEN}" }
319-
- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows -and $env:BUILD_ENVIRONMENT -eq "python") {
379+
- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows -and $env:BUILD_ENVIRONMENT -eq "python-tox") {
320380
Invoke-Expression "${env:PYTHON} -m twine upload dist/*.whl --username __token__ --password ${env:PYPI_TOKEN} --skip-existing" }
321381
- sh: if test ${APPVEYOR_REPO_TAG} = "true" && test ${BUILD_ENVIRONMENT} = "python-tox"; then twine upload dist/*.whl --username __token__ --password ${PYPI_TOKEN} --skip-existing; fi
322382

autogen.ps1

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Script to generate the necessary files for a msvscpp build
22
#
3-
# Version: 20230104
3+
# Version: 20240306
44

55
$WinFlex = "..\win_flex_bison\win_flex.exe"
66
$WinBison = "..\win_flex_bison\win_bison.exe"
@@ -9,48 +9,56 @@ $Library = Get-Content -Path configure.ac | select -skip 3 -first 1 | % { $_ -Re
99
$Version = Get-Content -Path configure.ac | select -skip 4 -first 1 | % { $_ -Replace " \[","" } | % { $_ -Replace "\],","" }
1010
$Prefix = ${Library}.Substring(3)
1111

12-
Get-Content -Path "include\${Library}.h.in" > "include\${Library}.h"
13-
Get-Content -Path "include\${Library}\definitions.h.in" | % { $_ -Replace "@VERSION@","${Version}" } > "include\${Library}\definitions.h"
14-
Get-Content -Path "include\${Library}\features.h.in" | % { $_ -Replace "@[A-Z0-9_]*@","0" } > "include\${Library}\features.h"
15-
Get-Content -Path "include\${Library}\types.h.in" | % { $_ -Replace "@[A-Z0-9_]*@","0" } > "include\${Library}\types.h"
16-
Get-Content -Path "common\types.h.in" | % { $_ -Replace "@PACKAGE@","${Library}" } > "common\types.h"
17-
Get-Content -Path "${Library}\${Library}_definitions.h.in" | % { $_ -Replace "@VERSION@","${Version}" } > "${Library}\${Library}_definitions.h"
18-
Get-Content -Path "${Library}\${Library}.rc.in" | % { $_ -Replace "@VERSION@","${Version}" } > "${Library}\${Library}.rc"
12+
Get-Content -Path "include\${Library}.h.in" | Out-File -Encoding ascii "include\${Library}.h"
13+
Get-Content -Path "include\${Library}\definitions.h.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "include\${Library}\definitions.h"
14+
Get-Content -Path "include\${Library}\features.h.in" | % { $_ -Replace "@[A-Z0-9_]*@","0" } | Out-File -Encoding ascii "include\${Library}\features.h"
15+
Get-Content -Path "include\${Library}\types.h.in" | % { $_ -Replace "@[A-Z0-9_]*@","0" } | Out-File -Encoding ascii "include\${Library}\types.h"
16+
Get-Content -Path "common\types.h.in" | % { $_ -Replace "@PACKAGE@","${Library}" } | Out-File -Encoding ascii "common\types.h"
17+
Get-Content -Path "${Library}\${Library}_definitions.h.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "${Library}\${Library}_definitions.h"
18+
Get-Content -Path "${Library}\${Library}.rc.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "${Library}\${Library}.rc"
19+
20+
If (Test-Path "setup.cfg.in")
21+
{
22+
Get-Content -Path "setup.cfg.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "setup.cfg"
23+
}
1924

2025
If (Test-Path "${Prefix}.net")
2126
{
22-
Get-Content -Path "${Prefix}.net\${Prefix}.net.rc.in" | % { $_ -Replace "@VERSION@","${Version}" } > "${Prefix}.net\${Prefix}.net.rc"
27+
Get-Content -Path "${Prefix}.net\${Prefix}.net.rc.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "${Prefix}.net\${Prefix}.net.rc"
2328
}
2429

2530
$NamePrefix = ""
2631

27-
ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.l")
32+
ForEach (${Library} in Get-ChildItem -Directory -Path "lib*")
2833
{
29-
$OutputFile = ${DirectoryElement} -Replace ".l$",".c"
34+
ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.l")
35+
{
36+
$OutputFile = ${DirectoryElement} -Replace ".l$",".c"
3037

31-
$NamePrefix = Split-Path -path ${DirectoryElement} -leaf
32-
$NamePrefix = ${NamePrefix} -Replace ".l$","_"
38+
$NamePrefix = Split-Path -path ${DirectoryElement} -leaf
39+
$NamePrefix = ${NamePrefix} -Replace ".l$","_"
3340

34-
Write-Host "Running: ${WinFlex} -Cf ${DirectoryElement}"
41+
Write-Host "Running: ${WinFlex} -Cf ${DirectoryElement}"
3542

36-
# PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr
37-
# therefore 2>&1 is added and the output is stored in a variable.
38-
$Output = Invoke-Expression -Command "& '${WinFlex}' -Cf ${DirectoryElement} 2>&1"
39-
Write-Host ${Output}
43+
# PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr
44+
# therefore 2>&1 is added and the output is stored in a variable.
45+
$Output = Invoke-Expression -Command "& '${WinFlex}' -Cf ${DirectoryElement} 2>&1"
46+
Write-Host ${Output}
4047

41-
# Moving manually since win_flex -o <filename> does not provide the expected behavior.
42-
Move-Item "lex.yy.c" ${OutputFile} -force
43-
}
48+
# Moving manually since `win_flex -o filename' does not provide the expected behavior.
49+
Move-Item "lex.yy.c" ${OutputFile} -force
50+
}
4451

45-
ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.y")
46-
{
47-
$OutputFile = ${DirectoryElement} -Replace ".y$",".c"
52+
ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.y")
53+
{
54+
$OutputFile = ${DirectoryElement} -Replace ".y$",".c"
4855

49-
Write-Host "Running: ${WinBison} -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement}"
56+
Write-Host "Running: ${WinBison} -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement}"
5057

51-
# PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr
52-
# therefore 2>&1 is added and the output is stored in a variable.
53-
$Output = Invoke-Expression -Command "& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1"
54-
Write-Host ${Output}
58+
# PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr
59+
# therefore 2>&1 is added and the output is stored in a variable.
60+
$Output = Invoke-Expression -Command "& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1"
61+
Write-Host ${Output}
62+
}
5563
}
5664

common/byte_stream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Byte stream functions
33
*
4-
* Copyright (C) 2010-2023, Joachim Metz <[email protected]>
4+
* Copyright (C) 2010-2024, Joachim Metz <[email protected]>
55
*
66
* Refer to AUTHORS for acknowledgements.
77
*

common/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Common include file
33
*
4-
* Copyright (C) 2010-2023, Joachim Metz <[email protected]>
4+
* Copyright (C) 2010-2024, Joachim Metz <[email protected]>
55
*
66
* Refer to AUTHORS for acknowledgements.
77
*

common/config_borlandc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Configuration for the Borland/CodeGear C++ Builder compiler
33
*
4-
* Copyright (C) 2010-2023, Joachim Metz <[email protected]>
4+
* Copyright (C) 2010-2024, Joachim Metz <[email protected]>
55
*
66
* Refer to AUTHORS for acknowledgements.
77
*

common/config_msc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Configuration for the Microsoft Visual Studio C++ compiler
33
*
4-
* Copyright (C) 2010-2023, Joachim Metz <[email protected]>
4+
* Copyright (C) 2010-2024, Joachim Metz <[email protected]>
55
*
66
* Refer to AUTHORS for acknowledgements.
77
*

common/config_winapi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Configuration file for WINAPI
33
*
4-
* Copyright (C) 2010-2023, Joachim Metz <[email protected]>
4+
* Copyright (C) 2010-2024, Joachim Metz <[email protected]>
55
*
66
* Refer to AUTHORS for acknowledgements.
77
*

common/file_stream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* FILE stream functions
33
*
4-
* Copyright (C) 2010-2023, Joachim Metz <[email protected]>
4+
* Copyright (C) 2010-2024, Joachim Metz <[email protected]>
55
*
66
* Refer to AUTHORS for acknowledgements.
77
*

common/memory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Memory functions
33
*
4-
* Copyright (C) 2010-2023, Joachim Metz <[email protected]>
4+
* Copyright (C) 2010-2024, Joachim Metz <[email protected]>
55
*
66
* Refer to AUTHORS for acknowledgements.
77
*

0 commit comments

Comments
 (0)