mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-24 22:29:47 +01:00
Merge pull request #2260 from Kampbell/poco-1.9.1
Poco 1.9.1: WIP on Gradle
This commit is contained in:
@@ -2,12 +2,13 @@ model {
|
||||
repositories {
|
||||
libs(PrebuiltLibraries) {
|
||||
mysql {
|
||||
headers.srcDir "$mysql32Home/include"
|
||||
binaries.withType(StaticLibraryBinary) {
|
||||
def libName = "foobar"
|
||||
println "StaticLibraryBinary:targetPlatform.name=" + targetPlatform.name
|
||||
if (buildType == buildTypes.debug) {
|
||||
libName = 'libmysqld.lib'
|
||||
if (targetPlatform.name == 'win32') {
|
||||
headers.srcDir "$mysql32Home/include"
|
||||
staticLibraryFile = file("$mysql32Home/lib/$libName")
|
||||
} else
|
||||
if (targetPlatform.name == 'win64') {
|
||||
@@ -25,13 +26,13 @@ model {
|
||||
headers.srcDir "$mysql64Home/include"
|
||||
staticLibraryFile = file("$mysql64Home/lib/$libName")
|
||||
}
|
||||
} else {
|
||||
throw new GradleException("Unknown buildType" + buildType)
|
||||
}
|
||||
}
|
||||
binaries.withType(SharedLibraryBinary) {
|
||||
def dllName
|
||||
def linkName
|
||||
println "SharedLibraryBinary:targetPlatform.name=" + targetPlatform.name
|
||||
println ""
|
||||
if (buildType == buildTypes.debug) {
|
||||
dllName = 'libmysqld.dll'
|
||||
linkName = 'libmysqld.lib'
|
||||
@@ -59,8 +60,6 @@ model {
|
||||
sharedLibraryFile = file("$mysql64Home/lib/$dllName")
|
||||
sharedLibraryLinkFile = file("$mysql64Home/lib/$linkName")
|
||||
}
|
||||
} else {
|
||||
throw new GradleException("Unknown buildType" + buildType)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,7 +87,9 @@ model {
|
||||
all {
|
||||
cppCompiler.define "THREADSAFE"
|
||||
cppCompiler.define "__LCC__"
|
||||
cppCompiler.define "WINVER=0x0600"
|
||||
if (toolChain in VisualCpp) {
|
||||
cppCompiler.define "WINVER=0x0600"
|
||||
}
|
||||
}
|
||||
withType(SharedLibraryBinarySpec) {
|
||||
if (toolChain in VisualCpp) {
|
||||
|
||||
326
build.gradle
326
build.gradle
@@ -7,10 +7,6 @@ plugins {
|
||||
// id 'com.jfrog.artifactory' version '4.1'
|
||||
}
|
||||
apply plugin: 'base'
|
||||
apply plugin: 'nuget'
|
||||
nuget {
|
||||
version = '4.4.1'
|
||||
}
|
||||
|
||||
def os = org.gradle.internal.os.OperatingSystem.current()
|
||||
def String version = file("VERSION").text.replaceAll("[\n\r]", "")
|
||||
@@ -38,15 +34,6 @@ File appendStaticSuffix(File binaryFile) {
|
||||
}
|
||||
return new File(parent, name.substring(0, extensionSeparatorIndex) + "MT" + name.substring(extensionSeparatorIndex))
|
||||
}
|
||||
File appendSemiStaticSuffix(File binaryFile) {
|
||||
String name = binaryFile.getName()
|
||||
File parent = binaryFile.getParentFile()
|
||||
int extensionSeparatorIndex = name.lastIndexOf('.')
|
||||
if (extensionSeparatorIndex == -1) {
|
||||
return new File(parent, name + "MD")
|
||||
}
|
||||
return new File(parent, name.substring(0, extensionSeparatorIndex) + "MD" + name.substring(extensionSeparatorIndex))
|
||||
}
|
||||
File prefixByPoco(File binaryFile) {
|
||||
String name = binaryFile.getName()
|
||||
String prefix = ''
|
||||
@@ -280,12 +267,7 @@ subprojects {
|
||||
}
|
||||
}
|
||||
}
|
||||
def openSSLWinHome = new File(rootDir, "openssl/build")
|
||||
def openSSLBrewHome = new File('/usr/local/opt/openssl')
|
||||
def openSSLLinuxLib = new File('/usr/local/lib')
|
||||
def openSSLLinuxInc = new File('/usr/local/include/openssl')
|
||||
crypto {
|
||||
|
||||
binaries.withType(StaticLibraryBinary) {
|
||||
def libName = "foobar"
|
||||
if (buildType == buildTypes.debug) {
|
||||
@@ -480,9 +462,7 @@ subprojects {
|
||||
}
|
||||
components {
|
||||
withType(NativeComponentSpec) {
|
||||
// targetPlatform "win32"
|
||||
// targetPlatform "win64"
|
||||
// targetPlatform "linux32"
|
||||
targetPlatform "linux32"
|
||||
targetPlatform "linux64"
|
||||
targetPlatform "macos"
|
||||
|
||||
@@ -531,11 +511,6 @@ subprojects {
|
||||
}
|
||||
}
|
||||
} else
|
||||
/*
|
||||
if (it instanceof SemiStaticLibraryBinarySpec) {
|
||||
semiStaticLibraryFile = toStatic(prefixByPoco(appendDebugSuffix(appendSemiStaticSuffix(semiStaticLibraryFile))), targetPlatform)
|
||||
} else
|
||||
*/
|
||||
if (it instanceof NativeExecutableBinarySpec) {
|
||||
executable.file = toBin(appendDebugSuffix(executable.file), targetPlatform)
|
||||
}
|
||||
@@ -568,17 +543,6 @@ subprojects {
|
||||
}
|
||||
}
|
||||
} else
|
||||
/*
|
||||
if (it instanceof SemiStaticLibraryBinarySpec) {
|
||||
semiStaticLibraryFile = toStatic(prefixByPoco(appendSemiStaticSuffix(semiStaticLibraryFile)), targetPlatform)
|
||||
def binary = it
|
||||
tasks.withType(CreateSemiStaticLibrary) {
|
||||
doFirst {
|
||||
binary.semiStaticLibraryFile.parentFile.mkdirs()
|
||||
}
|
||||
}
|
||||
} else
|
||||
*/
|
||||
if (it instanceof NativeExecutableBinarySpec) {
|
||||
executable.file = toBin(executable.file, targetPlatform)
|
||||
}
|
||||
@@ -697,7 +661,12 @@ subprojects {
|
||||
}
|
||||
}
|
||||
if (toolChain in Gcc) {
|
||||
linker.args "-Wl,-rpath,$rootDir/lib64" //FIXME
|
||||
if (targetPlatform == platforms.linux32) {
|
||||
linker.args "-Wl,-rpath,$rootDir/lib" //FIXME
|
||||
} else
|
||||
if (targetPlatform == platforms.linux64) {
|
||||
linker.args "-Wl,-rpath,$rootDir/lib64" //FIXME
|
||||
}
|
||||
}
|
||||
}
|
||||
withType(StaticLibraryBinarySpec) {
|
||||
@@ -720,32 +689,9 @@ subprojects {
|
||||
}
|
||||
}
|
||||
if (toolChain in Gcc) {
|
||||
linker.args "-Wl,-rpath,$rootDir/lib64" //FIXME
|
||||
}
|
||||
}
|
||||
/*
|
||||
withType(SemiStaticLibraryBinarySpec) {
|
||||
if (toolChain in VisualCpp) {
|
||||
cCompiler.define '_LIB'
|
||||
cCompiler.define 'POCO_STATIC'
|
||||
cppCompiler.define '_LIB'
|
||||
cppCompiler.define 'POCO_STATIC'
|
||||
if (buildType == buildTypes.debug) {
|
||||
cCompiler.args "/MDd"
|
||||
cCompiler.args "/Fd" + toStatic(toPDB(semiStaticLibraryFile), targetPlatform)
|
||||
cppCompiler.args "/MDd"
|
||||
cppCompiler.args "/Fd" + toStatic(toPDB(semiStaticLibraryFile), targetPlatform)
|
||||
} else
|
||||
if (buildType == buildTypes.release) {
|
||||
cCompiler.args "/MD"
|
||||
cppCompiler.args "/MD"
|
||||
} else {
|
||||
throw new GradleException("Unknown buildType" + buildType)
|
||||
}
|
||||
}
|
||||
if (toolChain in Gcc) {
|
||||
}
|
||||
}
|
||||
*/
|
||||
withType(NativeExecutableBinarySpec) {
|
||||
if (toolChain in VisualCpp) {
|
||||
if (buildType == buildTypes.debug) {
|
||||
@@ -760,6 +706,12 @@ subprojects {
|
||||
}
|
||||
}
|
||||
if (toolChain in Gcc) {
|
||||
if (targetPlatform == platforms.linux32) {
|
||||
linker.args "-Wl,-rpath,$rootDir/lib" //FIXME
|
||||
} else
|
||||
if (targetPlatform == platforms.linux64) {
|
||||
linker.args "-Wl,-rpath,$rootDir/lib64" //FIXME
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -785,34 +737,61 @@ subprojects {
|
||||
|
||||
environment "Path", "$PATH"
|
||||
|
||||
String CPPUNIT_IGNORE;
|
||||
CPPUNIT_IGNORE = 'class CppUnit::TestCaller<class NTPClientTest>.testTimeSync';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class RawSocketTest>.testEchoIPv4';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class RawSocketTest>.testSendToReceiveFromIPv4';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class ICMPClientTest>.testPing';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class ICMPClientTest>.testBigPing';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class HTTPSClientSessionTest>.testProxy';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class HTTPSStreamFactoryTest>.testProxy';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class TCPServerTest>.testReuseSocket';
|
||||
String CPPUNIT_IGNORE = "";
|
||||
if (name.contains('Win32') || name.contains('Win64')) {
|
||||
CPPUNIT_IGNORE =' class CppUnit::TestCaller<class NTPClientTest>.testTimeSync';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class RawSocketTest>.testEchoIPv4';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class RawSocketTest>.testSendToReceiveFromIPv4';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class ICMPClientTest>.testPing';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class ICMPClientTest>.testBigPing';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class HTTPSClientSessionTest>.testProxy';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class HTTPSStreamFactoryTest>.testProxy';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class TCPServerTest>.testReuseSocket';
|
||||
|
||||
//FIXME Those tests below should work
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class ProcessTest>.testLaunch';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class ProcessTest>.testLaunchRedirectIn';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class ProcessTest>.testLaunchRedirectOut';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class ProcessTest>.testLaunchEnv';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class ProcessTest>.testLaunchArgs';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class ProcessTest>.testIsRunning';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class ProcessTest>.testIsRunningAllowsForTermination';
|
||||
//FIXME Those tests below should work
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class ProcessTest>.testLaunch';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class ProcessTest>.testLaunchRedirectIn';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class ProcessTest>.testLaunchRedirectOut';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class ProcessTest>.testLaunchEnv';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class ProcessTest>.testLaunchArgs';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class ProcessTest>.testIsRunning';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class ProcessTest>.testIsRunningAllowsForTermination';
|
||||
|
||||
//FIXME won't work until SharedLibraries be properly generated
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class SharedLibraryTest>.testSharedLibrary1';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class SharedLibraryTest>.testSharedLibrary2';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class SharedLibraryTest>.testSharedLibrary3';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class ClassLoaderTest>.testClassLoader2';
|
||||
CPPUNIT_IGNORE+=' class CppUnit::TestCaller<class ClassLoaderTest>.testClassLoader3';
|
||||
}
|
||||
if (name.contains('Linux32') || name.contains('Linux64')) {
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI8PathTestEE.testExpand';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI13RawSocketTestEE.testEchoIPv4';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI13RawSocketTestEE.testSendToReceiveFromIPv4';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI14ICMPClientTestEE.testPing';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI14ICMPClientTestEE.testBigPing';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI22HTTPSClientSessionTestEE.testProxy';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI22HTTPSStreamFactoryTestEE.testProxy';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI19MulticastSocketTestEE.testMulticast';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI13NTPClientTestEE.testTimeSync';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI9TimerTestEE.testTimer';
|
||||
|
||||
//FIXME won't work until SharedLibraries be properly generated
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class SharedLibraryTest>.testSharedLibrary1';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class SharedLibraryTest>.testSharedLibrary2';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class SharedLibraryTest>.testSharedLibrary3';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class ClassLoaderTest>.testClassLoader2';
|
||||
CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class ClassLoaderTest>.testClassLoader3';
|
||||
|
||||
environment "CPPUNIT_IGNORE", "\"$CPPUNIT_IGNORE\""
|
||||
//FIXME won't work until SharedLibraries be properly generated
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI17SharedLibraryTestEE.testSharedLibrary1';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI17SharedLibraryTestEE.testSharedLibrary2';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI17SharedLibraryTestEE.testSharedLibrary3';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI15ClassLoaderTestEE.testClassLoader2';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI15ClassLoaderTestEE.testClassLoader3';
|
||||
|
||||
//FIXME Those tests below should work
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI11ProcessTestEE.testLaunch';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI11ProcessTestEE.testLaunchRedirectIn';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI11ProcessTestEE.testLaunchRedirectOut';
|
||||
CPPUNIT_IGNORE+=' N7CppUnit10TestCallerI11ProcessTestEE.testLaunchEnv';
|
||||
}
|
||||
CPPUNIT_IGNORE+=' ';
|
||||
|
||||
environment "CPPUNIT_IGNORE", "\"$CPPUNIT_IGNORE\""
|
||||
environment "POCO_BASE", "$rootDir"
|
||||
|
||||
args test
|
||||
@@ -834,6 +813,7 @@ PocoBuild=$rootDir
|
||||
PocoBase=$rootDir
|
||||
PocoDoc.output=releases/poco-${version}-all-doc
|
||||
PocoDoc.version=${version}-all
|
||||
Includes=-I${postgres32Home}/include,-I${mysql32Home}/include,-ICppParser/include,-ICppUnit/include,-ICrypto/include,-IData/include,-IData/include,-IData/MySQL/include,-IData/ODBC/include,-IData/PostgreSQL/include,-IData/SQLite/include, -IData/SQLite/src,-IFoundation/include,-IJSON/include,-IMongoDB/include,-INet/include,-INetSSL_OpenSSL/include,-INetSSL_Win/include,-IRedis/include,-IUtil/include,-IXML/include,-IZip/include,-ISevenZip/include,-IPDF/include
|
||||
"""
|
||||
if (os.windows) {
|
||||
def String javaVCH = VCHome.replace('\\','/')
|
||||
@@ -842,12 +822,18 @@ PocoDoc.version=${version}-all
|
||||
javaWDK = javaWDK.replace('\\','/')
|
||||
|
||||
file.text += """
|
||||
Includes=-I${postgres32Home}/include,-I${mysql32Home}/include,-ICppParser/include,-ICppUnit/include,-ICrypto/include,-IData/include,-IData/include,-IData/MySQL/include,-IData/ODBC/include,-IData/PostgreSQL/include,-IData/SQLite/include, -IData/SQLite/src,-IFoundation/include,-IJSON/include,-IMongoDB/include,-INet/include,-INetSSL_OpenSSL/include,-INetSSL_Win/include,-IRedis/include,-IUtil/include,-IXML/include,-IZip/include,-ISevenZip/include,-IPDF/include
|
||||
VCH=${javaVCH}
|
||||
WDK=${javaWDK}
|
||||
CLP=${javaCLP}
|
||||
"""
|
||||
} else {
|
||||
} else
|
||||
if (os.linux) {
|
||||
file.text += """
|
||||
CXX=g++
|
||||
CXXFLAGS=
|
||||
"""
|
||||
} else
|
||||
if (os.macos) {
|
||||
}
|
||||
}
|
||||
task pocoDoc(type: Exec) {
|
||||
@@ -889,169 +875,7 @@ task zipDoc(type: Zip) {
|
||||
dependsOn pocoDoc
|
||||
}
|
||||
|
||||
def candle(VSYEAR, VERSION, target, os) {
|
||||
return tasks.create("Candle-${VSYEAR}-${VERSION}-${target}", Exec) {
|
||||
def Set<Task> pocos = project.getTasksByName('poco', true)
|
||||
setDependsOn(pocos)
|
||||
dependsOn ':pocoDoc'
|
||||
workingDir "packaging/Windows/WiX"
|
||||
|
||||
executable "${WiXHome}/bin/Candle.exe"
|
||||
args "-arch", "${target}"
|
||||
args "-dVSYEAR=${VSYEAR}"
|
||||
args "-dVERSION=${VERSION}"
|
||||
args "-dPOCO=${rootDir}"
|
||||
args "-dPlatform=${target}"
|
||||
args "-ext", "${WiXHome}/bin/WixUIExtension.dll"
|
||||
args "-out", "${VSYEAR}/${VSYEAR}-Poco-$VERSION-${target}.wixobj"
|
||||
args "Poco.wxs"
|
||||
|
||||
def File index = new File("$rootDir/releases/poco-$VERSION-all-doc/index.html")
|
||||
inputs.files(index)
|
||||
|
||||
inputs.files(pocos.inputs.files)
|
||||
inputs.files(new File(workingDir, "Poco.wxs"))
|
||||
inputs.files(project.getTasksByName('poco', true).outputs.files)
|
||||
|
||||
def File output = new File(workingDir,"${VSYEAR}/${VSYEAR}-Poco-$VERSION-${target}.wixobj")
|
||||
outputs.files(output)
|
||||
|
||||
onlyIf(new Spec<Exec>() {
|
||||
boolean isSatisfiedBy(Exec task) {
|
||||
return os.windows;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
def light(VSYEAR, VERSION, target, os) {
|
||||
return tasks.create("Light-${VSYEAR}-${VERSION}-${target}", Exec) {
|
||||
dependsOn candle(VSYEAR, VERSION, target, os)
|
||||
workingDir "packaging/Windows/WiX"
|
||||
|
||||
executable "${WiXHome}/bin/Light.exe"
|
||||
args "-cultures:null"
|
||||
args "-ext", "${WiXHome}/bin/WixUIExtension.dll"
|
||||
args "-out"
|
||||
args "${VSYEAR}/${VSYEAR}-Poco-$VERSION-${target}.msi"
|
||||
args "${VSYEAR}/${VSYEAR}-Poco-$VERSION-${target}.wixobj"
|
||||
|
||||
def File input = new File(workingDir, "${VSYEAR}/${VSYEAR}-Poco-$VERSION-${target}.wixobj")
|
||||
inputs.files(input)
|
||||
def File output = new File(workingDir, "${VSYEAR}/${VSYEAR}-Poco-$VERSION-${target}.msi")
|
||||
outputs.files(output)
|
||||
|
||||
onlyIf(new Spec<Exec>() {
|
||||
boolean isSatisfiedBy(Exec task) {
|
||||
return os.windows;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
task wix() {
|
||||
dependsOn light('VS2017', version, 'x86', os)
|
||||
dependsOn light('VS2017', version, 'x64', os)
|
||||
onlyIf(new Spec<Task>() {
|
||||
boolean isSatisfiedBy(Task task) {
|
||||
return os.windows;
|
||||
}
|
||||
});
|
||||
}
|
||||
/*
|
||||
ext.commonNuspecMetadata = [
|
||||
version: '2.0.0',
|
||||
owners: 'Günter Obiltschnig & Aleksandar Fabijanic',
|
||||
authors: 'Applied Informatics & Contributors',
|
||||
projectUrl: 'https://pocoproject.org/',
|
||||
licenseUrl: 'https://pocoproject.org/license.html',
|
||||
iconUrl: 'https://avatars1.githubusercontent.com/u/201918?v=4&s=200',
|
||||
copyright: 'Applied Informatics copyright 2018',
|
||||
requireLicenseAcceptance: false,
|
||||
description: 'Modern, powerful open source C++ class libraries for building network- and internet-based applications that run on desktop, server, mobile and embedded systems.',
|
||||
tags: 'string filesystem thread date log event regex uri uuid cache native nativepackage sockets mime http ftp mail pop3 smtp html sax sax2 dom xml'
|
||||
]
|
||||
def pocoNugetSpec(os) {
|
||||
return tasks.create("nugetSpec-$os", nugetSpec) {
|
||||
def String vers = commonNuspecMetadata.find { it.key == "version" }.value;
|
||||
nuspec = [
|
||||
metadata: commonNuspecMetadata + [
|
||||
id: "Pocoproject.Poco.vs150",
|
||||
title: "Poco $vers",
|
||||
dependencies: [
|
||||
]
|
||||
],
|
||||
files: [
|
||||
{ file(src: "$rootDir\\packaging\\Windows\\NuGet\\Pocoproject.Poco.vs150.targets", target: "build\\native") },
|
||||
{ file(src: "$rootDir\\bin\\Poco*.*", target: "build\\native\\bin", exclude: "$rootDir\\bin\\*CppParser*.*") },
|
||||
{ file(src: "$rootDir\\lib\\Poco*.*", target: "build\\native\\lib"), exclude: "$rootDir\\bin\\*CppParser*.*" },
|
||||
{ file(src: "$rootDir\\bin64\\Poco*64.*", target: "build\\native\\bin64"), exclude: "$rootDir\\bin\\*CppParser*.*" },
|
||||
{ file(src: "$rootDir\\lib64\\Poco*.*", target: "build\\native\\lib64"), exclude: "$rootDir\\bin\\*CppParser*.*" },
|
||||
{ file(src: "$rootDir\\bin\\Poco*d.*", target: "build\\native\\bin"), exclude: "$rootDir\\bin\\*CppParser*.*" },
|
||||
{ file(src: "$rootDir\\lib\\Poco*d.*", target: "build\\native\\lib"), exclude: "$rootDir\\bin\\*CppParser*.*" },
|
||||
{ file(src: "$rootDir\\bin64\\Poco*64d.*", target: "build\\native\\bin64"), exclude: "$rootDir\\bin\\*CppParser*.*" },
|
||||
{ file(src: "$rootDir\\lib64\\Poco*d.*", target: "build\\native\\lib64"), exclude: "$rootDir\\bin\\*CppParser*.*" },
|
||||
{ file(src: "$rootDir\\CppUnit\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\Crypto\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\Data\\MySQL\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\Data\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\Data\\ODBC\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\Data\\SQLite\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\Encodings\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\Foundation\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\JSON\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\MongoDB\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\Net\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\NetSSL_OpenSSL\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\NetSSL_Win\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\PDF\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\Util\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\XML\\include\\**", target: "build\\native\\inc") },
|
||||
{ file(src: "$rootDir\\Zip\\include\\**", target: "build\\native\\inc") }
|
||||
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
nugetPack {
|
||||
destinationDir "$rootDir/packaging/Windows/Nuget"
|
||||
def Set<Task> pocos = project.getTasksByName('poco', true)
|
||||
setDependsOn(pocos)
|
||||
dependsOn pocoNugetSpec('x86')
|
||||
}
|
||||
*/
|
||||
|
||||
def nuget(version, target, os) {
|
||||
return tasks.create("NuGet-${target}", Exec) {
|
||||
String nugetVersion = version.replace('p', '-')
|
||||
def Set<Task> pocos = project.getTasksByName('poco', true)
|
||||
|
||||
setDependsOn(pocos)
|
||||
workingDir "packaging/Windows/NuGet"
|
||||
|
||||
executable "${NuGetHome}/NuGet.exe"
|
||||
args "pack"
|
||||
args "-BasePath", "$rootDir"
|
||||
args "-Version", nugetVersion
|
||||
args "-NonInteractive"
|
||||
args "Pocoproject.Poco.vs150.${target}.nuspec"
|
||||
|
||||
inputs.files(pocos.inputs.files)
|
||||
inputs.files(new File(workingDir, "Pocoproject.Poco.vs150.${target}.nuspec"))
|
||||
outputs.files(new File(workingDir,"Pocoproject.Poco.vs150.${target}.${version}.nupkg"))
|
||||
|
||||
onlyIf(new Spec<Exec>() {
|
||||
boolean isSatisfiedBy(Exec task) {
|
||||
return os.windows;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
task packaging() {
|
||||
if (os.windows) {
|
||||
dependsOn nuget(version, 'x86', os)
|
||||
dependsOn nuget(version, 'x64', os)
|
||||
dependsOn wix
|
||||
}
|
||||
}
|
||||
//
|
||||
// gradle\bin\gradle Zip:testsuite:check -Ptest=-all
|
||||
|
||||
1169
build.gradle.win
Normal file
1169
build.gradle.win
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,6 @@
|
||||
###############################################################################
|
||||
# Windows Customization
|
||||
###############################################################################
|
||||
# https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.19-win32.zip
|
||||
mysql32Home=C:/mysql-5.6.37-win32
|
||||
|
||||
@@ -22,10 +25,10 @@ WDKVers=10.0.16299.0
|
||||
|
||||
# VisualStudio 2017
|
||||
# c:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503
|
||||
VCHome=C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503
|
||||
VCHome=C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128
|
||||
|
||||
# C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\cl.exe
|
||||
CLPath=C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/HostX86/x86
|
||||
# C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\114.13.26128\bin\HostX86\x86\cl.exe
|
||||
CLPath=C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/bin/HostX86/x86
|
||||
|
||||
# https://github.com/wixtoolset/wix3/releases/download/wix311rtm/wix311.exe
|
||||
WiXHome=C:/Program Files (x86)/WiX Toolset v3.11
|
||||
@@ -40,7 +43,24 @@ OpenCppCoverageHome=C:/Program Files/OpenCppCoverage
|
||||
#ReportGeneratorHome=C:/ProgramFiles/ReportGenerator
|
||||
ReportGeneratorHome=C:/ProgramFiles/ReportGenerator
|
||||
|
||||
openSSLWindowsHome = new File(rootDir, "openssl/build")
|
||||
|
||||
###############################################################################
|
||||
# Linux Customization
|
||||
###############################################################################
|
||||
openSSLLinuxLib = new File('/usr/local/lib')
|
||||
openSSLLinuxInc = new File('/usr/local/include/openssl')
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Mac OSX Customization
|
||||
###############################################################################
|
||||
openSSLBrewHome = new File('/usr/local/opt/openssl')
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Common
|
||||
###############################################################################
|
||||
cpus=
|
||||
test=-print
|
||||
LD_LIBRARY_PATH=
|
||||
cpus=
|
||||
|
||||
|
||||
@@ -8,18 +8,16 @@ include ':XML'
|
||||
include ':JSON'
|
||||
include ':Util'
|
||||
include ':Net'
|
||||
include ':Crypto'
|
||||
include ':NetSSL_OpenSSL'
|
||||
//include ':Crypto'
|
||||
//include ':NetSSL_OpenSSL'
|
||||
if (os.windows) {
|
||||
include ':NetSSL_Win'
|
||||
}
|
||||
include ':Data'
|
||||
if (os.windows) {
|
||||
include ':Data:ODBC'
|
||||
include ':Data:SQLite'
|
||||
include ':Data:MySQL'
|
||||
include ':Data:PostgreSQL'
|
||||
}
|
||||
// SQL not ready yet
|
||||
//include ':Data:ODBC'
|
||||
//include ':Data:SQLite'
|
||||
//include ':Data:MySQL'
|
||||
include ':Zip'
|
||||
include ':PageCompiler'
|
||||
include ':PageCompiler:File2Page'
|
||||
@@ -36,18 +34,15 @@ include ':XML:testsuite'
|
||||
include ':JSON:testsuite'
|
||||
include ':Util:testsuite'
|
||||
include ':Net:testsuite'
|
||||
include ':Crypto:testsuite'
|
||||
include ':NetSSL_OpenSSL:testsuite'
|
||||
//include ':Crypto:testsuite'
|
||||
//include ':NetSSL_OpenSSL:testsuite'
|
||||
if (os.windows) {
|
||||
include ':NetSSL_Win:testsuite'
|
||||
}
|
||||
include ':Data:testsuite'
|
||||
if (os.windows) {
|
||||
include ':Data:ODBC:testsuite'
|
||||
include ':Data:SQLite:testsuite'
|
||||
include ':Data:MySQL:testsuite'
|
||||
include ':Data:PostgreSQL:testsuite'
|
||||
}
|
||||
//include ':Data:testsuite'
|
||||
//include ':Data:ODBC:testsuite'
|
||||
//include ':Data:SQLite:testsuite'
|
||||
//include ':Data:MySQL:testsuite'
|
||||
include ':MongoDB:testsuite'
|
||||
include ':Redis:testsuite'
|
||||
include ':CppParser:testsuite'
|
||||
@@ -55,15 +50,13 @@ include ':Zip:testsuite'
|
||||
|
||||
include ':Encodings:samples'
|
||||
include ':Foundation:samples'
|
||||
if (os.windows) {
|
||||
include ':Data:samples'
|
||||
}
|
||||
include ':NetSSL_OpenSSL:samples'
|
||||
//include ':Data:samples'
|
||||
//include ':NetSSL_OpenSSL:samples'
|
||||
if (os.windows) {
|
||||
include ':NetSSL_Win:samples'
|
||||
}
|
||||
include ':JSON:samples'
|
||||
//include ':MongoDB:samples'
|
||||
include ':MongoDB:samples'
|
||||
include ':Net:samples'
|
||||
include ':PageCompiler:samples'
|
||||
include ':PDF:samples'
|
||||
|
||||
73
settings.gradle.win
Normal file
73
settings.gradle.win
Normal file
@@ -0,0 +1,73 @@
|
||||
def os = org.gradle.internal.os.OperatingSystem.current()
|
||||
rootProject.name = 'Poco'
|
||||
rootProject.buildFileName = 'build.gradle.win'
|
||||
|
||||
include ':CppUnit'
|
||||
include ':Encodings'
|
||||
include ':Foundation'
|
||||
include ':XML'
|
||||
include ':JSON'
|
||||
include ':Util'
|
||||
include ':Net'
|
||||
include ':Crypto'
|
||||
include ':NetSSL_OpenSSL'
|
||||
if (os.windows) {
|
||||
include ':NetSSL_Win'
|
||||
}
|
||||
include ':Data'
|
||||
if (os.windows) {
|
||||
include ':Data:ODBC'
|
||||
include ':Data:SQLite'
|
||||
include ':Data:MySQL'
|
||||
}
|
||||
include ':Zip'
|
||||
include ':PageCompiler'
|
||||
include ':PageCompiler:File2Page'
|
||||
include ':PDF'
|
||||
include ':CppParser'
|
||||
include ':MongoDB'
|
||||
include ':Redis'
|
||||
include ':PocoDoc'
|
||||
include ':ProGen'
|
||||
|
||||
include ':Encodings:testsuite'
|
||||
include ':Foundation:testsuite'
|
||||
include ':XML:testsuite'
|
||||
include ':JSON:testsuite'
|
||||
include ':Util:testsuite'
|
||||
include ':Net:testsuite'
|
||||
include ':Crypto:testsuite'
|
||||
include ':NetSSL_OpenSSL:testsuite'
|
||||
if (os.windows) {
|
||||
include ':NetSSL_Win:testsuite'
|
||||
}
|
||||
include ':Data:testsuite'
|
||||
if (os.windows) {
|
||||
include ':Data:ODBC:testsuite'
|
||||
include ':Data:SQLite:testsuite'
|
||||
include ':Data:MySQL:testsuite'
|
||||
}
|
||||
//include ':MongoDB:testsuite'
|
||||
include ':Redis:testsuite'
|
||||
include ':CppParser:testsuite'
|
||||
include ':Zip:testsuite'
|
||||
|
||||
include ':Encodings:samples'
|
||||
include ':Foundation:samples'
|
||||
if (os.windows) {
|
||||
include ':Data:samples'
|
||||
}
|
||||
include ':NetSSL_OpenSSL:samples'
|
||||
if (os.windows) {
|
||||
include ':NetSSL_Win:samples'
|
||||
}
|
||||
include ':JSON:samples'
|
||||
include ':MongoDB:samples'
|
||||
include ':Net:samples'
|
||||
include ':PageCompiler:samples'
|
||||
include ':PDF:samples'
|
||||
include ':Util:samples'
|
||||
include ':XML:samples'
|
||||
include ':SevenZip:samples'
|
||||
include ':Zip:samples'
|
||||
|
||||
Reference in New Issue
Block a user