Compare commits

..
26 Commits
Author SHA1 Message Date
Mikaël Capelle 8006988b20 Start updating the settings tab for extension. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 890bee5444 Refactor and clean plugin settings stuff. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 263eb6a552 Minor updates of themes. 2024-10-20 11:58:04 +02:00
Mikaël Capelle ee6624f091 Use MO2_INSTALL_BIN from mo2-cmake instead of custom CMake variable. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 17a2e5ef31 Start implementing extension info side. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 5c264af63e Minor fixes. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 5061ff5e59 Default icon for extension. 2024-10-20 11:58:04 +02:00
Mikaël Capelle c9f592049e Fix after rebase. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 20711bd3bf Start working on extensions tab in settings. 2024-10-20 11:58:04 +02:00
Mikaël Capelle af52b779e6 Update theme extensions. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 0d699bd025 Remove unused fileMapping() overload. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 28f134cc86 Add IExtensionList implementation. 2024-10-20 11:58:04 +02:00
Mikaël Capelle c6516af5db Recurse folders to find Qt plugins. 2024-10-20 11:58:04 +02:00
Mikaël Capelle d35ffb9751 Setup theme extensions properly. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 64f9c998cd Track the master plugin in a plugin group. 2024-10-20 11:58:04 +02:00
Mikaël Capelle a02fabc06f Update for extensions. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 62fe0a4c13 Remove plugin container from source group. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 1993fee880 Update plugin manager. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 646723cac7 Load themes and translations from extensions/. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 9d9370100c Fix after uibase changes. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 17e54ba347 Implement translation manager. 2024-10-20 11:58:04 +02:00
Mikaël Capelle f8ea6dedd0 Implement theme extensions. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 1d5a40738c Start implementing the theme manager. 2024-10-20 11:58:04 +02:00
Mikaël Capelle 54a7e93878 Move mo2-cmake to standalone feature. 2024-10-20 11:57:37 +02:00
Mikaël Capelle d0d0a983bb Switch VersionInfo -> Version for ModOrganizer2. (#2063) 2024-10-20 11:57:37 +02:00
Mikaël Capelle bb4f3fd74b Move to VCPKG.
* Remove SConscript related files.
* Update for libbsarch.
* Force-load translations from uibase and gamebryo/creation.
* Set option to use deprecated uibase include paths.
* Bring githubpp here and add a standalone preset.
* Full standalone build.
2024-10-20 11:57:37 +02:00
302 changed files with 12247 additions and 11998 deletions
@@ -7,7 +7,7 @@ assignees: ''
--- ---
**This template is useful to add basic support using https://github.com/ModOrganizer2/modorganizer-basic_games.** **This template is useful to add basic support using https://github.com/ModOrganizer2/modorganizer-basic_games.**
**If you are vaguely familiar with programming you can try following the instructions on that link to get something working yourself. If you have trouble with that please fill in this template.** **If you are vaguely familiar with programming you can try following the instructions on that link to get something working yourself. If you have trouble with that please fill in this template.**
+30 -11
View File
@@ -2,32 +2,51 @@ name: Build ModOrganizer 2
on: on:
push: push:
branches: [master] branches: master
pull_request: pull_request:
types: [opened, synchronize, reopened] types: [opened, synchronize, reopened]
env: env:
VCPKG_BINARY_SOURCES: ${{ vars.AZ_BLOB_VCPKG_URL != '' && format('clear;x-azblob,{0},{1},readwrite', vars.AZ_BLOB_VCPKG_URL, secrets.AZ_BLOB_SAS) || '' }} VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
jobs: jobs:
build: build:
runs-on: windows-2022 runs-on: windows-2022
steps: steps:
- name: Build ModOrganizer # https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache
id: build-modorganizer - name: Export GitHub Actions cache environment variables
uses: ModOrganizer2/build-with-mob-action@master uses: actions/github-script@v7
with: with:
qt-modules: qtpositioning qtwebchannel qtwebengine qtwebsockets qtnetworkauth script: |
mo2-dependencies: usvfs uibase bsatk esptk archive lootcli core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install ModOrganizer - name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.7.1
modules: qtpositioning qtwebchannel qtwebengine qtwebsockets
cache: true
- uses: actions/checkout@v4
- name: "Set environmental variables"
shell: bash
run: |
echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV
- name: Configure ModOrganizer
shell: pwsh shell: pwsh
run: | run: |
cmake --install vsbuild --config RelWithDebInfo cmake --preset vs2022-windows-standalone `
working-directory: ./build/${{ github.event.repository.name }} "-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64" `
"-DCMAKE_INSTALL_PREFIX=install"
- name: Build ModOrganizer
run: cmake --build vsbuild --config RelWithDebInfo --target INSTALL
- name: Package ModOrganizer - name: Package ModOrganizer
uses: actions/upload-artifact@master uses: actions/upload-artifact@master
with: with:
name: modorganizer name: modorganizer
path: ./install/bin path: ./install
+2 -4
View File
@@ -8,12 +8,10 @@ src/*.bak
CMakeLists.txt.user CMakeLists.txt.user
edit edit
/CMakeFiles /CMakeFiles
.idea/* .idea
!.idea/filetypes/
!.idea/filetypes/qt-translations.xml
/msbuild.log /msbuild.log
/*std*.log /*std*.log
/*build /*build
.vscode
/src/version.aps /src/version.aps
.idea/
-20
View File
@@ -1,20 +0,0 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-case-conflict
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v22.1.5
hooks:
- id: clang-format
'types_or': [c++, c]
ci:
autofix_commit_msg: "[pre-commit.ci] Auto fixes from pre-commit.com hooks."
autofix_prs: true
autoupdate_commit_msg: "[pre-commit.ci] Pre-commit autoupdate."
autoupdate_schedule: quarterly
submodules: false
+5 -9
View File
@@ -5,17 +5,13 @@ set(MO2_CMAKE_DEPRECATED_UIBASE_INCLUDE ON)
project(organizer) project(organizer)
# if MO2_INSTALL_IS_BIN is set, this means that we should install directly into the find_package(mo2-cmake CONFIG REQUIRED)
# installation prefix, without the bin/ subfolder, typically for a standalone build
# to update an existing install set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
if (MO2_INSTALL_IS_BIN)
set(_bin ".")
else()
set(_bin bin)
endif()
add_subdirectory(src) add_subdirectory(src)
add_subdirectory(themes)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT organizer) set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT organizer)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dump_running_process.bat DESTINATION ${_bin}) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dump_running_process.bat DESTINATION ${MO2_INSTALL_BIN})
+1 -13
View File
@@ -29,7 +29,7 @@
"value": "x64" "value": "x64"
}, },
"cacheVariables": { "cacheVariables": {
"CMAKE_CXX_FLAGS": "/EHsc /MP /W4", "CMAKE_CXX_FLAGS": "/EHsc /MP /W3",
"VCPKG_TARGET_TRIPLET": { "VCPKG_TARGET_TRIPLET": {
"type": "STRING", "type": "STRING",
"value": "x64-windows-static-md" "value": "x64-windows-static-md"
@@ -55,17 +55,5 @@
"name": "vs2022-windows-standalone" "name": "vs2022-windows-standalone"
} }
], ],
"buildPresets": [
{
"name": "vs2022-windows",
"resolvePackageReferences": "on",
"configurePreset": "vs2022-windows"
},
{
"name": "vs2022-windows-standalone",
"resolvePackageReferences": "on",
"configurePreset": "vs2022-windows-standalone"
}
],
"version": 4 "version": 4
} }
+1 -1
View File
@@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>. <http://www.gnu.org/philosophy/why-not-lgpl.html>.
+8 -7
View File
@@ -1,3 +1,5 @@
[![Build status](https://ci.appveyor.com/api/projects/status/hxenwxmpaob5xung?svg=true)](https://ci.appveyor.com/project/ModOrganizer2/modorganizer-736bd)
# Mod Organizer # 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 (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.
@@ -10,22 +12,22 @@ The project took up speed again after a few more coders showed up in late 2017,
## Help Wanted! ## 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. 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: [Mod Organizer 2](https://discord.gg/ewUVAqyrQX) To have more information, please join the open MO2 Development discord server: [Mod Organizer 2](https://discord.gg/ewUVAqyrQX)
If you want to help translate MO2 to your language you should join the Discord server too and head to the #translation channel. 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 [mob project](https://github.com/modorganizer2/mob) that handles that. To setup a development environment on your machine, there is the [mob project](https://github.com/modorganizer2/mob) that handles that.
If you want to submit your code changes, please use a good formatting style like the default one in Visual Studio. If you want to submit your code changes, please use a good formatting 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. 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: ## Reporting Issues:
Issues should be reported to the GitHub page or on the open Discord server: [Mod Organizer 2](https://discord.gg/ewUVAqyrQX). Here is also where dev builds are tested, bugs are reported and investigated, suggestions are discussed and a lot more. Issues should be reported to the GitHub page or on the open discord server: [Mod Organizer 2](https://discord.gg/ewUVAqyrQX). 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, LostDragonist, AnyOldName3, isa, Holt59, Project579, przester, Qudix, RJ, Jonathan Feenstra and many others for the development. Credits to Tannin, LePresidente, Silarn, erasmux, AL12, LostDragonist, AnyOldName3, isa, Holt59 and many others for the development.
## Download Location ## Download Location
* on [GitHub.com](https://github.com/Modorganizer2/modorganizer/releases) * on [GitHub.com](https://github.com/Modorganizer2/modorganizer/releases)
* on [NexusMods.com](https://www.nexusmods.com/site/mods/6) * on [NexusMods.com](https://www.nexusmods.com/skyrimspecialedition/mods/6194)
## Old Download Location ## Old Download Location
@@ -37,7 +39,7 @@ Please refer to [Modorganizer2/mob](https://github.com/modorganizer2/mob) for bu
## Other Repositories ## Other Repositories
MO2 consists of multiple repositories on GitHub. The mob project will download them automatically as required. They should however also be buildable individually. MO2 consists of multiple repositories on github. The mob project will download them automatically as required. They should however also be buildable individually.
Here is a complete list: Here is a complete list:
* https://github.com/LePresidente/cpython-1 * https://github.com/LePresidente/cpython-1
@@ -65,7 +67,6 @@ Here is a complete list:
* https://github.com/ModOrganizer2/modorganizer-game_skyrim * https://github.com/ModOrganizer2/modorganizer-game_skyrim
* https://github.com/ModOrganizer2/modorganizer-game_skyrimSE * https://github.com/ModOrganizer2/modorganizer-game_skyrimSE
* https://github.com/ModOrganizer2/modorganizer-game_skyrimVR * https://github.com/ModOrganizer2/modorganizer-game_skyrimVR
* https://github.com/ModOrganizer2/modorganizer-game_starfield
* https://github.com/ModOrganizer2/modorganizer-game_ttw * https://github.com/ModOrganizer2/modorganizer-game_ttw
* https://github.com/ModOrganizer2/modorganizer-installer_bain * https://github.com/ModOrganizer2/modorganizer-installer_bain
* https://github.com/ModOrganizer2/modorganizer-installer_wizard * https://github.com/ModOrganizer2/modorganizer-installer_wizard
+32 -30
View File
@@ -12,7 +12,7 @@ find_package(mo2-esptk CONFIG REQUIRED)
find_package(mo2-dds-header CONFIG REQUIRED) find_package(mo2-dds-header CONFIG REQUIRED)
find_package(mo2-libbsarch CONFIG REQUIRED) find_package(mo2-libbsarch CONFIG REQUIRED)
find_package(Qt6 REQUIRED COMPONENTS WebEngineWidgets WebSockets NetworkAuth) find_package(Qt6 REQUIRED COMPONENTS WebEngineWidgets WebSockets)
find_package(Boost CONFIG REQUIRED COMPONENTS program_options thread interprocess signals2 uuid accumulators) find_package(Boost CONFIG REQUIRED COMPONENTS program_options thread interprocess signals2 uuid accumulators)
find_package(7zip CONFIG REQUIRED) find_package(7zip CONFIG REQUIRED)
find_package(lz4 CONFIG REQUIRED) find_package(lz4 CONFIG REQUIRED)
@@ -25,54 +25,49 @@ set_target_properties(organizer PROPERTIES
# disable translations because we want to be able to install somewhere else if # disable translations because we want to be able to install somewhere else if
# required # required
mo2_configure_target(organizer WARNINGS 4 TRANSLATIONS OFF) mo2_configure_target(organizer WARNINGS 3 TRANSLATIONS OFF)
# we add translations "manually" to handle MO2_INSTALL_IS_BIN # we add translations "manually" to handle MO2_INSTALL_IS_BIN
mo2_add_translations(organizer mo2_add_translations(organizer
INSTALL_RELEASE INSTALL_RELEASE
INSTALL_DIRECTORY "${_bin}/translations" INSTALL_DIRECTORY "${MO2_INSTALL_BIN}/translations"
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}) SOURCES ${CMAKE_CURRENT_SOURCE_DIR})
mo2_set_project_to_run_from_install( mo2_set_project_to_run_from_install(
organizer EXECUTABLE ${CMAKE_INSTALL_PREFIX}/${_bin}/ModOrganizer.exe) organizer EXECUTABLE ${CMAKE_INSTALL_PREFIX}/${MO2_INSTALL_BIN}/ModOrganizer.exe)
target_link_libraries(organizer PRIVATE target_link_libraries(organizer PRIVATE
Shlwapi Bcrypt Shlwapi Bcrypt
usvfs::usvfs mo2::uibase mo2::archive mo2::libbsarch usvfs::usvfs mo2::uibase mo2::archive mo2::libbsarch
mo2::bsatk mo2::esptk mo2::lootcli-header mo2::bsatk mo2::esptk mo2::lootcli-header
Boost::program_options Boost::signals2 Boost::uuid Boost::accumulators Boost::program_options Boost::signals2 Boost::uuid Boost::accumulators
Qt6::WebEngineWidgets Qt6::WebSockets Qt6::NetworkAuth Version Dbghelp) Qt6::WebEngineWidgets Qt6::WebSockets Version Dbghelp)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/dlls.manifest.qt6" install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/dlls.manifest.qt6"
DESTINATION ${_bin}/dlls DESTINATION ${MO2_INSTALL_BIN}/dlls
CONFIGURATIONS Release RelWithDebInfo CONFIGURATIONS Release RelWithDebInfo
RENAME dlls.manifest) RENAME dlls.manifest)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/dlls.manifest.debug.qt6" install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/dlls.manifest.debug.qt6"
DESTINATION ${_bin}/dlls DESTINATION ${MO2_INSTALL_BIN}/dlls
CONFIGURATIONS Debug CONFIGURATIONS Debug
RENAME dlls.manifest) RENAME dlls.manifest)
if (NOT MO2_SKIP_STYLESHEETS_INSTALL)
install(
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/stylesheets"
DESTINATION ${_bin})
endif()
if (NOT MO2_SKIP_TUTORIALS_INSTALL) if (NOT MO2_SKIP_TUTORIALS_INSTALL)
install( install(
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/tutorials" DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/tutorials"
DESTINATION ${_bin}) DESTINATION ${MO2_INSTALL_BIN})
endif() endif()
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/resources/markdown.html" install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/resources/markdown.html"
DESTINATION ${_bin}/resources) DESTINATION ${MO2_INSTALL_BIN}/resources)
# install ModOrganizer.exe itself # install ModOrganizer.exe itself
install(FILES $<TARGET_FILE:organizer> DESTINATION ${_bin}) install(FILES $<TARGET_FILE:organizer> DESTINATION ${MO2_INSTALL_BIN})
# install dependencies DLLs # install dependencies DLLs
install(FILES $<TARGET_FILE:mo2::libbsarch> DESTINATION ${_bin}/dlls) install(FILES $<TARGET_FILE:mo2::libbsarch> DESTINATION ${MO2_INSTALL_BIN}/dlls)
install(FILES $<TARGET_FILE:7zip::7zip> DESTINATION ${_bin}/dlls) install(FILES $<TARGET_FILE:mo2::archive> DESTINATION ${MO2_INSTALL_BIN}/dlls)
install(FILES $<TARGET_FILE:7zip::7zip> DESTINATION ${MO2_INSTALL_BIN}/dlls)
# this may copy over the ones from uibase/usvfs # this may copy over the ones from uibase/usvfs
# - when building with mob, this should not matter as the files should be identical # - when building with mob, this should not matter as the files should be identical
@@ -88,7 +83,7 @@ install(FILES
$<TARGET_FILE:usvfs_x86::usvfs_dll> $<TARGET_FILE:usvfs_x86::usvfs_dll>
$<TARGET_FILE:usvfs_x64::usvfs_proxy> $<TARGET_FILE:usvfs_x64::usvfs_proxy>
$<TARGET_FILE:usvfs_x86::usvfs_proxy> $<TARGET_FILE:usvfs_x86::usvfs_proxy>
DESTINATION ${_bin}) DESTINATION ${MO2_INSTALL_BIN})
# do not install PDB if CMAKE_INSTALL_PREFIX is "bin" # do not install PDB if CMAKE_INSTALL_PREFIX is "bin"
if (NOT MO2_INSTALL_IS_BIN) if (NOT MO2_INSTALL_IS_BIN)
@@ -96,7 +91,7 @@ if (NOT MO2_INSTALL_IS_BIN)
endif() endif()
mo2_deploy_qt( mo2_deploy_qt(
DIRECTORY ${_bin} DIRECTORY ${MO2_INSTALL_BIN}
BINARIES ModOrganizer.exe $<TARGET_FILE_NAME:mo2::uibase>) BINARIES ModOrganizer.exe $<TARGET_FILE_NAME:mo2::uibase>)
# set source groups for VS # set source groups for VS
@@ -109,7 +104,6 @@ mo2_add_filter(NAME src/application GROUPS
multiprocess multiprocess
sanitychecks sanitychecks
selfupdater selfupdater
systemtraymanager
updatedialog updatedialog
) )
@@ -127,16 +121,12 @@ mo2_add_filter(NAME src/categories GROUPS
mo2_add_filter(NAME src/core GROUPS mo2_add_filter(NAME src/core GROUPS
archivefiletree archivefiletree
githubpp github
inibakery
installationmanager installationmanager
nexusinterface nexusinterface
nexusoauthlogin
nexusoauthtokens
nexusoauthconfig
nxmaccessmanager nxmaccessmanager
organizercore organizercore
game_features
plugincontainer
apiuseraccount apiuseraccount
processrunner processrunner
qdirfiletree qdirfiletree
@@ -144,6 +134,16 @@ mo2_add_filter(NAME src/core GROUPS
uilocker uilocker
) )
mo2_add_filter(NAME src/extensions GROUPS
game_features
thememanager
translationmanager
extensionmanager
extensionwatcher
pluginmanager
proxyqt
)
mo2_add_filter(NAME src/dialogs GROUPS mo2_add_filter(NAME src/dialogs GROUPS
aboutdialog aboutdialog
activatemodsdialog activatemodsdialog
@@ -277,10 +277,9 @@ mo2_add_filter(NAME src/profiles GROUPS
mo2_add_filter(NAME src/proxies GROUPS mo2_add_filter(NAME src/proxies GROUPS
downloadmanagerproxy downloadmanagerproxy
executableslistproxy
gamefeaturesproxy gamefeaturesproxy
instancemanagerproxy
modlistproxy modlistproxy
extensionlistproxy
organizerproxy organizerproxy
pluginlistproxy pluginlistproxy
proxyutils proxyutils
@@ -297,6 +296,7 @@ mo2_add_filter(NAME src/register GROUPS
) )
mo2_add_filter(NAME src/settings GROUPS mo2_add_filter(NAME src/settings GROUPS
extensionsettings
settings settings
settingsutilities settingsutilities
) )
@@ -307,7 +307,9 @@ mo2_add_filter(NAME src/settingsdialog GROUPS
settingsdialoggeneral settingsdialoggeneral
settingsdialognexus settingsdialognexus
settingsdialogpaths settingsdialogpaths
settingsdialogplugins settingsdialogextensions
settingsdialogextensionrow
settingsdialogextensioninfo
settingsdialogworkarounds settingsdialogworkarounds
settingsdialogmodlist settingsdialogmodlist
settingsdialogtheme settingsdialogtheme
+2331
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -45,6 +45,7 @@ AboutDialog::AboutDialog(const QString& version, QWidget* parent)
m_LicenseFiles[LICENSE_CCBY3] = "BY-SA-v3.0.txt"; m_LicenseFiles[LICENSE_CCBY3] = "BY-SA-v3.0.txt";
m_LicenseFiles[LICENSE_ZLIB] = "zlib.txt"; m_LicenseFiles[LICENSE_ZLIB] = "zlib.txt";
m_LicenseFiles[LICENSE_PYTHON] = "python.txt"; m_LicenseFiles[LICENSE_PYTHON] = "python.txt";
m_LicenseFiles[LICENSE_SSL] = "openssl.txt";
m_LicenseFiles[LICENSE_CPPTOML] = "cpptoml.txt"; m_LicenseFiles[LICENSE_CPPTOML] = "cpptoml.txt";
m_LicenseFiles[LICENSE_UDIS] = "udis86.txt"; m_LicenseFiles[LICENSE_UDIS] = "udis86.txt";
m_LicenseFiles[LICENSE_SPDLOG] = "spdlog.txt"; m_LicenseFiles[LICENSE_SPDLOG] = "spdlog.txt";
@@ -68,6 +69,7 @@ AboutDialog::AboutDialog(const QString& version, QWidget* parent)
addLicense("ANTLR", LICENSE_ANTLR); addLicense("ANTLR", LICENSE_ANTLR);
addLicense("LOOT", LICENSE_GPL3); addLicense("LOOT", LICENSE_GPL3);
addLicense("Python", LICENSE_PYTHON); addLicense("Python", LICENSE_PYTHON);
addLicense("OpenSSL", LICENSE_SSL);
addLicense("cpptoml", LICENSE_CPPTOML); addLicense("cpptoml", LICENSE_CPPTOML);
addLicense("Udis86", LICENSE_UDIS); addLicense("Udis86", LICENSE_UDIS);
addLicense("spdlog", LICENSE_SPDLOG); addLicense("spdlog", LICENSE_SPDLOG);
+1
View File
@@ -51,6 +51,7 @@ private:
LICENSE_BOOST, LICENSE_BOOST,
LICENSE_CCBY3, LICENSE_CCBY3,
LICENSE_PYTHON, LICENSE_PYTHON,
LICENSE_SSL,
LICENSE_CPPTOML, LICENSE_CPPTOML,
LICENSE_7ZIP, LICENSE_7ZIP,
LICENSE_ZLIB, LICENSE_ZLIB,
+696 -893
View File
File diff suppressed because it is too large Load Diff
+4 -15
View File
@@ -19,17 +19,12 @@ APIUserAccount::APIUserAccount() : m_type(APIUserAccountTypes::None) {}
bool APIUserAccount::isValid() const bool APIUserAccount::isValid() const
{ {
return !m_accessToken.isEmpty() || !m_apiKey.isEmpty(); return !m_key.isEmpty();
}
const QString& APIUserAccount::accessToken() const
{
return m_accessToken;
} }
const QString& APIUserAccount::apiKey() const const QString& APIUserAccount::apiKey() const
{ {
return m_apiKey; return m_key;
} }
const QString& APIUserAccount::id() const const QString& APIUserAccount::id() const
@@ -52,15 +47,9 @@ const APILimits& APIUserAccount::limits() const
return m_limits; return m_limits;
} }
APIUserAccount& APIUserAccount::accessToken(const QString& token) APIUserAccount& APIUserAccount::apiKey(const QString& key)
{ {
m_accessToken = token; m_key = key;
return *this;
}
APIUserAccount& APIUserAccount::apiKey(const QString& apiKey)
{
m_apiKey = apiKey;
return *this; return *this;
} }
+4 -14
View File
@@ -65,12 +65,7 @@ public:
bool isValid() const; bool isValid() const;
/** /**
* OAuth access token * api key
*/
const QString& accessToken() const;
/**
* OAuth access token
*/ */
const QString& apiKey() const; const QString& apiKey() const;
@@ -95,14 +90,9 @@ public:
const APILimits& limits() const; const APILimits& limits() const;
/** /**
* sets the OAuth access token * sets the api key
*/ */
APIUserAccount& accessToken(const QString& token); APIUserAccount& apiKey(const QString& key);
/**
* sets the OAuth access token
*/
APIUserAccount& apiKey(const QString& apiKey);
/** /**
* sets the user id * sets the user id
@@ -142,7 +132,7 @@ public:
bool exhausted() const; bool exhausted() const;
private: private:
QString m_accessToken, m_apiKey, m_id, m_name; QString m_key, m_id, m_name;
APIUserAccountTypes m_type; APIUserAccountTypes m_type;
APILimits m_limits; APILimits m_limits;
}; };
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<longPathAware xmlns="microsoft.com">true</longPathAware>
</windowsSettings>
</application>
</assembly>
+2 -2
View File
@@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License
along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef ARCHIVEFILETREE_H #ifndef ARCHIVEFILENETRY_H
#define ARCHIVEFILETREE_H #define ARCHIVEFILENTRY_H
#include <archive/archive.h> #include <archive/archive.h>
#include <uibase/ifiletree.h> #include <uibase/ifiletree.h>
+14 -20
View File
@@ -57,17 +57,13 @@ void CategoryFactory::loadCategories()
QFile categoryFile(categoriesFilePath()); QFile categoryFile(categoriesFilePath());
bool needLoad = false; bool needLoad = false;
if (!categoryFile.open(QIODevice::ReadOnly | QIODevice::Text)) { if (!categoryFile.open(QIODevice::ReadOnly)) {
needLoad = true; needLoad = true;
} else { } else {
const auto lines = categoryFile.readAll().split('\n'); int lineNum = 0;
categoryFile.close(); while (!categoryFile.atEnd()) {
for (int lineNum = 0; lineNum < lines.size(); ++lineNum) { QByteArray line = categoryFile.readLine();
const auto& line = lines[lineNum]; ++lineNum;
if (line.isEmpty()) {
continue;
}
QList<QByteArray> cells = line.split('|'); QList<QByteArray> cells = line.split('|');
if (cells.count() == 4) { if (cells.count() == 4) {
std::vector<NexusCategory> nexusCats; std::vector<NexusCategory> nexusCats;
@@ -80,7 +76,7 @@ void CategoryFactory::loadCategories()
if (!ok) { if (!ok) {
log::error(tr("invalid category id {0}"), iter->constData()); log::error(tr("invalid category id {0}"), iter->constData());
} }
nexusCats.emplace_back("Unknown", temp); nexusCats.push_back(NexusCategory("Unknown", temp));
} }
} }
bool cell0Ok = true; bool cell0Ok = true;
@@ -107,19 +103,16 @@ void CategoryFactory::loadCategories()
line.constData(), cells.count()); line.constData(), cells.count());
} }
} }
categoryFile.close();
QFile nexusMapFile(nexusMappingFilePath()); QFile nexusMapFile(nexusMappingFilePath());
if (!nexusMapFile.open(QIODevice::ReadOnly | QIODevice::Text)) { if (!nexusMapFile.open(QIODevice::ReadOnly)) {
needLoad = true; needLoad = true;
} else { } else {
const auto nexLines = nexusMapFile.readAll().split('\n'); int nexLineNum = 0;
nexusMapFile.close(); while (!nexusMapFile.atEnd()) {
for (int nexLineNum = 0; nexLineNum < nexLines.size(); ++nexLineNum) { QByteArray nexLine = nexusMapFile.readLine();
const auto& nexLine = nexLines[nexLineNum]; ++nexLineNum;
if (nexLine.isEmpty()) {
continue;
}
QList<QByteArray> nexCells = nexLine.split('|'); QList<QByteArray> nexCells = nexLine.split('|');
if (nexCells.count() == 3) { if (nexCells.count() == 3) {
std::vector<NexusCategory> nexusCats; std::vector<NexusCategory> nexusCats;
@@ -136,11 +129,12 @@ void CategoryFactory::loadCategories()
m_NexusMap.insert_or_assign(nexID, NexusCategory(nexName, nexID)); m_NexusMap.insert_or_assign(nexID, NexusCategory(nexName, nexID));
m_NexusMap.at(nexID).setCategoryID(catID); m_NexusMap.at(nexID).setCategoryID(catID);
} else { } else {
log::error(tr("invalid nexus category line {0}: {1} ({2} cells)"), nexLineNum, log::error(tr("invalid nexus category line {0}: {1} ({2} cells)"), lineNum,
nexLine.constData(), nexCells.count()); nexLine.constData(), nexCells.count());
} }
} }
} }
nexusMapFile.close();
} }
std::sort(m_Categories.begin(), m_Categories.end()); std::sort(m_Categories.begin(), m_Categories.end());
setParents(); setParents();
+7 -19
View File
@@ -97,11 +97,6 @@ public:
int pos = 0; int pos = 0;
QString editText = edit->text(); QString editText = edit->text();
if (m_Validator->validate(editText, pos) == QValidator::Acceptable) { if (m_Validator->validate(editText, pos) == QValidator::Acceptable) {
// Set ID and Parent ID as ints so sorting works as expected
if (index.column() == 0 || index.column() == 2) {
model->setData(index, editText.toInt());
return;
}
QItemDelegate::setModelData(editor, model, index); QItemDelegate::setModelData(editor, model, index);
} }
} }
@@ -203,8 +198,8 @@ void CategoriesDialog::fillTable()
table->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch); table->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch);
table->horizontalHeader()->setSectionResizeMode(2, QHeaderView::Fixed); table->horizontalHeader()->setSectionResizeMode(2, QHeaderView::Fixed);
table->horizontalHeader()->setSectionResizeMode(3, QHeaderView::Stretch); table->horizontalHeader()->setSectionResizeMode(3, QHeaderView::Stretch);
table->verticalHeader()->setSectionsMovable(true);
table->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed); table->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
table->verticalHeader()->setVisible(false);
table->setItemDelegateForColumn( table->setItemDelegateForColumn(
0, new ValidatingDelegate(this, new NewIDValidator(m_IDs))); 0, new ValidatingDelegate(this, new NewIDValidator(m_IDs)));
table->setItemDelegateForColumn( table->setItemDelegateForColumn(
@@ -222,6 +217,7 @@ void CategoriesDialog::fillTable()
} }
++row; ++row;
table->insertRow(row); table->insertRow(row);
// table->setVerticalHeaderItem(row, new QTableWidgetItem(" "));
QScopedPointer<QTableWidgetItem> idItem(new QTableWidgetItem()); QScopedPointer<QTableWidgetItem> idItem(new QTableWidgetItem());
idItem->setData(Qt::DisplayRole, category.ID()); idItem->setData(Qt::DisplayRole, category.ID());
@@ -258,26 +254,19 @@ void CategoriesDialog::fillTable()
} }
} }
table->setSortingEnabled(true);
refreshIDs(); refreshIDs();
} }
void CategoriesDialog::addCategory_clicked() void CategoriesDialog::addCategory_clicked()
{ {
int row = m_ContextRow >= 0 ? m_ContextRow : 0; int row = m_ContextRow >= 0 ? m_ContextRow : 0;
ui->categoriesTable->setSortingEnabled(false);
ui->categoriesTable->insertRow(row); ui->categoriesTable->insertRow(row);
ui->categoriesTable->setVerticalHeaderItem(row, new QTableWidgetItem(" "));
QScopedPointer<QTableWidgetItem> idItem(new QTableWidgetItem()); ui->categoriesTable->setItem(row, 0,
idItem->setData(Qt::DisplayRole, ++m_HighestID); new QTableWidgetItem(QString::number(++m_HighestID)));
QScopedPointer<QTableWidgetItem> parentIDItem(new QTableWidgetItem());
parentIDItem->setData(Qt::DisplayRole, 0);
ui->categoriesTable->setItem(row, 0, idItem.take());
ui->categoriesTable->setItem(row, 1, new QTableWidgetItem("new")); ui->categoriesTable->setItem(row, 1, new QTableWidgetItem("new"));
ui->categoriesTable->setItem(row, 2, parentIDItem.take()); ui->categoriesTable->setItem(row, 2, new QTableWidgetItem("0"));
ui->categoriesTable->setItem(row, 3, new QTableWidgetItem("")); ui->categoriesTable->setItem(row, 3, new QTableWidgetItem(""));
ui->categoriesTable->setSortingEnabled(true);
} }
void CategoriesDialog::removeCategory_clicked() void CategoriesDialog::removeCategory_clicked()
@@ -311,7 +300,6 @@ void CategoriesDialog::nexusImport_clicked()
m_HighestID = 0; m_HighestID = 0;
} }
int row = 0; int row = 0;
table->setSortingEnabled(false);
for (int i = 0; i < list->count(); ++i) { for (int i = 0; i < list->count(); ++i) {
QString name = list->item(i)->data(Qt::DisplayRole).toString(); QString name = list->item(i)->data(Qt::DisplayRole).toString();
int nexusID = list->item(i)->data(Qt::UserRole).toInt(); int nexusID = list->item(i)->data(Qt::UserRole).toInt();
@@ -328,6 +316,7 @@ void CategoriesDialog::nexusImport_clicked()
if (!table->findItems(name, Qt::MatchExactly).size()) { if (!table->findItems(name, Qt::MatchExactly).size()) {
row = table->rowCount(); row = table->rowCount();
table->insertRow(table->rowCount()); table->insertRow(table->rowCount());
// table->setVerticalHeaderItem(row, new QTableWidgetItem(" "));
QScopedPointer<QTableWidgetItem> idItem(new QTableWidgetItem()); QScopedPointer<QTableWidgetItem> idItem(new QTableWidgetItem());
idItem->setData(Qt::DisplayRole, ++m_HighestID); idItem->setData(Qt::DisplayRole, ++m_HighestID);
@@ -355,7 +344,6 @@ void CategoriesDialog::nexusImport_clicked()
} }
} }
} }
table->setSortingEnabled(true);
refreshIDs(); refreshIDs();
} }
} }
-2
View File
@@ -21,7 +21,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#define CATEGORIESDIALOG_H #define CATEGORIESDIALOG_H
#include "categories.h" #include "categories.h"
#include "plugincontainer.h"
#include "tutorabledialog.h" #include "tutorabledialog.h"
#include <set> #include <set>
@@ -71,7 +70,6 @@ private:
private: private:
Ui::CategoriesDialog* ui; Ui::CategoriesDialog* ui;
PluginContainer* m_PluginContainer;
int m_ContextRow; int m_ContextRow;
int m_HighestID; int m_HighestID;

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