mirror of
https://github.com/ModOrganizer2/modorganizer.git
synced 2026-07-27 13:58:24 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
886fb10288 | ||
|
|
693f3c40ee | ||
|
|
26b946a905 | ||
|
|
11aa955d73 | ||
|
|
2486c554a0 | ||
|
|
5e6bb0a16e | ||
|
|
632474ef97 | ||
|
|
0da6af17b2 | ||
|
|
44111d12c1 | ||
|
|
02d3f81829 | ||
|
|
fc74aa90d1 | ||
|
|
7d9514d497 | ||
|
|
6359d7d23f | ||
|
|
5f8bbaae2a | ||
|
|
fe33d7af43 | ||
|
|
9ae442810b | ||
|
|
9998727dba | ||
|
|
a76d987647 | ||
|
|
a29192f9b2 | ||
|
|
a77433f881 | ||
|
|
54e2197592 | ||
|
|
0d7460996a | ||
|
|
d9b1cfdb4b | ||
|
|
98b659f0da | ||
|
|
979c09b334 | ||
|
|
cf5833437d | ||
|
|
0eaa1c6791 | ||
|
|
fa193ddabb | ||
|
|
cc32c8c06b | ||
|
|
9872c1e462 | ||
|
|
e3989fe8f9 | ||
|
|
f7c9b8c333 | ||
|
|
5555a58f84 | ||
|
|
6588a81b7f | ||
|
|
2091330af2 | ||
|
|
168da18aa5 | ||
|
|
4245036f52 | ||
|
|
238c252b4c | ||
|
|
938d3ce91b | ||
|
|
d62ec9c867 | ||
|
|
3bb7a44610 | ||
|
|
4bf7b4e103 | ||
|
|
d3c207193f | ||
|
|
584c6049f9 | ||
|
|
2b7274380e | ||
|
|
275afb730f | ||
|
|
0306b0fc42 | ||
|
|
86c97c7c06 | ||
|
|
3114bcbd8d | ||
|
|
41a479bddf | ||
|
|
e02614ee14 | ||
|
|
cfbe399bba | ||
|
|
10b8d12152 | ||
|
|
b3ef185866 | ||
|
|
18328587b5 | ||
|
|
31bf15f3b4 | ||
|
|
001fddb069 | ||
|
|
141ac311d2 | ||
|
|
fbb93eaf86 | ||
|
|
7e04542762 | ||
|
|
08b56ee783 | ||
|
|
85faed5de1 | ||
|
|
189445191d | ||
|
|
618fd543a6 | ||
|
|
f276203517 | ||
|
|
b64fd1ed4d | ||
|
|
b1329c18cd | ||
|
|
62dc387de6 | ||
|
|
fc46a6a782 | ||
|
|
a2d7ce67aa | ||
|
|
a14ed8fcd1 | ||
|
|
c669fed48a | ||
|
|
634825e1b8 | ||
|
|
7688175c68 | ||
|
|
b4eae6e5d1 | ||
|
|
b1c477f8ec | ||
|
|
8b3a83ed8d | ||
|
|
332cdc155a | ||
|
|
30c177cb37 | ||
|
|
ae4e4f9df8 | ||
|
|
dd24b60895 | ||
|
|
fa104b342f | ||
|
|
cc2c4cc918 | ||
|
|
978d71bb43 | ||
|
|
25b6fe1471 | ||
|
|
6b5680f6e4 | ||
|
|
bc75009169 | ||
|
|
8be73d2e3b | ||
|
|
358e2c4e74 | ||
|
|
be2d39b035 | ||
|
|
8f0b42d466 | ||
|
|
37b1bdd9e6 | ||
|
|
e037caf58e | ||
|
|
e33da8402c | ||
|
|
c4bfee0089 | ||
|
|
5a24d2b60c | ||
|
|
9465966b2c | ||
|
|
47dc5cded7 | ||
|
|
bf9d187036 | ||
|
|
208eaccbf7 | ||
|
|
fb1c376533 | ||
|
|
0f8852f487 | ||
|
|
7eba6837dd | ||
|
|
cc2bd15256 | ||
|
|
b409a0bef9 | ||
|
|
d62669e1b4 | ||
|
|
a1d92fb673 | ||
|
|
fd9eb032b6 | ||
|
|
5c39a762e6 | ||
|
|
a905ce130d | ||
|
|
fed89352d1 | ||
|
|
74dd2bb914 | ||
|
|
dcbcb29ec7 | ||
|
|
92e3fa2fdd | ||
|
|
5a98d69dcd | ||
|
|
5dd0e3b77e | ||
|
|
4baba035dd | ||
|
|
5eb03a687c | ||
|
|
dd288fe152 | ||
|
|
ba0a1bd501 | ||
|
|
2d2a2b8b74 | ||
|
|
0e0c72422c | ||
|
|
82d4742e28 | ||
|
|
3cceb6502c | ||
|
|
92a8a3dce8 | ||
|
|
bcc4c8d6aa | ||
|
|
149ce846b5 | ||
|
|
192b0bafa5 | ||
|
|
0c792d548f | ||
|
|
336216ba9a | ||
|
|
b71d472e08 | ||
|
|
bbce6506cd | ||
|
|
2def87a143 | ||
|
|
90165b02ab | ||
|
|
8095be550f | ||
|
|
2fa1b04cd4 | ||
|
|
a4b0524c70 | ||
|
|
8dee1d108b | ||
|
|
e0f003a9a6 | ||
|
|
ccb5ad53e2 | ||
|
|
9c596ceb79 | ||
|
|
8305d92157 | ||
|
|
9f61ef5c9e | ||
|
|
887d464f2c | ||
|
|
0d4a59fd91 | ||
|
|
8f8beea427 | ||
|
|
0983c88c17 | ||
|
|
9ee2831c59 | ||
|
|
d6aab781ee | ||
|
|
a7f17c6429 | ||
|
|
12161d68fb | ||
|
|
090d660831 | ||
|
|
b7b12bb789 | ||
|
|
30a9f61d6d | ||
|
|
f7ab05767c | ||
|
|
d7e6adb3de | ||
|
|
00d8c517ec | ||
|
|
c7f660e061 | ||
|
|
d59b28847c | ||
|
|
5b565b5634 | ||
|
|
673a5034f0 | ||
|
|
7c87e9a645 | ||
|
|
52501e73c9 | ||
|
|
513c062932 | ||
|
|
7cf0c1a29b | ||
|
|
a873f7cfe2 | ||
|
|
1b85cda626 | ||
|
|
c7e1d9738f | ||
|
|
a540a542a4 | ||
|
|
3eee61c67b | ||
|
|
3556d4f58f | ||
|
|
8e97f3f84c | ||
|
|
e6f999ffbb | ||
|
|
5fcd51aad8 | ||
|
|
c1421d0734 | ||
|
|
4a45e1a2a7 | ||
|
|
50c244d7e1 | ||
|
|
b82f9f1006 | ||
|
|
8ebd79ee71 | ||
|
|
e70ee1e895 | ||
|
|
0a4fa10ca4 | ||
|
|
ea6292168a | ||
|
|
28714f0eb8 | ||
|
|
5e5c9c0729 | ||
|
|
5ad912e193 | ||
|
|
0fa6f7feff | ||
|
|
ee7d801b86 | ||
|
|
1cdfb7105d | ||
|
|
0bcd752b27 | ||
|
|
1f34f7d8c1 | ||
|
|
c2cc2a82c8 | ||
|
|
7e2b83c922 | ||
|
|
9624d86b46 | ||
|
|
9fd3f6c4e4 | ||
|
|
4804903f3a | ||
|
|
61898074fe | ||
|
|
ea7c391c33 | ||
|
|
7dfe0c9a8f | ||
|
|
0241d71da3 | ||
|
|
5be7c9a0b5 | ||
|
|
f7374a8525 | ||
|
|
dd8f73178c | ||
|
|
3f5f56397b | ||
|
|
e85285934e | ||
|
|
e1fc0d22b6 | ||
|
|
9ddbf25809 | ||
|
|
ed08faa4a8 | ||
|
|
0c4cdb89ad | ||
|
|
28b0411cca | ||
|
|
d6b645413c | ||
|
|
3a17614bed | ||
|
|
ba0cd0e10d | ||
|
|
8c34131bb8 | ||
|
|
3fdb00e0c9 | ||
|
|
95b258c0df | ||
|
|
45b3614fbc | ||
|
|
7dbb4cedda | ||
|
|
5d5a7b8511 | ||
|
|
0413bf27a5 | ||
|
|
d267b8aaf3 | ||
|
|
ca54760c13 | ||
|
|
d2c5ed352d | ||
|
|
71995f0343 | ||
|
|
5579db7f90 | ||
|
|
d2f90e6a76 | ||
|
|
785852cf21 | ||
|
|
14b06dd2e8 | ||
|
|
58ec83f8c8 | ||
|
|
d06972729d | ||
|
|
39efb9a7c2 | ||
|
|
a4e43b68cd | ||
|
|
cdf588e7c4 |
+4
-7
@@ -2,17 +2,14 @@
|
||||
Thumbs.db
|
||||
src/moc_*.cpp
|
||||
src/ui_*.h
|
||||
src/organizer_en.ts
|
||||
src/*.qrc.depends
|
||||
src/Modorganizer.*
|
||||
src/*.bak
|
||||
CMakeLists.txt.user
|
||||
edit
|
||||
stderr.log
|
||||
stdout.log
|
||||
vs_stderr.log
|
||||
vs_stdout.log
|
||||
build
|
||||
/vsbuild
|
||||
/CMakeFiles
|
||||
.idea
|
||||
/msbuild.log
|
||||
/*std*.log
|
||||
/*build
|
||||
|
||||
|
||||
+6
-5
@@ -1,14 +1,15 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
|
||||
|
||||
ADD_COMPILE_OPTIONS($<$<CXX_COMPILER_ID:MSVC>:/MP>)
|
||||
|
||||
PROJECT(organizer)
|
||||
|
||||
# sets ModOrganizer as StartUp Project in Visual Studio
|
||||
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" PROPERTY VS_STARTUP_PROJECT "ModOrganizer")
|
||||
|
||||
SET(DEPENDENCIES_DIR CACHE PATH "")
|
||||
# hint to find qt in dependencies path
|
||||
LIST(APPEND CMAKE_PREFIX_PATH ${QT_ROOT}/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)
|
||||
LIST(APPEND CMAKE_PREFIX_PATH ${LZ4_ROOT}/dll)
|
||||
|
||||
ADD_SUBDIRECTORY(src)
|
||||
|
||||
@@ -1,42 +1,83 @@
|
||||
# Mod Organizer
|
||||
|
||||
Mod Organizer (MO) is a tool for managing mod collections of arbitrary size. It is specifically designed for people who like to experiment with mods and thus need an easy and reliable way to install and uninstall them.
|
||||
Mod Organizer 2 is a mod manager created by Tannin to support 64-bit games like Skyrim Special Edition and Fallout 4 in addition to all the 32-bit games MO1 already supported.
|
||||
|
||||
Tannin discontinued the project when he was hired by the Nexus team to develop their new Vortex mod manager.
|
||||
MO2 was not completed and was left with many issues. LePresidente managed to fix it to a usable state by himself after SkyrimSE came out, adding support for it, and releasing v2.0.8.
|
||||
The project took up speed again after a few more coders showed up in late 2017, and a lot of progress has been made.
|
||||
|
||||
## Help Wanted!
|
||||
Mod Organizer 2 is an open project in the hands of the community, there are problems that need to be solved and things that could be added. MO2 really needs developers and if you have the programming skills and some free time you can really improve the experience of the modding community.
|
||||
|
||||
To have more information, please join the open MO2 Development discord server :* [ModOrganizerDevs](https://discord.gg/vD2ZbfX)
|
||||
If you want to help translate MO2 to your language you should join the discord server too and head to the #translation channel.
|
||||
To setup a development environment on your machine, there is the [umbrella project](https://github.com/Modorganizer2/modorganizer-umbrella) that handles that.
|
||||
If you want to submit your code changes, please use a good formating style like the default one in Visual Studio.
|
||||
|
||||
Through the work of a few people of the community MO2 has come quite far, now it needs some more of those people to go further.
|
||||
|
||||
## Reporting Issues:
|
||||
Issues should be reported to the GitHub page or on the open discord server: [ModOrganizerDevs](https://discord.gg/vD2ZbfX). Here is also where dev builds are tested, bugs are reported and investigated, suggestions are discussed and a lot more.
|
||||
|
||||
Credits to Tannin, LePresidente, Silarn, erasmux, AL12 and many others for the development.
|
||||
|
||||
## Download Location
|
||||
|
||||
* on [GitHub.com](https://github.com/Modorganizer2/modorganizer/releases)
|
||||
* on [NexusMods.com](https://www.nexusmods.com/skyrimspecialedition/mods/6194)
|
||||
|
||||
## Old Download Location
|
||||
|
||||
* [TanninOne/modorganizer/releases](https://github.com/TanninOne/modorganizer/releases)
|
||||
|
||||
## Building
|
||||
|
||||
Please refer to [TanninOne/modorganizer-umbrella](https://github.com/TanninOne/modorganizer-umbrella) for build instructions.
|
||||
Please refer to [Modorganizer2/modorganizer-umbrella](https://github.com/Modorganizer2/modorganizer-umbrella) for build instructions.
|
||||
|
||||
## Other Repositories
|
||||
|
||||
MO consists of multiple repositories on github. The Umbrella project will download them automatically as required. They should however also be buildable individually.
|
||||
MO2 consists of multiple repositories on github. The Umbrella project will download them automatically as required. They should however also be buildable individually.
|
||||
Here is a complete list:
|
||||
* https://github.com/TanninOne/modorganizer
|
||||
* https://github.com/TanninOne/modorganizer-uibase
|
||||
* https://github.com/TanninOne/modorganizer-hookdll
|
||||
* https://github.com/TanninOne/modorganizer-bsatk
|
||||
* https://github.com/TanninOne/modorganizer-esptk
|
||||
* https://github.com/TanninOne/modorganizer-archive
|
||||
* https://github.com/TanninOne/modorganizer-nxmhandler
|
||||
* https://github.com/TanninOne/modorganizer-lootcli
|
||||
* https://github.com/TanninOne/modorganizer-helper
|
||||
|
||||
* https://github.com/LePresidente/cpython-1
|
||||
* https://github.com/Modorganizer2/githubpp
|
||||
* https://github.com/Modorganizer2/modorganizer
|
||||
* https://github.com/Modorganizer2/modorganizer-archive
|
||||
* https://github.com/Modorganizer2/modorganizer-bsatk
|
||||
* https://github.com/Modorganizer2/modorganizer-bsa_extractor
|
||||
* https://github.com/Modorganizer2/modorganizer-check_fnis
|
||||
* https://github.com/Modorganizer2/modorganizer-diagnose_basic
|
||||
* https://github.com/Modorganizer2/modorganizer-esptk
|
||||
* https://github.com/Modorganizer2/modorganizer-helper
|
||||
* https://github.com/Modorganizer2/modorganizer-game_fallout3
|
||||
* https://github.com/Modorganizer2/modorganizer-game_fallout4
|
||||
* https://github.com/Modorganizer2/modorganizer-game_fallout4vr
|
||||
* https://github.com/Modorganizer2/modorganizer-game_falloutnv
|
||||
* https://github.com/Modorganizer2/modorganizer-game_features
|
||||
* https://github.com/Modorganizer2/modorganizer-game_gamebryo
|
||||
* https://github.com/Modorganizer2/modorganizer-game_morrowind
|
||||
* https://github.com/Modorganizer2/modorganizer-game_oblivion
|
||||
* https://github.com/Modorganizer2/modorganizer-game_skyrim
|
||||
* https://github.com/Modorganizer2/modorganizer-game_skyrimSE
|
||||
* https://github.com/Modorganizer2/modorganizer-game_ttw
|
||||
* https://github.com/Modorganizer2/modorganizer-installer_bain
|
||||
* https://github.com/Modorganizer2/modorganizer-installer_bundle
|
||||
* https://github.com/Modorganizer2/modorganizer-installer_fomod
|
||||
* https://github.com/Modorganizer2/modorganizer-installer_manual
|
||||
* https://github.com/Modorganizer2/modorganizer-installer_ncc
|
||||
* https://github.com/Modorganizer2/modorganizer-installer_quick
|
||||
* https://github.com/Modorganizer2/modorganizer-lootcli
|
||||
* https://github.com/Modorganizer2/modorganizer-NCC
|
||||
* https://github.com/Modorganizer2/modorganizer-nxmhandler
|
||||
* https://github.com/Modorganizer2/modorganizer-plugin_python
|
||||
* https://github.com/Modorganizer2/modorganizer-preview_base
|
||||
* https://github.com/Modorganizer2/modorganizer-tool_configurator
|
||||
* https://github.com/Modorganizer2/modorganizer-tool_inibakery
|
||||
* https://github.com/Modorganizer2/modorganizer-uibase
|
||||
* https://github.com/Modorganizer2/usvfs
|
||||
|
||||
### Unused Repositories
|
||||
* https://github.com/Modorganizer2/modorganizer-hookdll
|
||||
* https://github.com/TanninOne/modorganizer-tool_nmmimport
|
||||
* 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
|
||||
* https://github.com/TanninOne/modorganizer-installer_quick
|
||||
* https://github.com/TanninOne/modorganizer-installer_manual
|
||||
* https://github.com/TanninOne/modorganizer-installer_fomod
|
||||
* https://github.com/TanninOne/modorganizer-installer_bundle
|
||||
* https://github.com/TanninOne/modorganizer-installer_bain
|
||||
* 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
-26
@@ -1,4 +1,4 @@
|
||||
CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
|
||||
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.11)
|
||||
|
||||
CMAKE_POLICY(SET CMP0020 NEW)
|
||||
#CMAKE_POLICY(SET CMP0043 NEW)
|
||||
@@ -30,6 +30,7 @@ SET(organizer_SRCS
|
||||
motddialog.cpp
|
||||
modlistsortproxy.cpp
|
||||
modlist.cpp
|
||||
modidlineedit.cpp
|
||||
modinfodialog.cpp
|
||||
modinfo.cpp
|
||||
modinfobackup.cpp
|
||||
@@ -120,6 +121,7 @@ SET(organizer_HDRS
|
||||
motddialog.h
|
||||
modlistsortproxy.h
|
||||
modlist.h
|
||||
modidlineedit.h
|
||||
modinfodialog.h
|
||||
modinfo.h
|
||||
modinfobackup.h
|
||||
@@ -238,6 +240,13 @@ SOURCE_GROUP(Source FILES ${organizer_SRCS})
|
||||
SOURCE_GROUP(Headers FILES ${organizer_HDRS})
|
||||
SOURCE_GROUP(UI FILES ${organizer_UIS})
|
||||
|
||||
# MO projects
|
||||
SET(default_project_path "${CMAKE_SOURCE_DIR}/..")
|
||||
GET_FILENAME_COMPONENT(${default_project_path} ${default_project_path} REALPATH)
|
||||
|
||||
SET(project_path "${default_project_path}" CACHE PATH "path to the other mo projects")
|
||||
#TODO this should not be a hardcoded path
|
||||
SET(lib_path "${project_path}/../../install/libs")
|
||||
|
||||
# Qt5
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
@@ -249,10 +258,13 @@ FIND_PACKAGE(Qt5Quick REQUIRED)
|
||||
FIND_PACKAGE(Qt5Network REQUIRED)
|
||||
FIND_PACKAGE(Qt5WinExtras REQUIRED)
|
||||
FIND_PACKAGE(Qt5WebEngineWidgets REQUIRED)
|
||||
FIND_PACKAGE(Qt5Qml 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)
|
||||
SET(mo_translation_sources ${CMAKE_SOURCE_DIR}/src ${project_path}/uibase/src)
|
||||
QT5_CREATE_TRANSLATION(organizer_translations_qm ${mo_translation_sources} ${CMAKE_SOURCE_DIR}/src/organizer_en.ts)
|
||||
ADD_CUSTOM_TARGET(translations DEPENDS ${organizer_translations_qm})
|
||||
|
||||
INCLUDE_DIRECTORIES(${Qt5Declarative_INCLUDES})
|
||||
|
||||
@@ -271,15 +283,6 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
|
||||
FIND_PACKAGE(zlib REQUIRED)
|
||||
# TODO FindZlib doesn't find the static zlib library
|
||||
|
||||
|
||||
# MO projects
|
||||
SET(default_project_path "${CMAKE_SOURCE_DIR}/..")
|
||||
GET_FILENAME_COMPONENT(${default_project_path} ${default_project_path} REALPATH)
|
||||
|
||||
SET(project_path "${default_project_path}" CACHE PATH "path to the other mo projects")
|
||||
SET(lib_path "${project_path}/../../install/libs")
|
||||
|
||||
|
||||
INCLUDE_DIRECTORIES(${project_path}/uibase/src
|
||||
${project_path}/bsatk/src
|
||||
${project_path}/esptk/src
|
||||
@@ -287,13 +290,13 @@ INCLUDE_DIRECTORIES(${project_path}/uibase/src
|
||||
${project_path}/../usvfs/include
|
||||
${project_path}/game_gamebryo/src
|
||||
${project_path}/game_features/src
|
||||
${project_path}/githubpp/src)
|
||||
|
||||
${project_path}/githubpp/src
|
||||
${LZ4_ROOT}/include)
|
||||
|
||||
INCLUDE_DIRECTORIES(shared ${ZLIB_INCLUDE_DIRS})
|
||||
LINK_DIRECTORIES(${lib_path}
|
||||
${project_path}/../zlib/lib)
|
||||
|
||||
${ZLIB_ROOT}/lib
|
||||
${LZ4_ROOT}/dll)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND git log -1 --format=%h
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
@@ -312,20 +315,27 @@ 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::WebEngineWidgets Qt5::Quick
|
||||
Qt5::Qml Qt5::QuickWidgets Qt5::Network
|
||||
${Boost_LIBRARIES}
|
||||
zlibstatic
|
||||
uibase esptk bsatk githubpp
|
||||
${usvfs_name}
|
||||
Dbghelp advapi32 Version Shlwapi)
|
||||
IF (NOT "${OPTIMIZE_COMPILE_FLAGS}" STREQUAL "")
|
||||
SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES COMPILE_FLAGS_RELWITHDEBINFO
|
||||
${OPTIMIZE_COMPILE_FLAGS})
|
||||
Dbghelp advapi32 Version Shlwapi liblz4)
|
||||
|
||||
IF (MSVC)
|
||||
SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES COMPILE_FLAGS "/std:c++latest")
|
||||
ENDIF()
|
||||
IF (MSVC AND "${CMAKE_SIZEOF_VOID_P}" EQUAL 4)
|
||||
# 32 bits
|
||||
SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES LINK_FLAGS "/LARGEADDRESSAWARE")
|
||||
ENDIF()
|
||||
SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES LINK_FLAGS_RELWITHDEBINFO
|
||||
"/LARGEADDRESSAWARE ${OPTIMIZE_LINK_FLAGS}")
|
||||
|
||||
|
||||
QT5_USE_MODULES(ModOrganizer Widgets Script Qml QuickWidgets Quick Network WebEngineWidgets)
|
||||
IF (NOT "${OPTIMIZE_COMPILE_FLAGS}" STREQUAL "")
|
||||
SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES COMPILE_FLAGS_RELWITHDEBINFO ${OPTIMIZE_COMPILE_FLAGS})
|
||||
ENDIF()
|
||||
IF (NOT "${OPTIMIZE_LINK_FLAGS}" STREQUAL "")
|
||||
SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES LINK_FLAGS_RELWITHDEBINFO ${OPTIMIZE_LINK_FLAGS})
|
||||
ENDIF()
|
||||
|
||||
|
||||
###############
|
||||
@@ -347,10 +357,16 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dlls.manifest.qt5
|
||||
SET(windeploy_parameters "--no-translations --plugindir qtplugins --libdir dlls --release-with-debug-info --no-compiler-runtime")
|
||||
INSTALL(
|
||||
CODE
|
||||
"EXECUTE_PROCESS(
|
||||
COMMAND
|
||||
"EXECUTE_PROCESS(COMMAND
|
||||
${qt5bin}/windeployqt.exe ModOrganizer.exe --webenginewidgets ${windeploy_parameters}
|
||||
COMMAND
|
||||
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
|
||||
)
|
||||
# run it a second time because on the first run it misses some files
|
||||
EXECUTE_PROCESS(COMMAND
|
||||
${qt5bin}/windeployqt.exe ModOrganizer.exe --webenginewidgets ${windeploy_parameters}
|
||||
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
|
||||
)
|
||||
EXECUTE_PROCESS(COMMAND
|
||||
${qt5bin}/windeployqt.exe uibase.dll ${windeploy_parameters}
|
||||
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
|
||||
)
|
||||
@@ -363,6 +379,11 @@ INSTALL(
|
||||
file(REMOVE_RECURSE ${CMAKE_INSTALL_PREFIX}/bin/qtplugins)"
|
||||
)
|
||||
|
||||
# qdds.dll needs installing manually as Qt no longer ships with it by default.
|
||||
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../qdds.dll DESTINATION bin/dlls/imageformats)
|
||||
|
||||
install(FILES ${organizer_translations_qm} DESTINATION bin/translations)
|
||||
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/stylesheets
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tutorials
|
||||
DESTINATION bin)
|
||||
|
||||
+37
-10
@@ -29,7 +29,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <QTextBrowser>
|
||||
#include <QVariant>
|
||||
#include <Qt>
|
||||
|
||||
#include <QFontDatabase>
|
||||
|
||||
AboutDialog::AboutDialog(const QString &version, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
@@ -37,24 +37,44 @@ AboutDialog::AboutDialog(const QString &version, QWidget *parent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_LicenseFiles[LICENSE_LGPL3] = "lgpl-3.0.txt";
|
||||
m_LicenseFiles[LICENSE_GPL3] = "gpl-3.0.txt";
|
||||
m_LicenseFiles[LICENSE_BSD3] = "bsd3.txt";
|
||||
m_LicenseFiles[LICENSE_LGPL3] = "LGPL-v3.0.txt";
|
||||
m_LicenseFiles[LICENSE_LGPL21] = "GNU-LGPL-v2.1.txt";
|
||||
m_LicenseFiles[LICENSE_GPL3] = "GPL-v3.0.txt";
|
||||
m_LicenseFiles[LICENSE_GPL2] = "GPL-v2.0.txt";
|
||||
m_LicenseFiles[LICENSE_BOOST] = "boost.txt";
|
||||
m_LicenseFiles[LICENSE_CCBY3] = "by-sa3.txt";
|
||||
m_LicenseFiles[LICENSE_7ZIP] = "7zip.txt";
|
||||
m_LicenseFiles[LICENSE_CCBY3] = "BY-SA-v3.0.txt";
|
||||
m_LicenseFiles[LICENSE_ZLIB] = "zlib.txt";
|
||||
m_LicenseFiles[LICENSE_APACHE2] = "apache-license-2.0.txt";
|
||||
m_LicenseFiles[LICENSE_PYTHON] = "python.txt";
|
||||
m_LicenseFiles[LICENSE_SSL] = "openssl.txt";
|
||||
m_LicenseFiles[LICENSE_CPPTOML] = "cpptoml.txt";
|
||||
m_LicenseFiles[LICENSE_UDIS] = "udis86.txt";
|
||||
m_LicenseFiles[LICENSE_SPDLOG] = "spdlog.txt";
|
||||
m_LicenseFiles[LICENSE_FMT] = "fmt.txt";
|
||||
m_LicenseFiles[LICENSE_SIP] = "sip.txt";
|
||||
m_LicenseFiles[LICENSE_CASTLE] = "Castle.txt";
|
||||
m_LicenseFiles[LICENSE_ANTLR] = "AntlrBuildTask.txt";
|
||||
m_LicenseFiles[LICENSE_DXTEX] = "DXTex.txt";
|
||||
|
||||
addLicense("Qt", LICENSE_LGPL3);
|
||||
addLicense("Qt Json", LICENSE_GPL3);
|
||||
addLicense("Boost Library", LICENSE_BOOST);
|
||||
addLicense("7-zip", LICENSE_LGPL3);
|
||||
addLicense("ZLib", LICENSE_ZLIB);
|
||||
addLicense("7-zip", LICENSE_7ZIP);
|
||||
addLicense("ZLib", LICENSE_NONE);
|
||||
addLicense("Tango Icon Theme", LICENSE_NONE);
|
||||
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("Castle Core", LICENSE_CASTLE);
|
||||
addLicense("ANTLR", LICENSE_ANTLR);
|
||||
addLicense("LOOT", LICENSE_GPL3);
|
||||
addLicense("Python", LICENSE_PYTHON);
|
||||
addLicense("OpenSSL", LICENSE_SSL);
|
||||
addLicense("cpptoml", LICENSE_CPPTOML);
|
||||
addLicense("Udis86", LICENSE_UDIS);
|
||||
addLicense("spdlog", LICENSE_SPDLOG);
|
||||
addLicense("{fmt}", LICENSE_FMT);
|
||||
addLicense("SIP", LICENSE_SIP);
|
||||
addLicense("DXTex Headers", LICENSE_DXTEX);
|
||||
|
||||
ui->nameLabel->setText(QString("<span style=\"font-size:12pt; font-weight:600;\">%1 %2</span>").arg(ui->nameLabel->text()).arg(version));
|
||||
#if defined(HGID)
|
||||
@@ -64,6 +84,8 @@ AboutDialog::AboutDialog(const QString &version, QWidget *parent)
|
||||
#else
|
||||
ui->revisionLabel->setText(ui->revisionLabel->text() + " unknown");
|
||||
#endif
|
||||
|
||||
ui->licenseText->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
|
||||
}
|
||||
|
||||
|
||||
@@ -85,10 +107,15 @@ void AboutDialog::on_creditsList_currentItemChanged(QListWidgetItem *current, QL
|
||||
{
|
||||
auto iter = m_LicenseFiles.find(current->data(Qt::UserRole).toInt());
|
||||
if (iter != m_LicenseFiles.end()) {
|
||||
QString filePath = qApp->applicationDirPath() + "/license/" + iter->second;
|
||||
QString filePath = qApp->applicationDirPath() + "/licenses/" + iter->second;
|
||||
QString text = MOBase::readFileText(filePath);
|
||||
ui->licenseText->setText(text);
|
||||
} else {
|
||||
ui->licenseText->setText(tr("No license"));
|
||||
}
|
||||
}
|
||||
|
||||
void AboutDialog::on_copyrightText_linkActivated(const QString &link)
|
||||
{
|
||||
emit linkClicked(link);
|
||||
}
|
||||
+18
-2
@@ -40,17 +40,32 @@ public:
|
||||
explicit AboutDialog(const QString &version, QWidget *parent = 0);
|
||||
~AboutDialog();
|
||||
|
||||
signals:
|
||||
|
||||
void linkClicked(QString link);
|
||||
|
||||
private:
|
||||
|
||||
enum Licenses {
|
||||
LICENSE_NONE,
|
||||
LICENSE_LGPL3,
|
||||
LICENSE_LGPL21,
|
||||
LICENSE_GPL3,
|
||||
LICENSE_BSD3,
|
||||
LICENSE_GPL2,
|
||||
LICENSE_BOOST,
|
||||
LICENSE_CCBY3,
|
||||
LICENSE_PYTHON,
|
||||
LICENSE_SSL,
|
||||
LICENSE_CPPTOML,
|
||||
LICENSE_7ZIP,
|
||||
LICENSE_ZLIB,
|
||||
LICENSE_APACHE2
|
||||
LICENSE_UDIS,
|
||||
LICENSE_SPDLOG,
|
||||
LICENSE_FMT,
|
||||
LICENSE_SIP,
|
||||
LICENSE_CASTLE,
|
||||
LICENSE_ANTLR,
|
||||
LICENSE_DXTEX
|
||||
};
|
||||
|
||||
private:
|
||||
@@ -59,6 +74,7 @@ private:
|
||||
|
||||
private slots:
|
||||
void on_creditsList_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous);
|
||||
void on_copyrightText_linkActivated(const QString &link);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
+142
-56
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>604</width>
|
||||
<height>369</height>
|
||||
<width>1010</width>
|
||||
<height>477</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -120,14 +120,14 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string notr="true">Copyright 2011-2016 Sebastian Herbord</string>
|
||||
<string notr="true"><html><head/><body><p>Copyright 2011-2016 Sebastian Herbord</p><p>Copyright 2016-2018 Mod Organizer 2 contributors</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<widget class="QLabel" name="copyrightText">
|
||||
<property name="text">
|
||||
<string notr="true"><html><head/><body><p>This program 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.</p><p>See the GNU General Public License for more details.</p><p>Source code can be found at <a href="https://github.com/TanninOne/modorganizer"><span style=" text-decoration: underline; color:#007af4;">GitHub</span></a>.</p></body></html></string>
|
||||
<string notr="true"><html><head/><body><p>This program 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.</p><p>See the GNU General Public License for more details.</p><p>Source code can be found at <a href="https://github.com/Modorganizer2/modorganizer"><span style=" text-decoration: underline; color:#007af4;">GitHub</span></a>.</p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -153,8 +153,8 @@
|
||||
<attribute name="title">
|
||||
<string>Thanks</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_0">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Current Maintainers</string>
|
||||
@@ -167,12 +167,17 @@
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">LePresidente</string>
|
||||
<string>LePresidente (Project Lead)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Silarn</string>
|
||||
<string notr="true">AL12</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Diana</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@@ -182,7 +187,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Diana</string>
|
||||
<string notr="true">Silarn</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
@@ -190,8 +195,29 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Major Contributors</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7" stretch="0">
|
||||
<item>
|
||||
<widget class="QListWidget" name="listWidget_2">
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::NoSelection</enum>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">AnyOldName3 (Python Plugins)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Translators</string>
|
||||
</property>
|
||||
@@ -201,36 +227,6 @@
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::NoSelection</enum>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">pndrev (German)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">DaWul (Spanish)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Fiama (Spanish)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Alyndiar (French)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Jlkawaii (French)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Rigoletto (French)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Scythe1912 (Chinese)</string>
|
||||
@@ -248,7 +244,47 @@
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">tokcdk (Russian)</string>
|
||||
<string>Cyb3r (Dutch)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Alyndiar (French)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>fruttyx (French)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Jlkawaii (French)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Rigoletto (French)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Yoplala (French)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Faron (German)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">pndrev (German)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Mordan (Greek)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@@ -261,7 +297,37 @@
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>... more (Can't track)</string>
|
||||
<string>Yoosk (Polish)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Brgodfx (Portuguese)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">tokcdk (Russian)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">DaWul (Spanish)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Fiama (Spanish)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Jax (Swedish)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>...and all other Transifex contributors!</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
@@ -272,10 +338,10 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<item row="0" column="2" rowspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string>Other Supporter</string>
|
||||
<string>Other Supporters && Contributors</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
@@ -283,11 +349,6 @@
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::NoSelection</enum>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Al12 (Discord) </string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">blacksol</string>
|
||||
@@ -308,6 +369,11 @@
|
||||
<string notr="true">Bridger</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Brixified</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">GamerPoet</string>
|
||||
@@ -318,11 +384,36 @@
|
||||
<string notr="true">Gopher</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">GrantSP</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">GSDFan</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">ogrotten</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">outdatedtv</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Schilduin</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">SuperSandro2000</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">Uhuru</string>
|
||||
@@ -343,11 +434,6 @@
|
||||
<string notr="true">thosrtanner</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ogrotten</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -173,13 +173,13 @@ void BrowserDialog::titleChanged(const QString &title)
|
||||
|
||||
QString BrowserDialog::guessFileName(const QString &url)
|
||||
{
|
||||
QRegExp uploadsExp(QString("http://.+/uploads/([^/]+)$"));
|
||||
QRegExp uploadsExp(QString("https://.+/uploads/([^/]+)$"));
|
||||
if (uploadsExp.indexIn(url) != -1) {
|
||||
// these seem to be premium downloads
|
||||
return uploadsExp.cap(1);
|
||||
}
|
||||
|
||||
QRegExp filesExp(QString("http://.+\\?file=([^&]+)"));
|
||||
QRegExp filesExp(QString("https://.+\\?file=([^&]+)"));
|
||||
if (filesExp.indexIn(url) != -1) {
|
||||
// a regular manual download?
|
||||
return filesExp.cap(1);
|
||||
|
||||
+1
-1
@@ -167,7 +167,7 @@ void CategoryFactory::saveCategories()
|
||||
}
|
||||
|
||||
|
||||
unsigned int CategoryFactory::countCategories(std::tr1::function<bool (const Category &category)> filter)
|
||||
unsigned int CategoryFactory::countCategories(std::function<bool (const Category &category)> filter)
|
||||
{
|
||||
unsigned int result = 0;
|
||||
for (const Category &cat : m_Categories) {
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ public:
|
||||
* @param filter the filter to test
|
||||
* @return number of matching categories
|
||||
*/
|
||||
unsigned int countCategories(std::tr1::function<bool (const Category &category)> filter);
|
||||
unsigned int countCategories(std::function<bool (const Category &category)> filter);
|
||||
|
||||
/**
|
||||
* @brief get the id of the parent category
|
||||
|
||||
+23
-25
@@ -1,28 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity type="win32" name="dlls" version="1.0.0.0" processorArchitecture="x86"/>
|
||||
<file name="7z.dll"/>
|
||||
<file name="archive.dll"/>
|
||||
<file name="d3dcompiler_47.dll"/>
|
||||
<file name="libeay32.dll"/>
|
||||
<file name="libEGL.dll"/>
|
||||
<file name="libGLESV2.dll"/>
|
||||
<file name="liblz4.dll"/>
|
||||
<file name="opengl32sw.dll"/>
|
||||
<file name="Qt5Core.dll"/>
|
||||
<file name="Qt5Gui.dll"/>
|
||||
<file name="Qt5Network.dll"/>
|
||||
<file name="Qt5Positioning.dll"/>
|
||||
<file name="Qt5PrintSupport.dll"/>
|
||||
<file name="Qt5Qml.dll"/>
|
||||
<file name="Qt5Quick.dll"/>
|
||||
<file name="Qt5QuickWidgets.dll"/>
|
||||
<file name="Qt5WebChannel.dll"/>
|
||||
<file name="Qt5SerialPort.dll"/>
|
||||
<file name="Qt5Svg.dll"/>
|
||||
<file name="Qt5WebEngineCore.dll"/>
|
||||
<file name="Qt5WebEngineWidgets.dll"/>
|
||||
<file name="Qt5Widgets.dll"/>
|
||||
<file name="Qt5WinExtras.dll"/>
|
||||
<file name="ssleay32.dll"/>
|
||||
<assemblyIdentity type="win32" name="dlls" version="1.0.0.0" processorArchitecture="x86"/>
|
||||
<file name="7z.dll"/>
|
||||
<file name="archive.dll"/>
|
||||
<file name="d3dcompiler_47.dll"/>
|
||||
<file name="libEGL.dll"/>
|
||||
<file name="libGLESV2.dll"/>
|
||||
<file name="liblz4.dll"/>
|
||||
<file name="opengl32sw.dll"/>
|
||||
<file name="Qt5Core.dll"/>
|
||||
<file name="Qt5Gui.dll"/>
|
||||
<file name="Qt5Network.dll"/>
|
||||
<file name="Qt5Positioning.dll"/>
|
||||
<file name="Qt5PrintSupport.dll"/>
|
||||
<file name="Qt5Qml.dll"/>
|
||||
<file name="Qt5Quick.dll"/>
|
||||
<file name="Qt5QuickWidgets.dll"/>
|
||||
<file name="Qt5WebChannel.dll"/>
|
||||
<file name="Qt5SerialPort.dll"/>
|
||||
<file name="Qt5Svg.dll"/>
|
||||
<file name="Qt5WebEngineCore.dll"/>
|
||||
<file name="Qt5WebEngineWidgets.dll"/>
|
||||
<file name="Qt5Widgets.dll"/>
|
||||
<file name="Qt5WinExtras.dll"/>
|
||||
</assembly>
|
||||
@@ -53,6 +53,7 @@ DownloadListWidgetDelegate::DownloadListWidgetDelegate(DownloadManager *manager,
|
||||
m_InstallLabel = m_ItemWidget->findChild<QLabel*>("installLabel");
|
||||
|
||||
m_InstallLabel->setVisible(false);
|
||||
m_Progress->setTextVisible(true);
|
||||
|
||||
connect(manager, SIGNAL(stateChanged(int,DownloadManager::DownloadState)), this, SLOT(stateChanged(int,DownloadManager::DownloadState)));
|
||||
connect(manager, SIGNAL(downloadRemoved(int)), this, SLOT(resetCache(int)));
|
||||
@@ -88,8 +89,8 @@ void DownloadListWidgetDelegate::drawCache(QPainter *painter, const QStyleOption
|
||||
|
||||
void DownloadListWidgetDelegate::paintPendingDownload(int downloadIndex) const
|
||||
{
|
||||
std::pair<int, int> nexusids = m_Manager->getPendingDownload(downloadIndex);
|
||||
m_NameLabel->setText(tr("< mod %1 file %2 >").arg(nexusids.first).arg(nexusids.second));
|
||||
std::tuple<QString, int, int> nexusids = m_Manager->getPendingDownload(downloadIndex);
|
||||
m_NameLabel->setText(tr("< game %1 mod %2 file %3 >").arg(std::get<0>(nexusids)).arg(std::get<1>(nexusids)).arg(std::get<2>(nexusids)));
|
||||
m_SizeLabel->setText("???");
|
||||
m_InstallLabel->setVisible(true);
|
||||
m_InstallLabel->setText(tr("Pending"));
|
||||
@@ -159,7 +160,8 @@ void DownloadListWidgetDelegate::paintRegularDownload(int downloadIndex) const
|
||||
} else {
|
||||
m_InstallLabel->setVisible(false);
|
||||
m_Progress->setVisible(true);
|
||||
m_Progress->setValue(m_Manager->getProgress(downloadIndex));
|
||||
m_Progress->setValue(m_Manager->getProgress(downloadIndex).first);
|
||||
m_Progress->setFormat(m_Manager->getProgress(downloadIndex).second);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,7 +320,7 @@ bool DownloadListWidgetDelegate::editorEvent(QEvent *event, QAbstractItemModel *
|
||||
if (hidden) {
|
||||
menu.addAction(tr("Un-Hide"), this, SLOT(issueRestoreToView()));
|
||||
} else {
|
||||
menu.addAction(tr("Remove from View"), this, SLOT(issueRemoveFromView()));
|
||||
menu.addAction(tr("Hide"), this, SLOT(issueRemoveFromView()));
|
||||
}
|
||||
} else if (state == DownloadManager::STATE_DOWNLOADING){
|
||||
menu.addAction(tr("Cancel"), this, SLOT(issueCancel()));
|
||||
@@ -334,8 +336,8 @@ bool DownloadListWidgetDelegate::editorEvent(QEvent *event, QAbstractItemModel *
|
||||
menu.addAction(tr("Delete All..."), this, SLOT(issueDeleteAll()));
|
||||
if (!hidden) {
|
||||
menu.addSeparator();
|
||||
menu.addAction(tr("Remove Installed..."), this, SLOT(issueRemoveFromViewCompleted()));
|
||||
menu.addAction(tr("Remove All..."), this, SLOT(issueRemoveFromViewAll()));
|
||||
menu.addAction(tr("Hide Installed..."), this, SLOT(issueRemoveFromViewCompleted()));
|
||||
menu.addAction(tr("Hide All..."), this, SLOT(issueRemoveFromViewAll()));
|
||||
}
|
||||
menu.exec(mouseEvent->globalPos());
|
||||
|
||||
|
||||
@@ -88,8 +88,8 @@ void DownloadListWidgetCompactDelegate::drawCache(QPainter *painter, const QStyl
|
||||
|
||||
void DownloadListWidgetCompactDelegate::paintPendingDownload(int downloadIndex) const
|
||||
{
|
||||
std::pair<int, int> nexusids = m_Manager->getPendingDownload(downloadIndex);
|
||||
m_NameLabel->setText(tr("< mod %1 file %2 >").arg(nexusids.first).arg(nexusids.second));
|
||||
std::tuple<QString, int, int> nexusids = m_Manager->getPendingDownload(downloadIndex);
|
||||
m_NameLabel->setText(tr("< game %1 mod %2 file %3 >").arg(std::get<0>(nexusids)).arg(std::get<1>(nexusids)).arg(std::get<2>(nexusids)));
|
||||
if (m_SizeLabel != nullptr) {
|
||||
m_SizeLabel->setText("???");
|
||||
}
|
||||
@@ -138,7 +138,8 @@ void DownloadListWidgetCompactDelegate::paintRegularDownload(int downloadIndex)
|
||||
} else {
|
||||
m_DoneLabel->setVisible(false);
|
||||
m_Progress->setVisible(true);
|
||||
m_Progress->setValue(m_Manager->getProgress(downloadIndex));
|
||||
m_Progress->setValue(m_Manager->getProgress(downloadIndex).first);
|
||||
m_Progress->setFormat(m_Manager->getProgress(downloadIndex).second);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,7 +304,7 @@ bool DownloadListWidgetCompactDelegate::editorEvent(QEvent *event, QAbstractItem
|
||||
if (hidden) {
|
||||
menu.addAction(tr("Un-Hide"), this, SLOT(issueRestoreToView()));
|
||||
} else {
|
||||
menu.addAction(tr("Remove from View"), this, SLOT(issueRemoveFromView()));
|
||||
menu.addAction(tr("Hide"), this, SLOT(issueRemoveFromView()));
|
||||
}
|
||||
} else if (state == DownloadManager::STATE_DOWNLOADING){
|
||||
menu.addAction(tr("Cancel"), this, SLOT(issueCancel()));
|
||||
@@ -319,8 +320,8 @@ bool DownloadListWidgetCompactDelegate::editorEvent(QEvent *event, QAbstractItem
|
||||
menu.addAction(tr("Delete All..."), this, SLOT(issueDeleteAll()));
|
||||
if (!hidden) {
|
||||
menu.addSeparator();
|
||||
menu.addAction(tr("Remove Installed..."), this, SLOT(issueRemoveFromViewCompleted()));
|
||||
menu.addAction(tr("Remove All..."), this, SLOT(issueRemoveFromViewAll()));
|
||||
menu.addAction(tr("Hide Installed..."), this, SLOT(issueRemoveFromViewCompleted()));
|
||||
menu.addAction(tr("Hide All..."), this, SLOT(issueRemoveFromViewAll()));
|
||||
}
|
||||
menu.exec(mouseEvent->globalPos());
|
||||
|
||||
|
||||
+245
-86
File diff suppressed because it is too large
Load Diff
+33
-16
@@ -38,6 +38,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
namespace MOBase { class IPluginGame; }
|
||||
|
||||
class NexusInterface;
|
||||
class PluginContainer;
|
||||
|
||||
/*!
|
||||
* \brief manages downloading of files and provides progress information for gui elements
|
||||
@@ -74,7 +75,8 @@ private:
|
||||
QNetworkReply *m_Reply;
|
||||
QTime m_StartTime;
|
||||
qint64 m_PreResumeSize;
|
||||
int m_Progress;
|
||||
std::pair<int, QString> m_Progress;
|
||||
std::tuple<int, int, int, int, int> m_SpeedDiff;
|
||||
DownloadState m_State;
|
||||
int m_CurrentUrl;
|
||||
QStringList m_Urls;
|
||||
@@ -92,7 +94,7 @@ private:
|
||||
bool m_Hidden;
|
||||
|
||||
static DownloadInfo *createNew(const MOBase::ModRepositoryFileInfo *fileInfo, const QStringList &URLs);
|
||||
static DownloadInfo *createFromMeta(const QString &filePath, bool showHidden);
|
||||
static DownloadInfo *createFromMeta(const QString &filePath, bool showHidden, const QString outputDirectory);
|
||||
|
||||
/**
|
||||
* @brief rename the file
|
||||
@@ -112,7 +114,7 @@ private:
|
||||
private:
|
||||
static unsigned int s_NextDownloadID;
|
||||
private:
|
||||
DownloadInfo() : m_TotalSize(0), m_ReQueried(false), m_Hidden(false) {}
|
||||
DownloadInfo() : m_TotalSize(0), m_ReQueried(false), m_Hidden(false), m_SpeedDiff(std::tuple<int,int,int,int,int>(0,0,0,0,0)) {}
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -162,6 +164,8 @@ public:
|
||||
*/
|
||||
void setShowHidden(bool showHidden);
|
||||
|
||||
void setPluginContainer(PluginContainer *pluginContainer);
|
||||
|
||||
/**
|
||||
* @brief download from an already open network connection
|
||||
*
|
||||
@@ -179,7 +183,7 @@ public:
|
||||
* @param fileInfo information previously retrieved from the nexus network
|
||||
* @return true if the download was started, false if it wasn't. The latter currently only happens if there is a duplicate and the user decides not to download again
|
||||
**/
|
||||
bool addDownload(QNetworkReply *reply, const QStringList &URLs, const QString &fileName, int modID, int fileID = 0, const MOBase::ModRepositoryFileInfo *fileInfo = new MOBase::ModRepositoryFileInfo());
|
||||
bool addDownload(QNetworkReply *reply, const QStringList &URLs, const QString &fileName, QString gameName, int modID, int fileID = 0, const MOBase::ModRepositoryFileInfo *fileInfo = new MOBase::ModRepositoryFileInfo());
|
||||
|
||||
/**
|
||||
* @brief start a download using a nxm-link
|
||||
@@ -209,7 +213,7 @@ public:
|
||||
* @param index index of the pending download (index in the range [0, numPendingDownloads()[)
|
||||
* @return pair of modid, fileid
|
||||
*/
|
||||
std::pair<int, int> getPendingDownload(int index);
|
||||
std::tuple<QString, int, int> getPendingDownload(int index);
|
||||
|
||||
/**
|
||||
* @brief retrieve the full path to the download specified by index
|
||||
@@ -256,7 +260,7 @@ public:
|
||||
* @param index index of the file to look up
|
||||
* @return progress of the download in percent (integer)
|
||||
**/
|
||||
int getProgress(int index) const;
|
||||
std::pair<int, QString> getProgress(int index) const;
|
||||
|
||||
/**
|
||||
* @brief retrieve the current state of the download
|
||||
@@ -285,6 +289,14 @@ public:
|
||||
**/
|
||||
int getModID(int index) const;
|
||||
|
||||
/**
|
||||
* @brief retrieve the game name of the downlaod specified by the index
|
||||
*
|
||||
* @param index index of the file to look up
|
||||
* @return the game name
|
||||
**/
|
||||
QString getGameName(int index) const;
|
||||
|
||||
/**
|
||||
* @brief determine if the specified file is supposed to be hidden
|
||||
* @param index index of the file to look up
|
||||
@@ -307,6 +319,8 @@ public:
|
||||
*/
|
||||
void markInstalled(int index);
|
||||
|
||||
void markInstalled(QString download);
|
||||
|
||||
/**
|
||||
* @brief mark a download as uninstalled
|
||||
*
|
||||
@@ -314,6 +328,8 @@ public:
|
||||
*/
|
||||
void markUninstalled(int index);
|
||||
|
||||
void markUninstalled(QString download);
|
||||
|
||||
/**
|
||||
* @brief refreshes the list of downloads
|
||||
*/
|
||||
@@ -407,15 +423,15 @@ public slots:
|
||||
|
||||
void queryInfo(int index);
|
||||
|
||||
void nxmDescriptionAvailable(int modID, QVariant userData, QVariant resultData, int requestID);
|
||||
void nxmDescriptionAvailable(QString gameName, int modID, QVariant userData, QVariant resultData, int requestID);
|
||||
|
||||
void nxmFilesAvailable(int modID, QVariant userData, QVariant resultData, int requestID);
|
||||
void nxmFilesAvailable(QString gameName, int modID, QVariant userData, QVariant resultData, int requestID);
|
||||
|
||||
void nxmFileInfoAvailable(int modID, int fileID, QVariant userData, QVariant resultData, int requestID);
|
||||
void nxmFileInfoAvailable(QString gameName, int modID, int fileID, QVariant userData, QVariant resultData, int requestID);
|
||||
|
||||
void nxmDownloadURLsAvailable(int modID, int fileID, QVariant userData, QVariant resultData, int requestID);
|
||||
void nxmDownloadURLsAvailable(QString gameName, int modID, int fileID, QVariant userData, QVariant resultData, int requestID);
|
||||
|
||||
void nxmRequestFailed(int modID, int fileID, QVariant userData, int requestID, const QString &errorString);
|
||||
void nxmRequestFailed(QString gameName, int modID, int fileID, QVariant userData, int requestID, const QString &errorString);
|
||||
|
||||
void managedGameChanged(MOBase::IPluginGame const *gamePlugin);
|
||||
|
||||
@@ -423,7 +439,7 @@ private slots:
|
||||
|
||||
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
|
||||
void downloadReadyRead();
|
||||
void downloadFinished();
|
||||
void downloadFinished(int index = 0);
|
||||
void downloadError(QNetworkReply::NetworkError error);
|
||||
void metaDataChanged();
|
||||
void directoryChanged(const QString &dirctory);
|
||||
@@ -431,6 +447,7 @@ private slots:
|
||||
private:
|
||||
|
||||
void createMetaFile(DownloadInfo *info);
|
||||
DownloadManager::DownloadInfo* getDownloadInfo(QString fileName);
|
||||
|
||||
public:
|
||||
|
||||
@@ -443,7 +460,7 @@ public:
|
||||
*
|
||||
* @return Unique(ish) name
|
||||
*/
|
||||
QString getDownloadFileName(const QString &baseName) const;
|
||||
QString getDownloadFileName(const QString &baseName, bool rename = false) const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -457,7 +474,7 @@ private:
|
||||
* @param fileInfo information previously retrieved from the mod page
|
||||
* @return true if the download was started, false if it wasn't. The latter currently only happens if there is a duplicate and the user decides not to download again
|
||||
**/
|
||||
bool addDownload(const QStringList &URLs, int modID, int fileID, const MOBase::ModRepositoryFileInfo *fileInfo);
|
||||
bool addDownload(const QStringList &URLs, QString gameName, int modID, int fileID, const MOBase::ModRepositoryFileInfo *fileInfo);
|
||||
|
||||
// important: the caller has to lock the list-mutex, otherwise the DownloadInfo-pointer might get invalidated at any time
|
||||
DownloadInfo *findDownload(QObject *reply, int *index = nullptr) const;
|
||||
@@ -476,7 +493,7 @@ private:
|
||||
|
||||
QDateTime matchDate(const QString &timeString);
|
||||
|
||||
void removePending(int modID, int fileID);
|
||||
void removePending(QString gameName, int modID, int fileID);
|
||||
|
||||
static QString getFileTypeString(int fileType);
|
||||
|
||||
@@ -488,7 +505,7 @@ private:
|
||||
|
||||
NexusInterface *m_NexusInterface;
|
||||
|
||||
QVector<std::pair<int, int> > m_PendingDownloads;
|
||||
QVector<std::tuple<QString, int, int>> m_PendingDownloads;
|
||||
|
||||
QVector<DownloadInfo*> m_ActiveDownloads;
|
||||
|
||||
|
||||
@@ -115,6 +115,9 @@ void EditExecutablesDialog::saveExecutable()
|
||||
m_Profile->storeSetting("custom_overwrites", ui->titleEdit->text(),
|
||||
ui->newFilesModBox->currentText());
|
||||
}
|
||||
else {
|
||||
m_Profile->removeSetting("custom_overwrites", ui->titleEdit->text());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+62
-21
@@ -49,6 +49,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <QDirIterator>
|
||||
#include <QDebug>
|
||||
#include <QTextDocument>
|
||||
#include <QtConcurrent/QtConcurrentRun>
|
||||
|
||||
#include <Shellapi.h>
|
||||
|
||||
@@ -181,6 +182,7 @@ bool InstallationManager::unpackSingleFile(const QString &fileName)
|
||||
m_InstallationProgress->hide();
|
||||
m_InstallationProgress->deleteLater();
|
||||
m_InstallationProgress = nullptr;
|
||||
m_Progress = 0;
|
||||
});
|
||||
m_InstallationProgress->setWindowFlags(
|
||||
m_InstallationProgress->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
@@ -190,10 +192,20 @@ bool InstallationManager::unpackSingleFile(const QString &fileName)
|
||||
m_InstallationProgress->setFixedSize(600, 100);
|
||||
m_InstallationProgress->show();
|
||||
|
||||
bool res = m_ArchiveHandler->extract(QDir::tempPath(),
|
||||
new MethodCallback<InstallationManager, void, float>(this, &InstallationManager::updateProgress),
|
||||
nullptr,
|
||||
new MethodCallback<InstallationManager, void, QString const &>(this, &InstallationManager::report7ZipError));
|
||||
QFuture<bool> future = QtConcurrent::run([&]() -> bool {
|
||||
return m_ArchiveHandler->extract(
|
||||
QDir::tempPath(),
|
||||
new MethodCallback<InstallationManager, void, float>(this, &InstallationManager::updateProgress),
|
||||
nullptr,
|
||||
new MethodCallback<InstallationManager, void, QString const &>(this, &InstallationManager::report7ZipError)
|
||||
);
|
||||
});
|
||||
do {
|
||||
if (m_Progress != m_InstallationProgress->value())
|
||||
m_InstallationProgress->setValue(m_Progress);
|
||||
QCoreApplication::processEvents();
|
||||
} while (!future.isFinished() || m_InstallationProgress->isVisible());
|
||||
bool res = future.result();
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -270,6 +282,7 @@ QStringList InstallationManager::extractFiles(const QStringList &filesOrig, bool
|
||||
m_InstallationProgress->hide();
|
||||
m_InstallationProgress->deleteLater();
|
||||
m_InstallationProgress = nullptr;
|
||||
m_Progress = 0;
|
||||
});
|
||||
m_InstallationProgress->setWindowFlags(
|
||||
m_InstallationProgress->windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
@@ -279,10 +292,20 @@ QStringList InstallationManager::extractFiles(const QStringList &filesOrig, bool
|
||||
m_InstallationProgress->show();
|
||||
|
||||
// unpack only the files we need for the installer
|
||||
if (!m_ArchiveHandler->extract(QDir::tempPath(),
|
||||
new MethodCallback<InstallationManager, void, float>(this, &InstallationManager::updateProgress),
|
||||
nullptr,
|
||||
new MethodCallback<InstallationManager, void, QString const &>(this, &InstallationManager::report7ZipError))) {
|
||||
QFuture<bool> future = QtConcurrent::run([&]() -> bool {
|
||||
return m_ArchiveHandler->extract(
|
||||
QDir::tempPath(),
|
||||
new MethodCallback<InstallationManager, void, float>(this, &InstallationManager::updateProgress),
|
||||
nullptr,
|
||||
new MethodCallback<InstallationManager, void, QString const &>(this, &InstallationManager::report7ZipError)
|
||||
);
|
||||
});
|
||||
do {
|
||||
if (m_Progress != m_InstallationProgress->value())
|
||||
m_InstallationProgress->setValue(m_Progress);
|
||||
QCoreApplication::processEvents();
|
||||
} while (!future.isFinished() || m_InstallationProgress->isVisible());
|
||||
if (!future.result()) {
|
||||
throw MyException(QString("extracting failed (%1)").arg(m_ArchiveHandler->getLastError()));
|
||||
}
|
||||
|
||||
@@ -410,7 +433,8 @@ DirectoryTree::Node *InstallationManager::getSimpleArchiveBase(DirectoryTree *da
|
||||
void InstallationManager::updateProgress(float percentage)
|
||||
{
|
||||
if (m_InstallationProgress != nullptr) {
|
||||
m_InstallationProgress->setValue(static_cast<int>(percentage * 100.0));
|
||||
m_Progress = static_cast<int>(percentage * 100.0);
|
||||
|
||||
if (m_InstallationProgress->wasCanceled()) {
|
||||
m_ArchiveHandler->cancel();
|
||||
m_InstallationProgress->reset();
|
||||
@@ -421,10 +445,7 @@ void InstallationManager::updateProgress(float percentage)
|
||||
|
||||
void InstallationManager::updateProgressFile(QString const &fileName)
|
||||
{
|
||||
if (m_InstallationProgress != nullptr) {
|
||||
m_InstallationProgress->setLabelText(fileName);
|
||||
QCoreApplication::processEvents();
|
||||
}
|
||||
m_ProgressFile = fileName;
|
||||
}
|
||||
|
||||
|
||||
@@ -537,7 +558,7 @@ bool InstallationManager::ensureValidModName(GuessedValue<QString> &name) const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool InstallationManager::doInstall(GuessedValue<QString> &modName, int modID,
|
||||
bool InstallationManager::doInstall(GuessedValue<QString> &modName, QString gameName, int modID,
|
||||
const QString &version, const QString &newestVersion,
|
||||
int categoryID, const QString &repository)
|
||||
{
|
||||
@@ -561,6 +582,8 @@ bool InstallationManager::doInstall(GuessedValue<QString> &modName, int modID,
|
||||
m_InstallationProgress->hide();
|
||||
m_InstallationProgress->deleteLater();
|
||||
m_InstallationProgress = nullptr;
|
||||
m_Progress = 0;
|
||||
m_ProgressFile = QString();
|
||||
});
|
||||
|
||||
m_InstallationProgress->setWindowFlags(
|
||||
@@ -568,10 +591,22 @@ bool InstallationManager::doInstall(GuessedValue<QString> &modName, int modID,
|
||||
m_InstallationProgress->setWindowModality(Qt::WindowModal);
|
||||
m_InstallationProgress->setFixedSize(600, 100);
|
||||
m_InstallationProgress->show();
|
||||
if (!m_ArchiveHandler->extract(targetDirectory,
|
||||
new MethodCallback<InstallationManager, void, float>(this, &InstallationManager::updateProgress),
|
||||
new MethodCallback<InstallationManager, void, QString const &>(this, &InstallationManager::updateProgressFile),
|
||||
new MethodCallback<InstallationManager, void, QString const &>(this, &InstallationManager::report7ZipError))) {
|
||||
QFuture<bool> future = QtConcurrent::run([&]() -> bool {
|
||||
return m_ArchiveHandler->extract(
|
||||
targetDirectory,
|
||||
new MethodCallback<InstallationManager, void, float>(this, &InstallationManager::updateProgress),
|
||||
new MethodCallback<InstallationManager, void, QString const &>(this, &InstallationManager::updateProgressFile),
|
||||
new MethodCallback<InstallationManager, void, QString const &>(this, &InstallationManager::report7ZipError)
|
||||
);
|
||||
});
|
||||
do {
|
||||
if (m_Progress != m_InstallationProgress->value())
|
||||
m_InstallationProgress->setValue(m_Progress);
|
||||
if (m_ProgressFile != m_InstallationProgress->labelText())
|
||||
m_InstallationProgress->setLabelText(m_ProgressFile);
|
||||
QCoreApplication::processEvents();
|
||||
} while (!future.isFinished());
|
||||
if (!future.result()) {
|
||||
if (m_ArchiveHandler->getLastError() == Archive::ERROR_EXTRACT_CANCELLED) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -582,6 +617,9 @@ bool InstallationManager::doInstall(GuessedValue<QString> &modName, int modID,
|
||||
QSettings settingsFile(targetDirectory + "/meta.ini", QSettings::IniFormat);
|
||||
|
||||
// overwrite settings only if they are actually are available or haven't been set before
|
||||
if ((gameName != "") || !settingsFile.contains("gameName")) {
|
||||
settingsFile.setValue("gameName", gameName);
|
||||
}
|
||||
if ((modID != 0) || !settingsFile.contains("modid")) {
|
||||
settingsFile.setValue("modid", modID);
|
||||
}
|
||||
@@ -662,6 +700,7 @@ bool InstallationManager::install(const QString &fileName,
|
||||
modName.update(QFileInfo(fileName).completeBaseName(), GUESS_FALLBACK);
|
||||
|
||||
// read out meta information from the download if available
|
||||
QString gameName = "";
|
||||
int modID = 0;
|
||||
QString version = "";
|
||||
QString newestVersion = "";
|
||||
@@ -671,6 +710,7 @@ bool InstallationManager::install(const QString &fileName,
|
||||
QString metaName = fileName + ".meta";
|
||||
if (QFile(metaName).exists()) {
|
||||
QSettings metaFile(metaName, QSettings::IniFormat);
|
||||
gameName = metaFile.value("gameName", "").toString();
|
||||
modID = metaFile.value("modID", 0).toInt();
|
||||
QTextDocument doc;
|
||||
doc.setHtml(metaFile.value("name", "").toString());
|
||||
@@ -759,7 +799,7 @@ bool InstallationManager::install(const QString &fileName,
|
||||
mapToArchive(filesTree.data());
|
||||
// the simple installer only prepares the installation, the rest
|
||||
// works the same for all installers
|
||||
if (!doInstall(modName, modID, version, newestVersion, categoryID,
|
||||
if (!doInstall(modName, gameName, modID, version, newestVersion, categoryID,
|
||||
repository)) {
|
||||
installResult = IPluginInstaller::RESULT_FAILED;
|
||||
}
|
||||
@@ -779,7 +819,7 @@ bool InstallationManager::install(const QString &fileName,
|
||||
= installerCustom->supportedExtensions();
|
||||
if (installerExt.find(fileInfo.suffix()) != installerExt.end()) {
|
||||
installResult
|
||||
= installerCustom->install(modName, fileName, version, modID);
|
||||
= installerCustom->install(modName, gameName, fileName, version, modID);
|
||||
unsigned int idx = ModInfo::getIndex(modName);
|
||||
if (idx != UINT_MAX) {
|
||||
ModInfo::Ptr info = ModInfo::getByIndex(idx);
|
||||
@@ -814,7 +854,8 @@ bool InstallationManager::install(const QString &fileName,
|
||||
}
|
||||
}
|
||||
|
||||
reportError(tr("None of the available installer plugins were able to handle that archive"));
|
||||
reportError(tr("None of the available installer plugins were able to handle that archive.\n"
|
||||
"This is likely due to a corrupted or incompatible download or unrecognized archive format."));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ private:
|
||||
bool isSimpleArchiveTopLayer(const MOBase::DirectoryTree::Node *node, bool bainStyle);
|
||||
MOBase::DirectoryTree::Node *getSimpleArchiveBase(MOBase::DirectoryTree *dataTree);
|
||||
|
||||
bool doInstall(MOBase::GuessedValue<QString> &modName,
|
||||
bool doInstall(MOBase::GuessedValue<QString> &modName, QString gameName,
|
||||
int modID, const QString &version, const QString &newestVersion, int categoryID, const QString &repository);
|
||||
|
||||
QString generateBackupName(const QString &directoryName) const;
|
||||
@@ -177,6 +177,11 @@ private:
|
||||
|
||||
void postInstallCleanup();
|
||||
|
||||
signals:
|
||||
|
||||
void progressUpdate(float percentage);
|
||||
void progressUpdate(QString const fileName);
|
||||
|
||||
private:
|
||||
|
||||
struct ByPriority {
|
||||
@@ -207,6 +212,8 @@ private:
|
||||
QString m_CurrentFile;
|
||||
|
||||
QProgressDialog *m_InstallationProgress { nullptr };
|
||||
int m_Progress;
|
||||
QString m_ProgressFile;
|
||||
|
||||
std::set<QString> m_TempFilesToDelete;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user