Skip to content

Commit 890d692

Browse files
committed
Add arm64 library builds and upgrade to VS 2019 for all compilation
1 parent 1a4e58f commit 890d692

File tree

9 files changed

+883
-16
lines changed

9 files changed

+883
-16
lines changed

appveyor.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
environment:
22
matrix:
33
- Architecture: x86
4-
Compiler: vs2015
4+
Compiler: vs2019
5+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
56
- Architecture: x64
6-
Compiler: vs2015
7+
Compiler: vs2019
8+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
9+
- Architecture: arm64
10+
Compiler: vs2019
11+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
712
- Architecture: x86
813
Compiler: vs2008
14+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
915
- Architecture: x64
1016
Compiler: vs2008
1117
PYTHON_ARCH: 64
1218
PATCH_VS2008: True
19+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
20+
1321
install:
1422
- cmd: git submodule update --init --recursive
1523
- ps: install-module pscx -scope CurrentUser -AllowClobber
@@ -26,9 +34,11 @@ build_script:
2634
- ps: >-
2735
$x64param = if ($env:Architecture -eq 'x64') { $true } else { $false }
2836
37+
$arm64param = if ($env:Architecture -eq 'arm64') { $true } else { $false }
38+
2939
$vs2008param = if ($env:Compiler -eq 'vs2008') { $true } else { $false }
3040
31-
.\build.ps1 -x64:$x64param -vs2008:$vs2008param
41+
.\build.ps1 -x64:$x64param -arm64:$arm64param -vs2008:$vs2008param
3242
3343
test: off
3444
test_script:

build.ps1

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,46 @@ This script builds libiconv,libxml2 and libxslt
33
#>
44
Param(
55
[switch]$x64,
6+
[switch]$arm64,
67
[switch]$vs2008
78
)
89

910
$ErrorActionPreference = "Stop"
1011
Import-Module Pscx
1112

12-
$x64Dir = If($x64) { "\x64" } Else { "" }
13-
$distname = If($x64) { "win64" } Else { "win32" }
13+
$platDir = If($x64) { "\x64" } ElseIf ($arm64) { "\arm64" } Else { "" }
14+
$distname = If($x64) { "win64" } ElseIf($arm64) { "win-arm64" } Else { "win32" }
1415
If($vs2008) { $distname = "vs2008.$distname" }
15-
$vcvarsarch = If($x64) { "amd64" } Else { "x86" }
16-
$vsver = If($vs2008) { "90" } Else { "140" }
1716

18-
Set-Location $PSScriptRoot
17+
If($vs2008) {
18+
$vcvarsarch = If($x64) { "amd64" } Else { "x86" }
19+
Import-VisualStudioVars -VisualStudioVersion "90" -Architecture $vcvarsarch
20+
} Else {
21+
$vcvarsarch = If($x64) { "x86_amd64" } ElseIf ($arm64) { "x86_arm64" } Else { "32" }
22+
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars$vcvarsarch.bat`" && set > %temp%\vcvars$vcvarsarch.txt"
23+
Get-Content "$env:temp\vcvars$vcvarsarch.txt" | Foreach-Object {
24+
if ($_ -match "^(.*?)=(.*)$") {
25+
Set-Content "env:\$($matches[1])" $matches[2]
26+
}
27+
}
28+
}
1929

20-
Import-VisualStudioVars -VisualStudioVersion $vsver -Architecture $vcvarsarch
30+
Set-Location $PSScriptRoot
2131

2232
if($vs2008) {
2333
Set-Location .\libiconv\MSVC9
2434
$vcarch = If($x64) { "x64" } Else {"Win32"}
2535
vcbuild libiconv_static\libiconv_static.vcproj "Release|$vcarch"
36+
$iconvLib = Join-Path (pwd) libiconv_static$platDir\Release
2637
} else {
27-
Set-Location .\libiconv\MSVC14
28-
msbuild libiconv.sln /p:Configuration=Release /t:libiconv_static
38+
Set-Location .\libiconv_msvc16\
39+
msbuild libiconv_static\libiconv_static.vcxproj /p:Configuration=Release
40+
$iconvLib = Join-Path (pwd) libiconv_static$platDir\Release
2941
}
30-
$iconvLib = Join-Path (pwd) libiconv_static$x64Dir\Release
31-
$iconvInc = Join-Path (pwd) ..\source\include
32-
Set-Location ..\..
42+
43+
$iconvInc = Join-Path $PSScriptRoot libiconv\source\include
44+
45+
Set-Location $PSScriptRoot
3346

3447
Set-Location .\zlib
3548
Start-Process -NoNewWindow -Wait nmake "-f win32/Makefile.msc zlib.lib"
@@ -49,8 +62,10 @@ cscript configure.js lib="$zlibLib;$iconvLib;$xmlLib" include="$zlibInc;$iconvIn
4962
Start-Process -NoNewWindow -Wait nmake "libxslta libexslta"
5063
Set-Location ..\..
5164

52-
# Pushed by Import-VisualStudioVars
53-
Pop-EnvironmentBlock
65+
if($vs2008) {
66+
# Pushed by Import-VisualStudioVars
67+
Pop-EnvironmentBlock
68+
}
5469

5570
# Bundle releases
5671
Function BundleRelease($name, $lib, $inc)

libiconv_msvc16/libiconv-64.rc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/* Resources for libiconv.dll */
2+
/* There are 4 occurrences of the version number in this file. */
3+
4+
#include <winver.h>
5+
6+
VS_VERSION_INFO VERSIONINFO
7+
FILEVERSION 1,14,0,0
8+
PRODUCTVERSION 1,14,0,0
9+
FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */
10+
#ifdef _DEBUG
11+
FILEFLAGS 0x1L /* VS_FF_DEBUG */
12+
#else
13+
FILEFLAGS 0x0L
14+
#endif
15+
FILEOS 0x10004L /* VOS_DOS_WINDOWS32 */
16+
FILETYPE 0x2L /* VFT_DLL */
17+
FILESUBTYPE 0x0L /* VFT2_UNKNOWN */
18+
BEGIN
19+
BLOCK "StringFileInfo"
20+
BEGIN
21+
BLOCK "04090000" /* Lang = US English, Charset = ASCII */
22+
BEGIN
23+
VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\0"
24+
VALUE "CompanyName", "Free Software Foundation\0"
25+
VALUE "FileDescription", "LGPLed libiconv for Windows XP 64 and Vista 64\0"
26+
VALUE "FileVersion", "1.12\0"
27+
VALUE "InternalName", "libiconv.dll\0"
28+
VALUE "LegalCopyright", "Copyright (C) 1999-2005\0"
29+
VALUE "LegalTrademarks", "\0"
30+
VALUE "OriginalFilename", "iconv.dll\0"
31+
VALUE "ProductName", "libiconv: character set conversion library\0"
32+
VALUE "ProductVersion", "1.12\0"
33+
VALUE "SpecialBuild", "Built for http://php.net with MSVC9-x64\0"
34+
END
35+
END
36+
BLOCK "VarFileInfo"
37+
BEGIN
38+
VALUE "Translation", 0x0409, 0 /* US English, ASCII */
39+
END
40+
END

libiconv_msvc16/libiconv.rc

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* Resources for iconv.dll */
2+
3+
#include <winver.h>
4+
5+
#define PACKAGE_VERSION_MAJOR 1
6+
#define PACKAGE_VERSION_MINOR 14
7+
#define PACKAGE_VERSION_SUBMINOR 0
8+
#define PACKAGE_VERSION_STRING "1.14"
9+
10+
VS_VERSION_INFO VERSIONINFO
11+
FILEVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0
12+
PRODUCTVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0
13+
FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */
14+
#ifdef _DEBUG
15+
FILEFLAGS 0x1L /* VS_FF_DEBUG */
16+
#else
17+
FILEFLAGS 0x0L
18+
#endif
19+
FILEOS 0x10004L /* VOS_DOS_WINDOWS32 */
20+
FILETYPE 0x2L /* VFT_DLL */
21+
FILESUBTYPE 0x0L /* VFT2_UNKNOWN */
22+
BEGIN
23+
BLOCK "StringFileInfo"
24+
BEGIN
25+
BLOCK "04090000" /* Lang = US English, Charset = ASCII */
26+
BEGIN
27+
VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\0"
28+
VALUE "CompanyName", "Free Software Foundation\0"
29+
VALUE "FileDescription", "LGPLed libiconv for Windows NT/2000/XP/Vista/7 and Windows 95/98/ME\0"
30+
VALUE "FileVersion", PACKAGE_VERSION_STRING "\0"
31+
VALUE "InternalName", "iconv.dll\0"
32+
VALUE "LegalCopyright", "Copyright (C) 1999-2009\0"
33+
VALUE "LegalTrademarks", "\0"
34+
VALUE "OriginalFilename", "iconv.dll\0"
35+
VALUE "ProductName", "libiconv: character set conversion library\0"
36+
VALUE "ProductVersion", PACKAGE_VERSION_STRING "\0"
37+
END
38+
END
39+
BLOCK "VarFileInfo"
40+
BEGIN
41+
VALUE "Translation", 0x0409, 0 /* US English, ASCII */
42+
END
43+
END

libiconv_msvc16/libiconv.sln

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 16
3+
VisualStudioVersion = 16.0.31424.327
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiconv_static", "libiconv_static\libiconv_static.vcxproj", "{F9C13A95-C7EB-40F3-A599-3695C1E0CF38}"
6+
EndProject
7+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiconv_dll", "libiconv_dll\libiconv_dll.vcxproj", "{7EA4EC62-EA19-4ACC-86E2-0513E381292B}"
8+
EndProject
9+
Global
10+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
11+
Debug|ARM64 = Debug|ARM64
12+
Debug|Win32 = Debug|Win32
13+
Debug|x64 = Debug|x64
14+
Release|ARM64 = Release|ARM64
15+
Release|Win32 = Release|Win32
16+
Release|x64 = Release|x64
17+
EndGlobalSection
18+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19+
{F9C13A95-C7EB-40F3-A599-3695C1E0CF38}.Debug|ARM64.ActiveCfg = Debug|ARM64
20+
{F9C13A95-C7EB-40F3-A599-3695C1E0CF38}.Debug|ARM64.Build.0 = Debug|ARM64
21+
{F9C13A95-C7EB-40F3-A599-3695C1E0CF38}.Debug|Win32.ActiveCfg = Debug|Win32
22+
{F9C13A95-C7EB-40F3-A599-3695C1E0CF38}.Debug|Win32.Build.0 = Debug|Win32
23+
{F9C13A95-C7EB-40F3-A599-3695C1E0CF38}.Debug|x64.ActiveCfg = Debug|x64
24+
{F9C13A95-C7EB-40F3-A599-3695C1E0CF38}.Debug|x64.Build.0 = Debug|x64
25+
{F9C13A95-C7EB-40F3-A599-3695C1E0CF38}.Release|ARM64.ActiveCfg = Release|ARM64
26+
{F9C13A95-C7EB-40F3-A599-3695C1E0CF38}.Release|ARM64.Build.0 = Release|ARM64
27+
{F9C13A95-C7EB-40F3-A599-3695C1E0CF38}.Release|Win32.ActiveCfg = Release|Win32
28+
{F9C13A95-C7EB-40F3-A599-3695C1E0CF38}.Release|Win32.Build.0 = Release|Win32
29+
{F9C13A95-C7EB-40F3-A599-3695C1E0CF38}.Release|x64.ActiveCfg = Release|x64
30+
{F9C13A95-C7EB-40F3-A599-3695C1E0CF38}.Release|x64.Build.0 = Release|x64
31+
{7EA4EC62-EA19-4ACC-86E2-0513E381292B}.Debug|ARM64.ActiveCfg = Debug|ARM64
32+
{7EA4EC62-EA19-4ACC-86E2-0513E381292B}.Debug|ARM64.Build.0 = Debug|ARM64
33+
{7EA4EC62-EA19-4ACC-86E2-0513E381292B}.Debug|Win32.ActiveCfg = Debug|Win32
34+
{7EA4EC62-EA19-4ACC-86E2-0513E381292B}.Debug|Win32.Build.0 = Debug|Win32
35+
{7EA4EC62-EA19-4ACC-86E2-0513E381292B}.Debug|x64.ActiveCfg = Debug|x64
36+
{7EA4EC62-EA19-4ACC-86E2-0513E381292B}.Debug|x64.Build.0 = Debug|x64
37+
{7EA4EC62-EA19-4ACC-86E2-0513E381292B}.Release|ARM64.ActiveCfg = Release|ARM64
38+
{7EA4EC62-EA19-4ACC-86E2-0513E381292B}.Release|ARM64.Build.0 = Release|ARM64
39+
{7EA4EC62-EA19-4ACC-86E2-0513E381292B}.Release|Win32.ActiveCfg = Release|Win32
40+
{7EA4EC62-EA19-4ACC-86E2-0513E381292B}.Release|Win32.Build.0 = Release|Win32
41+
{7EA4EC62-EA19-4ACC-86E2-0513E381292B}.Release|x64.ActiveCfg = Release|x64
42+
{7EA4EC62-EA19-4ACC-86E2-0513E381292B}.Release|x64.Build.0 = Release|x64
43+
EndGlobalSection
44+
GlobalSection(SolutionProperties) = preSolution
45+
HideSolutionNode = FALSE
46+
EndGlobalSection
47+
GlobalSection(ExtensibilityGlobals) = postSolution
48+
SolutionGuid = {3828A197-E059-48CC-B70C-A009922772AD}
49+
EndGlobalSection
50+
EndGlobal

0 commit comments

Comments
 (0)