Compare commits

..
77 Commits
Author SHA1 Message Date
Tannin 352975e757 updated to use the unmanaged-mod game plugin feature 2016-06-19 16:01:51 +02:00
Tannin cd83f4e732 reduced number of mod content icons a bit because they take too much space 2016-06-19 16:01:15 +02:00
Tannin 4f25a0689f updated translation 2016-06-19 16:00:13 +02:00
Tannin 3d642563cb usvfs log level can now be changed without a restart 2016-06-19 15:59:50 +02:00
Tannin 0100c86887 download list and data tree now also maintain their layout between sessions 2016-06-19 15:58:37 +02:00
Tannin 8d04c77c29 updated version number and translation file 2016-06-05 14:23:27 +02:00
Tannin b935ce3862 bugfix: unnecessary repeat of delayed operations 2016-06-05 14:20:49 +02:00
Tannin fcebf21c44 fixed startup errors 2016-06-05 14:16:55 +02:00
Tannin 3d1dfadb40 automatic update of translation file during build 2016-06-04 15:29:52 +02:00
Tannin c2c48bd39a testing the hook for updating the translation-page 2016-06-04 14:33:24 +02:00
Tannin 9163a6dc34 added transifex configuration 2016-06-04 11:40:06 +02:00
Tannin 8bf3037d4b bugfix: changing from local language to english doesn't stick 2016-06-03 18:49:48 +02:00
Tannin 4f1bb36933 fixed some filename/modname handling for names received from nexus 2016-06-02 19:45:04 +02:00
Tannin cbdea13a9c minor cleanup 2016-06-01 19:34:01 +02:00
Tannin b36c666899 fixed: mandatory esms could get disabled without a way in the ui to re-enable them 2016-06-01 19:33:37 +02:00
Tannin bbab59f681 fixed handling of base dir in settings dialog (and fixed the tab order in the settings dialog) 2016-05-27 15:51:01 +02:00
Tannin bfbb190998 moved button to switch instance (and to portable mode) to the main window 2016-05-27 14:04:00 +02:00
Tannin c3b7737ae4 bugfix: incorrect url-encoding for passwords prevented login with some special characters 2016-05-19 19:18:46 +02:00
Tannin 30878ae394 added button to clear webcaches and cookies 2016-05-19 19:17:15 +02:00
Tannin 45a182a381 bugfix: initial setup didn't offer a portable install even if the global install dir is gone 2016-05-19 19:15:19 +02:00
Tannin 0b07cfa3f0 cleanup 2016-05-19 19:10:33 +02:00
Tannin 986330a3bd removed obsolete stuff 2016-05-16 16:03:36 +02:00
Tannin 81c5ca5308 Merge branch 'master' into new_vfs_library 2016-05-16 15:48:38 +02:00
Tannin 3a8da159da removed obsolete inject code 2016-05-16 14:46:54 +02:00
Tannin f6c3b516fd changes to primary category are now saved immediately instead of after the menu is closed 2016-05-15 15:09:14 +02:00
Tannin 5665be7fd1 fixed calls to helper.exe using wrong path 2016-05-15 14:58:54 +02:00
Tannin e522afa63b removed highlighting of dummy plugins 2016-05-15 13:07:46 +02:00
Tannin e3c3c2dcc4 fixed: after running an external application the plugin list was potentially not updated correctly 2016-05-15 13:06:31 +02:00
Tannin 519f215fd7 fixed saves list wasn't updated after removing a save game 2016-05-15 12:59:50 +02:00
TanninOne 89221af929 Merge pull request #677 from writemorecode/master
FIXED #302 Edited tooltip in Executables menu
2016-05-15 12:50:41 +02:00
Tannin 59a36107a1 fixed crash when disabling mods 2016-05-11 20:12:14 +02:00
Tannin bc5d5d8bfa ssl libraries can now be placed in dlls directory 2016-05-11 20:10:18 +02:00
Gustav Karlsson a294f8410f Edited tooltip in Executables menu
Edited a tooltip in the Executables menu.
2016-05-09 20:47:25 +02:00
Tannin 256cdb8df7 fixed priority ordering after enabling/disabling mod 2016-05-09 20:36:13 +02:00
Tannin 32480f7a81 minor fixes 2016-05-07 00:23:13 +02:00
Tannin e43762e7db profiles can now be configured to use the global game settings instead of profile-local 2016-05-07 00:22:23 +02:00
Tannin afe0d749c4 added option to use a mod as the target to create now files instead of "overwrite" 2016-05-07 00:18:23 +02:00
Tannin eb97c46ed6 cleanup 2016-05-07 00:03:38 +02:00
Tannin d958e11e2b now using github for self updater 2016-05-06 23:47:51 +02:00
Tannin b0e3e86a61 moved plugins.txt reading/writing to game plugin 2016-05-06 23:39:08 +02:00
Tannin 9df612c7ca more configuration options
- overwrite path configurable
- one can now set a base directory for all configurable paths
- user can now opt in/out of receiving pre-release updates (not functional yet)
2016-03-02 21:28:17 +01:00
Tannin 0899724d90 profile- and group-dropdown no longer switch by mouse-wheel. Plus fixed refreshing of right-hand side tabs 2016-03-02 21:22:26 +01:00
Tannin 53d9789740 updated icon and splash screen. MO can now use custom instance specific splash screens and splashes stored in game plugins 2016-03-02 21:20:38 +01:00
Tannin 4f8c71d626 merged master into new_vfs_library 2016-02-12 19:08:25 +01:00
TanninOne ba8464f01f Merge pull request #456 from ThosRTanner/issue/418
Refactor save game code into plugins
2016-02-10 18:37:28 +01:00
Tannin fd68248698 fixed browse-button for mod directory (in settings) 2016-02-09 20:57:20 +01:00
Tannin 1ad2115e01 fixed cleanup of file handles 2016-02-09 20:55:39 +01:00
Tannin 8d1dd6238f fixed display of process name in unlock-widget 2016-02-09 20:54:54 +01:00
Tannin aaa1f52bdd fixed cleanup on restart 2016-02-09 20:53:09 +01:00
Tannin b085aeea0e changed focus policy on grouping selection to prevent accidentally changing the grouping mode 2016-02-09 20:51:56 +01:00
Tannin ea621ef859 fixed update of window title 2016-02-09 20:50:07 +01:00
Tannin 3202713cff updated to match current usvfs api 2016-02-09 20:46:46 +01:00
Tannin ad9d50e5f0 replaced boost&qt foreach-implementations by the c++11 variant 2016-02-09 20:32:26 +01:00
Tannin 63eaf453e0 portable setup is no longer offered if the directory isn't writable 2016-02-09 20:05:41 +01:00
Tannin 8a9a1680b0 code formatting (clang_format) 2016-02-09 20:02:58 +01:00
Tannin 1439347def updated version number 2016-02-08 20:33:53 +01:00
Thomas Tanner 0e9a86ebfc Merge branch 'master' into issue/418
# Conflicts:
#	SConstruct
#	src/organizerproxy.cpp
2016-01-24 18:10:25 +00:00
Thomas Tanner 8da9ba5404 Removing the 'get' in all function names and making FO4 plugin build
Merge branch 'master' of https://github.com/TanninOne/modorganizer
2016-01-24 15:25:38 +00:00
Thomas Tanner 387326f2d6 thoughts 2016-01-24 10:22:27 +00:00
Tannin a9a51f5085 fixed a potential crash-cause when querying download info and slight improvement (?) to the regex that extracts the modid 2016-01-10 20:22:50 +01:00
Tannin 2aae65d6f6 made instance-switching usable
this includes tons and tons of changes to how paths are determined.
the profiles-dir can now also be configured
2016-01-10 20:19:56 +01:00
Thomas Tanner d07b4f7ff0 Fixes an issue with doing connect for download cancel at the wrong time
Also cleaned up header usage per include-what-you-use
2015-12-31 23:08:24 +00:00
Thomas Tanner 197c49e996 Fixes for building with qt5.5 2015-12-31 23:06:52 +00:00
Thomas Tanner 0d50427b83 Patch to build with QT5.5 2015-12-30 16:38:47 +00:00
Thomas Tanner e90fbb1df2 Patch to build with QT5.5 2015-12-30 16:24:47 +00:00
Thomas Tanner a4dbe82be7 Removes the gameinfo + related files from shared to hookdll 2015-12-27 13:50:46 +00:00
Thomas Tanner 42417b6a01 Fix missing functions and also a bit of const correctness 2015-12-26 15:49:19 +00:00
Thomas Tanner f2b2ee1a11 Merge remote-tracking branch 'TanninOne/master' into issue/418 2015-12-26 15:27:34 +00:00
Thomas Tanner ae6bb99c52 Remove savegameinfowidget from organizer core 2015-12-26 08:23:43 +00:00
Thomas Tanner 3869eaaf2b Transferring the savegame widget into gamebryo + some cleanup 2015-12-25 21:57:23 +00:00
Thomas Tanner 6edf12f2f7 Rename the save game identifier method to make it clearer what it's for. 2015-12-20 21:22:38 +00:00
Thomas Tanner f55a5f2b21 Managed to remove SaveGame and SaveGameGamebryo classes from organizer 2015-12-20 21:08:14 +00:00
Thomas Tanner 5f5184ebfe Changes to support getting list of mods / esps to activate from game plugin 2015-12-19 20:49:54 +00:00
Thomas Tanner 30b29635f6 unsaved edits... 2015-12-15 16:00:15 +00:00
Thomas Tanner 0c536a4c12 Makes iSaveGame responsible for returning all files involved in savegame.
Cleans up save deletion and save transfer dialogue somewhat
2015-12-15 15:58:01 +00:00
Thomas Tanner 967c2ae653 Removes the SaveGame class from mainwindow. Using include what you use to add/remove #includes 2015-12-14 22:25:57 +00:00
Thomas Tanner ba176e5e9b Remove dependency of TransferSave on SaveGameBryo, part of fix for #418
Added a method to Profile class to get location of save games for the profile. I haven't added this to IProfile as am in two minds.

Aside from this have done cleanups of issues suggested by include-what-you-use, and some OCD sorting of #includes
2015-12-13 18:30:40 +00:00
112 changed files with 9719 additions and 4482 deletions
+82
View File
@@ -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
View File
@@ -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)
+31 -10
View File
@@ -431,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')
@@ -531,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
@@ -618,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')
@@ -648,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 = []
+11 -3
View File
@@ -36,6 +36,7 @@ includes = dict()
adding = None
added = dict()
lcadded = dict()
foundline = None
@@ -70,6 +71,7 @@ def process_next_line(line, outfile):
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:
@@ -79,12 +81,18 @@ def process_next_line(line, outfile):
m = re.match(r'- #include [<"](.*)[">] +// lines (.*)-', line)
if m:
foundline = m.group(2)
if m.group(1) in added:
# 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[m.group(1)][1]))
del added[m.group(1)]
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' % (
+1 -1
View File
@@ -2463,7 +2463,7 @@
{ include: [ "@\"(QtCore/)?qglobal\\.h\"", "private", "<QtGlobal>", "public" ] },
{ include: [ "@\"(QtCore/)?qnamespace\\.h\"", "private", "<Qt>", "public" ] },
{ include: [ "@\"(QtCore/)?qlogging\\.h\"", "private", "<QtDebug>", "public" ] }, #qDebug, qWarning, etc
{ include: [ "@\"(QtCore/)?qalgorithms\\.h\"", "private", "<QAlgorithms>", "public" ] }, #qSort, etc
{ include: [ "@\"(QtCore/)?qalgorithms\\.h\"", "private", "<QtAlgorithms>", "public" ] }, #qSort, etc
{ include: [ "@\"(QtWinExtras/)?qwinfunctions\\.h\"", "private", "<QtWin>", "public" ] }, # for fromHICON
# These ones are just madness. For instance, why with the above do we get
+33 -44
View File
@@ -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,11 +31,11 @@ SET(organizer_SRCS
modlist.cpp
modinfodialog.cpp
modinfo.cpp
modinfobackup.cpp
modinfoforeign.cpp
modinfooverwrite.cpp
modinforegular.cpp
modinfowithconflictinfo.cpp
modinfobackup.cpp
modinfoforeign.cpp
modinfooverwrite.cpp
modinforegular.cpp
modinfowithconflictinfo.cpp
messagedialog.cpp
mainwindow.cpp
main.cpp
@@ -80,26 +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/fallout4info.cpp
shared/falloutnvinfo.cpp
shared/util.cpp
shared/skyriminfo.cpp
shared/appconfig.cpp
shared/leaktrace.cpp
shared/stackdata.cpp
@@ -114,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
@@ -131,11 +117,11 @@ SET(organizer_HDRS
modlist.h
modinfodialog.h
modinfo.h
modinfobackup.h
modinfoforeign.h
modinfooverwrite.h
modinforegular.h
modinfowithconflictinfo.h
modinfobackup.h
modinfoforeign.h
modinfooverwrite.h
modinforegular.h
modinfowithconflictinfo.h
messagedialog.h
mainwindow.h
loghighlighter.h
@@ -175,7 +161,6 @@ SET(organizer_HDRS
previewdialog.h
aboutdialog.h
json.h
safewritefile.h
modflagicondelegate.h
genericicondelegate.h
organizerproxy.h
@@ -183,19 +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/fallout4info.h
shared/falloutnvinfo.h
shared/util.h
shared/skyriminfo.h
shared/appconfig.h
shared/appconfig.inc
shared/leaktrace.h
@@ -208,7 +188,6 @@ SET(organizer_UIS
simpleinstalldialog.ui
settingsdialog.ui
selectiondialog.ui
savegameinfowidget.ui
queryoverwritedialog.ui
profilesdialog.ui
overwriteinfodialog.ui
@@ -258,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)
@@ -293,16 +274,22 @@ INCLUDE_DIRECTORIES(${project_path}/uibase/src
${project_path}/archive/src
${project_path}/../usvfs/usvfs
${project_path}/game_gamebryo/src
${project_path}/game_features/src)
MESSAGE(STATUS ${project_path}/gameGamebryo/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_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)
@@ -310,16 +297,18 @@ ELSE()
SET(usvfs_name usvfs_x86)
ENDIF()
ADD_EXECUTABLE(ModOrganizer WIN32 ${organizer_HDRS} ${organizer_SRCS} ${organizer_UIHDRS} ${organizer_RCS} ${organizer_RCCPPS})
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
"/LARGEADDRESSAWARE ${OPTIMIZE_LINK_FLAGS}")
+12 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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);
}
+8 -2
View File
@@ -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 -1
View File
@@ -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;
+6 -10
View File
@@ -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>
+1 -1
View File
@@ -159,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);
+2
View File
@@ -4,6 +4,8 @@
<file name="icuin53.dll"/>
<file name="icuuc53.dll"/>
<file name="icudt53.dll"/>
<file name="libeay32.dll"/>
<file name="ssleay32.dll"/>
<file name="Qt5Core.dll"/>
<file name="Qt5Declarative.dll"/>
<file name="Qt5Gui.dll"/>
+45 -46
View File
@@ -88,7 +88,8 @@ DownloadManager::DownloadInfo *DownloadManager::DownloadInfo::createFromMeta(con
QString fileName = QFileInfo(filePath).fileName();
if (fileName.endsWith(UNFINISHED)) {
info->m_FileName = fileName.mid(0, fileName.length() - strlen(UNFINISHED));
info->m_FileName = fileName.mid(
0, fileName.length() - static_cast<int>(strlen(UNFINISHED)));
info->m_State = STATE_PAUSED;
} else {
info->m_FileName = fileName;
@@ -471,7 +472,7 @@ void DownloadManager::addNXMDownload(const QString &url)
void DownloadManager::removeFile(int index, bool deleteFile)
{
if (index >= m_ActiveDownloads.size()) {
throw MyException(tr("invalid index"));
throw MyException(tr("remove: invalid download index %1").arg(index));
}
DownloadInfo *download = m_ActiveDownloads.at(index);
@@ -538,7 +539,7 @@ void DownloadManager::refreshAlphabeticalTranslation()
void DownloadManager::restoreDownload(int index)
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("restore: invalid download index: %1").arg(index));
}
DownloadInfo *download = m_ActiveDownloads.at(index);
@@ -571,7 +572,7 @@ void DownloadManager::removeDownload(int index, bool deleteFile)
}
} else {
if (index >= m_ActiveDownloads.size()) {
reportError(tr("invalid index %1").arg(index));
reportError(tr("remove: invalid download index %1").arg(index));
return;
}
@@ -589,7 +590,7 @@ void DownloadManager::removeDownload(int index, bool deleteFile)
void DownloadManager::cancelDownload(int index)
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
reportError(tr("invalid index %1").arg(index));
reportError(tr("cancel: invalid download index %1").arg(index));
return;
}
@@ -602,7 +603,7 @@ void DownloadManager::cancelDownload(int index)
void DownloadManager::pauseDownload(int index)
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
reportError(tr("invalid index %1").arg(index));
reportError(tr("pause: invalid download index %1").arg(index));
return;
}
@@ -622,7 +623,7 @@ void DownloadManager::pauseDownload(int index)
void DownloadManager::resumeDownload(int index)
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
reportError(tr("invalid index %1").arg(index));
reportError(tr("resume: invalid download index %1").arg(index));
return;
}
DownloadInfo *info = m_ActiveDownloads[index];
@@ -633,7 +634,7 @@ void DownloadManager::resumeDownload(int index)
void DownloadManager::resumeDownloadInt(int index)
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
reportError(tr("invalid index %1").arg(index));
reportError(tr("resume (int): invalid download index %1").arg(index));
return;
}
DownloadInfo *info = m_ActiveDownloads[index];
@@ -673,7 +674,7 @@ DownloadManager::DownloadInfo *DownloadManager::downloadInfoByID(unsigned int id
void DownloadManager::queryInfo(int index)
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
reportError(tr("invalid index %1").arg(index));
reportError(tr("query: invalid download index %1").arg(index));
return;
}
DownloadInfo *info = m_ActiveDownloads[index];
@@ -693,19 +694,14 @@ void DownloadManager::queryInfo(int index)
QString ignore;
NexusInterface::interpretNexusFileName(fileName, ignore, info->m_FileInfo->modID, true);
if (info->m_FileInfo->modID < 0) {
QString modIDString;
while (modIDString.isEmpty()) {
modIDString = QInputDialog::getText(nullptr, tr("Please enter the nexus mod id"), tr("Mod ID:"), QLineEdit::Normal,
QString(), nullptr, 0, Qt::ImhFormattedNumbersOnly);
if (modIDString.isNull()) {
// canceled
return;
} else if (modIDString.contains(QRegExp("[^0-9]"))) {
qDebug("illegal character in mod-id");
modIDString.clear();
}
}
info->m_FileInfo->modID = modIDString.toInt(nullptr, 10);
bool ok = false;
int modId = QInputDialog::getInt(
nullptr, tr("Please enter the nexus mod id"), tr("Mod ID:"), 1, 1,
std::numeric_limits<int>::max(), 1, &ok);
// careful now: while the dialog was displayed, events were processed.
// the download list might have changed and our info-ptr invalidated.
m_ActiveDownloads[index]->m_FileInfo->modID = modId;
return;
}
}
info->m_ReQueried = true;
@@ -726,7 +722,7 @@ int DownloadManager::numPendingDownloads() const
std::pair<int, int> DownloadManager::getPendingDownload(int index)
{
if ((index < 0) || (index >= m_PendingDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("get pending: invalid download index %1").arg(index));
}
return m_PendingDownloads.at(index);
@@ -735,7 +731,7 @@ std::pair<int, int> DownloadManager::getPendingDownload(int index)
QString DownloadManager::getFilePath(int index) const
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("get path: invalid download index %1").arg(index));
}
return m_OutputDirectory + "/" + m_ActiveDownloads.at(index)->m_FileName;
@@ -756,24 +752,27 @@ QString DownloadManager::getFileTypeString(int fileType)
QString DownloadManager::getDisplayName(int index) const
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("display name: invalid download index %1").arg(index));
}
DownloadInfo *info = m_ActiveDownloads.at(index);
QTextDocument doc;
if (!info->m_FileInfo->name.isEmpty()) {
return QString("%1 (%2, v%3)").arg(info->m_FileInfo->name)
doc.setHtml(info->m_FileInfo->name);
return QString("%1 (%2, v%3)").arg(doc.toPlainText())
.arg(getFileTypeString(info->m_FileInfo->fileCategory))
.arg(info->m_FileInfo->version.displayString());
} else {
return info->m_FileName;
doc.setHtml(info->m_FileName);
return doc.toPlainText();
}
}
QString DownloadManager::getFileName(int index) const
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("file name: invalid download index %1").arg(index));
}
return m_ActiveDownloads.at(index)->m_FileName;
@@ -782,7 +781,7 @@ QString DownloadManager::getFileName(int index) const
QDateTime DownloadManager::getFileTime(int index) const
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("file time: invalid download index %1").arg(index));
}
DownloadInfo *info = m_ActiveDownloads.at(index);
@@ -796,7 +795,7 @@ QDateTime DownloadManager::getFileTime(int index) const
qint64 DownloadManager::getFileSize(int index) const
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("file size: invalid download index %1").arg(index));
}
return m_ActiveDownloads.at(index)->m_TotalSize;
@@ -806,7 +805,7 @@ qint64 DownloadManager::getFileSize(int index) const
int DownloadManager::getProgress(int index) const
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("progress: invalid download index %1").arg(index));
}
return m_ActiveDownloads.at(index)->m_Progress;
@@ -816,7 +815,7 @@ int DownloadManager::getProgress(int index) const
DownloadManager::DownloadState DownloadManager::getState(int index) const
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("state: invalid download index %1").arg(index));
}
return m_ActiveDownloads.at(index)->m_State;
@@ -826,7 +825,7 @@ DownloadManager::DownloadState DownloadManager::getState(int index) const
bool DownloadManager::isInfoIncomplete(int index) const
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("infocomplete: invalid download index %1").arg(index));
}
DownloadInfo *info = m_ActiveDownloads.at(index);
@@ -841,7 +840,7 @@ bool DownloadManager::isInfoIncomplete(int index) const
int DownloadManager::getModID(int index) const
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("mod id: invalid download index %1").arg(index));
}
return m_ActiveDownloads.at(index)->m_FileInfo->modID;
}
@@ -849,7 +848,7 @@ int DownloadManager::getModID(int index) const
bool DownloadManager::isHidden(int index) const
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("ishidden: invalid download index %1").arg(index));
}
return m_ActiveDownloads.at(index)->m_Hidden;
}
@@ -858,7 +857,7 @@ bool DownloadManager::isHidden(int index) const
const ModRepositoryFileInfo *DownloadManager::getFileInfo(int index) const
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("file info: invalid download index %1").arg(index));
}
return m_ActiveDownloads.at(index)->m_FileInfo;
@@ -868,7 +867,7 @@ const ModRepositoryFileInfo *DownloadManager::getFileInfo(int index) const
void DownloadManager::markInstalled(int index)
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("mark installed: invalid download index %1").arg(index));
}
DownloadInfo *info = m_ActiveDownloads.at(index);
@@ -883,7 +882,7 @@ void DownloadManager::markInstalled(int index)
void DownloadManager::markUninstalled(int index)
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
throw MyException(tr("invalid index"));
throw MyException(tr("mark uninstalled: invalid download index %1").arg(index));
}
DownloadInfo *info = m_ActiveDownloads.at(index);
@@ -1062,7 +1061,9 @@ void DownloadManager::nxmDescriptionAvailable(int, QVariant userData, QVariant r
DownloadInfo *info = downloadInfoByID(userData.toInt());
if (info == nullptr) return;
info->m_FileInfo->categoryID = result["category_id"].toInt();
info->m_FileInfo->modName = result["name"].toString().trimmed();
QTextDocument doc;
doc.setHtml(result["name"].toString().trimmed());
info->m_FileInfo->modName = doc.toPlainText();
info->m_FileInfo->newestVersion.parse(result["version"].toString());
if (info->m_FileInfo->fileID != 0) {
setState(info, STATE_READY);
@@ -1120,7 +1121,7 @@ void DownloadManager::nxmFilesAvailable(int, QVariant userData, QVariant resultD
bool found = false;
foreach(QVariant file, result) {
for (QVariant file : result) {
QVariantMap fileInfo = file.toMap();
QString fileName = fileInfo["uri"].toString();
QString fileNameVariant = fileName.mid(0).replace(' ', '_');
@@ -1131,12 +1132,10 @@ void DownloadManager::nxmFilesAvailable(int, QVariant userData, QVariant resultD
if (!info->m_FileInfo->version.isValid()) {
info->m_FileInfo->version = info->m_FileInfo->newestVersion;
}
//Nexus has HTMLd these so unhtml them if necessary
// we receive some names html-encoded. This is used to decode it
QTextDocument doc;
doc.setHtml(info->m_FileInfo->modName);
doc.setHtml(fileInfo["modName"].toString());
info->m_FileInfo->modName = doc.toPlainText();
doc.setHtml(info->m_FileInfo->name);
info->m_FileInfo->name = doc.toPlainText();
info->m_FileInfo->fileCategory = convertFileCategory(fileInfo["category_id"].toInt());
info->m_FileInfo->fileTime = matchDate(fileInfo["date"].toString());
info->m_FileInfo->fileID = fileInfo["id"].toInt();
@@ -1152,7 +1151,7 @@ void DownloadManager::nxmFilesAvailable(int, QVariant userData, QVariant resultD
emit showMessage(tr("No matching file found on Nexus! Maybe this file is no longer available or it was renamed?"));
} else {
SelectionDialog selection(tr("No file on Nexus matches the selected file by name. Please manually choose the correct one."));
foreach(QVariant file, result) {
for (QVariant file : result) {
QVariantMap fileInfo = file.toMap();
selection.addChoice(fileInfo["uri"].toString(), "", file);
}
@@ -1247,7 +1246,7 @@ int DownloadManager::startDownloadURLs(const QStringList &urls)
int DownloadManager::startDownloadNexusFile(int modID, int fileID)
{
int newID = m_ActiveDownloads.size();
addNXMDownload(QString("nxm://%1/mods/%2/files/%3").arg(m_ManagedGame->getGameShortName()).arg(modID).arg(fileID));
addNXMDownload(QString("nxm://%1/mods/%2/files/%3").arg(m_ManagedGame->gameShortName()).arg(modID).arg(fileID));
return newID;
}
+52 -14
View File
@@ -21,6 +21,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "ui_editexecutablesdialog.h"
#include "filedialogmemory.h"
#include "stackdata.h"
#include "modlist.h"
#include <QMessageBox>
#include <Shellapi.h>
#include <utility.h>
@@ -29,15 +30,20 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
using namespace MOBase;
using namespace MOShared;
EditExecutablesDialog::EditExecutablesDialog(const ExecutablesList &executablesList, QWidget *parent)
EditExecutablesDialog::EditExecutablesDialog(
const ExecutablesList &executablesList, const ModList &modList,
Profile *profile, QWidget *parent)
: TutorableDialog("EditExecutables", parent)
, ui(new Ui::EditExecutablesDialog)
, m_CurrentItem(nullptr)
, m_ExecutablesList(executablesList)
, m_Profile(profile)
{
ui->setupUi(this);
refreshExecutablesWidget();
ui->newFilesModBox->addItems(modList.allMods());
}
EditExecutablesDialog::~EditExecutablesDialog()
@@ -86,23 +92,30 @@ void EditExecutablesDialog::resetInput()
ui->appIDOverwriteEdit->clear();
ui->overwriteAppIDBox->setChecked(false);
ui->useAppIconCheckBox->setChecked(false);
ui->newFilesModCheckBox->setChecked(false);
m_CurrentItem = nullptr;
}
void EditExecutablesDialog::saveExecutable()
{
m_ExecutablesList.updateExecutable(ui->titleEdit->text(),
QDir::fromNativeSeparators(ui->binaryEdit->text()),
ui->argumentsEdit->text(),
QDir::fromNativeSeparators(ui->workingDirEdit->text()),
ui->overwriteAppIDBox->isChecked() ?
ui->appIDOverwriteEdit->text() : "",
Executable::UseApplicationIcon | Executable::CustomExecutable,
(ui->useAppIconCheckBox->isChecked() ?
Executable::UseApplicationIcon : Executable::Flags())
| Executable::CustomExecutable);
m_ExecutablesList.updateExecutable(
ui->titleEdit->text(),
QDir::fromNativeSeparators(ui->binaryEdit->text()),
ui->argumentsEdit->text(),
QDir::fromNativeSeparators(ui->workingDirEdit->text()),
ui->overwriteAppIDBox->isChecked() ?
ui->appIDOverwriteEdit->text() : "",
Executable::UseApplicationIcon | Executable::CustomExecutable,
(ui->useAppIconCheckBox->isChecked() ?
Executable::UseApplicationIcon : Executable::Flags())
| Executable::CustomExecutable);
if (ui->newFilesModCheckBox->isChecked()) {
m_Profile->storeSetting("custom_overwrites", ui->titleEdit->text(),
ui->newFilesModBox->currentText());
}
}
void EditExecutablesDialog::delayedRefresh()
@@ -126,15 +139,17 @@ void EditExecutablesDialog::on_addButton_clicked()
void EditExecutablesDialog::on_browseButton_clicked()
{
QString binaryName = FileDialogMemory::getOpenFileName("editExecutableBinary", this,
tr("Select a binary"), QString(), tr("Executable (%1)").arg("*.exe *.bat *.jar"));
QString binaryName = FileDialogMemory::getOpenFileName(
"editExecutableBinary", this, tr("Select a binary"), QString(),
tr("Executable (%1)").arg("*.exe *.bat *.jar"));
if (binaryName.endsWith(".jar", Qt::CaseInsensitive)) {
QString binaryPath;
{ // try to find java automatically
std::wstring binaryNameW = ToWString(binaryName);
WCHAR buffer[MAX_PATH];
if (::FindExecutableW(binaryNameW.c_str(), nullptr, buffer) > (HINSTANCE)32) {
if (::FindExecutableW(binaryNameW.c_str(), nullptr, buffer)
> reinterpret_cast<HINSTANCE>(32)) {
DWORD binaryType = 0UL;
if (!::GetBinaryTypeW(binaryNameW.c_str(), &binaryType)) {
qDebug("failed to determine binary type of \"%ls\": %lu", binaryNameW.c_str(), ::GetLastError());
@@ -210,8 +225,13 @@ bool EditExecutablesDialog::executableChanged()
{
if (m_CurrentItem != nullptr) {
Executable const &selectedExecutable(m_ExecutablesList.find(m_CurrentItem->text()));
QString storedCustomOverwrite = m_Profile->setting("custom_overwrites", selectedExecutable.m_Title).toString();
return selectedExecutable.m_Arguments != ui->argumentsEdit->text()
|| selectedExecutable.m_SteamAppID != ui->appIDOverwriteEdit->text()
|| !storedCustomOverwrite.isEmpty() != ui->newFilesModCheckBox->isChecked()
|| !storedCustomOverwrite.isEmpty() && (storedCustomOverwrite != ui->newFilesModBox->currentText())
|| selectedExecutable.m_WorkingDirectory != QDir::fromNativeSeparators(ui->workingDirEdit->text())
|| selectedExecutable.m_BinaryInfo.absoluteFilePath() != QDir::fromNativeSeparators(ui->binaryEdit->text())
|| selectedExecutable.usesOwnIcon() != ui->useAppIconCheckBox->isChecked();
@@ -294,5 +314,23 @@ void EditExecutablesDialog::on_executablesListBox_clicked(const QModelIndex &cur
ui->appIDOverwriteEdit->clear();
}
ui->useAppIconCheckBox->setChecked(selectedExecutable.usesOwnIcon());
int index = -1;
QString customOverwrite = m_Profile->setting("custom_overwrites", selectedExecutable.m_Title).toString();
if (!customOverwrite.isEmpty()) {
index = ui->newFilesModBox->findText(customOverwrite);
qDebug("find %s -> %d", qPrintable(customOverwrite), index);
}
ui->newFilesModCheckBox->setChecked(index != -1);
if (index != -1) {
ui->newFilesModBox->setCurrentIndex(index);
}
}
}
void EditExecutablesDialog::on_newFilesModCheckBox_toggled(bool checked)
{
ui->newFilesModBox->setEnabled(checked);
}
+17 -4
View File
@@ -24,11 +24,16 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QListWidgetItem>
#include <QTimer>
#include "executableslist.h"
#include "profile.h"
namespace Ui {
class EditExecutablesDialog;
}
class ModList;
/**
* @brief Dialog to manage the list of executables
**/
@@ -44,7 +49,10 @@ public:
* @param executablesList current list of executables
* @param parent parent widget
**/
explicit EditExecutablesDialog(const ExecutablesList &executablesList, QWidget *parent = 0);
explicit EditExecutablesDialog(const ExecutablesList &executablesList,
const ModList &modList,
Profile *profile,
QWidget *parent = 0);
~EditExecutablesDialog();
@@ -56,6 +64,10 @@ public:
ExecutablesList getExecutablesList() const;
void saveExecutable();
private slots:
void on_newFilesModCheckBox_toggled(bool checked);
private slots:
void on_binaryEdit_textChanged(const QString &arg1);
@@ -89,12 +101,13 @@ private:
bool executableChanged();
private:
Ui::EditExecutablesDialog *ui;
Ui::EditExecutablesDialog *ui;
QListWidgetItem *m_CurrentItem;
QListWidgetItem *m_CurrentItem;
ExecutablesList m_ExecutablesList;
ExecutablesList m_ExecutablesList;
Profile *m_Profile;
};
#endif // EDITEXECUTABLESDIALOG_H
+47 -2
View File
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>384</width>
<height>446</height>
<width>426</width>
<height>460</height>
</rect>
</property>
<property name="windowTitle">
@@ -164,6 +164,27 @@ Right now the only case I know of where this needs to be overwritten is for the
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9" stretch="0,1">
<item>
<widget class="QCheckBox" name="newFilesModCheckBox">
<property name="toolTip">
<string>If this is enabled, new files are created in the specified mod instead of the &quot;Overwrite&quot; mod.</string>
</property>
<property name="text">
<string>Create Files in Mod instead of Overwrite (*)</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="newFilesModBox">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="useAppIconCheckBox">
<property name="text">
@@ -171,6 +192,13 @@ Right now the only case I know of where this needs to be overwritten is for the
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>(*) This setting is profile-specific</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
@@ -235,6 +263,23 @@ Right now the only case I know of where this needs to be overwritten is for the
</item>
</layout>
</widget>
<tabstops>
<tabstop>executablesListBox</tabstop>
<tabstop>titleEdit</tabstop>
<tabstop>binaryEdit</tabstop>
<tabstop>browseButton</tabstop>
<tabstop>workingDirEdit</tabstop>
<tabstop>browseDirButton</tabstop>
<tabstop>argumentsEdit</tabstop>
<tabstop>overwriteAppIDBox</tabstop>
<tabstop>appIDOverwriteEdit</tabstop>
<tabstop>newFilesModCheckBox</tabstop>
<tabstop>newFilesModBox</tabstop>
<tabstop>useAppIconCheckBox</tabstop>
<tabstop>addButton</tabstop>
<tabstop>removeButton</tabstop>
<tabstop>closeButton</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
+33 -31
View File
@@ -1,31 +1,33 @@
/*
Copyright (C) 2012 Sebastian Herbord. All rights reserved.
This file is part of Mod Organizer.
Mod Organizer is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Mod Organizer is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <string>
namespace MOShared {
void injectDLL(HANDLE processHandle, HANDLE threadHandle, const std::string &dllname, const std::wstring &profileName, int logLevel);
}
/*
Copyright (C) 2016 Sebastian Herbord. All rights reserved.
This file is part of Mod Organizer.
Mod Organizer is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Mod Organizer is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/
#include "eventfilter.h"
EventFilter::EventFilter(QObject *parent,
const EventFilter::HandlerFunc &handler)
: QObject(parent)
, m_Handler(handler)
{
}
bool EventFilter::eventFilter(QObject *obj, QEvent *event)
{
return m_Handler(obj, event);
}

Some files were not shown because too many files have changed in this diff Show More