mirror of
https://github.com/ModOrganizer2/modorganizer.git
synced 2026-07-27 13:58:24 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
352975e757 | ||
|
|
cd83f4e732 | ||
|
|
4f25a0689f | ||
|
|
3d642563cb | ||
|
|
0100c86887 | ||
|
|
8d04c77c29 | ||
|
|
b935ce3862 | ||
|
|
fcebf21c44 | ||
|
|
3d1dfadb40 | ||
|
|
c2c48bd39a | ||
|
|
9163a6dc34 | ||
|
|
8bf3037d4b | ||
|
|
4f1bb36933 | ||
|
|
cbdea13a9c | ||
|
|
b36c666899 | ||
|
|
bbab59f681 | ||
|
|
bfbb190998 | ||
|
|
c3b7737ae4 | ||
|
|
30878ae394 | ||
|
|
45a182a381 | ||
|
|
0b07cfa3f0 | ||
|
|
986330a3bd | ||
|
|
81c5ca5308 | ||
|
|
3a8da159da | ||
|
|
f6c3b516fd | ||
|
|
5665be7fd1 | ||
|
|
e522afa63b | ||
|
|
e3c3c2dcc4 | ||
|
|
519f215fd7 | ||
|
|
89221af929 | ||
|
|
59a36107a1 | ||
|
|
bc5d5d8bfa | ||
|
|
a294f8410f | ||
|
|
256cdb8df7 | ||
|
|
32480f7a81 | ||
|
|
e43762e7db | ||
|
|
afe0d749c4 | ||
|
|
eb97c46ed6 | ||
|
|
d958e11e2b | ||
|
|
b0e3e86a61 | ||
|
|
9df612c7ca | ||
|
|
0899724d90 | ||
|
|
53d9789740 | ||
|
|
4f8c71d626 | ||
|
|
ba8464f01f | ||
|
|
fd68248698 | ||
|
|
1ad2115e01 | ||
|
|
8d1dd6238f | ||
|
|
aaa1f52bdd | ||
|
|
b085aeea0e | ||
|
|
ea621ef859 | ||
|
|
3202713cff | ||
|
|
ad9d50e5f0 | ||
|
|
63eaf453e0 | ||
|
|
8a9a1680b0 | ||
|
|
1439347def | ||
|
|
0e9a86ebfc | ||
|
|
8da9ba5404 | ||
|
|
387326f2d6 | ||
|
|
a9a51f5085 | ||
|
|
2aae65d6f6 | ||
|
|
d07b4f7ff0 | ||
|
|
197c49e996 | ||
|
|
0d50427b83 | ||
|
|
e90fbb1df2 | ||
|
|
ddf841400e | ||
|
|
1bfc91046b | ||
|
|
d417229e6b | ||
|
|
1d1cd36957 | ||
|
|
a4dbe82be7 | ||
|
|
42417b6a01 | ||
|
|
f2b2ee1a11 | ||
|
|
ae6bb99c52 | ||
|
|
3869eaaf2b | ||
|
|
c037b74b00 | ||
|
|
5adb3b377e | ||
|
|
d4326250fb | ||
|
|
2d43645b64 | ||
|
|
6edf12f2f7 | ||
|
|
f55a5f2b21 | ||
|
|
5f5184ebfe | ||
|
|
9d260a43f6 | ||
|
|
9effaec234 | ||
|
|
502e950cde | ||
|
|
4908affbfc | ||
|
|
8dc51895e3 | ||
|
|
568b2abc12 | ||
|
|
30b29635f6 | ||
|
|
0c536a4c12 | ||
|
|
967c2ae653 | ||
|
|
ba176e5e9b | ||
|
|
c344714661 | ||
|
|
a3a4d5441d | ||
|
|
e60e2858d8 | ||
|
|
495846534d | ||
|
|
4a8c7306be | ||
|
|
7b087f8f9d | ||
|
|
eff0f46872 | ||
|
|
752bed064c | ||
|
|
750239bebb | ||
|
|
865c75a499 | ||
|
|
eca56079d5 | ||
|
|
e31cf3f2fd | ||
|
|
3670ab2528 | ||
|
|
235d893eb8 | ||
|
|
c2ed844eeb | ||
|
|
cb09ace972 | ||
|
|
0dedf5a875 | ||
|
|
ec9c78f8fa | ||
|
|
c07e48075e | ||
|
|
688e149c96 | ||
|
|
87d5fe28f6 | ||
|
|
ce38a3bd33 | ||
|
|
71b8c00592 | ||
|
|
20442cd4de | ||
|
|
c236078aa1 | ||
|
|
9a88a190eb | ||
|
|
d03e4f45ef | ||
|
|
9e2bcffc32 | ||
|
|
2e78a381ea | ||
|
|
bb56696f7e | ||
|
|
ca54ee2e9a | ||
|
|
2025145ff6 | ||
|
|
1b1fc247df | ||
|
|
dd37152eae | ||
|
|
82e6c98043 | ||
|
|
29dadf52f1 | ||
|
|
38c5899fef | ||
|
|
b9b12ca765 | ||
|
|
78b686b2bc | ||
|
|
42a68689fe | ||
|
|
c7d583bcf1 | ||
|
|
d6da51536f | ||
|
|
d4a287a4cc | ||
|
|
91576257bc | ||
|
|
a7ef089650 | ||
|
|
37c3bea7dd | ||
|
|
fe8c3aaea5 | ||
|
|
dda9e11976 | ||
|
|
9945b5e926 | ||
|
|
3659284ab6 | ||
|
|
2a50683133 | ||
|
|
efaba90706 | ||
|
|
159501d076 | ||
|
|
4dbb3b148d | ||
|
|
408b7933d2 | ||
|
|
efb54100dc | ||
|
|
f339cc8431 | ||
|
|
49de6e8d25 | ||
|
|
dbbd0c4eec | ||
|
|
4ff751fb7e | ||
|
|
d8d81ee06f | ||
|
|
a4b69c9ed8 | ||
|
|
7f9af7f93e | ||
|
|
9ac845779a | ||
|
|
053ebc898f | ||
|
|
0bd38e3f67 | ||
|
|
7f4f4cafea | ||
|
|
d1932bfc8e | ||
|
|
a284cbf232 | ||
|
|
fe54b6c46a | ||
|
|
d82ca00733 | ||
|
|
1a12b1f1f6 | ||
|
|
184cff8a77 | ||
|
|
f1aaf92afb | ||
|
|
8f64a1d136 | ||
|
|
b1cfc45853 | ||
|
|
76bee42dd1 | ||
|
|
0f8ae51459 | ||
|
|
dfdf80417e | ||
|
|
d4754f4d3c | ||
|
|
1cb0a49dfc | ||
|
|
9d88ca13b9 | ||
|
|
ca6d7c7d11 | ||
|
|
077a58f410 | ||
|
|
9d4b7a1df0 | ||
|
|
9a7b0ee2c7 | ||
|
|
f5c86bc22c | ||
|
|
2fb4917111 |
+82
@@ -0,0 +1,82 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[mod-organizer.organizer]
|
||||
file_filter = organizer/organizer_<lang>.ts
|
||||
source_file = organizer/organizer_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.diagnosebasic]
|
||||
file_filter = plugins/diagnoseBasic/diagnoseBasic_<lang>.ts
|
||||
source_file = plugins/diagnoseBasic/diagnoseBasic_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.bsaextractor]
|
||||
file_filter = plugins/bsaExtractor/bsaExtractor_<lang>.ts
|
||||
source_file = plugins/bsaExtractor/bsaExtractor_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.checkfnis]
|
||||
file_filter = plugins/checkFNIS/checkFNIS_<lang>.ts
|
||||
source_file = plugins/checkFNIS/checkFNIS_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.inieditor]
|
||||
file_filter = plugins/iniEditor/iniEditor_<lang>.ts
|
||||
source_file = plugins/iniEditor/iniEditor_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.installerbain]
|
||||
file_filter = plugins/installerBAIN/installerBAIN_<lang>.ts
|
||||
source_file = plugins/installerBAIN/installerBAIN_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.installerbundle]
|
||||
file_filter = plugins/installerBundle/installerBundle_<lang>.ts
|
||||
source_file = plugins/installerBundle/installerBundle_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.installerfomod]
|
||||
file_filter = plugins/installerFomod/installerFomod_<lang>.ts
|
||||
source_file = plugins/installerFomod/installerFomod_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.installermanual]
|
||||
file_filter = plugins/installerManual/installerManual_<lang>.ts
|
||||
source_file = plugins/installerManual/installerManual_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.installerncc]
|
||||
file_filter = plugins/installerNCC/installerNCC_<lang>.ts
|
||||
source_file = plugins/installerNCC/installerNCC_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.installerquick]
|
||||
file_filter = plugins/installerQuick/installerQuick_<lang>.ts
|
||||
source_file = plugins/installerQuick/installerQuick_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.nmmimport]
|
||||
file_filter = plugins/NMMImport/NMMImport_<lang>.ts
|
||||
source_file = plugins/NMMImport/NMMImport_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.previewbase]
|
||||
file_filter = plugins/previewBase/previewBase_<lang>.ts
|
||||
source_file = plugins/previewBase/previewBase_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.previewdds]
|
||||
file_filter = plugins/previewDDS/previewDDS_<lang>.ts
|
||||
source_file = plugins/previewDDS/previewDDS_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.proxypython]
|
||||
file_filter = plugins/proxyPython/proxyPython_<lang>.ts
|
||||
source_file = plugins/proxyPython/proxyPython_en.ts
|
||||
source_lang = en
|
||||
|
||||
[mod-organizer.configurator]
|
||||
file_filter = plugins/pyniEdit/pyniEdit_<lang>.ts
|
||||
source_file = plugins/pyniEdit/pyniEdit_en.ts
|
||||
source_lang = en
|
||||
+2
-2
@@ -2,13 +2,13 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
|
||||
PROJECT(organizer)
|
||||
|
||||
|
||||
SET(DEPENDENCIES_DIR CACHE PATH "")
|
||||
# hint to find qt in dependencies path
|
||||
LIST(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR}/qt5/lib/cmake)
|
||||
|
||||
FILE(GLOB_RECURSE BOOST_ROOT ${DEPENDENCIES_DIR}/boost*/project-config.jam)
|
||||
GET_FILENAME_COMPONENT(BOOST_ROOT ${BOOST_ROOT} DIRECTORY)
|
||||
|
||||
SET(ZLIB_ROOT ${DEPENDENCIES_DIR}/zlib)
|
||||
|
||||
ADD_SUBDIRECTORY(src)
|
||||
ADD_SUBDIRECTORY(src)
|
||||
|
||||
+201
-14
@@ -37,6 +37,14 @@ def setup_config_variables():
|
||||
if 'ZLIBPATH' in os.environ:
|
||||
zlibpath = os.environ['ZLIBPATH']
|
||||
|
||||
git = 'git'
|
||||
if 'GIT' in os.environ:
|
||||
git = os.environ['GIT']
|
||||
|
||||
mercurial = 'hg'
|
||||
if 'MERCURIAL' in os.environ:
|
||||
hg = os.environ['HG']
|
||||
|
||||
vars = Variables('scons_configure.py')
|
||||
vars.AddVariables(
|
||||
PathVariable('BOOSTPATH', 'Set to point to your boost directory',
|
||||
@@ -50,12 +58,14 @@ def setup_config_variables():
|
||||
PathVariable.PathIsDir),
|
||||
PathVariable('SEVENZIPPATH', 'Path to 7zip sources', sevenzippath,
|
||||
PathVariable.PathIsDir),
|
||||
PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath,
|
||||
PathVariable.PathIsDir).
|
||||
PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath,
|
||||
PathVariable.PathIsDir),
|
||||
PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath,
|
||||
PathVariable.PathIsDir)
|
||||
PathVariable('GIT', 'Path to git executable', git,
|
||||
PathVariable.PathIsFile),
|
||||
PathVariable('MERCURIAL', 'Path to hg executable', mercurial,
|
||||
PathVariable.PathIsFile),
|
||||
PathVariable('IWYU', 'Path to include-what-you-use executable', None,
|
||||
PathVariable.PathIsFile)
|
||||
)
|
||||
|
||||
return vars
|
||||
@@ -235,6 +245,157 @@ def DisableQtModules(self, *modules):
|
||||
for module in modules:
|
||||
self['CPPPATH'].remove(os.path.join('$QTDIR', 'include', 'QT' + module))
|
||||
|
||||
def setup_IWYU(env):
|
||||
import SCons.Defaults
|
||||
import SCons.Builder
|
||||
original_shared = SCons.Defaults.SharedObjectEmitter
|
||||
original_static = SCons.Defaults.StaticObjectEmitter
|
||||
|
||||
def DoIWYU(env, source, target):
|
||||
for i in range(len(source)):
|
||||
s = source[i]
|
||||
dir, name = os.path.split(str(s)) # I'm sure theres a way of getting this from scons
|
||||
# Don't bother looking at moc files and 7zip source
|
||||
if not name.startswith('moc_') and \
|
||||
not dir.startswith(env['SEVENZIPPATH']):
|
||||
# Put the .iwyu in the same place as the .obj
|
||||
targ = os.path.splitext(str(target[i]))[0]
|
||||
env.Depends(env.IWYU(targ + '.iwyu', s), target[i])
|
||||
|
||||
def shared_emitter(target, source, env):
|
||||
DoIWYU(env, source, target)
|
||||
return original_shared(target, source, env)
|
||||
|
||||
def static_emitter(target, source, env):
|
||||
DoIWYU(env, source, target)
|
||||
return original_static(target, source, env)
|
||||
|
||||
SCons.Defaults.SharedObjectEmitter = shared_emitter
|
||||
SCons.Defaults.StaticObjectEmitter = static_emitter
|
||||
|
||||
def emitter(target, source, env):
|
||||
env.Depends(target, env['IWYU_MAPPING_FILE'])
|
||||
env.Depends(target, env['IWYU_MASSAGE'])
|
||||
return target, source
|
||||
|
||||
def _concat_list(prefixes, list, suffixes, env, f=lambda x: x, target=None, source=None):
|
||||
""" Creates a new list from 'list' by first interpolating each element
|
||||
in the list using the 'env' dictionary and then calling f on the
|
||||
list, and concatenate the 'prefix' and 'suffix' LISTS onto each element of the list.
|
||||
A trailing space on the last element of 'prefix' or leading space on the
|
||||
first element of 'suffix' will cause them to be put into separate list
|
||||
elements rather than being concatenated.
|
||||
"""
|
||||
|
||||
if not list:
|
||||
return list
|
||||
|
||||
l = f(SCons.PathList.PathList(list).subst_path(env, target, source))
|
||||
if l is not None:
|
||||
list = l
|
||||
|
||||
# This bit replaces current concat_ixes
|
||||
|
||||
result = []
|
||||
|
||||
def process_stringlist(s):
|
||||
return [ str(env.subst(p, SCons.Subst.SUBST_RAW))
|
||||
for p in Flatten([s]) if p != '' ]
|
||||
|
||||
# ensure that prefix and suffix are strings
|
||||
prefixes = process_stringlist(prefixes)
|
||||
prefix = ''
|
||||
if len(prefixes) != 0:
|
||||
if prefixes[-1][-1] != ' ':
|
||||
prefix = prefixes.pop()
|
||||
|
||||
suffixes = process_stringlist(suffixes)
|
||||
suffix = ''
|
||||
if len(suffixes) != 0:
|
||||
if suffixes[-1][0] != ' ':
|
||||
suffix = suffixes.pop(0)
|
||||
|
||||
for x in list:
|
||||
if isinstance(x, SCons.Node.FS.File):
|
||||
result.append(x)
|
||||
continue
|
||||
x = str(x)
|
||||
if x:
|
||||
result.append(prefixes)
|
||||
if prefix:
|
||||
if x[:len(prefix)] != prefix:
|
||||
x = prefix + x
|
||||
result.append(x)
|
||||
if suffix:
|
||||
if x[-len(suffix):] != suffix:
|
||||
result[-1] = result[-1] + suffix
|
||||
result.append(suffixes)
|
||||
return result
|
||||
|
||||
env['_concat_list'] = _concat_list
|
||||
# Note to self: command 2>&1 | other command appears to work as I would hope
|
||||
# except it eats errors
|
||||
iwyu = SCons.Builder.Builder(
|
||||
action=[
|
||||
'$IWYU_MASSAGE $TARGET $IWYU $IWYU_FLAGS $IWYU_MAPPINGS $IWYU_COMCOM $SOURCE'
|
||||
],
|
||||
emitter=emitter,
|
||||
suffix='.iwyu',
|
||||
src_suffix='.cpp')
|
||||
|
||||
env.Append(BUILDERS={'IWYU': iwyu})
|
||||
|
||||
# Sigh - IWYU is a right bum as it doesn't recognise /I so I have to
|
||||
# duplicate most of the usual stuff
|
||||
|
||||
env['IWYU_FLAGS'] = [
|
||||
# This might turn down the output a bit. I hope
|
||||
'-Xiwyu', '--transitive_includes_only',
|
||||
# Seem to be needed for a windows build
|
||||
'-D_MT', '-D_DLL', '-m32',
|
||||
# This is something to do with clang, windows and boost headers
|
||||
'-DBOOST_USE_WINDOWS_H',
|
||||
# There's a lot of this, disabled for now
|
||||
'-Wno-inconsistent-missing-override',
|
||||
# Mark boost and Qt headers as system headers to disable a lot of noise.
|
||||
# I'm sure there has to be a better way than saying 'prefix=Q'
|
||||
'--system-header-prefix=Q',
|
||||
'--system-header-prefix=boost/',
|
||||
# Should be able to get this info from our setup really
|
||||
'-fmsc-version=1800', '-D_MSC_VER=1800',
|
||||
# clang and qt don't agree about these because clang says its gcc 4.2
|
||||
# and QT doesn't realise it's clang
|
||||
'-DQ_COMPILER_INITIALIZER_LISTS',
|
||||
'-DQ_COMPILER_DECLTYPE',
|
||||
'-DQ_COMPILER_VARIADIC_TEMPLATES',
|
||||
]
|
||||
if env['CONFIG'] == 'debug':
|
||||
env['IWYU_FLAGS'] += [ '-D_DEBUG' ]
|
||||
|
||||
env['IWYU_DEFPREFIX'] = '-D'
|
||||
env['IWYU_DEFSUFFIX'] = ''
|
||||
env['IWYU_CPPDEFFLAGS'] = '${_defines(IWYU_DEFPREFIX, CPPDEFINES, IWYU_DEFSUFFIX, __env__)}'
|
||||
|
||||
env['IWYU_INCPREFIX'] = '-I'
|
||||
env['IWYU_INCSUFFIX'] = ''
|
||||
env['IWYU_CPPINCFLAGS'] = '$( ${_concat(IWYU_INCPREFIX, CPPPATH, IWYU_INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)'
|
||||
|
||||
env['IWYU_PCH_PREFIX'] = '-include' # Amazingly this works without a space
|
||||
env['IWYU_PCH_SUFFIX'] = ''
|
||||
env['IWYU_PCHFILES'] = '$( ${_concat(IWYU_PCH_PREFIX, PCHSTOP, IWYU_PCH_SUFFIX, __env__, target=TARGET, source=SOURCE)} $)'
|
||||
|
||||
env['IWYU_COMCOM'] = '$IWYU_CPPDEFFLAGS $IWYU_CPPINCFLAGS $IWYU_PCHFILES $CCPDBFLAGS'
|
||||
env['IWYU_MAPPING_PREFIX'] = ['-Xiwyu', '--mapping_file=']
|
||||
env['IWYU_MAPPING_SUFFIX'] = ''
|
||||
env['IWYU_MAPPINGS'] = '$( ${_concat_list(IWYU_MAPPING_PREFIX, IWYU_MAPPING_FILE, IWYU_MAPPING_SUFFIX, __env__, f=lambda l: [ str(x) for x in l], target=TARGET, source=SOURCE)} $)'
|
||||
|
||||
env['IWYU_MAPPING_FILE'] = [
|
||||
env.File('#/modorganizer/qt5_4.imp'),
|
||||
env.File('#/modorganizer/win.imp'),
|
||||
env.File('#/modorganizer/mappings.imp')
|
||||
]
|
||||
|
||||
env['IWYU_MASSAGE'] = env.File('#/modorganizer/massage_messages.py')
|
||||
|
||||
# Create base environment
|
||||
vars = setup_config_variables()
|
||||
@@ -270,16 +431,24 @@ msvs_version = int(env['MSVS_VERSION'].split('.')[0]) + 2000
|
||||
if msvs_version > 2010:
|
||||
msvs_version += 1
|
||||
|
||||
# Need more work on the qt version stuff
|
||||
#build-ModOrganizer-Desktop_Qt_5_4_1_MSVC2013_OpenGL_32bit-Debug
|
||||
build_dir = 'scons-ModOrganizer-QT_%s_for_MSVS%d_32bit-%s' % (
|
||||
#os.path.basename(env['QTDIR']).replace('.', '_'),
|
||||
'5_4_1_OpenGL',
|
||||
# Read the QT version info
|
||||
with open(os.path.join(env['QTDIR'], 'mkspecs', 'qconfig.pri')) as qtinfo:
|
||||
for line in qtinfo:
|
||||
info = re.split(r'\s*=\s*', line.rstrip())
|
||||
if info[0] == 'QT_VERSION':
|
||||
env[info[0]] = info[1]
|
||||
elif '_VERSION' in info[0]:
|
||||
env[info[0]] = int(info[1])
|
||||
|
||||
build_dir = 'scons-ModOrganizer-QT_%s_%sfor_MSVS%d_32bit-%s' % (
|
||||
env['QT_VERSION'].replace('.', '_'),
|
||||
'OpenGL_' if 'opengl' in env['QTDIR'] else '',
|
||||
msvs_version,
|
||||
config.title())
|
||||
|
||||
# Put the sconsign file somewhere sane
|
||||
env.SConsignFile(os.path.join(build_dir, '.sconsign.dblite'))
|
||||
env.CacheDir(os.path.join(build_dir, '.cache'))
|
||||
|
||||
#this doesn't seem to work
|
||||
#env.VariantDir('build/$CONFIG', 'source')
|
||||
@@ -351,6 +520,11 @@ else:
|
||||
env.AppendUnique(CPPFLAGS = [ '/O2', '/MD' ])
|
||||
env.AppendUnique(LINKFLAGS = [ '/OPT:REF', '/OPT:ICF' ])
|
||||
|
||||
# Set up include what you use. Add this as an extra compile step. Note it
|
||||
# doesn't currently generate an output file (use the output instead!).
|
||||
if 'IWYU' in env:
|
||||
setup_IWYU(env)
|
||||
|
||||
# /OPT:REF removes unreferenced code
|
||||
# for release, use /OPT:ICF (comdat folding: coalesce identical blocks of code)
|
||||
|
||||
@@ -365,9 +539,6 @@ qt_env = env.Clone()
|
||||
if qt_env['CONFIG'] != 'debug':
|
||||
qt_env.AppendUnique(CPPDEFINES = [ 'QT_NO_DEBUG' ])
|
||||
|
||||
# Better way of working this out
|
||||
qt_env['QT_MAJOR_VERSION'] = 5 #int(os.path.basename(env['QTDIR']).split('.')[0])
|
||||
|
||||
qt_env.Tool('qt%d' % qt_env['QT_MAJOR_VERSION'])
|
||||
|
||||
# FIXME See if I can work out how to get official scons qt to work. Appears
|
||||
@@ -452,6 +623,20 @@ if qt_env['QT_MAJOR_VERSION'] > 4:
|
||||
]
|
||||
|
||||
# Finally, set up rules to install the DLLs.
|
||||
# use windeployqt.exe to install all required libraries
|
||||
#SET(windeploy_parameters --no-translations --no-plugins --libdir dlls --release-with-debug-info --no-compiler-runtime)
|
||||
#INSTALL(
|
||||
# CODE
|
||||
# "EXECUTE_PROCESS(
|
||||
# COMMAND
|
||||
# ${qt5bin}/windeployqt.exe ModOrganizer.exe ${windeploy_parameters}
|
||||
# COMMAND
|
||||
# ${qt5bin}/windeployqt.exe uibase.dll ${windeploy_parameters}
|
||||
# WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
|
||||
# )"
|
||||
#)
|
||||
# this should probably be a rule though it seems to produce an awful lot of
|
||||
# Stuff(TM). or a postaction
|
||||
|
||||
dll_path = os.path.join('$INSTALL_PATH', 'DLLs')
|
||||
|
||||
@@ -482,8 +667,10 @@ if 'WebKit' in libs_to_install and qt_env['QT_MAJOR_VERSION'] == 4:
|
||||
if qt_env['QT_MAJOR_VERSION'] > 4:
|
||||
# Guesswork a bit.
|
||||
dlls_to_install += [
|
||||
os.path.join(env['QTDIR'], 'bin', 'icu%s53.dll' % lib)
|
||||
for lib in ('dt','in', 'uc')
|
||||
os.path.join(env['QTDIR'],
|
||||
'bin',
|
||||
'icu%s%d%d.dll' % (lib, qt_env['QT_MAJOR_VERSION'], qt_env['QT_MINOR_VERSION'] - 1))
|
||||
for lib in ('dt','in', 'uc')
|
||||
]
|
||||
|
||||
platform_dlls = []
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
[
|
||||
|
||||
# for boost???
|
||||
# These are probably correct but might need a revisit as if you look at the boost documentation pages, it
|
||||
# can give you huge lists of alternate includes...
|
||||
{ symbol: [ "BOOST_FOREACH", "private", "<boost/foreach.hpp>", "public" ] },
|
||||
|
||||
{ include: [ "@\"boost/bind/.*\"", "private", "<boost/bind.hpp>", "public" ] },
|
||||
{ include: [ "@\"boost/algorithm/string/.*\"", "private", "<boost/algorithm/string.hpp>", "public" ] },
|
||||
{ include: [ "@\"boost/assign/.*\"", "private", "<boost/assign.hpp>", "public" ] },
|
||||
{ include: [ "@\"boost/filesystem/.*\"", "private", "<boost/filesystem.hpp>", "public" ] },
|
||||
{ include: [ "@\"boost/format/.*\"", "private", "<boost/format.hpp>", "public" ] },
|
||||
{ include: [ "@\"boost/function/.*\"", "private", "<boost/function.hpp>", "public" ] },
|
||||
{ include: [ "@\"boost/local/.*\"", "private", "<boost/locale.hpp>", "public" ] },
|
||||
{ include: [ "@\"boost/python/.*\"", "private", "<boost/python.hpp>", "public" ] },
|
||||
{ include: [ "@\"boost/signals2/.*\"", "private", "<boost/signals2.hpp>", "public" ] },
|
||||
{ include: [ "\"boost/smart_ptr/scoped_array.hpp\"", "private", "<boost/scoped_array.hpp>", "public" ] },
|
||||
{ include: [ "\"boost/smart_ptr/shared_ptr.hpp\"", "private", "<boost/shared_ptr.hpp>", "public" ] },
|
||||
# this appears to be excessive
|
||||
#{ include: [ "@\"boost/thread/.*\"", "private", "<boost/thread.hpp>", "public" ] },
|
||||
|
||||
# And this is specific to us
|
||||
{ include: [ "\"appconfig.inc\"", "private", "\"appconfig.h\"", "public" ] },
|
||||
|
||||
]
|
||||
|
||||
# Ones I don't yet know how to deal with
|
||||
#include "boost/fusion/container/vector/vector10_fwd.hpp" // for fusion
|
||||
#include "boost/iterator/iterator_facade.hpp" // for operator!=
|
||||
#include "boost/iterator/iterator_facade.hpp"
|
||||
@@ -0,0 +1,157 @@
|
||||
from collections import defaultdict
|
||||
|
||||
import fileinput
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
"""
|
||||
|
||||
source/organizer/aboutdialog.h should add these lines:
|
||||
#include <QObject> // for Q_OBJECT, slots
|
||||
#include <QString> // for QString
|
||||
class QListWidgetItem;
|
||||
class QWidget;
|
||||
|
||||
source/organizer/aboutdialog.h should remove these lines:
|
||||
- #include <QListWidgetItem> // lines 25-25
|
||||
- #include <utility> // lines 28-28
|
||||
- #include <vector> // lines 27-27
|
||||
- class DownloadManager; // lines 47-47
|
||||
|
||||
The full include-list for source/organizer/aboutdialog.h:
|
||||
#include <QDialog> // for QDialog
|
||||
#include <QObject> // for Q_OBJECT, slots
|
||||
#include <QString> // for QString
|
||||
#include <map> // for map
|
||||
class QListWidgetItem;
|
||||
class QWidget;
|
||||
namespace Ui { class AboutDialog; } // lines 31-31
|
||||
---
|
||||
"""
|
||||
|
||||
removing = None
|
||||
includes = dict()
|
||||
|
||||
adding = None
|
||||
added = dict()
|
||||
lcadded = dict()
|
||||
|
||||
foundline = None
|
||||
|
||||
errors = False
|
||||
|
||||
messages = defaultdict(list)
|
||||
|
||||
def process_next_line(line, outfile):
|
||||
""" Read a line of output/error from include-what-you use
|
||||
Turn clang errors into a form QT creator recognises
|
||||
Raise warnings for unneeded includes
|
||||
"""
|
||||
global removing
|
||||
global includes
|
||||
global foundline
|
||||
global errors
|
||||
global added
|
||||
global adding
|
||||
line = line.rstrip()
|
||||
print >> outfile, line
|
||||
|
||||
if line.endswith(' should remove these lines:'):
|
||||
adding = None
|
||||
removing = (line.split(' '))[0]
|
||||
elif line.endswith(' should add these lines:'):
|
||||
removing = None
|
||||
adding = (line.split(' '))[0]
|
||||
elif line == '' or line.startswith(' the full include-list'):
|
||||
adding = None
|
||||
removing = None
|
||||
elif adding:
|
||||
m = re.match(r'.*class (.*);', line)
|
||||
if m:
|
||||
added[m.group(1)] = (adding, line)
|
||||
lcadded[m.group(1).lower() + '.h'] = m.group(1)
|
||||
else:
|
||||
added[line] = (adding, line)
|
||||
elif removing:
|
||||
# Really we should stash these so that if we get a 'class xxx' in
|
||||
# the add lines we can print it here. also we could do the case
|
||||
# fixing.
|
||||
m = re.match(r'- #include [<"](.*)[">] +// lines (.*)-', line)
|
||||
if m:
|
||||
foundline = m.group(2)
|
||||
# Note: In this project at least we have a naming convention of
|
||||
# lower case filename and upper case classname.
|
||||
clname = m.group(1)
|
||||
if clname not in added:
|
||||
if clname in lcadded:
|
||||
clname = lcadded[clname]
|
||||
if clname in added:
|
||||
messages[removing].append(
|
||||
'%s(%s) : warning I0004: Replace include of %s with '
|
||||
'forward reference %s' % (
|
||||
removing, m.group(2), m.group(1), added[clname][1]))
|
||||
del added[clname]
|
||||
else:
|
||||
messages[removing].append(
|
||||
'%s(%s) : warning I0001: Unnecessary include of %s' % (
|
||||
removing, m.group(2), m.group(1)))
|
||||
|
||||
else:
|
||||
m = re.match(r'- (.*) +// lines (.*)-', line)
|
||||
if m:
|
||||
messages[removing].append(
|
||||
'%s(%s) : warning I0002: Unnecessary forward ref of %s' % (
|
||||
removing, m.group(2), m.group(1)))
|
||||
else:
|
||||
print '********* I got confused **********'
|
||||
elif line.startswith('In file included from'):
|
||||
line = re.sub(r'^(In file included from)(.*):(\d+):',
|
||||
r' \2(\3) : \1 here',
|
||||
line)
|
||||
# Note; QT Creator seems to be unwilling to let you double click the
|
||||
# line to select the code in question if you get a string of these, not
|
||||
# sure why.
|
||||
elif ': note:' in line:
|
||||
line = ' ' + re.sub(r':(\d+):\d+: note:', r'(\1) : note:', line)
|
||||
else:
|
||||
# Replace clang :line:column: type: with ms (line) : type nnnn:
|
||||
line = re.sub(r':(\d+):\d+: ([^:]*):', r'(\1) : \2 I1234:', line)
|
||||
if ' : error I1234:' in line:
|
||||
errors = True
|
||||
|
||||
print line
|
||||
|
||||
outfile = open(sys.argv[1], 'w')
|
||||
process = subprocess.Popen(sys.argv[2:],
|
||||
stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
|
||||
while True:
|
||||
output = process.stdout.readline()
|
||||
if output == '' and process.poll() is not None:
|
||||
break
|
||||
if output:
|
||||
process_next_line(output, outfile)
|
||||
|
||||
# A note: We should probably do some work as we use the source code line for
|
||||
# messages in include files...
|
||||
|
||||
if foundline is None:
|
||||
foundline = '1'
|
||||
|
||||
for add in added:
|
||||
messages[added[add][0]].append(
|
||||
'%s(%s) : warning I0003: Need to include %s' % (
|
||||
added[add][0], foundline, added[add][1]))
|
||||
|
||||
for file in sorted(messages.keys(), reverse = True):
|
||||
for line in messages[file]:
|
||||
print line
|
||||
|
||||
rc = process.poll()
|
||||
# The return code you get appears to be more to do with the amount of output
|
||||
# generated than any real error, so instead we should error if any ': error:'
|
||||
# lines are detected
|
||||
|
||||
if errors:
|
||||
sys.exit(1)
|
||||
@@ -20,7 +20,7 @@ Here is a complete list:
|
||||
* https://github.com/TanninOne/modorganizer-lootcli
|
||||
* https://github.com/TanninOne/modorganizer-helper
|
||||
* https://github.com/TanninOne/modorganizer-tool_nmmimport
|
||||
* https://github.com/TanninOne/modorganizer-tool_pyniedit
|
||||
* https://github.com/TanninOne/modorganizer-tool_configurator
|
||||
* https://github.com/TanninOne/modorganizer-tool_inieditor
|
||||
* https://github.com/TanninOne/modorganizer-preview_base
|
||||
* https://github.com/TanninOne/modorganizer-diagnose_basic
|
||||
@@ -32,9 +32,11 @@ Here is a complete list:
|
||||
* https://github.com/TanninOne/modorganizer-game_skyrim
|
||||
* https://github.com/TanninOne/modorganizer-game_oblivion
|
||||
* https://github.com/TanninOne/modorganizer-game_fallout3
|
||||
* https://github.com/TanninOne/modorganizer-game_fallout4
|
||||
* https://github.com/TanninOne/modorganizer-game_falloutnv
|
||||
* https://github.com/TanninOne/modorganizer-game_gamebryo
|
||||
* https://github.com/TanninOne/modorganizer-game_features
|
||||
* https://github.com/TanninOne/modorganizer-check_fnis
|
||||
* https://github.com/TanninOne/modorganizer-plugin_python
|
||||
* https://github.com/TanninOne/modorganizer-bsa_extractor
|
||||
* https://github.com/TanninOne/usvfs
|
||||
|
||||
+47
-36
@@ -18,10 +18,6 @@ SET(organizer_SRCS
|
||||
settings.cpp
|
||||
selfupdater.cpp
|
||||
selectiondialog.cpp
|
||||
savegameinfowidgetgamebryo.cpp
|
||||
savegameinfowidget.cpp
|
||||
savegamegamebryo.cpp
|
||||
savegame.cpp
|
||||
queryoverwritedialog.cpp
|
||||
profilesdialog.cpp
|
||||
profile.cpp
|
||||
@@ -35,6 +31,11 @@ SET(organizer_SRCS
|
||||
modlist.cpp
|
||||
modinfodialog.cpp
|
||||
modinfo.cpp
|
||||
modinfobackup.cpp
|
||||
modinfoforeign.cpp
|
||||
modinfooverwrite.cpp
|
||||
modinforegular.cpp
|
||||
modinfowithconflictinfo.cpp
|
||||
messagedialog.cpp
|
||||
mainwindow.cpp
|
||||
main.cpp
|
||||
@@ -61,7 +62,6 @@ SET(organizer_SRCS
|
||||
moapplication.cpp
|
||||
profileinputdialog.cpp
|
||||
icondelegate.cpp
|
||||
gameinfoimpl.cpp
|
||||
csvbuilder.cpp
|
||||
savetextasdialog.cpp
|
||||
qtgroupingproxy.cpp
|
||||
@@ -76,24 +76,20 @@ SET(organizer_SRCS
|
||||
previewdialog.cpp
|
||||
aboutdialog.cpp
|
||||
json.cpp
|
||||
safewritefile.cpp
|
||||
modflagicondelegate.cpp
|
||||
genericicondelegate.cpp
|
||||
organizerproxy.cpp
|
||||
viewmarkingscrollbar.cpp
|
||||
plugincontainer.cpp
|
||||
organizercore.cpp
|
||||
instancemanager.cpp
|
||||
usvfsconnector.cpp
|
||||
eventfilter.cpp
|
||||
|
||||
shared/inject.cpp
|
||||
shared/windows_error.cpp
|
||||
shared/error_report.cpp
|
||||
shared/directoryentry.cpp
|
||||
shared/gameinfo.cpp
|
||||
shared/oblivioninfo.cpp
|
||||
shared/fallout3info.cpp
|
||||
shared/falloutnvinfo.cpp
|
||||
shared/util.cpp
|
||||
shared/skyriminfo.cpp
|
||||
shared/appconfig.cpp
|
||||
shared/leaktrace.cpp
|
||||
shared/stackdata.cpp
|
||||
@@ -108,10 +104,6 @@ SET(organizer_HDRS
|
||||
settings.h
|
||||
selfupdater.h
|
||||
selectiondialog.h
|
||||
savegameinfowidgetgamebryo.h
|
||||
savegameinfowidget.h
|
||||
savegamegamebyro.h
|
||||
savegame.h
|
||||
queryoverwritedialog.h
|
||||
profilesdialog.h
|
||||
profile.h
|
||||
@@ -125,6 +117,11 @@ SET(organizer_HDRS
|
||||
modlist.h
|
||||
modinfodialog.h
|
||||
modinfo.h
|
||||
modinfobackup.h
|
||||
modinfoforeign.h
|
||||
modinfooverwrite.h
|
||||
modinforegular.h
|
||||
modinfowithconflictinfo.h
|
||||
messagedialog.h
|
||||
mainwindow.h
|
||||
loghighlighter.h
|
||||
@@ -150,7 +147,6 @@ SET(organizer_HDRS
|
||||
moapplication.h
|
||||
profileinputdialog.h
|
||||
icondelegate.h
|
||||
gameinfoimpl.h
|
||||
csvbuilder.h
|
||||
savetextasdialog.h
|
||||
qtgroupingproxy.h
|
||||
@@ -165,7 +161,6 @@ SET(organizer_HDRS
|
||||
previewdialog.h
|
||||
aboutdialog.h
|
||||
json.h
|
||||
safewritefile.h
|
||||
modflagicondelegate.h
|
||||
genericicondelegate.h
|
||||
organizerproxy.h
|
||||
@@ -173,17 +168,14 @@ SET(organizer_HDRS
|
||||
plugincontainer.h
|
||||
organizercore.h
|
||||
iuserinterface.h
|
||||
instancemanager.h
|
||||
usvfsconnector.h
|
||||
eventfilter.h
|
||||
|
||||
shared/inject.h
|
||||
shared/windows_error.h
|
||||
shared/error_report.h
|
||||
shared/directoryentry.h
|
||||
shared/gameinfo.h
|
||||
shared/oblivioninfo.h
|
||||
shared/fallout3info.h
|
||||
shared/falloutnvinfo.h
|
||||
shared/util.h
|
||||
shared/skyriminfo.h
|
||||
shared/appconfig.h
|
||||
shared/appconfig.inc
|
||||
shared/leaktrace.h
|
||||
@@ -196,7 +188,6 @@ SET(organizer_UIS
|
||||
simpleinstalldialog.ui
|
||||
settingsdialog.ui
|
||||
selectiondialog.ui
|
||||
savegameinfowidget.ui
|
||||
queryoverwritedialog.ui
|
||||
profilesdialog.ui
|
||||
overwriteinfodialog.ui
|
||||
@@ -246,15 +237,17 @@ FIND_PACKAGE(Qt5Declarative REQUIRED)
|
||||
FIND_PACKAGE(Qt5Network REQUIRED)
|
||||
FIND_PACKAGE(Qt5WinExtras REQUIRED)
|
||||
FIND_PACKAGE(Qt5WebKitWidgets REQUIRED)
|
||||
FIND_PACKAGE(Qt5LinguistTools)
|
||||
QT5_WRAP_UI(organizer_UIHDRS ${organizer_UIS})
|
||||
QT5_ADD_RESOURCES(organizer_RCCPPS ${organizer_QRCS})
|
||||
QT5_CREATE_TRANSLATION(organizer_translations_qm ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/organizer_en.ts)
|
||||
|
||||
INCLUDE_DIRECTORIES(${Qt5Declarative_INCLUDES})
|
||||
|
||||
ADD_DEFINITIONS(-DQT_MESSAGELOGCONTEXT)
|
||||
|
||||
# Boost
|
||||
SET(Boost_USE_STATIC_LIBS ON)
|
||||
SET(Boost_USE_STATIC_LIBS OFF)
|
||||
SET(Boost_USE_MULTITHREADED ON)
|
||||
SET(Boost_USE_STATIC_RUNTIME OFF)
|
||||
FIND_PACKAGE(Boost REQUIRED)
|
||||
@@ -275,31 +268,49 @@ SET(project_path "${default_project_path}" CACHE PATH "path to the other mo proj
|
||||
SET(lib_path "${project_path}/../../install/libs")
|
||||
|
||||
|
||||
MESSAGE(STATUS ${lib_path})
|
||||
MESSAGE(STATUS ${project_path})
|
||||
|
||||
INCLUDE_DIRECTORIES(${project_path}/uibase/src
|
||||
${project_path}/bsatk/src
|
||||
${project_path}/esptk/src
|
||||
${project_path}/archive/src
|
||||
${project_path}/game_features/src)
|
||||
${project_path}/../usvfs/usvfs
|
||||
${project_path}/game_gamebryo/src
|
||||
${project_path}/game_features/src
|
||||
${project_path}/githubpp/src)
|
||||
|
||||
|
||||
INCLUDE_DIRECTORIES(shared ${ZLIB_INCLUDE_DIRS})
|
||||
LINK_DIRECTORIES(${lib_path}
|
||||
${project_path}/../zlib/lib)
|
||||
|
||||
ADD_DEFINITIONS(-D_UNICODE -DUNICODE -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND git log -1 --format=%h
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(ModOrganizer WIN32 ${organizer_HDRS} ${organizer_SRCS} ${organizer_UIHDRS} ${organizer_RCS} ${organizer_RCCPPS})
|
||||
ADD_DEFINITIONS(-D_UNICODE -DUNICODE -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS -DGITID="${GIT_COMMIT_HASH}")
|
||||
|
||||
IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
SET(usvfs_name usvfs_x64)
|
||||
ELSE()
|
||||
SET(usvfs_name usvfs_x86)
|
||||
ENDIF()
|
||||
|
||||
ADD_EXECUTABLE(ModOrganizer WIN32 ${organizer_HDRS} ${organizer_SRCS} ${organizer_UIHDRS} ${organizer_RCS} ${organizer_RCCPPS} ${organizer_translations_qm})
|
||||
TARGET_LINK_LIBRARIES(ModOrganizer
|
||||
Qt5::Widgets Qt5::WinExtras Qt5::WebKitWidgets
|
||||
${Boost_LIBRARIES}
|
||||
zlibstatic
|
||||
uibase esptk bsatk
|
||||
uibase esptk bsatk githubpp
|
||||
${usvfs_name}
|
||||
Dbghelp advapi32 Version Shlwapi)
|
||||
|
||||
SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES COMPILE_FLAGS /GL)
|
||||
IF (NOT "${OPTIMIZE_COMPILE_FLAGS}" STREQUAL "")
|
||||
SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES COMPILE_FLAGS_RELWITHDEBINFO
|
||||
${OPTIMIZE_COMPILE_FLAGS})
|
||||
ENDIF()
|
||||
SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES LINK_FLAGS_RELWITHDEBINFO
|
||||
"/LTCG /INCREMENTAL:NO /LARGEADDRESSAWARE /OPT:REF /OPT:ICF")
|
||||
"/LARGEADDRESSAWARE ${OPTIMIZE_LINK_FLAGS}")
|
||||
|
||||
|
||||
QT5_USE_MODULES(ModOrganizer Widgets Declarative Network WebKitWidgets)
|
||||
|
||||
+14
-4
@@ -67,7 +67,6 @@ env.Uic(env.Glob('*.ui'))
|
||||
|
||||
env.RequireLibraries('uibase', 'shared', 'bsatk', 'esptk')
|
||||
|
||||
|
||||
env.AppendUnique(LIBS = [
|
||||
'shell32',
|
||||
'user32',
|
||||
@@ -96,6 +95,12 @@ env['CPPPATH'] += [
|
||||
'${BOOSTPATH}',
|
||||
]
|
||||
|
||||
#########################FUDGE###############################
|
||||
env['CPPPATH'] += [
|
||||
'../plugins/gameGamebryo',
|
||||
]
|
||||
#############################################################
|
||||
|
||||
env.AppendUnique(CPPDEFINES = [
|
||||
'_UNICODE',
|
||||
'_CRT_SECURE_NO_WARNINGS',
|
||||
@@ -105,7 +110,11 @@ env.AppendUnique(CPPDEFINES = [
|
||||
'QT_MESSAGELOGCONTEXT'
|
||||
])
|
||||
|
||||
env.AppendUnique(CPPFLAGS = [ '-wd4100', '-wd4127', '-wd4512', '-wd4189' ])
|
||||
# Boost produces very long names with msvc truncates. Doesn't seem to cause
|
||||
# problems.
|
||||
# Also note to remove the -wd4100 I hacked the boost headers (tagged_argument.hpp)
|
||||
# appropriately.
|
||||
env.AppendUnique(CPPFLAGS = [ '-wd4503' ])
|
||||
|
||||
env.AppendUnique(LINKFLAGS = [
|
||||
'/SUBSYSTEM:WINDOWS',
|
||||
@@ -114,8 +123,9 @@ env.AppendUnique(LINKFLAGS = [
|
||||
|
||||
# modeltest is optional and it doesn't compile anyway...
|
||||
cpp_files = [
|
||||
x for x in Glob('*.cpp')
|
||||
if x.name != 'modeltest.cpp' and x.name != 'aboutdialog.cpp'
|
||||
x for x in env.Glob('*.cpp', source = True)
|
||||
if x.name != 'modeltest.cpp' and x.name != 'aboutdialog.cpp' and \
|
||||
not x.name.startswith('moc_') # I think this is a strange bug
|
||||
]
|
||||
|
||||
about_env = env.Clone()
|
||||
|
||||
+12
-1
@@ -22,6 +22,14 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "ui_aboutdialog.h"
|
||||
#include <utility.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QLabel>
|
||||
#include <QListWidget>
|
||||
#include <QListWidgetItem>
|
||||
#include <QTextBrowser>
|
||||
#include <QVariant>
|
||||
#include <Qt>
|
||||
|
||||
|
||||
AboutDialog::AboutDialog(const QString &version, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
@@ -46,10 +54,13 @@ AboutDialog::AboutDialog(const QString &version, QWidget *parent)
|
||||
addLicense("RRZE Icon Set", LICENSE_CCBY3);
|
||||
addLicense("Icons by Lorc, Delapouite and sbed available on http://game-icons.net", LICENSE_CCBY3);
|
||||
addLicense("Castle Core", LICENSE_APACHE2);
|
||||
addLicense("LOOT", LICENSE_GPL3);
|
||||
|
||||
ui->nameLabel->setText(QString("<span style=\"font-size:12pt; font-weight:600;\">%1 %2</span>").arg(ui->nameLabel->text()).arg(version));
|
||||
#ifdef HGID
|
||||
#if defined(HGID)
|
||||
ui->revisionLabel->setText(ui->revisionLabel->text() + " " + HGID);
|
||||
#elif defined(GITID)
|
||||
ui->revisionLabel->setText(ui->revisionLabel->text() + " " + GITID);
|
||||
#else
|
||||
ui->revisionLabel->setText(ui->revisionLabel->text() + " unknown");
|
||||
#endif
|
||||
|
||||
+4
-3
@@ -22,10 +22,11 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define ABOUTDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QListWidgetItem>
|
||||
class QListWidgetItem;
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
namespace Ui {
|
||||
class AboutDialog;
|
||||
|
||||
+48
-6
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>508</width>
|
||||
<height>335</height>
|
||||
<width>604</width>
|
||||
<height>369</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -18,13 +18,50 @@
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="iconLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>250</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>250</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="resources.qrc">:/MO/gui/mo_icon.ico</pixmap>
|
||||
<pixmap resource="resources.qrc">:/MO/gui/splash</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -83,7 +120,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string notr="true">Copyright 2011-2015 Sebastian Herbord</string>
|
||||
<string notr="true">Copyright 2011-2016 Sebastian Herbord</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -114,7 +151,7 @@
|
||||
</widget>
|
||||
<widget class="QWidget" name="credits">
|
||||
<attribute name="title">
|
||||
<string>Credits</string>
|
||||
<string>Thanks</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
@@ -202,7 +239,7 @@
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Others</string>
|
||||
<string>Other Supporter</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
@@ -265,6 +302,11 @@
|
||||
<string notr="true">thosrtanner</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ogrotten</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
+13
-14
@@ -21,37 +21,36 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "ui_activatemodsdialog.h"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QHeaderView>
|
||||
#include <QLabel>
|
||||
#include <QString>
|
||||
#include <QTableWidget>
|
||||
|
||||
ActivateModsDialog::ActivateModsDialog(const std::map<QString, std::vector<QString> > &missingPlugins, QWidget *parent)
|
||||
#include <QtGlobal>
|
||||
|
||||
ActivateModsDialog::ActivateModsDialog(SaveGameInfo::MissingAssets const &missingAssets, QWidget *parent)
|
||||
: TutorableDialog("ActivateMods", parent), ui(new Ui::ActivateModsDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
QTableWidget *modsTable = findChild<QTableWidget*>("modsTable");
|
||||
QHeaderView *headerView = modsTable->horizontalHeader();
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
headerView->setSectionResizeMode(0, QHeaderView::Stretch);
|
||||
headerView->setSectionResizeMode(1, QHeaderView::Interactive);
|
||||
#else
|
||||
headerView->setResizeMode(0, QHeaderView::Stretch);
|
||||
headerView->setResizeMode(1, QHeaderView::Interactive);
|
||||
#endif
|
||||
|
||||
int row = 0;
|
||||
|
||||
modsTable->setRowCount(missingPlugins.size());
|
||||
modsTable->setRowCount(missingAssets.size());
|
||||
|
||||
for (std::map<QString, std::vector<QString> >::const_iterator espIter = missingPlugins.begin();
|
||||
espIter != missingPlugins.end(); ++espIter, ++row) {
|
||||
modsTable->setCellWidget(row, 0, new QLabel(espIter->first));
|
||||
if (espIter->second.size() == 0) {
|
||||
for (SaveGameInfo::MissingAssets::const_iterator espIter = missingAssets.begin();
|
||||
espIter != missingAssets.end(); ++espIter, ++row) {
|
||||
modsTable->setCellWidget(row, 0, new QLabel(espIter.key()));
|
||||
if (espIter->size() == 0) {
|
||||
modsTable->setCellWidget(row, 1, new QLabel(tr("not found")));
|
||||
} else {
|
||||
QComboBox* combo = new QComboBox();
|
||||
for (std::vector<QString>::const_iterator modIter = espIter->second.begin();
|
||||
modIter != espIter->second.end(); ++modIter) {
|
||||
combo->addItem(*modIter);
|
||||
for (QString const &mod : espIter.value()) {
|
||||
combo->addItem(mod);
|
||||
}
|
||||
modsTable->setCellWidget(row, 1, combo);
|
||||
}
|
||||
|
||||
@@ -20,8 +20,14 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifndef ACTIVATEMODSDIALOG_H
|
||||
#define ACTIVATEMODSDIALOG_H
|
||||
|
||||
#include "savegameinfo.h"
|
||||
#include "tutorabledialog.h"
|
||||
#include <map>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class QString;
|
||||
class QWidget;
|
||||
|
||||
#include <set>
|
||||
|
||||
namespace Ui {
|
||||
@@ -42,7 +48,7 @@ public:
|
||||
* @param missingPlugins a map containing missing plugins that need to be activated
|
||||
* @param parent ... Defaults to 0.
|
||||
**/
|
||||
explicit ActivateModsDialog(const std::map<QString, std::vector<QString> > &missingPlugins, QWidget *parent = 0);
|
||||
explicit ActivateModsDialog(SaveGameInfo::MissingAssets const &missingAssets, QWidget *parent = 0);
|
||||
~ActivateModsDialog();
|
||||
|
||||
/**
|
||||
|
||||
+1
-3
@@ -21,8 +21,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <QRegExp>
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
#include <boost/assign.hpp>
|
||||
|
||||
|
||||
namespace BBCode {
|
||||
@@ -80,7 +78,7 @@ public:
|
||||
if (tagName == "color") {
|
||||
QString color = tagIter->second.first.cap(1);
|
||||
QString content = tagIter->second.first.cap(2);
|
||||
if (color.at(0) == "#") {
|
||||
if (color.at(0) == '#') {
|
||||
return temp.replace(tagIter->second.first, QString("<font style=\"color: %1;\">%2</font>").arg(color, content));
|
||||
} else {
|
||||
auto colIter = m_ColorMap.find(color.toLower());
|
||||
|
||||
@@ -18,18 +18,16 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "browserdialog.h"
|
||||
|
||||
#include "ui_browserdialog.h"
|
||||
#include "browserview.h"
|
||||
|
||||
#include "messagedialog.h"
|
||||
#include "report.h"
|
||||
#include "persistentcookiejar.h"
|
||||
|
||||
#include "json.h"
|
||||
|
||||
#include <utility.h>
|
||||
#include <gameinfo.h>
|
||||
#include "settings.h"
|
||||
|
||||
#include <QNetworkCookieJar>
|
||||
#include <QNetworkCookie>
|
||||
#include <QMenu>
|
||||
|
||||
+3
-1
@@ -21,9 +21,11 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define NEXUSVIEW_H
|
||||
|
||||
|
||||
class QEvent;
|
||||
class QUrl;
|
||||
class QWidget;
|
||||
#include <QWebView>
|
||||
#include <QWebPage>
|
||||
#include <QTabWidget>
|
||||
|
||||
/**
|
||||
* @brief web view used to display a nexus page
|
||||
|
||||
+6
-4
@@ -18,9 +18,10 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "categories.h"
|
||||
|
||||
#include <utility.h>
|
||||
#include <report.h>
|
||||
#include <gameinfo.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
@@ -29,7 +30,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
using namespace MOBase;
|
||||
using namespace MOShared;
|
||||
|
||||
|
||||
CategoryFactory* CategoryFactory::s_Instance = nullptr;
|
||||
@@ -188,7 +188,7 @@ int CategoryFactory::addCategory(const QString &name, const std::vector<int> &ne
|
||||
|
||||
void CategoryFactory::addCategory(int id, const QString &name, const std::vector<int> &nexusIDs, int parentID)
|
||||
{
|
||||
int index = m_Categories.size();
|
||||
int index = static_cast<int>(m_Categories.size());
|
||||
m_Categories.push_back(Category(index, id, name, nexusIDs, parentID));
|
||||
for (int nexusID : nexusIDs) {
|
||||
m_NexusMap[nexusID] = index;
|
||||
@@ -317,9 +317,11 @@ int CategoryFactory::getCategoryIndex(int ID) const
|
||||
|
||||
int CategoryFactory::getCategoryID(const QString &name) const
|
||||
{
|
||||
auto iter = std::find_if(m_Categories.begin(), m_Categories.end(), [name] (const Category &cat) -> bool {
|
||||
auto iter = std::find_if(m_Categories.begin(), m_Categories.end(),
|
||||
[name] (const Category &cat) -> bool {
|
||||
return cat.m_Name == name;
|
||||
});
|
||||
|
||||
if (iter != m_Categories.end()) {
|
||||
return iter->m_ID;
|
||||
} else {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>282</width>
|
||||
<width>294</width>
|
||||
<height>156</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -25,29 +25,25 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Username</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="usernameEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="passwordEdit">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
|
||||
@@ -18,10 +18,13 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "directoryrefresher.h"
|
||||
|
||||
#include "iplugingame.h"
|
||||
#include "utility.h"
|
||||
#include "report.h"
|
||||
#include "modinfo.h"
|
||||
#include <gameinfo.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
#include <QString>
|
||||
|
||||
@@ -141,7 +144,9 @@ void DirectoryRefresher::refresh()
|
||||
|
||||
m_DirectoryStructure = new DirectoryEntry(L"data", nullptr, 0);
|
||||
|
||||
std::wstring dataDirectory = GameInfo::instance().getGameDirectory() + L"\\data";
|
||||
IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
|
||||
|
||||
std::wstring dataDirectory = QDir::toNativeSeparators(game->dataDirectory().absolutePath()).toStdWString();
|
||||
m_DirectoryStructure->addFromOrigin(L"data", dataDirectory, 0);
|
||||
|
||||
// TODO what was the point of having the priority in this tuple? the list is already sorted by priority
|
||||
@@ -154,7 +159,7 @@ void DirectoryRefresher::refresh()
|
||||
} catch (const std::exception &e) {
|
||||
emit error(tr("failed to read mod (%1): %2").arg(iter->modName, e.what()));
|
||||
}
|
||||
emit progress((i * 100) / m_Mods.size() + 1);
|
||||
emit progress((i * 100) / static_cast<int>(m_Mods.size()) + 1);
|
||||
}
|
||||
|
||||
emit progress(100);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user