mirror of
https://github.com/ModOrganizer2/modorganizer.git
synced 2026-07-27 13:58:24 -07:00
Compare commits
164
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c95de1b3aa | ||
|
|
351fc9ca9c | ||
|
|
53f0a2bc79 | ||
|
|
793dfb1637 | ||
|
|
d25a81071c | ||
|
|
ef9a61886c | ||
|
|
13a40b43c8 | ||
|
|
d7790cd717 | ||
|
|
84d632af6a | ||
|
|
b14b35349d | ||
|
|
83a4db2362 | ||
|
|
c797af8b76 | ||
|
|
ebf6ff3f76 | ||
|
|
02b5e73c2d | ||
|
|
b0b2f1d3a9 | ||
|
|
d8e406daa0 | ||
|
|
50dcc4c1d4 | ||
|
|
e21db0eaea | ||
|
|
859332e18d | ||
|
|
1fd8f44960 | ||
|
|
e0c655330d | ||
|
|
a0999cd42b | ||
|
|
eb47d4d0bb | ||
|
|
59476e38ec | ||
|
|
c5d36af06d | ||
|
|
8d1931bc6b | ||
|
|
c05be9f5c3 | ||
|
|
75714907d9 | ||
|
|
02471a3da1 | ||
|
|
afab0cec7e | ||
|
|
02cc97a58d | ||
|
|
ffd94e72b4 | ||
|
|
6435e1ab8a | ||
|
|
dbfa9b89d1 | ||
|
|
fe5c4255c8 | ||
|
|
ac8f6dbdec | ||
|
|
d2ab10ecff | ||
|
|
883f4d9894 | ||
|
|
d3e904e9ad | ||
|
|
e38592da97 | ||
|
|
268d2ffe8b | ||
|
|
9d3364f4da | ||
|
|
9ea5086c4c | ||
|
|
4c1155a6ab | ||
|
|
90365041f4 | ||
|
|
183b571560 | ||
|
|
0f1271dd99 | ||
|
|
dbdc2538f9 | ||
|
|
5a908442d6 | ||
|
|
328244692b | ||
|
|
f32b4c3ce1 | ||
|
|
83a896d0a9 | ||
|
|
209fe5cab5 | ||
|
|
cd68c9d53c | ||
|
|
65b64d111b | ||
|
|
73fa7045b6 | ||
|
|
a25d889e78 | ||
|
|
3680e37d39 | ||
|
|
abba182b1b | ||
|
|
ffb470a380 | ||
|
|
1403d51a82 | ||
|
|
89eabf3c4d | ||
|
|
26368df7a6 | ||
|
|
5f399f6a39 | ||
|
|
c909f8ce4f | ||
|
|
ce925bc73e | ||
|
|
927504cbd9 | ||
|
|
a44cb011a5 | ||
|
|
11e67d7a6c | ||
|
|
0b58653e2d | ||
|
|
e47e04dcf2 | ||
|
|
fd584f8038 | ||
|
|
942bd04e5e | ||
|
|
4b6e8ac51b | ||
|
|
8c2e88b9c9 | ||
|
|
ef39699d69 | ||
|
|
55eacfbd80 | ||
|
|
056acd03cd | ||
|
|
9eb1a303a7 | ||
|
|
a44c4bbdb2 | ||
|
|
8cca47454a | ||
|
|
a818688d3f | ||
|
|
feaad36168 | ||
|
|
a6f7480ab9 | ||
|
|
1ba140e0fa | ||
|
|
eed3664302 | ||
|
|
35eb41daf9 | ||
|
|
38eb03c306 | ||
|
|
6ff201385c | ||
|
|
0269fc36e6 | ||
|
|
fa5d3cdaf3 | ||
|
|
ab28c9631a | ||
|
|
04b6f2e475 | ||
|
|
0d5197a3c8 | ||
|
|
8eb63a068c | ||
|
|
4d4a7713fb | ||
|
|
4161696527 | ||
|
|
73eea93abb | ||
|
|
db7c6e6006 | ||
|
|
266a696429 | ||
|
|
ea520baf4e | ||
|
|
07b8896f92 | ||
|
|
4a2e4652f4 | ||
|
|
a9e1d44a2a | ||
|
|
b210a2f083 | ||
|
|
cbbc2d191d | ||
|
|
cad7ed47be | ||
|
|
a9cec9e5e2 | ||
|
|
771dde7771 | ||
|
|
c6758e47c8 | ||
|
|
4a99cfe6ad | ||
|
|
f134c7ab4c | ||
|
|
03b029c613 | ||
|
|
a1c8e529f7 | ||
|
|
39dd67f22f | ||
|
|
de79d15980 | ||
|
|
16beb6f9b1 | ||
|
|
a00a9a5bba | ||
|
|
4b1059f5a1 | ||
|
|
2628dd3fb8 | ||
|
|
2d20185e77 | ||
|
|
7a1ae9b0f1 | ||
|
|
d45ebf1348 | ||
|
|
db2954e8eb | ||
|
|
8c0756bd9d | ||
|
|
026b97835e | ||
|
|
97d6f7ce01 | ||
|
|
d80cdf726e | ||
|
|
9c8f0a2041 | ||
|
|
1b16897228 | ||
|
|
4bd5df5ab4 | ||
|
|
d08e0ebab0 | ||
|
|
6479f972dc | ||
|
|
e01ab940b0 | ||
|
|
e9c937f909 | ||
|
|
d87661a66f | ||
|
|
3c030a28e9 | ||
|
|
6b4cb9ff4c | ||
|
|
cbe84327c6 | ||
|
|
ce228e512c | ||
|
|
1579e4dcb0 | ||
|
|
671d96383b | ||
|
|
bdfd41a862 | ||
|
|
8aa6dc4c7d | ||
|
|
c3a95bdef1 | ||
|
|
f756aede08 | ||
|
|
855e8bd737 | ||
|
|
b0fe23a711 | ||
|
|
c2edbcf90f | ||
|
|
2400e2c99e | ||
|
|
af1e3d0187 | ||
|
|
9ab9c072fc | ||
|
|
30c016567f | ||
|
|
da27ec45da | ||
|
|
1321564a92 | ||
|
|
4d9795527d | ||
|
|
9f09c30e08 | ||
|
|
caf31e72cc | ||
|
|
f2ab6825bf | ||
|
|
25348238b2 | ||
|
|
8b3a42bd17 | ||
|
|
6f1162c23f | ||
|
|
2b21463514 | ||
|
|
d20a26e0eb |
@@ -1,4 +1,6 @@
|
||||
syntax: glob
|
||||
scons_configure.py
|
||||
scons-ModOrganizer-*
|
||||
ModOrganizer-build-desktop*
|
||||
outputd/*
|
||||
output/*
|
||||
@@ -34,6 +36,11 @@ html
|
||||
source/organizer/resources/contents/icons
|
||||
source/plugins/build-*
|
||||
*/GeneratedFiles/*
|
||||
translations/*
|
||||
source/LocalPaths.pri
|
||||
source/*/Win32/Debug/*
|
||||
source/plugins/*/Win32/Debug/*
|
||||
*~
|
||||
syntax: regexp
|
||||
Makefile\.(Debug|Release)
|
||||
source/.*/debug/.*
|
||||
|
||||
+86
-41
@@ -10,7 +10,7 @@ Please note that if you only want to work on and build a plugin you can save you
|
||||
Overview:
|
||||
---------
|
||||
|
||||
As of Juli 2014 MO consists of the following subprojects:
|
||||
As of July 2014 MO consists of the following subprojects:
|
||||
- organizer: The main userinterface. heavy usage of various libraries
|
||||
- hookdll: core library of the virtual file system
|
||||
- uibase: interop between plugins and the main application as well as some reusable functionality
|
||||
@@ -23,7 +23,7 @@ As of Juli 2014 MO consists of the following subprojects:
|
||||
- archive: small wrapper library around 7zip for dealing with mod archives. Requires 7zip
|
||||
- NCC: extension to NMM to provide a binary with command line interface for fomod installation. This is c# code and does not build with the rest of the project. Requires the rest of NMM
|
||||
- bossdummy: dummy dll that looks like the boss.dll. This is used instead of the real boss dlls in NCC to save some disk space
|
||||
- pythonrunner: library for embedding python code. Requires boost_python, python 2.7 and pyqt4
|
||||
- pythonrunner: library for embedding python code. Requires boost_python, python 2.7 and pyqt5
|
||||
- loot_cli: this is a command line client of loot. This can be better integrated with MO than the official loot client.
|
||||
|
||||
And various plugins:
|
||||
@@ -51,27 +51,19 @@ There are a few more plugins that are either broken or samples
|
||||
Requirements:
|
||||
-------------
|
||||
|
||||
Visual C++ compiler 2010 (VC 10.0) or up
|
||||
- Included in visual c++ express 2010 or windows sdk 7.x
|
||||
Visual C++ compiler 2013 (VC 12.0) or up
|
||||
- Included in visual c++ express 2013
|
||||
- Do install windows sdk too if only for the cdb debugger which is included in that package
|
||||
Note: If you're having trouble installing the windows sdk, you may be affected by this bug: http://support.microsoft.com/kb/2717426
|
||||
|
||||
Qt Libraries 4.8.x (http://qt-project.org/downloads)
|
||||
- i.e. "Qt libraries 4.8.6 for Windows (VS 2010, 235 MB)"
|
||||
- tested: 4.8.6
|
||||
Qt Libraries 5.4.x (http://www.qt.io/download-open-source/#section-2)
|
||||
- i.e. "Qt libraries 5.4.0 for Windows (VS 2013, 722 MB)"
|
||||
- tested: 5.4.0 for Windows 32-bit (VS 2013, OpenGL, 695 MB)
|
||||
- Install according to instruction
|
||||
|
||||
Qt 5 Compatibility:
|
||||
MO compiles and mostly runs correctly built with Qt 5.3 and VC++ 2013 but
|
||||
- python plugins haven't been rewritten to use qt5 yet
|
||||
- pyqt5 isn't distributed as binaries for python 2.7 so this needs to be set up and built first
|
||||
- tutorial doesn't work because it seems to be impossible to create a transparent Qt Quick control...
|
||||
- the previewdds plugin only compiles with the opengl variant of the qt 5 distribution
|
||||
- Qt5 is a bi*** to distribute
|
||||
|
||||
boost libraries (http://www.boost.org/)
|
||||
- tested: 1.55
|
||||
- Build according to their instructions (using vc++): http://www.boost.org/doc/libs/1_54_0/more/getting_started/windows.html
|
||||
- tested: 1.56
|
||||
- Build according to their instructions (using vc++): http://www.boost.org/doc/libs/1_57_0/more/getting_started/windows.html
|
||||
- A few of the boost libraries need to be built (the rest is header-only). The only compiled libs MO needs (at the time of writing) are
|
||||
boost_thread (for everything that links agains bsatk) and boost_python (for pythonrunner). You can disable the others to save yourself compile time (even on a modern system compiling boost can easily take an hour)
|
||||
|
||||
@@ -87,26 +79,27 @@ zlib (http://www.zlib.net/)
|
||||
Python 2.7 (32-bit)
|
||||
- only for pythonrunner
|
||||
|
||||
PyQt4 for Python 2.7
|
||||
- tested: 4.10
|
||||
PyQt5 for Python 2.7 (http://www.riverbankcomputing.co.uk/software/pyqt/download)
|
||||
- tested: PyQt-gpl-5.4.zip
|
||||
- only for pythonrunner
|
||||
|
||||
SIP (http://www.riverbankcomputing.com/software/sip/download)
|
||||
- presumably only for pythonrunner as it's needed for PyQT5
|
||||
|
||||
Recommended:
|
||||
------------
|
||||
|
||||
Qt Creator
|
||||
- http://qt-project.org/downloads#qt-creator
|
||||
- I.e. "Qt Creator 2.8.1 for Windows (53 MB)"
|
||||
- included in Qt SDK
|
||||
- With Qt Creator usually the rule is "the newer the better"
|
||||
- Start Qt Creator and check if things are set up correctly:
|
||||
1) Go to Tools > Options > Build & Run > Qt Versions
|
||||
2.1) If the QtSDK 4.8.x you installed earlier is not auto-detected, click "Add" to add it manually
|
||||
2.2) Navigate to your <your qt4 installation>\bin\qmake.exe
|
||||
2.1) If the QtSDK 5.4.x you installed earlier is not auto-detected, click "Add" to add it manually
|
||||
2.2) Navigate to your <your qt5 installation>\bin\qmake.exe
|
||||
2.3) Restart qt creator
|
||||
3) Go to Tools > Options > Build & Run > Kits
|
||||
3.1) If no Kit is auto-detected (or the auto-detected ones have picked up the wrong qt or vc++ installation) click "Add"
|
||||
3.2) Enter a Name (i.e. "Qt 4.8.5 MSVC2010 32bit")
|
||||
3.2) Enter a Name (i.e. "Qt 5.4 MSVC2013 32bit")
|
||||
3.3) In Compiler select the visual studio compiler installed earlier (may show up as "Microsoft Windows SDK for Windows x). Make sure you select the x86 variant
|
||||
3.4) CDB should be auto-detected
|
||||
3.5) Select the qt version set up earlier
|
||||
@@ -115,25 +108,26 @@ Qt Creator
|
||||
Set up (using Qt Creator):
|
||||
--------------------------
|
||||
|
||||
1. Using Qt Creator open source/ModOrganizer.pro from your working copy
|
||||
2. Open the "Projects" tab, open the "Details" for "Build Environment"
|
||||
3a. Click "Add" to add a variable called "BOOSTPATH" with the path of your boost installation as the value (i.e. C:\code\boost_1_49_0)
|
||||
3b. Click "Add" to add a variable called "ZLIBPATH" with the path of your zlib installation as the value (i.e. C:\code\zlib-1.2.7)
|
||||
3c. Click "Add" to add a variable called "SEVENZIPPATH" with the path of your 7zip installation as the value (i.e. C:\code\7zip)
|
||||
3d. Click "Add" to add a variable called "PYTHONPATH" with the path of your python installation as the value (i.e. C:\code\python)
|
||||
4. Switch the build configuration at the very top of the same page from "debug" to "release" (or vice versa) and repeat step 3
|
||||
5. Compile the configuration(s) you want to use (debug and/or release) (Build All). This should compile correctly.
|
||||
6. <reserved for future use. Maybe grab a coffee?>
|
||||
7. return to the "projects" tab and switch to "Run Settings"
|
||||
8. Determine the folder of the qt binaries in the package you downloaded. This could be "QtSDK\Desktop\Qt\4.8.5\msvc2010\bin" or "Qt4.8.5\bin"
|
||||
1. Create a file called "LocalPaths.pri" in your ModOrganizer\source directory
|
||||
2. Open that file with any text editor and enter (one entry per line)
|
||||
2a. BOOSTPATH=<path to your boost installation> (i.e. C:\code\boost_1_56_0)
|
||||
2b. LOOTPATH=C:/Users/Tannin/Documents/Projects/loot_api
|
||||
2c. PYTHONPATH=D:/Python278
|
||||
2d. SEVENZIPPATH=D:/Documents/Projects/7zip
|
||||
2e. ZLIBPATH=D:/Documents/Projects/zlib-1.2.7
|
||||
3. Using Qt Creator open source/ModOrganizer.pro from your working copy
|
||||
4. Compile the configuration(s) you want to use (debug and/or release) (Build All). This should compile correctly (though right now it produces a lot of warnings in boost headers).
|
||||
5. <reserved for future use. Maybe grab a coffee?>
|
||||
6. return to the "projects" tab and switch to "Run Settings"
|
||||
7. Determine the folder of the qt binaries in the package you downloaded. This could be "QtSDK\Desktop\Qt\5.4.0\msvc2013\bin" or "Qt5.4.0\bin"
|
||||
For Release build:
|
||||
9r. Add a "Run configuration" that points to <your working copy>\output\ModOrganizer.exe
|
||||
10r. Copy "7z.dll" to <your working copy>\output\dlls
|
||||
11r. From the qt binaries directory, copy the following files to <your working copy>\output\dlls: QtCore4.dll, QtDeclarative4.dll, QtGui4.dll, QtNetwork4.dll, QtScript4.dll, QtSql4.dll, QtWebkit4.dll, QtXml4.dll, QtXmlPatterns4.dll
|
||||
8r. Add a "Run configuration" that points to <your working copy>\output\ModOrganizer.exe
|
||||
9r. Copy "7z.dll" to <your working copy>\output\dlls
|
||||
10r. From the qt binaries directory, copy the following files to <your working copy>\output\dlls: Qt5Core.dll, Qt5Declarative.dll, Qt5Gui.dll, Qt5Network.dll, Qt5Script.dll, Qt5Sql.dll, Qt5Webkit.dll, Qt5Xml.dll, Qt5XmlPatterns.dll
|
||||
For Debug build:
|
||||
9d. Add a "Run configuration" that points to <your working copy>\outputd\ModOrganizer.exe
|
||||
10d. Copy "7z.dll" to <your working copy>\outputd\dlls
|
||||
11d. From the qt binaries copy the following files to <your working copy>\outputd\dlls: QtCored4.dll, QtDeclaratived4.dll, QtGuid4.dll, QtNetworkd4.dll, QtScriptd4.dll, QtSqld4.dll, QtWebkitd4.dll, QtXmld4.dll, QtXmlPatternsd4.dll
|
||||
8d. Add a "Run configuration" that points to <your working copy>\outputd\ModOrganizer.exe
|
||||
9d. Copy "7z.dll" to <your working copy>\outputd\dlls
|
||||
10d. From the qt binaries copy the following files to <your working copy>\outputd\dlls: Qt5Cored.dll, Qt5Declaratived.dll, Qt5Guid.dll, Qt5Networkd.dll, Qt5Scriptd.dll, Qt5Sqld.dll, Qt5Webkitd.dll, Qt5Xmld.dll, Qt5XmlPatternsd.dll
|
||||
|
||||
Now you should be able to compile and run Mod Organizer.
|
||||
Please note that when you change anything apart from the "organizer" subproject, qt creator may not pick up on the changes
|
||||
@@ -171,6 +165,8 @@ Troubleshooting (thanks to Ross):
|
||||
./bsatk/bsatk.pro
|
||||
./hookdll/hookdll.pro
|
||||
|
||||
Please note if building this, you need to switch OFF -DZLIB_WINAPI ...
|
||||
|
||||
2) After building, I try to open {MOPROJECTPATH}\outputd\ModOragnizer.exe and get this error
|
||||
"The program can't start because QtDeclaratived4.dll is missing from your computer. Try reinstalling the program to fix this problem."
|
||||
|
||||
@@ -226,3 +222,52 @@ Troubleshooting (thanks to Ross):
|
||||
Unlocker: http://www.filehippo.com/download_unlocker/ or http://www.emptyloop.com/unlocker/
|
||||
Warning: With Unlocker v1.9.2, you must select "Advanced" then uncheck everything to
|
||||
avoid having some Delta toolbar garbage installed...
|
||||
|
||||
5) Problem TT has seen:
|
||||
Complains about 'qtwebkit4' missing. For some reason this seems to insist on
|
||||
living with modorganiser.exe
|
||||
|
||||
6) Debugging the python proxy: I (TT) don't think this is possible unless you have a debug
|
||||
build of PyQt. However, a debug build of PyQt requires a debug build of python. There doesn't
|
||||
appear to be a half way house which is build wiht normal python but debug versions of QT libraries.
|
||||
You can confuse pyqt by copying the debug QT DLLs to appropriate named files in the DLLs
|
||||
directory, and removing QT from your project run path, which results in the python proxy
|
||||
initialising succesfully, but causes mod organiser to crash in strange places.
|
||||
|
||||
-------------------
|
||||
Building with scons
|
||||
-------------------
|
||||
|
||||
1) Download scons from www.scons.org and install
|
||||
2) Download QT4 (and/or QT5) from https://bitbucket.org/dirkbaechle/scons_qt4 and
|
||||
https://bitbucket.org/dirkbaechle/scons_qt5. Install as per instructions
|
||||
3) Copy scons_configure_template.py to scons_configure.py. Edit to point to your
|
||||
boost/python/zlib/7zip/loot directories as appropriate.
|
||||
4) Create build kits as follows:
|
||||
Custom Process step:
|
||||
Command: <python path>\Scripts\scons.bat
|
||||
Arguments: -u .
|
||||
Working directory: %{sourcedir}
|
||||
|
||||
Clean Custom Process step:
|
||||
Command: <python path>\Scripts\scons.bat
|
||||
Arguments: -c -u .
|
||||
Working directory: %{sourcedir}
|
||||
|
||||
For the release build, add 'CONFIG=release' to the arguments.
|
||||
|
||||
If you want to do parallel builds, add -j and a number to the arguments.
|
||||
However you may need to install pywin32 (but it seems to work OK for me).
|
||||
-j 4 did the entire build in 2m 15s. scons uses -Z7 to store debugging
|
||||
information in the .obj files which removes the issues with multiple
|
||||
processes attempting to access one datafile.
|
||||
|
||||
Note. If you want to build a sub project separately, it seems to be better
|
||||
to open the subproject, set that up with the scons kit and build that as a
|
||||
project.
|
||||
|
||||
Please note: the generated (runnable) output files end up in the build directory,
|
||||
in the '_ModOrganizer' subdirectory (not at the top level). Named like that
|
||||
so you can see it! The scons build will also populate the directory with
|
||||
all the necessary DLLs (but see note 6 above about your build tool path if
|
||||
trying to debug).
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# This python script contains the configuration for scons
|
||||
# Copy this to scons_configure.py and adjust to taste.
|
||||
|
||||
# Path to your boost install - it should have a boost/ subdirectory and a stage/
|
||||
# subdirectory. The scons script will use stage/lib if there, or the appropriate
|
||||
# version for your compiler, if you installed the multiple-build version
|
||||
BOOSTPATH = 'C:\\Apps\\boost_1_55_0'
|
||||
|
||||
# Version of Visual Studio to use, if you wish to use a specific version. If you
|
||||
# don't specify a version, the latest will be picked.. See the scons manual for
|
||||
# supported values.
|
||||
#MSVC_VERSION = '10.0Exp'
|
||||
|
||||
# Path to your python install
|
||||
# You don't really need to set this up but you might if (say) you have a 32- and
|
||||
# 64-bit python install and scons has been installed for the 64 bit version
|
||||
#PYTHONPATH=C:\Apps\Python
|
||||
|
||||
# Path to your QT install. This might constrain the version of MSVC you can use.
|
||||
# This seems to be set by QTCreator
|
||||
#QTDIR = 'C:\\Apps\\Qt\\4.8.6'
|
||||
|
||||
# Path to 7-zip sources
|
||||
SEVENZIPPATH = 'C:\\Apps\\7-Zip\\7z920'
|
||||
|
||||
# Path to zlib. Please read the README file for more information about how this
|
||||
# needs to be set up
|
||||
ZLIBPATH = 'C:\\Apps\\zlib-1.2.8'
|
||||
@@ -8,7 +8,6 @@ SUBDIRS = bsatk \
|
||||
archive \
|
||||
helper \
|
||||
plugins \
|
||||
proxydll \
|
||||
nxmhandler \
|
||||
BossDummy \
|
||||
pythonRunner \
|
||||
@@ -50,3 +49,8 @@ for(QTNAME, QTLIBNAMES) {
|
||||
}
|
||||
|
||||
INSTALLS += qtlibs otherlibs
|
||||
|
||||
OTHER_FILES +=\
|
||||
../SConstruct\
|
||||
../scons_configure.py\
|
||||
SConscript
|
||||
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
Import('qt_env')
|
||||
|
||||
env = qt_env.Clone()
|
||||
|
||||
modules = [
|
||||
'Core',
|
||||
'Gui',
|
||||
'Network',
|
||||
'Script',
|
||||
'Sql',
|
||||
'WebKit',
|
||||
'Xml',
|
||||
'XmlPatterns',
|
||||
'Declarative'
|
||||
]
|
||||
|
||||
if env['QT_MAJOR_VERSION'] > 4:
|
||||
modules += [
|
||||
'Widgets',
|
||||
'Qml',
|
||||
'WebKitWidgets'
|
||||
]
|
||||
|
||||
env.EnableQtModules(*modules)
|
||||
|
||||
env.Uic(env.Glob('*.ui'))
|
||||
|
||||
env.RequireLibraries('uibase', 'shared', 'bsatk', 'esptk')
|
||||
|
||||
|
||||
env.AppendUnique(LIBS = [
|
||||
'shell32',
|
||||
'user32',
|
||||
'ole32',
|
||||
'advapi32',
|
||||
'gdi32',
|
||||
'shlwapi',
|
||||
'Psapi',
|
||||
'Version'
|
||||
])
|
||||
|
||||
# We have to 'persuade' moc to generate certain other targets and inject them
|
||||
# into the list of cpps
|
||||
other_sources = env.AddExtraMoc(env.Glob('*.h'))
|
||||
|
||||
for file in env.Glob('*.rc'):
|
||||
# version.rc is included in app_icon.rc. Not sure why it's a separate file.
|
||||
if file.name == 'version.rc':
|
||||
continue
|
||||
other_sources.append(env.RES(file))
|
||||
|
||||
# Note the order of this is important, or you can pick up the wrong report.h...
|
||||
# Doing appendunique seems to throw the moc code into a tizzy
|
||||
env['CPPPATH'] += [
|
||||
'../archive',
|
||||
# '../boss_modified/boss-api',
|
||||
'../plugins/gamefeatures',
|
||||
'.', # Why is this necessary?
|
||||
'${LOOTPATH}',
|
||||
'${BOOSTPATH}',
|
||||
]
|
||||
|
||||
env.AppendUnique(CPPDEFINES = [
|
||||
'_UNICODE',
|
||||
'_CRT_SECURE_NO_WARNINGS',
|
||||
'_SCL_SECURE_NO_WARNINGS',
|
||||
'BOOST_DISABLE_ASSERTS',
|
||||
'NDEBUG',
|
||||
'QT_MESSAGELOGCONTEXT'
|
||||
])
|
||||
|
||||
env.AppendUnique(CPPFLAGS = [ '-wd4100', '-wd4127', '-wd4512', '-wd4189' ])
|
||||
|
||||
env.AppendUnique(LINKFLAGS = [
|
||||
'/SUBSYSTEM:WINDOWS',
|
||||
'${EXE_MANIFEST_DEPENDENCY}'
|
||||
])
|
||||
|
||||
# modeltest is optional and it doesn't compile anyway...
|
||||
cpp_files = [
|
||||
x for x in Glob('*.cpp')
|
||||
if x.name != 'modeltest.cpp' and x.name != 'aboutdialog.cpp'
|
||||
]
|
||||
|
||||
about_env = env.Clone()
|
||||
try:
|
||||
hgid = subprocess.check_output(['hg', 'id', '-i']).rstrip()
|
||||
except:
|
||||
hgid = 'Unknown version'
|
||||
|
||||
# FIXME: It'd be much easier to stringify this in the source code
|
||||
about_env.AppendUnique(CPPDEFINES = [ 'HGID=\\"%s\\"' % hgid ])
|
||||
other_sources.append(about_env.StaticObject('aboutdialog.cpp'))
|
||||
|
||||
env.AppendUnique(LIBPATH = "${ZLIBPATH}/build")
|
||||
env.AppendUnique(LIBS = 'zlibstatic')
|
||||
|
||||
prog = env.Program('ModOrganizer',
|
||||
cpp_files + env.Glob('*.qrc') + other_sources)
|
||||
|
||||
env.InstallModule(prog)
|
||||
|
||||
for subdir in ('tutorials', 'stylesheets'):
|
||||
env.Install(os.path.join(env['INSTALL_PATH'], subdir),
|
||||
env.Glob(os.path.join(subdir, '*')))
|
||||
|
||||
# FIXME Sort the translations. Except they don't exist on the 1.2 branch
|
||||
|
||||
res = env['QT_USED_MODULES']
|
||||
Return('res')
|
||||
|
||||
"""
|
||||
CONFIG(debug, debug|release) {
|
||||
} else {
|
||||
QMAKE_CXXFLAGS += /Zi /GL
|
||||
QMAKE_LFLAGS += /DEBUG /LTCG /OPT:REF /OPT:ICF
|
||||
}
|
||||
|
||||
TRANSLATIONS = organizer_en.ts
|
||||
|
||||
|
||||
QMAKE_POST_LINK += xcopy /y /s /I $$quote($$BASEDIR\\*.qm) $$quote($$DSTDIR)\\translations $$escape_expand(\\n)
|
||||
|
||||
"""
|
||||
+1
-1
@@ -37,7 +37,7 @@ AboutDialog::AboutDialog(const QString &version, QWidget *parent)
|
||||
m_LicenseFiles[LICENSE_ZLIB] = "zlib.txt";
|
||||
m_LicenseFiles[LICENSE_APACHE2] = "apache-license-2.0.txt";
|
||||
|
||||
addLicense("Qt 5.3", LICENSE_LGPL3);
|
||||
addLicense("Qt 5.4", LICENSE_LGPL3);
|
||||
addLicense("Qt Json", LICENSE_GPL3);
|
||||
addLicense("Boost Library", LICENSE_BOOST);
|
||||
addLicense("7-zip", LICENSE_LGPL3);
|
||||
|
||||
@@ -183,6 +183,11 @@
|
||||
<string>Ren (Korean)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>... more (Can't track)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -249,6 +254,11 @@
|
||||
<string notr="true">z929669</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>thosrtanner</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -19,6 +19,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "browserdialog.h"
|
||||
#include "ui_browserdialog.h"
|
||||
#include "browserview.h"
|
||||
|
||||
#include "messagedialog.h"
|
||||
#include "report.h"
|
||||
|
||||
+1
-2
@@ -20,8 +20,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifndef BROWSERDIALOG_H
|
||||
#define BROWSERDIALOG_H
|
||||
|
||||
#include "browserview.h"
|
||||
#include "tutorialcontrol.h"
|
||||
#include <QDialog>
|
||||
#include <QNetworkRequest>
|
||||
#include <QNetworkReply>
|
||||
@@ -36,6 +34,7 @@ namespace Ui {
|
||||
class BrowserDialog;
|
||||
}
|
||||
|
||||
class BrowserView;
|
||||
|
||||
/**
|
||||
* @brief a dialog containing a webbrowser that is intended to browse the nexus network
|
||||
|
||||
@@ -20,7 +20,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifndef NEXUSVIEW_H
|
||||
#define NEXUSVIEW_H
|
||||
|
||||
#include "finddialog.h"
|
||||
|
||||
#include <QWebView>
|
||||
#include <QWebPage>
|
||||
|
||||
+28
-6
@@ -19,7 +19,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "categories.h"
|
||||
#include <utility.h>
|
||||
#include "report.h"
|
||||
#include <report.h>
|
||||
#include <gameinfo.h>
|
||||
#include <QObject>
|
||||
#include <QFile>
|
||||
@@ -166,22 +166,32 @@ void CategoryFactory::saveCategories()
|
||||
unsigned int CategoryFactory::countCategories(std::tr1::function<bool (const Category &category)> filter)
|
||||
{
|
||||
unsigned int result = 0;
|
||||
for (auto iter = m_Categories.begin(); iter != m_Categories.end(); ++iter) {
|
||||
if (filter(*iter)) {
|
||||
for (const Category &cat : m_Categories) {
|
||||
if (filter(cat)) {
|
||||
++result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int CategoryFactory::addCategory(const QString &name, const std::vector<int> &nexusIDs, int parentID)
|
||||
{
|
||||
int id = 1;
|
||||
while (m_IDMap.find(id) != m_IDMap.end()) {
|
||||
++id;
|
||||
}
|
||||
addCategory(id, name, nexusIDs, parentID);
|
||||
|
||||
saveCategories();
|
||||
return id;
|
||||
}
|
||||
|
||||
void CategoryFactory::addCategory(int id, const QString &name, const std::vector<int> &nexusIDs, int parentID)
|
||||
{
|
||||
int index = m_Categories.size();
|
||||
m_Categories.push_back(Category(index, id, name, nexusIDs, parentID));
|
||||
for (std::vector<int>::const_iterator iter = nexusIDs.begin();
|
||||
iter != nexusIDs.end(); ++iter) {
|
||||
m_NexusMap[*iter] = index;
|
||||
for (int nexusID : nexusIDs) {
|
||||
m_NexusMap[nexusID] = index;
|
||||
}
|
||||
m_IDMap[id] = index;
|
||||
}
|
||||
@@ -305,6 +315,18 @@ int CategoryFactory::getCategoryIndex(int ID) const
|
||||
}
|
||||
|
||||
|
||||
int CategoryFactory::getCategoryID(const QString &name) const
|
||||
{
|
||||
auto iter = std::find_if(m_Categories.begin(), m_Categories.end(), [name] (const Category &cat) -> bool {
|
||||
return cat.m_Name == name;
|
||||
});
|
||||
if (iter != m_Categories.end()) {
|
||||
return iter->m_ID;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
unsigned int CategoryFactory::resolveNexusID(int nexusID) const
|
||||
{
|
||||
|
||||
@@ -80,6 +80,8 @@ public:
|
||||
**/
|
||||
void saveCategories();
|
||||
|
||||
int addCategory(const QString &name, const std::vector<int> &nexusIDs, int parentID);
|
||||
|
||||
/**
|
||||
* @brief retrieve the number of available categories
|
||||
*
|
||||
@@ -142,6 +144,12 @@ public:
|
||||
**/
|
||||
int getCategoryID(unsigned int index) const;
|
||||
|
||||
/**
|
||||
* @brief look up the id of a category by its name
|
||||
* @note O(n)
|
||||
*/
|
||||
int getCategoryID(const QString &name) const;
|
||||
|
||||
/**
|
||||
* @brief look up the index of a category by its id
|
||||
*
|
||||
|
||||
@@ -100,16 +100,19 @@ void DirectoryRefresher::addModFilesToStructure(DirectoryEntry *directoryStructu
|
||||
if (stealFiles.length() > 0) {
|
||||
// instead of adding all the files of the target directory, we just change the root of the specified
|
||||
// files to this mod
|
||||
FilesOrigin origin = directoryStructure->createOrigin(ToWString(modName), directoryW, priority);
|
||||
foreach (const QString &filename, stealFiles) {
|
||||
FilesOrigin &origin = directoryStructure->createOrigin(ToWString(modName), directoryW, priority);
|
||||
for (const QString &filename : stealFiles) {
|
||||
QFileInfo fileInfo(filename);
|
||||
FileEntry::Ptr file = directoryStructure->findFile(ToWString(fileInfo.fileName()));
|
||||
if (file.get() != nullptr) {
|
||||
if (file->getOrigin() == 0) {
|
||||
// replace data as the origin on this bsa
|
||||
file->removeOrigin(0);
|
||||
file->addOrigin(origin.getID(), file->getFileTime(), L"");
|
||||
}
|
||||
origin.addFile(file->getIndex());
|
||||
file->addOrigin(origin.getID(), file->getFileTime(), L"");
|
||||
} else {
|
||||
qWarning("%s not found", qPrintable(fileInfo.fileName()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -23,5 +23,7 @@
|
||||
<file name="Qt5WebKitd.dll"/>
|
||||
<file name="Qt5WebKitWidgetsd.dll"/>
|
||||
<file name="Qt5Widgetsd.dll"/>
|
||||
<file name="Qt5WinExtrasd.dll"/>
|
||||
<file name="Qt5Xmld.dll"/>
|
||||
<file name="Qt5XmlPatternsd.dll"/>
|
||||
</assembly>
|
||||
|
||||
@@ -23,5 +23,7 @@
|
||||
<file name="Qt5WebKit.dll"/>
|
||||
<file name="Qt5WebKitWidgets.dll"/>
|
||||
<file name="Qt5Widgets.dll"/>
|
||||
<file name="Qt5WinExtras.dll"/>
|
||||
<file name="Qt5Xml.dll"/>
|
||||
<file name="Qt5XmlPatterns.dll"/>
|
||||
</assembly>
|
||||
@@ -19,6 +19,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "downloadlistsortproxy.h"
|
||||
#include "downloadlist.h"
|
||||
#include "downloadmanager.h"
|
||||
#include "settings.h"
|
||||
|
||||
DownloadListSortProxy::DownloadListSortProxy(const DownloadManager *manager, QObject *parent)
|
||||
: QSortFilterProxyModel(parent), m_Manager(manager), m_CurrentFilter()
|
||||
@@ -54,12 +56,17 @@ bool DownloadListSortProxy::lessThan(const QModelIndex &left,
|
||||
}
|
||||
|
||||
|
||||
bool DownloadListSortProxy::filterAcceptsRow(int source_row, const QModelIndex&) const
|
||||
bool DownloadListSortProxy::filterAcceptsRow(int sourceRow, const QModelIndex&) const
|
||||
{
|
||||
if (m_CurrentFilter.length() == 0) {
|
||||
return true;
|
||||
} else if (source_row < m_Manager->numTotalDownloads()) {
|
||||
return m_Manager->getFileName(source_row).contains(m_CurrentFilter, Qt::CaseInsensitive);
|
||||
} else if (sourceRow < m_Manager->numTotalDownloads()) {
|
||||
int downloadIndex = sourceModel()->index(sourceRow, 0).data().toInt();
|
||||
|
||||
QString displayedName = Settings::instance().metaDownloads()
|
||||
? m_Manager->getDisplayName(downloadIndex)
|
||||
: m_Manager->getFileName(downloadIndex);
|
||||
return displayedName.contains(m_CurrentFilter, Qt::CaseInsensitive);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,9 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
#include "downloadmanager.h"
|
||||
|
||||
|
||||
class DownloadManager;
|
||||
|
||||
|
||||
class DownloadListSortProxy : public QSortFilterProxyModel
|
||||
@@ -39,7 +41,7 @@ public slots:
|
||||
protected:
|
||||
|
||||
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
|
||||
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
|
||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &source_parent) const;
|
||||
|
||||
signals:
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "downloadlistwidget.h"
|
||||
#include "ui_downloadlistwidget.h"
|
||||
#include "downloadmanager.h"
|
||||
#include <QPainter>
|
||||
#include <QMouseEvent>
|
||||
#include <QMenu>
|
||||
|
||||
@@ -20,14 +20,13 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifndef DOWNLOADLISTWIDGET_H
|
||||
#define DOWNLOADLISTWIDGET_H
|
||||
|
||||
#include "downloadmanager.h"
|
||||
#include <QWidget>
|
||||
#include <QItemDelegate>
|
||||
#include <QLabel>
|
||||
#include <QProgressBar>
|
||||
#include <QTreeView>
|
||||
|
||||
#include "downloadmanager.h"
|
||||
|
||||
namespace Ui {
|
||||
class DownloadListWidget;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include "downloadmanager.h"
|
||||
|
||||
|
||||
DownloadListWidgetCompact::DownloadListWidgetCompact(QWidget *parent) :
|
||||
@@ -54,7 +53,8 @@ DownloadListWidgetCompactDelegate::DownloadListWidgetCompactDelegate(DownloadMan
|
||||
|
||||
m_DoneLabel->setVisible(false);
|
||||
|
||||
connect(manager, SIGNAL(stateChanged(int,DownloadManager::DownloadState)), this, SLOT(stateChanged(int,DownloadManager::DownloadState)));
|
||||
connect(manager, SIGNAL(stateChanged(int,DownloadManager::DownloadState)),
|
||||
this, SLOT(stateChanged(int,DownloadManager::DownloadState)));
|
||||
connect(manager, SIGNAL(downloadRemoved(int)), this, SLOT(resetCache(int)));
|
||||
}
|
||||
|
||||
@@ -117,24 +117,20 @@ void DownloadListWidgetCompactDelegate::paintRegularDownload(int downloadIndex)
|
||||
if ((state == DownloadManager::STATE_PAUSED) || (state == DownloadManager::STATE_ERROR)) {
|
||||
m_DoneLabel->setVisible(true);
|
||||
m_Progress->setVisible(false);
|
||||
m_DoneLabel->setText(tr("Paused"));
|
||||
m_DoneLabel->setForegroundRole(QPalette::Link);
|
||||
m_DoneLabel->setText(QString("%1<img src=\":/MO/gui/inactive\">").arg(tr("Paused")));
|
||||
} else if (state == DownloadManager::STATE_FETCHINGMODINFO) {
|
||||
m_DoneLabel->setText(tr("Fetching Info 1"));
|
||||
m_DoneLabel->setText(QString("%1").arg(tr("Fetching Info 1")));
|
||||
} else if (state == DownloadManager::STATE_FETCHINGFILEINFO) {
|
||||
m_DoneLabel->setText(tr("Fetching Info 2"));
|
||||
m_DoneLabel->setText(QString("%1").arg(tr("Fetching Info 2")));
|
||||
} else if (state >= DownloadManager::STATE_READY) {
|
||||
m_DoneLabel->setVisible(true);
|
||||
m_Progress->setVisible(false);
|
||||
if (state == DownloadManager::STATE_INSTALLED) {
|
||||
m_DoneLabel->setText(tr("Installed"));
|
||||
m_DoneLabel->setForegroundRole(QPalette::Mid);
|
||||
m_DoneLabel->setText(QString("%1<img src=\":/MO/gui/check\">").arg(tr("Installed")));
|
||||
} else if (state == DownloadManager::STATE_UNINSTALLED) {
|
||||
m_DoneLabel->setText(tr("Uninstalled"));
|
||||
m_DoneLabel->setForegroundRole(QPalette::Dark);
|
||||
m_DoneLabel->setText(QString("%1<img src=\":/MO/gui/awaiting\">").arg(tr("Uninstalled")));
|
||||
} else {
|
||||
m_DoneLabel->setText(tr("Done"));
|
||||
m_DoneLabel->setForegroundRole(QPalette::WindowText);
|
||||
m_DoneLabel->setText(QString("%1<img src=\":/MO/gui/active\">").arg(tr("Done")));
|
||||
}
|
||||
if (m_Manager->isInfoIncomplete(downloadIndex)) {
|
||||
m_NameLabel->setText("<img src=\":/MO/gui/warning_16\"/> " + m_NameLabel->text());
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user