mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-03 07:02:30 +00:00
Fixes and tweaks for 'vcxproj' script [skip ci] (zlib still needs some work)
This commit is contained in:
parent
f5da6e18fc
commit
53ec007459
@ -340,18 +340,18 @@ def check_for_version_discrepancies():
|
|||||||
'include': [
|
'include': [
|
||||||
'', # 'NOT FOUND'
|
'', # 'NOT FOUND'
|
||||||
'', # 'install'
|
'', # 'install'
|
||||||
'/dependencies/zlib_x##/include', # 'dependencies'
|
'/server/dependencies/zlib_x##/include', # 'dependencies'
|
||||||
# not sure if this should be '/libs/zlibng' or '/build/libs/zlibng' based on cmake behavior
|
# not sure if this should be '/libs/zlibng' or '/build/libs/zlibng' based on cmake behavior
|
||||||
'/build/libs/zlibng', # 'libs'
|
'/server/libs/zlibng', # 'libs'
|
||||||
'/vcpkg/vcpkg-export-##/installed/x##-windows/include', # 'vcpkg'
|
'/server/vcpkg/vcpkg-export-##/installed/x##-windows/include', # 'vcpkg'
|
||||||
'/build/libs/zlibng', # 'static'
|
'/server/build/libs/zlibng', # 'static'
|
||||||
'' # 'submodule'
|
'' # 'submodule'
|
||||||
],
|
],
|
||||||
'source': [
|
'source': [
|
||||||
'', # 'NOT FOUND'
|
'', # 'NOT FOUND'
|
||||||
'', # 'install'
|
'', # 'install'
|
||||||
'', # 'dependencies'
|
'', # 'dependencies'
|
||||||
'/libs/zlibng', # 'libs'
|
'/server/libs/zlibng', # 'libs'
|
||||||
'', # 'vcpkg'
|
'', # 'vcpkg'
|
||||||
'', # 'static'
|
'', # 'static'
|
||||||
'' # 'submodule'
|
'' # 'submodule'
|
||||||
@ -359,10 +359,10 @@ def check_for_version_discrepancies():
|
|||||||
'library': [
|
'library': [
|
||||||
'', # 'NOT FOUND'
|
'', # 'NOT FOUND'
|
||||||
'', # 'install'
|
'', # 'install'
|
||||||
'dependencies/zlib_x##/lib/zdll.lib', # 'dependencies'
|
'/server/dependencies/zlib_x##/lib/zdll.lib', # 'dependencies'
|
||||||
'', # 'libs'
|
'', # 'libs'
|
||||||
'/vcpkg/vcpkg-export-##/installed/x##-windows/&&lib/zlib.lib^debug/lib/zlibd.lib', # 'vcpkg'
|
'/server/vcpkg/vcpkg-export-##/installed/x##-windows/&&lib/zlib.lib^debug/lib/zlibd.lib', # 'vcpkg'
|
||||||
'/build/libs/zlibng/##&&zlibstatic.lib^zlibstaticd.lib', # 'static'
|
'/server/build/libs/zlibng/##&&zlibstatic.lib^zlibstaticd.lib', # 'static'
|
||||||
'' # 'submodule'
|
'' # 'submodule'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -399,16 +399,16 @@ def check_for_version_discrepancies():
|
|||||||
'include': [
|
'include': [
|
||||||
'', # 'NOT FOUND'
|
'', # 'NOT FOUND'
|
||||||
'', # 'install'
|
'', # 'install'
|
||||||
'/dependencies/luaj_x##/src', # 'dependencies'
|
'/server/dependencies/luaj_x##/src', # 'dependencies'
|
||||||
'', # 'libs'
|
'', # 'libs'
|
||||||
'/vcpkg/vcpkg-export-##/installed/x##-windows/include', # 'vcpkg'
|
'/server/vcpkg/vcpkg-export-##/installed/x##-windows/include', # 'vcpkg'
|
||||||
'', # 'static'
|
'', # 'static'
|
||||||
'' # 'submodule'
|
'' # 'submodule'
|
||||||
],
|
],
|
||||||
'source': [
|
'source': [
|
||||||
'', # 'NOT FOUND'
|
'', # 'NOT FOUND'
|
||||||
'', # 'install'
|
'', # 'install'
|
||||||
'/dependencies/luaj_x##/src', # 'dependencies'
|
'/server/dependencies/luaj_x##/src', # 'dependencies'
|
||||||
'', # 'libs'
|
'', # 'libs'
|
||||||
'', # 'vcpkg'
|
'', # 'vcpkg'
|
||||||
'', # 'static'
|
'', # 'static'
|
||||||
@ -417,10 +417,10 @@ def check_for_version_discrepancies():
|
|||||||
'library': [
|
'library': [
|
||||||
'', # 'NOT FOUND'
|
'', # 'NOT FOUND'
|
||||||
'', # 'install'
|
'', # 'install'
|
||||||
'/dependencies/luaj_x##/bin/lua51.lib', # 'dependencies'
|
'/server/dependencies/luaj_x##/bin/lua51.lib', # 'dependencies'
|
||||||
'', # 'libs'
|
'', # 'libs'
|
||||||
# debug lua package likely incorrect..should be 'lua51d.lib' - or whatever debug version is
|
# debug lua package likely incorrect..should be 'lua51d.lib' - or whatever debug version is
|
||||||
'/vcpkg/vcpkg-export-##/installed/x##-windows/&&lib/lua51.lib^debug/lib/lua51.lib', # 'vcpkg'
|
'/server/vcpkg/vcpkg-export-##/installed/x##-windows/&&lib/lua51.lib^debug/lib/lua51.lib', # 'vcpkg'
|
||||||
'', # 'static'
|
'', # 'static'
|
||||||
'' # 'submodule'
|
'' # 'submodule'
|
||||||
]
|
]
|
||||||
@ -429,9 +429,9 @@ def check_for_version_discrepancies():
|
|||||||
'include': [
|
'include': [
|
||||||
'', # 'NOT FOUND'
|
'', # 'NOT FOUND'
|
||||||
'', # 'install'
|
'', # 'install'
|
||||||
'/dependencies/boost', # 'dependencies'
|
'/server/dependencies/boost', # 'dependencies'
|
||||||
'', # 'libs'
|
'', # 'libs'
|
||||||
'/vcpkg/vcpkg-export-##/installed/x##-windows/include', # 'vcpkg'
|
'/server/vcpkg/vcpkg-export-##/installed/x##-windows/include', # 'vcpkg'
|
||||||
'', # 'static'
|
'', # 'static'
|
||||||
'' # 'submodule'
|
'' # 'submodule'
|
||||||
],
|
],
|
||||||
@ -447,9 +447,9 @@ def check_for_version_discrepancies():
|
|||||||
'library': [
|
'library': [
|
||||||
'', # 'NOT FOUND'
|
'', # 'NOT FOUND'
|
||||||
'', # 'install'
|
'', # 'install'
|
||||||
'/dependencies/boost', # 'dependencies'
|
'/server/dependencies/boost', # 'dependencies'
|
||||||
'', # 'libs'
|
'', # 'libs'
|
||||||
'/vcpkg/vcpkg-export', # 'vcpkg'
|
'/server/vcpkg/vcpkg-export', # 'vcpkg'
|
||||||
'', # 'static'
|
'', # 'static'
|
||||||
'' # 'submodule'
|
'' # 'submodule'
|
||||||
]
|
]
|
||||||
@ -458,9 +458,9 @@ def check_for_version_discrepancies():
|
|||||||
'include': [
|
'include': [
|
||||||
'', # 'NOT FOUND'
|
'', # 'NOT FOUND'
|
||||||
'', # 'install'
|
'', # 'install'
|
||||||
'/dependencies/libsodium/include', # 'dependencies'
|
'/server/dependencies/libsodium/include', # 'dependencies'
|
||||||
'', # 'libs'
|
'', # 'libs'
|
||||||
'/vcpkg/vcpkg-export-##/installed/x##-windows/include', # 'vcpkg'
|
'/server/vcpkg/vcpkg-export-##/installed/x##-windows/include', # 'vcpkg'
|
||||||
'', # 'static'
|
'', # 'static'
|
||||||
'' # 'submodule'
|
'' # 'submodule'
|
||||||
],
|
],
|
||||||
@ -476,10 +476,11 @@ def check_for_version_discrepancies():
|
|||||||
'library': [
|
'library': [
|
||||||
'', # 'NOT FOUND'
|
'', # 'NOT FOUND'
|
||||||
'', # 'install'
|
'', # 'install'
|
||||||
'dependencies/libsodium/##/dynamic/libsodium.lib', # 'dependencies'
|
'/server/dependencies/libsodium/##/dynamic/libsodium.lib', # 'dependencies'
|
||||||
'', # 'libs'
|
'', # 'libs'
|
||||||
# debug libsodium package likely incorrect..should be 'libsodiumd.lib' - or whatever debug version is
|
# debug libsodium package likely incorrect..should be 'libsodiumd.lib' - or whatever debug version is
|
||||||
'/vcpkg/vcpkg-export-##/installed/x##-windows/&&lib/libsodium.lib^debug/lib/libsodium.lib', # 'vcpkg'
|
'/server/vcpkg/vcpkg-export-##/installed/x##-windows/&&lib/libsodium.lib^'
|
||||||
|
'debug/lib/libsodium.lib', # 'vcpkg'
|
||||||
'', # 'static'
|
'', # 'static'
|
||||||
'' # 'submodule'
|
'' # 'submodule'
|
||||||
]
|
]
|
||||||
@ -488,9 +489,9 @@ def check_for_version_discrepancies():
|
|||||||
'include': [
|
'include': [
|
||||||
'', # 'NOT FOUND'
|
'', # 'NOT FOUND'
|
||||||
'', # 'install'
|
'', # 'install'
|
||||||
'/dependencies/openssl_x##/include', # 'dependencies'
|
'/server/dependencies/openssl_x##/include', # 'dependencies'
|
||||||
'', # 'libs'
|
'', # 'libs'
|
||||||
'/vcpkg/vcpkg-export-##/installed/x##-windows/include', # 'vcpkg'
|
'/server/vcpkg/vcpkg-export-##/installed/x##-windows/include', # 'vcpkg'
|
||||||
'', # 'static'
|
'', # 'static'
|
||||||
'' # 'submodule'
|
'' # 'submodule'
|
||||||
],
|
],
|
||||||
@ -506,12 +507,12 @@ def check_for_version_discrepancies():
|
|||||||
'library': [
|
'library': [
|
||||||
'', # 'NOT FOUND'
|
'', # 'NOT FOUND'
|
||||||
'', # 'install'
|
'', # 'install'
|
||||||
'/dependencies/openssl_x##/lib/VC/&&libeay32MD.lib^libeay32MDd.lib^'
|
'/server/dependencies/openssl_x##/lib/VC/&&libeay32MD.lib^libeay32MDd.lib^'
|
||||||
'ssleay32MD.lib^ssleay32MDd.lib', # 'dependencies'
|
'ssleay32MD.lib^ssleay32MDd.lib', # 'dependencies'
|
||||||
'', # 'libs'
|
'', # 'libs'
|
||||||
# debug openssl package likely incorrect..should be
|
# debug openssl package likely incorrect..should be
|
||||||
# 'libeay32d.lib' and 'ssleay32d.lib' - or whatever debug versions are
|
# 'libeay32d.lib' and 'ssleay32d.lib' - or whatever debug versions are
|
||||||
'/vcpkg/vcpkg-export-##/installed/x##-windows/&&lib/libeay32.lib^'
|
'/server/vcpkg/vcpkg-export-##/installed/x##-windows/&&lib/libeay32.lib^'
|
||||||
'lib/ssleay32.lib^debug/lib/libeay32.lib^debug/lib/ssleay32.lib', # 'vcpkg'
|
'lib/ssleay32.lib^debug/lib/libeay32.lib^debug/lib/ssleay32.lib', # 'vcpkg'
|
||||||
'', # 'static'
|
'', # 'static'
|
||||||
'' # 'submodule'
|
'' # 'submodule'
|
||||||
@ -521,51 +522,61 @@ def check_for_version_discrepancies():
|
|||||||
# {[project]:{[build]:{[resource]:{[library]:{[reference]:priority}}}}}
|
# {[project]:{[build]:{[resource]:{[library]:{[reference]:priority}}}}}
|
||||||
context_tree = {}
|
context_tree = {}
|
||||||
# {[library]:priority}
|
# {[library]:priority}
|
||||||
global_priorities = {
|
global_priorities = {}
|
||||||
'mysql': 0,
|
# {[build]:{[library]:priority}}
|
||||||
'zlib': 0,
|
build_priorities = {}
|
||||||
'perl': 0,
|
|
||||||
'lua': 0,
|
|
||||||
'boost': 0,
|
|
||||||
'sodium': 0,
|
|
||||||
'openssl': 0
|
|
||||||
}
|
|
||||||
# loop for discovering first occurence dependency sources (assumes same search precedence as compiler includes)
|
# loop for discovering first occurence dependency sources (assumes same search precedence as compiler includes)
|
||||||
for key1 in project_dependencies:
|
for project in project_dependencies:
|
||||||
if key1 not in context_tree.keys():
|
if project not in context_tree.keys():
|
||||||
context_tree[key1] = {}
|
context_tree[project] = {}
|
||||||
for key2 in project_dependencies[key1]:
|
for build in project_dependencies[project]:
|
||||||
if key2 not in context_tree[key1].keys():
|
if build not in context_tree[project].keys():
|
||||||
context_tree[key1][key2] = {}
|
context_tree[project][build] = {}
|
||||||
for key3 in project_dependencies[key1][key2]:
|
if build not in build_priorities.keys():
|
||||||
if key3 not in context_tree[key1][key2].keys():
|
build_priorities[build] = {}
|
||||||
context_tree[key1][key2][key3] = {}
|
for resource in project_dependencies[project][build]:
|
||||||
for key4 in project_dependencies[key1][key2][key3]:
|
if resource not in context_tree[project][build].keys():
|
||||||
for path in project_dependencies[key1][key2][key3][key4]:
|
context_tree[project][build][resource] = {}
|
||||||
|
for reference_project in project_dependencies[project][build][resource]:
|
||||||
|
for path in project_dependencies[project][build][resource][reference_project]:
|
||||||
for library in libraries:
|
for library in libraries:
|
||||||
if library not in context_tree[key1][key2][key3].keys():
|
if library not in context_tree[project][build][resource].keys():
|
||||||
context_tree[key1][key2][key3][library] = {}
|
context_tree[project][build][resource][library] = {}
|
||||||
|
if library not in build_priorities[build].keys():
|
||||||
|
build_priorities[build][library] = 0
|
||||||
|
if library not in global_priorities.keys():
|
||||||
|
global_priorities[library] = 0
|
||||||
for reference in references:
|
for reference in references:
|
||||||
if reference not in context_tree[key1][key2][key3][library].keys():
|
if reference not in context_tree[project][build][resource][library].keys():
|
||||||
context_tree[key1][key2][key3][library][reference] = 0
|
context_tree[project][build][resource][library][reference] = 0
|
||||||
elif not context_tree[key1][key2][key3][library][reference] == 0:
|
elif not context_tree[project][build][resource][library][reference] == 0:
|
||||||
continue
|
continue
|
||||||
for priority in priorities:
|
for priority in priorities:
|
||||||
if hints[library][reference][priority] == '':
|
if hints[library][reference][priority] == '':
|
||||||
continue
|
continue
|
||||||
for hint in hints[library][reference][priority].split('|'):
|
for hint in hints[library][reference][priority].split('|'):
|
||||||
if is_hint_in_path(hint, path):
|
if is_hint_in_path(hint, path):
|
||||||
context_tree[key1][key2][key3][library][reference] = priority
|
context_tree[project][build][resource][library][reference] = priority
|
||||||
if context_tree[key1][key2][key3][library][reference] >\
|
if context_tree[project][build][resource][library][reference] >\
|
||||||
|
build_priorities[build][library]:
|
||||||
|
build_priorities[build][library] =\
|
||||||
|
context_tree[project][build][resource][library][reference]
|
||||||
|
if context_tree[project][build][resource][library][reference] >\
|
||||||
global_priorities[library]:
|
global_priorities[library]:
|
||||||
global_priorities[library] =\
|
global_priorities[library] =\
|
||||||
context_tree[key1][key2][key3][library][reference]
|
context_tree[project][build][resource][library][reference]
|
||||||
twrite('{0}<Global>'.format(col1))
|
twrite('{0}<Global>'.format(col1))
|
||||||
for library in libraries:
|
for library in libraries:
|
||||||
twrite('{0}<Library Name="{1}">{2}</Library>'.format(col2, library, global_priorities[library]))
|
twrite('{0}<Library Name="{1}">{2}</Library>'.format(col2, library, global_priorities[library]))
|
||||||
twrite('{0}</Global>'.format(col1))
|
twrite('{0}</Global>'.format(col1))
|
||||||
twrite('')
|
twrite('')
|
||||||
# loop for dumping 'ConflictTree'
|
for build in build_priorities.keys():
|
||||||
|
twrite('{0}<Build Type="{1}">'.format(col1, build))
|
||||||
|
for library in libraries:
|
||||||
|
twrite('{0}<Library Name="{1}">{2}</Library>'.format(col2, library, build_priorities[build][library]))
|
||||||
|
twrite('{0}</Build>'.format(col1))
|
||||||
|
twrite('')
|
||||||
|
# loop for dumping 'ContextTree'
|
||||||
for project in context_tree:
|
for project in context_tree:
|
||||||
twrite('{0}<Project Path="{1}">'.format(col1, project))
|
twrite('{0}<Project Path="{1}">'.format(col1, project))
|
||||||
for build in context_tree[project]:
|
for build in context_tree[project]:
|
||||||
@ -612,11 +623,21 @@ def check_for_version_discrepancies():
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
r_flag = False
|
if build_priorities[build][library] == 0:
|
||||||
|
if QUIET_REPORT is False:
|
||||||
|
rwrite(
|
||||||
|
'> No Build Library \'{0}\' .. skipping Project:Build:Resource'
|
||||||
|
' "{1}":"{2}":"{3}"'.format(
|
||||||
|
library,
|
||||||
|
project,
|
||||||
|
build,
|
||||||
|
resource
|
||||||
|
)
|
||||||
|
)
|
||||||
|
continue
|
||||||
for reference in context_tree[project][build][resource][library]:
|
for reference in context_tree[project][build][resource][library]:
|
||||||
if context_tree[project][build][resource][library][reference] == 0:
|
if context_tree[project][build][resource][library][reference] == 0:
|
||||||
continue
|
continue
|
||||||
r_flag = True
|
|
||||||
if not global_priorities[library] == context_tree[project][build][resource][library][reference]:
|
if not global_priorities[library] == context_tree[project][build][resource][library][reference]:
|
||||||
rwrite(
|
rwrite(
|
||||||
'> Global-Project Library \'{0}\' mis-match \'{1}!={2}\''
|
'> Global-Project Library \'{0}\' mis-match \'{1}!={2}\''
|
||||||
@ -631,6 +652,7 @@ def check_for_version_discrepancies():
|
|||||||
resource
|
resource
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
# 'builds' are allowed to have different dependencies..so, we'll start crossing at 'resource'
|
||||||
for cross_resource in context_tree[project][build]:
|
for cross_resource in context_tree[project][build]:
|
||||||
for cross_reference in context_tree[project][build][cross_resource][library]:
|
for cross_reference in context_tree[project][build][cross_resource][library]:
|
||||||
if cross_resource == resource and cross_reference == reference:
|
if cross_resource == resource and cross_reference == reference:
|
||||||
@ -657,14 +679,6 @@ def check_for_version_discrepancies():
|
|||||||
build
|
build
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if r_flag is False and QUIET_REPORT is False:
|
|
||||||
rwrite(
|
|
||||||
'> No References found for Library \'{0}\' in Project "{1}":"{2}"'.format(
|
|
||||||
library,
|
|
||||||
project,
|
|
||||||
resource
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -716,7 +730,7 @@ def is_hint_in_path(hint, path):
|
|||||||
if path[start_index:].find(alt_hint) == 0:
|
if path[start_index:].find(alt_hint) == 0:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user