mirror of
https://github.com/ModOrganizer2/mob.git
synced 2026-07-27 14:07:05 -07:00
Compare commits
80
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60eb00e04e | ||
|
|
fe14219400 | ||
|
|
b8fe18effa | ||
|
|
a9be58aaa3 | ||
|
|
35083f28e8 | ||
|
|
a433afe54f | ||
|
|
0b839834a5 | ||
|
|
932e639850 | ||
|
|
6a4f047a13 | ||
|
|
3f2aad38cd | ||
|
|
0039738ca2 | ||
|
|
93ec9f2409 | ||
|
|
862e6d3684 | ||
|
|
f9bb4a15d8 | ||
|
|
ad06c600ab | ||
|
|
25bcd55b3b | ||
|
|
a2e9b63b65 | ||
|
|
f0fdead031 | ||
|
|
cc5e49ba5c | ||
|
|
9df84177d1 | ||
|
|
7d38877fa4 | ||
|
|
abcd5aef03 | ||
|
|
a526409349 | ||
|
|
55b57aa44b | ||
|
|
a3857ae64b | ||
|
|
676a9c1911 | ||
|
|
9d9e3b38fb | ||
|
|
6712f78dd4 | ||
|
|
0266fc0133 | ||
|
|
19ec6fbf2e | ||
|
|
3f4eed9e2a | ||
|
|
3e8f5b83e2 | ||
|
|
b98e4ae653 | ||
|
|
57453530b4 | ||
|
|
fb0b446e13 | ||
|
|
e2493b5da2 | ||
|
|
e397eae7b1 | ||
|
|
a6f2cbee45 | ||
|
|
b7de6c4dfa | ||
|
|
a3c0c72644 | ||
|
|
8d70ec1ca6 | ||
|
|
e8c4835bc9 | ||
|
|
6cc1883492 | ||
|
|
80b002cffa | ||
|
|
7c677c142e | ||
|
|
5398952bad | ||
|
|
720cd53d3d | ||
|
|
8ce78c529d | ||
|
|
8a16685805 | ||
|
|
863364b7ac | ||
|
|
f1f9ec72cc | ||
|
|
936d0f7d37 | ||
|
|
ec573c1266 | ||
|
|
e2747c4163 | ||
|
|
327a9fbe17 | ||
|
|
f63066e123 | ||
|
|
875b99f861 | ||
|
|
e5e497f8c1 | ||
|
|
7dcce4bc85 | ||
|
|
066001efb1 | ||
|
|
995ab2dbba | ||
|
|
4cdcedf60c | ||
|
|
1bcda87303 | ||
|
|
1874e6287f | ||
|
|
af407c8ea8 | ||
|
|
196390e5f2 | ||
|
|
8af608de5a | ||
|
|
ed0f05a96e | ||
|
|
359f277dff | ||
|
|
99b6ad045c | ||
|
|
6681cb3a02 | ||
|
|
6997a6ef08 | ||
|
|
dc6f03a915 | ||
|
|
f5c0b3e223 | ||
|
|
ae95c2e643 | ||
|
|
3d7412f958 | ||
|
|
505ff0359a | ||
|
|
41ef172815 | ||
|
|
21c5c5ea28 | ||
|
|
6707a03289 |
@@ -0,0 +1,26 @@
|
||||
---
|
||||
# We'll use defaults from the LLVM style, but with 4 columns indentation.
|
||||
BasedOnStyle: LLVM
|
||||
IndentWidth: 4
|
||||
---
|
||||
Language: Cpp
|
||||
# Force pointers to the type for C++.
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Left
|
||||
AlignConsecutiveAssignments: true
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: Empty
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
AccessModifierOffset: -4
|
||||
AlignTrailingComments: true
|
||||
SpacesBeforeTrailingComments: 2
|
||||
NamespaceIndentation: All
|
||||
MaxEmptyLinesToKeep: 1
|
||||
BreakBeforeBraces: Stroustrup
|
||||
ColumnLimit: 88
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: '^"pch.h"$'
|
||||
Priority: -1
|
||||
SortPriority: -1
|
||||
@@ -0,0 +1,7 @@
|
||||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text=auto
|
||||
|
||||
# Explicitly declare text files you want to always be normalized and converted
|
||||
# to native line endings on checkout.
|
||||
*.cpp text eol=crlf
|
||||
*.h text eol=crlf
|
||||
@@ -1,6 +1,15 @@
|
||||
# mob-specific files
|
||||
/build
|
||||
/vs/obj
|
||||
/vs/.vs
|
||||
/vs/*.user
|
||||
/mob.exe
|
||||
/mob.log
|
||||
|
||||
# Files built by mob
|
||||
/*/build
|
||||
/*/downloads
|
||||
/*/install
|
||||
/*/releases
|
||||
/*/mob.ini
|
||||
/*/mob.log
|
||||
|
||||
+21
-21
@@ -1,22 +1,23 @@
|
||||
7-Zip source code
|
||||
~~~~~~~~~~~~~~~~~
|
||||
7-Zip
|
||||
~~~~~
|
||||
License for use and distribution
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
7-Zip Copyright (C) 1999-2019 Igor Pavlov.
|
||||
7-Zip Copyright (C) 1999-2023 Igor Pavlov.
|
||||
|
||||
The licenses for files are:
|
||||
|
||||
1) CPP/7zip/Compress/Rar* files: the "GNU LGPL" with "unRAR license restriction"
|
||||
2) CPP/7zip/Compress/LzfseDecoder.cpp: the "BSD 3-clause License"
|
||||
3) Some files are "public domain" files, if "public domain" status is stated in source file.
|
||||
4) the "GNU LGPL" for all other files. If there is no license information in
|
||||
some source file, that file is under the "GNU LGPL".
|
||||
|
||||
The "GNU LGPL" with "unRAR license restriction" means that you must follow both
|
||||
"GNU LGPL" rules and "unRAR license restriction" rules.
|
||||
1) 7z.dll:
|
||||
- The "GNU LGPL" as main license for most of the code
|
||||
- The "GNU LGPL" with "unRAR license restriction" for some code
|
||||
- The "BSD 3-clause License" for some code
|
||||
2) All other files: the "GNU LGPL".
|
||||
|
||||
Redistributions in binary form must reproduce related license information from this file.
|
||||
|
||||
Note:
|
||||
You can use 7-Zip on any computer, including a computer in a commercial
|
||||
organization. You don't need to register or pay for 7-Zip.
|
||||
|
||||
|
||||
GNU LGPL information
|
||||
@@ -32,9 +33,8 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
You can receive a copy of the GNU Lesser General Public License from
|
||||
http://www.gnu.org/
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
BSD 3-clause License
|
||||
--------------------
|
||||
|
||||
The "BSD 3-clause License" is used for the code in LzfseDecoder.cpp that implements LZFSE data decompression.
|
||||
The "BSD 3-clause License" is used for the code in 7z.dll that implements LZFSE data decompression.
|
||||
That code was derived from the code in the "LZFSE compression library" developed by Apple Inc,
|
||||
that also uses the "BSD 3-clause License":
|
||||
|
||||
@@ -73,17 +73,17 @@
|
||||
unRAR license restriction
|
||||
-------------------------
|
||||
|
||||
The decompression engine for RAR archives was developed using source
|
||||
The decompression engine for RAR archives was developed using source
|
||||
code of unRAR program.
|
||||
All copyrights to original unRAR code are owned by Alexander Roshal.
|
||||
|
||||
The license for original unRAR code has the following restriction:
|
||||
|
||||
The unRAR sources cannot be used to re-create the RAR compression algorithm,
|
||||
which is proprietary. Distribution of modified unRAR sources in separate form
|
||||
or as a part of other software is permitted, provided that it is clearly
|
||||
stated in the documentation and source comments that the code may
|
||||
not be used to develop a RAR (WinRAR) compatible archiver.
|
||||
The unRAR sources cannot be used to re-create the RAR compression algorithm,
|
||||
which is proprietary. Distribution of modified unRAR sources in separate form
|
||||
or as a part of other software is permitted, provided that it is clearly
|
||||
stated in the documentation and source comments that the code may
|
||||
not be used to develop a RAR (WinRAR) compatible archiver.
|
||||
|
||||
|
||||
--
|
||||
|
||||
+23
-19
@@ -1,23 +1,27 @@
|
||||
Copyright (c) 2012 - 2016, Victor Zverovich
|
||||
Copyright (c) 2012 - present, Victor Zverovich
|
||||
|
||||
All rights reserved.
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
--- Optional exception to the license ---
|
||||
|
||||
As an exception, if, as a result of your compiling your source code, portions
|
||||
of this Software are embedded into a machine-executable object form of such
|
||||
source code, you may redistribute such embedded portions in such object form
|
||||
without including the above copyright and permission notices.
|
||||
|
||||
@@ -59,6 +59,17 @@ direction to make these releases possible.
|
||||
B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
|
||||
===============================================================
|
||||
|
||||
Python software and documentation are licensed under the
|
||||
Python Software Foundation License Version 2.
|
||||
|
||||
Starting with Python 3.8.6, examples, recipes, and other code in
|
||||
the documentation are dual licensed under the PSF License Version 2
|
||||
and the Zero-Clause BSD license.
|
||||
|
||||
Some software incorporated into Python is under different licenses.
|
||||
The licenses are listed with code falling under that license.
|
||||
|
||||
|
||||
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
|
||||
--------------------------------------------
|
||||
|
||||
@@ -252,3 +263,17 @@ FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON DOCUMENTATION
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
+7
-6
@@ -1,11 +1,12 @@
|
||||
RIVERBANK COMPUTING LIMITED LICENSE AGREEMENT FOR SIP
|
||||
|
||||
1. This LICENSE AGREEMENT is between Riverbank Computing Limited ("Riverbank"),
|
||||
and the Individual or Organization ("Licensee") accessing and otherwise using
|
||||
SIP software in source or binary form and its associated documentation. SIP
|
||||
comprises a software tool for generating Python bindings for software C and C++
|
||||
libraries, and a Python extension module used at runtime by those generated
|
||||
bindings.
|
||||
1. This LICENSE AGREEMENT ("the SIP License") is between Riverbank Computing
|
||||
Limited ("Riverbank"), and the Individual or Organization ("Licensee")
|
||||
accessing and otherwise using SIP software in source or binary form and its
|
||||
associated documentation. SIP comprises a software tool for generating Python
|
||||
bindings for software C and C++ libraries, and a Python extension module used
|
||||
at runtime by those generated bindings. This License Agreement may also be
|
||||
applied to other software packages written by Riverbank.
|
||||
|
||||
2. Subject to the terms and conditions of this License Agreement, Riverbank
|
||||
hereby grants Licensee a nonexclusive, royalty-free, world-wide license to
|
||||
|
||||
@@ -20,3 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
-- NOTE: Third party dependency used by this software --
|
||||
This software depends on the fmt lib (MIT License),
|
||||
and users must comply to its license: https://github.com/fmtlib/fmt/blob/master/LICENSE.rst
|
||||
|
||||
|
||||
+1
-6
@@ -1,7 +1,4 @@
|
||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||
version 1.2.11, January 15th, 2017
|
||||
|
||||
Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
(C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -21,5 +18,3 @@
|
||||
|
||||
Jean-loup Gailly Mark Adler
|
||||
jloup@gzip.org madler@alumni.caltech.edu
|
||||
|
||||
*/
|
||||
@@ -13,17 +13,26 @@ log_file = mob.log
|
||||
ignore_uncommitted = false
|
||||
github_key =
|
||||
|
||||
[cmake]
|
||||
install_message = never
|
||||
host =
|
||||
|
||||
[aliases]
|
||||
super = cmake_common modorganizer* githubpp
|
||||
plugins = check_fnis bsapacker bsa_extractor diagnose_basic installer_* plugin_python preview_base preview_bsa tool_* game_*
|
||||
|
||||
[translations]
|
||||
mo2-translations = organizer
|
||||
mo2-game-bethesda = game_creation game_enderal game_enderalse game_fallout3 game_fallout4 game_fallout4vr game_falloutNV game_gamebryo game_morrowind game_nehrim game_oblivion game_skyrim game_skyrimse game_skyrimvr game_ttw
|
||||
|
||||
[task]
|
||||
enabled = true
|
||||
mo_org = ModOrganizer2
|
||||
mo_branch = master
|
||||
no_pull = false
|
||||
ignore_ts = false
|
||||
revert_ts = false
|
||||
enabled = true
|
||||
mo_org = ModOrganizer2
|
||||
mo_branch = master
|
||||
mo_fallback =
|
||||
no_pull = false
|
||||
ignore_ts = false
|
||||
revert_ts = false
|
||||
|
||||
git_url_prefix = https://github.com/
|
||||
git_shallow = true
|
||||
@@ -58,10 +67,11 @@ cmake = cmake.exe
|
||||
perl = perl.exe
|
||||
devenv = devenv.exe
|
||||
msbuild = msbuild.exe
|
||||
nmake = nmake.exe
|
||||
nuget = nuget.exe
|
||||
vswhere = vswhere.exe
|
||||
nasm = nasm.exe
|
||||
tx = tx.py37-x64.exe
|
||||
tx = tx.exe
|
||||
lrelease = lrelease.exe
|
||||
iscc = ISCC.exe
|
||||
vcvars =
|
||||
@@ -71,7 +81,7 @@ enabled = true
|
||||
key =
|
||||
team = mod-organizer-2-team
|
||||
project = mod-organizer-2
|
||||
url = https://www.transifex.com
|
||||
url = https://app.transifex.com
|
||||
minimum = 60
|
||||
force = false
|
||||
configure = true
|
||||
@@ -86,40 +96,42 @@ python = true
|
||||
usvfs = false
|
||||
|
||||
[versions]
|
||||
vs = 16
|
||||
vs_year = 2019
|
||||
vs_toolset = 14.2
|
||||
sdk = 10.0.19041.0
|
||||
sevenz = 19.00
|
||||
boost = 1.75.0
|
||||
boost_vs = 14.2
|
||||
fmt = 7.1.3
|
||||
gtest = master
|
||||
libloot = 0.16.1
|
||||
libloot_hash = gd8c9b98
|
||||
libloot_branch = 0.16.1
|
||||
lz4 = v1.9.3
|
||||
vs = 17
|
||||
vs_year = 2022
|
||||
vs_toolset = 14.3
|
||||
sdk = 10.0.22621.0
|
||||
sevenz = 23.01
|
||||
boost = 1.82.0
|
||||
boost_vs = 14.3
|
||||
fmt = 8.1.1
|
||||
gtest = main
|
||||
libloot = 0.19.4
|
||||
lz4 = v1.9.4
|
||||
nmm = 0.71.2
|
||||
openssl = 1.1.1i
|
||||
pyqt = 5.15.2
|
||||
pyqt_builder = 1.7.0
|
||||
pyqt_sip = 12.8.1
|
||||
python = v3.8.7
|
||||
bzip2 = 1.0.6
|
||||
sip = 5.5.0
|
||||
spdlog = v1.8.2
|
||||
qt = 5.15.2
|
||||
openssl = 1.1.1u
|
||||
pyqt = 6.5.1
|
||||
pyqt_builder = 1.15.1
|
||||
pyqt_sip = 13.5.1
|
||||
python = v3.10.12
|
||||
pybind11 = v2.10.4
|
||||
bzip2 = 1.0.8
|
||||
sip = 6.7.1
|
||||
spdlog = v1.10.0
|
||||
qt = 6.5.1
|
||||
qt_vs = 2019
|
||||
zlib = 1.2.11
|
||||
libbsarch = 0.0.8
|
||||
usvfs = master
|
||||
zlib = v1.2.13
|
||||
libbsarch = 0.0.9
|
||||
usvfs = qt6
|
||||
explorerpp = 1.3.5
|
||||
|
||||
ss_paper_lad_6788 = 7.0
|
||||
ss_paper_automata_6788 = 3.0
|
||||
ss_paper_mono_6788 = 2.2
|
||||
ss_dark_mode_1809_6788 = 3.0
|
||||
ss_morrowind_trosski = 1.0
|
||||
ss_morrowind_trosski = 1.1
|
||||
ss_skyrim_trosski = v1.1
|
||||
ss_fallout3_trosski = v1.1
|
||||
ss_fallout4_trosski = v1.1
|
||||
|
||||
[paths]
|
||||
third_party =
|
||||
@@ -136,10 +148,10 @@ install_pdbs =
|
||||
install_dlls =
|
||||
install_loot =
|
||||
install_plugins =
|
||||
install_extensions =
|
||||
install_stylesheets =
|
||||
install_licenses =
|
||||
install_pythoncore =
|
||||
install_translations =
|
||||
vs =
|
||||
qt_install =
|
||||
qt_bin =
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
--- CPP/7zip/7zip.mak Mon Jun 23 11:56:48 2014
|
||||
+++ CPP/7zip/7zip.mak Mon Apr 27 15:38:13 2020
|
||||
@@ -1,5 +1,4 @@
|
||||
-OBJS = \
|
||||
- $O\StdAfx.obj \
|
||||
+OBJS_NEEDING_PCH = \
|
||||
$(CURRENT_OBJS) \
|
||||
$(COMMON_OBJS) \
|
||||
$(WIN_OBJS) \
|
||||
@@ -26,9 +25,11 @@
|
||||
$(ZIP_OBJS) \
|
||||
$(COMPRESS_OBJS) \
|
||||
$(CRYPTO_OBJS) \
|
||||
- $(C_OBJS) \
|
||||
+ $(C_OBJS)
|
||||
+
|
||||
+OBJS = $(OBJS_NEEDING_PCH) \
|
||||
$(ASM_OBJS) \
|
||||
- $O\resource.res \
|
||||
+ $O\resource.res
|
||||
|
||||
!include "../../../Build.mak"
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
--- CPP/Build.mak Thu Feb 21 07:50:31 2019
|
||||
+++ CPP/Build.mak Tue Apr 28 21:24:54 2020
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
!IF "$(PLATFORM)" == "x64"
|
||||
-MY_ML = ml64 -Dx64 -WX
|
||||
+MY_ML = ml64 -Dx64 -WX -nologo
|
||||
!ELSEIF "$(PLATFORM)" == "arm"
|
||||
MY_ML = armasm -WX
|
||||
!ELSE
|
||||
@@ -137,6 +137,8 @@
|
||||
|
||||
all: $(PROGPATH)
|
||||
|
||||
+$(OBJS_NEEDING_PCH): $O\StdAfx.obj
|
||||
+
|
||||
clean:
|
||||
-del /Q $(PROGPATH) $O\*.exe $O\*.dll $O\*.obj $O\*.lib $O\*.exp $O\*.res $O\*.pch $O\*.asm
|
||||
|
||||
@@ -146,7 +148,7 @@
|
||||
if not exist "$O/asm" mkdir "$O/asm"
|
||||
|
||||
$(PROGPATH): $O $O/asm $(OBJS) $(DEF_FILE)
|
||||
- link $(LFLAGS) -out:$(PROGPATH) $(OBJS) $(LIBS)
|
||||
+ link $(LFLAGS) -out:$(PROGPATH) $O\StdAfx.obj $(OBJS) $(LIBS)
|
||||
|
||||
!IFNDEF NO_DEFAULT_RES
|
||||
$O\resource.res: $(*B).rc
|
||||
@@ -1,11 +0,0 @@
|
||||
--- tools/build/src/engine/vswhere_usability_wrapper.cmd Wed Dec 4 23:03:07 2019
|
||||
+++ tools/build/src/engine/vswhere_usability_wrapper.cmd Wed Apr 29 20:23:25 2020
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
REM Visual Studio 2019 (16.X, toolset 14.2)
|
||||
set VSWHERE_LMT=-version "[16.0,17.0)"
|
||||
-SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT%
|
||||
+SET VSWHERE_ARGS=-latest -prerelease -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT%
|
||||
for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do (
|
||||
endlocal
|
||||
echo Found with vswhere %%i
|
||||
@@ -27,21 +27,37 @@
|
||||
## Quick start
|
||||
```
|
||||
> git clone https://github.com/ModOrganizer2/mob
|
||||
> cd mob
|
||||
> bootstrap
|
||||
> mob -d c:\somewhere build
|
||||
```
|
||||
|
||||
## Slow start
|
||||
- Install Qt 5.15.2 ([Installer](http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe))
|
||||
- Install Qt 6.5.1 ([Installer](https://download.qt.io/official_releases/online_installers/qt-unified-windows-x64-online.exe)) and select these components:
|
||||
- MSVC 2019 64-bit
|
||||
- Qt WebEngine
|
||||
- Optional: Sources, Debug Information Files
|
||||
- Install Visual Studio 2019 ([Installer](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16))
|
||||
- Additional Libraries:
|
||||
- Qt WebEngine (display nexus pages)
|
||||
- Qt Image Formats (display images in image tab and preview)
|
||||
- Qt Positioning (required by QtWebEngine)
|
||||
- Qt Serial Port (required by Qt Core)
|
||||
- Qt Web Channel (required by QtWebEngine)
|
||||
- Qt WebSockets (Nexus api/download)
|
||||
- Optional:
|
||||
- Qt Source Files
|
||||
- Qt Debug Files
|
||||
- Install Visual Studio 2022 ([Installer](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&channel=Release&version=VS2022&source=VSLandingPage&cid=2030&passive=false))
|
||||
- Desktop development with C++
|
||||
- Git for Windows (if you don't have git already installed)
|
||||
- .NET Framework 3.5 development tools
|
||||
- .NET Framework 4.6 targeting pack
|
||||
- .NET Framework 4.6.1 targeting pack and SDK
|
||||
- Desktop .NET desktop development (needed by OMOD and FOMOD installers)
|
||||
- Individual Components:
|
||||
- .Net Framework 4.8 SDK
|
||||
- .Net Framework 4.7.2 targeting pack (OMOD targets 4.8 but VS still requires the package for other .Net components)
|
||||
- Windows Universal C Runtime
|
||||
- C++ ATL for latest v143 build Tools (x86 & x64)
|
||||
- C++ /CLI support for v143 build Tools (Latest) (for OMOD and FOMOD installers)
|
||||
- Windows 11 SDK (get latest)
|
||||
- C++ Build Tools core features
|
||||
- Optional:
|
||||
- Git for Windows (if you don't have git already installed)
|
||||
- Start a shell
|
||||
- If you have git in your path, a regular cmd shell works.
|
||||
- If not, start the _x64 Native Tools Command Prompt for VS 2019_, it'll use Git for Windows installed above.
|
||||
@@ -113,6 +129,8 @@ Unless otherwise stated, applies to any task that is a git repo.
|
||||
| --- | --- | --- |
|
||||
| `mo_org` | string | The organisation name when pulling from Github. Only applies to ModOrganizer projects, plus NCC and usvfs. |
|
||||
| `mo_branch` | string | The branch name when pulling from Github. Only applies to ModOrganizer projects, plus NCC and usvfs. |
|
||||
| `mo_master` | string | The fallback branch name when pulling from Github. Only applies to ModOrganizer projects, plus NCC and usvfs.
|
||||
This branch is used when `mo_branch` does not exists. If this value is empty, the fallback mechanism is disabled (default behavior). |
|
||||
| `no_pull` | bool | If a repo is already cloned, a `git pull` will be done on it every time `mob build` is run. Set to `false` to never pull and build with whatever is in there. |
|
||||
| `ignore_ts` | bool | Marks all the `.ts` files in a repo with `--assume-unchanged`. Note that `mob git ignore-ts off` can be used to revert it. |
|
||||
| `git_url_prefix` | string | When cloning a repo, the URL will be `$(git_url_prefix)mo_org/repo.git`. |
|
||||
@@ -165,7 +183,7 @@ The versions for all the tasks.
|
||||
### `[paths]`
|
||||
The only path that's required is `prefix`, which is where `mob` will put everything. Within this directory will be `build/`, `downloads/` and `install/`. Everything else is derived from it.
|
||||
|
||||
If `mob` is unable to find the Qt installation directory, it can be specified in `qt_install`. This directory should contain `bin/`, `include/`, etc. It's typically something like `C:\Qt\5.14.2\msvc2017_64\`. The other path `qt_bin` will be derived from it, it's just `$qt_install/bin/`.
|
||||
If `mob` is unable to find the Qt installation directory, it can be specified in `qt_install`. This directory should contain `bin/`, `include/`, etc. It's typically something like `C:\Qt\6.5.1\msvc2019_64\`. The other path `qt_bin` will be derived from it, it's just `$qt_install/bin/`.
|
||||
|
||||
|
||||
## Command line
|
||||
|
||||
+150
-155
@@ -1,200 +1,195 @@
|
||||
#include "pch.h"
|
||||
#include "commands.h"
|
||||
#include "../core/ini.h"
|
||||
#include "../core/conf.h"
|
||||
#include "../core/context.h"
|
||||
#include "../core/ini.h"
|
||||
#include "../core/op.h"
|
||||
#include "../tasks/task_manager.h"
|
||||
#include "commands.h"
|
||||
|
||||
namespace mob
|
||||
{
|
||||
namespace mob {
|
||||
|
||||
build_command::build_command()
|
||||
: command(requires_options | handle_sigint)
|
||||
{
|
||||
}
|
||||
build_command::build_command() : command(requires_options | handle_sigint) {}
|
||||
|
||||
command::meta_t build_command::meta() const
|
||||
{
|
||||
return
|
||||
{
|
||||
"build",
|
||||
"builds tasks"
|
||||
};
|
||||
}
|
||||
command::meta_t build_command::meta() const
|
||||
{
|
||||
return {"build", "builds tasks"};
|
||||
}
|
||||
|
||||
clipp::group build_command::do_group()
|
||||
{
|
||||
return
|
||||
(clipp::command("build")).set(picked_),
|
||||
clipp::group build_command::do_group()
|
||||
{
|
||||
return (clipp::command("build")).set(picked_),
|
||||
|
||||
(clipp::option("-h", "--help") >> help_)
|
||||
% ("shows this message"),
|
||||
(clipp::option("-h", "--help") >> help_) % ("shows this message"),
|
||||
|
||||
(clipp::option("-g", "--redownload") >> redownload_)
|
||||
% "redownloads archives, see --reextract",
|
||||
(clipp::option("-g", "--redownload") >> redownload_) %
|
||||
"redownloads archives, see --reextract",
|
||||
|
||||
(clipp::option("-e", "--reextract") >> reextract_)
|
||||
% "deletes source directories and re-extracts archives",
|
||||
(clipp::option("-e", "--reextract") >> reextract_) %
|
||||
"deletes source directories and re-extracts archives",
|
||||
|
||||
(clipp::option("-c", "--reconfigure") >> reconfigure_)
|
||||
% "reconfigures the task by running cmake, configure scripts, "
|
||||
"etc.; some tasks might have to delete the whole source "
|
||||
"directory",
|
||||
(clipp::option("-c", "--reconfigure") >> reconfigure_) %
|
||||
"reconfigures the task by running cmake, configure scripts, "
|
||||
"etc.; some tasks might have to delete the whole source "
|
||||
"directory",
|
||||
|
||||
(clipp::option("-b", "--rebuild") >> rebuild_)
|
||||
% "cleans and rebuilds projects; some tasks might have to "
|
||||
"delete the whole source directory",
|
||||
(clipp::option("-b", "--rebuild") >> rebuild_) %
|
||||
"cleans and rebuilds projects; some tasks might have to "
|
||||
"delete the whole source directory",
|
||||
|
||||
(clipp::option("-n", "--new") >> new_)
|
||||
% "deletes everything and starts from scratch",
|
||||
(clipp::option("-n", "--new") >> new_) %
|
||||
"deletes everything and starts from scratch",
|
||||
|
||||
(
|
||||
clipp::option("--clean-task").call([&]{ clean_ = true; }) |
|
||||
clipp::option("--no-clean-task").call([&]{ clean_ = false; })
|
||||
) % "sets whether tasks are cleaned",
|
||||
(clipp::option("--clean-task").call([&] {
|
||||
clean_ = true;
|
||||
}) |
|
||||
clipp::option("--no-clean-task").call([&] {
|
||||
clean_ = false;
|
||||
})) %
|
||||
"sets whether tasks are cleaned",
|
||||
|
||||
(
|
||||
clipp::option("--fetch-task").call([&]{ fetch_ = true; }) |
|
||||
clipp::option("--no-fetch-task").call([&]{ fetch_ = false; })
|
||||
) % "sets whether tasks are fetched",
|
||||
(clipp::option("--fetch-task").call([&] {
|
||||
fetch_ = true;
|
||||
}) |
|
||||
clipp::option("--no-fetch-task").call([&] {
|
||||
fetch_ = false;
|
||||
})) %
|
||||
"sets whether tasks are fetched",
|
||||
|
||||
(
|
||||
clipp::option("--build-task").call([&]{ build_ = true; }) |
|
||||
clipp::option("--no-build-task").call([&]{ build_ = false; })
|
||||
) % "sets whether tasks are built",
|
||||
(clipp::option("--build-task").call([&] {
|
||||
build_ = true;
|
||||
}) |
|
||||
clipp::option("--no-build-task").call([&] {
|
||||
build_ = false;
|
||||
})) %
|
||||
"sets whether tasks are built",
|
||||
|
||||
(
|
||||
clipp::option("--pull").call([&]{ nopull_ = false; }) |
|
||||
clipp::option("--no-pull").call([&]{ nopull_ = true; })
|
||||
) % "whether to pull repos that are already cloned; global override",
|
||||
(clipp::option("--pull").call([&] {
|
||||
nopull_ = false;
|
||||
}) |
|
||||
clipp::option("--no-pull").call([&] {
|
||||
nopull_ = true;
|
||||
})) %
|
||||
"whether to pull repos that are already cloned; global override",
|
||||
|
||||
(
|
||||
clipp::option("--revert-ts").call([&]{ revert_ts_ = true; }) |
|
||||
clipp::option("--no-revert-ts").call([&]{ revert_ts_ = false; })
|
||||
) % "whether to revert all the .ts files in a repo before pulling to "
|
||||
"avoid merge errors; global override",
|
||||
(clipp::option("--revert-ts").call([&] {
|
||||
revert_ts_ = true;
|
||||
}) |
|
||||
clipp::option("--no-revert-ts").call([&] {
|
||||
revert_ts_ = false;
|
||||
})) %
|
||||
"whether to revert all the .ts files in a repo before pulling to "
|
||||
"avoid merge errors; global override",
|
||||
|
||||
(clipp::option("--ignore-uncommitted-changes") >> ignore_uncommitted_)
|
||||
% "when --reextract is given, directories controlled by git will "
|
||||
"be deleted even if they contain uncommitted changes",
|
||||
(clipp::option("--ignore-uncommitted-changes") >> ignore_uncommitted_) %
|
||||
"when --reextract is given, directories controlled by git will "
|
||||
"be deleted even if they contain uncommitted changes",
|
||||
|
||||
(clipp::option("--keep-msbuild") >> keep_msbuild_)
|
||||
% "don't terminate msbuild.exe instances after building",
|
||||
(clipp::option("--keep-msbuild") >> keep_msbuild_) %
|
||||
"don't terminate msbuild.exe instances after building",
|
||||
|
||||
(clipp::opt_values(
|
||||
clipp::match::prefix_not("-"), "task", tasks_))
|
||||
% "tasks to run; specify 'super' to only build modorganizer "
|
||||
"projects";
|
||||
}
|
||||
(clipp::opt_values(clipp::match::prefix_not("-"), "task", tasks_)) %
|
||||
"tasks to run; specify 'super' to only build modorganizer "
|
||||
"projects";
|
||||
}
|
||||
|
||||
void build_command::convert_cl_to_conf()
|
||||
{
|
||||
command::convert_cl_to_conf();
|
||||
void build_command::convert_cl_to_conf()
|
||||
{
|
||||
command::convert_cl_to_conf();
|
||||
|
||||
if (redownload_ || new_)
|
||||
common.options.push_back("global/redownload=true");
|
||||
if (redownload_ || new_)
|
||||
common.options.push_back("global/redownload=true");
|
||||
|
||||
if (reextract_ || new_)
|
||||
common.options.push_back("global/reextract=true");
|
||||
if (reextract_ || new_)
|
||||
common.options.push_back("global/reextract=true");
|
||||
|
||||
if (reconfigure_ || new_)
|
||||
common.options.push_back("global/reconfigure=true");
|
||||
if (reconfigure_ || new_)
|
||||
common.options.push_back("global/reconfigure=true");
|
||||
|
||||
if (rebuild_ || new_)
|
||||
common.options.push_back("global/rebuild=true");
|
||||
if (rebuild_ || new_)
|
||||
common.options.push_back("global/rebuild=true");
|
||||
|
||||
if (ignore_uncommitted_)
|
||||
common.options.push_back("global/ignore_uncommitted=true");
|
||||
if (ignore_uncommitted_)
|
||||
common.options.push_back("global/ignore_uncommitted=true");
|
||||
|
||||
if (clean_)
|
||||
{
|
||||
if (*clean_)
|
||||
common.options.push_back("global/clean_task=true");
|
||||
else
|
||||
common.options.push_back("global/clean_task=false");
|
||||
}
|
||||
if (clean_) {
|
||||
if (*clean_)
|
||||
common.options.push_back("global/clean_task=true");
|
||||
else
|
||||
common.options.push_back("global/clean_task=false");
|
||||
}
|
||||
|
||||
if (fetch_)
|
||||
{
|
||||
if (*fetch_)
|
||||
common.options.push_back("global/fetch_task=true");
|
||||
else
|
||||
common.options.push_back("global/fetch_task=false");
|
||||
}
|
||||
if (fetch_) {
|
||||
if (*fetch_)
|
||||
common.options.push_back("global/fetch_task=true");
|
||||
else
|
||||
common.options.push_back("global/fetch_task=false");
|
||||
}
|
||||
|
||||
if (build_)
|
||||
{
|
||||
if (*build_)
|
||||
common.options.push_back("global/build_task=true");
|
||||
else
|
||||
common.options.push_back("global/build_task=false");
|
||||
}
|
||||
if (build_) {
|
||||
if (*build_)
|
||||
common.options.push_back("global/build_task=true");
|
||||
else
|
||||
common.options.push_back("global/build_task=false");
|
||||
}
|
||||
|
||||
if (nopull_)
|
||||
{
|
||||
if (*nopull_)
|
||||
common.options.push_back("_override:task/no_pull=true");
|
||||
else
|
||||
common.options.push_back("_override:task/no_pull=false");
|
||||
}
|
||||
if (nopull_) {
|
||||
if (*nopull_)
|
||||
common.options.push_back("_override:task/no_pull=true");
|
||||
else
|
||||
common.options.push_back("_override:task/no_pull=false");
|
||||
}
|
||||
|
||||
if (revert_ts_)
|
||||
{
|
||||
if (*revert_ts_)
|
||||
common.options.push_back("_override:task/revert_ts=true");
|
||||
else
|
||||
common.options.push_back("_override:task/revert_ts=false");
|
||||
}
|
||||
if (revert_ts_) {
|
||||
if (*revert_ts_)
|
||||
common.options.push_back("_override:task/revert_ts=true");
|
||||
else
|
||||
common.options.push_back("_override:task/revert_ts=false");
|
||||
}
|
||||
|
||||
if (!tasks_.empty())
|
||||
set_task_enabled_flags(tasks_);
|
||||
}
|
||||
if (!tasks_.empty())
|
||||
set_task_enabled_flags(tasks_);
|
||||
}
|
||||
|
||||
int build_command::do_run()
|
||||
{
|
||||
try
|
||||
{
|
||||
create_prefix_ini();
|
||||
int build_command::do_run()
|
||||
{
|
||||
try {
|
||||
create_prefix_ini();
|
||||
|
||||
task_manager::instance().run_all();
|
||||
task_manager::instance().run_all();
|
||||
|
||||
if (!keep_msbuild_)
|
||||
terminate_msbuild();
|
||||
if (!keep_msbuild_)
|
||||
terminate_msbuild();
|
||||
|
||||
mob::gcx().info(mob::context::generic, "mob done");
|
||||
return 0;
|
||||
}
|
||||
catch(bailed&)
|
||||
{
|
||||
gcx().error(context::generic, "bailing out");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
mob::gcx().info(mob::context::generic, "mob done");
|
||||
return 0;
|
||||
}
|
||||
catch (bailed&) {
|
||||
gcx().error(context::generic, "bailing out");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
void build_command::create_prefix_ini()
|
||||
{
|
||||
const auto prefix = conf().path().prefix();
|
||||
void build_command::create_prefix_ini()
|
||||
{
|
||||
const auto prefix = conf().path().prefix();
|
||||
|
||||
// creating prefix
|
||||
if (!exists(prefix))
|
||||
op::create_directories(gcx(), prefix);
|
||||
// creating prefix
|
||||
if (!exists(prefix))
|
||||
op::create_directories(gcx(), prefix);
|
||||
|
||||
const auto ini = prefix / default_ini_filename();
|
||||
if (!exists(ini))
|
||||
{
|
||||
std::ofstream(ini)
|
||||
<< "[paths]\n"
|
||||
<< "prefix = .\n";
|
||||
}
|
||||
}
|
||||
const auto ini = prefix / default_ini_filename();
|
||||
if (!exists(ini)) {
|
||||
std::ofstream(ini) << "[paths]\n"
|
||||
<< "prefix = .\n";
|
||||
}
|
||||
}
|
||||
|
||||
void build_command::terminate_msbuild()
|
||||
{
|
||||
if (conf().global().dry())
|
||||
return;
|
||||
void build_command::terminate_msbuild()
|
||||
{
|
||||
if (conf().global().dry())
|
||||
return;
|
||||
|
||||
system("taskkill /im msbuild.exe /f > NUL 2>&1");
|
||||
}
|
||||
system("taskkill /im msbuild.exe /f > NUL 2>&1");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace mob
|
||||
|
||||
+45
-63
@@ -1,83 +1,65 @@
|
||||
#include "pch.h"
|
||||
#include "commands.h"
|
||||
#include "../tasks/tasks.h"
|
||||
#include "commands.h"
|
||||
|
||||
namespace mob
|
||||
{
|
||||
namespace mob {
|
||||
|
||||
cmake_command::cmake_command()
|
||||
: command(requires_options)
|
||||
{
|
||||
}
|
||||
cmake_command::cmake_command() : command(requires_options) {}
|
||||
|
||||
command::meta_t cmake_command::meta() const
|
||||
{
|
||||
return
|
||||
{
|
||||
"cmake",
|
||||
"runs cmake in a directory"
|
||||
};
|
||||
}
|
||||
command::meta_t cmake_command::meta() const
|
||||
{
|
||||
return {"cmake", "runs cmake in a directory"};
|
||||
}
|
||||
|
||||
clipp::group cmake_command::do_group()
|
||||
{
|
||||
return clipp::group(
|
||||
clipp::command("cmake").set(picked_),
|
||||
clipp::group cmake_command::do_group()
|
||||
{
|
||||
return clipp::group(
|
||||
clipp::command("cmake").set(picked_),
|
||||
|
||||
(clipp::option("-h", "--help") >> help_)
|
||||
% "shows this message",
|
||||
(clipp::option("-h", "--help") >> help_) % "shows this message",
|
||||
|
||||
(clipp::option("-G", "--generator")
|
||||
& clipp::value("GEN") >> gen_)
|
||||
% ("sets the -G option for cmake [default: VS]"),
|
||||
(clipp::option("-G", "--generator") & clipp::value("GEN") >> gen_) %
|
||||
("sets the -G option for cmake [default: VS]"),
|
||||
|
||||
(clipp::option("-c", "--cmd")
|
||||
& clipp::value("CMD") >> cmd_)
|
||||
% "overrides the cmake command line [default: \"..\"]",
|
||||
(clipp::option("-c", "--cmd") & clipp::value("CMD") >> cmd_) %
|
||||
"overrides the cmake command line [default: \"..\"]",
|
||||
|
||||
(
|
||||
clipp::option("--x64").set(x64_, true) |
|
||||
clipp::option("--x86").set(x64_, false)
|
||||
)
|
||||
% "whether to use the x64 or x86 vcvars; if -G is not set, "
|
||||
"whether to pass \"-A Win32\" or \"-A x64\" for the default "
|
||||
"VS generator [default: x64]",
|
||||
(clipp::option("--x64").set(x64_, true) |
|
||||
clipp::option("--x86").set(x64_, false)) %
|
||||
"whether to use the x64 or x86 vcvars; if -G is not set, "
|
||||
"whether to pass \"-A Win32\" or \"-A x64\" for the default "
|
||||
"VS generator [default: x64]",
|
||||
|
||||
(clipp::option("--install-prefix")
|
||||
& clipp::value("PATH") >> prefix_)
|
||||
% "sets CMAKE_INSTALL_PREFIX [default: empty]",
|
||||
(clipp::option("--install-prefix") & clipp::value("PATH") >> prefix_) %
|
||||
"sets CMAKE_INSTALL_PREFIX [default: empty]",
|
||||
|
||||
(clipp::value("PATH") >> path_)
|
||||
% "path from which to run `cmake`"
|
||||
);
|
||||
}
|
||||
(clipp::value("PATH") >> path_) % "path from which to run `cmake`");
|
||||
}
|
||||
|
||||
int cmake_command::do_run()
|
||||
{
|
||||
auto t = tasks::modorganizer::create_cmake_tool(
|
||||
fs::path(utf8_to_utf16(path_)));
|
||||
int cmake_command::do_run()
|
||||
{
|
||||
auto t = tasks::modorganizer::create_cmake_tool(fs::path(utf8_to_utf16(path_)));
|
||||
|
||||
t.generator(gen_);
|
||||
t.cmd(cmd_);
|
||||
t.prefix(prefix_);
|
||||
t.output(path_);
|
||||
t.generator(gen_);
|
||||
t.cmd(cmd_);
|
||||
t.prefix(prefix_);
|
||||
t.output(path_);
|
||||
|
||||
if (!x64_)
|
||||
t.architecture(arch::x86);
|
||||
if (!x64_)
|
||||
t.architecture(arch::x86);
|
||||
|
||||
// copy the global context, the tool will modify it
|
||||
context cxcopy(gcx());
|
||||
// copy the global context, the tool will modify it
|
||||
context cxcopy(gcx());
|
||||
|
||||
t.run(cxcopy);
|
||||
t.run(cxcopy);
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string cmake_command::do_doc()
|
||||
{
|
||||
return
|
||||
"Runs `cmake ..` in the given directory with the same command line\n"
|
||||
"as the one used for modorganizer projects.";
|
||||
}
|
||||
std::string cmake_command::do_doc()
|
||||
{
|
||||
return "Runs `cmake ..` in the given directory with the same command line\n"
|
||||
"as the one used for modorganizer projects.";
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace mob
|
||||
|
||||
+319
-372
File diff suppressed because it is too large
Load Diff
+423
-477
File diff suppressed because it is too large
Load Diff
+191
-234
@@ -1,290 +1,247 @@
|
||||
#include "pch.h"
|
||||
#include "commands.h"
|
||||
#include "../tasks/tasks.h"
|
||||
#include "../tools/tools.h"
|
||||
#include "commands.h"
|
||||
|
||||
namespace mob
|
||||
{
|
||||
namespace mob {
|
||||
|
||||
git_command::git_command()
|
||||
: command(requires_options)
|
||||
{
|
||||
}
|
||||
git_command::git_command() : command(requires_options) {}
|
||||
|
||||
command::meta_t git_command::meta() const
|
||||
{
|
||||
return
|
||||
{
|
||||
"git",
|
||||
"manages the git repos"
|
||||
};
|
||||
}
|
||||
command::meta_t git_command::meta() const
|
||||
{
|
||||
return {"git", "manages the git repos"};
|
||||
}
|
||||
|
||||
clipp::group git_command::do_group()
|
||||
{
|
||||
return clipp::group(
|
||||
clipp::command("git").set(picked_),
|
||||
clipp::group git_command::do_group()
|
||||
{
|
||||
return clipp::group(
|
||||
clipp::command("git").set(picked_),
|
||||
|
||||
(clipp::option("-h", "--help") >> help_)
|
||||
% ("shows this message"),
|
||||
(clipp::option("-h", "--help") >> help_) % ("shows this message"),
|
||||
|
||||
"set-remotes" %
|
||||
(clipp::command("set-remotes").set(mode_, modes::set_remotes),
|
||||
(clipp::required("-u", "--username")
|
||||
& clipp::value("USERNAME") >> username_)
|
||||
% "git username",
|
||||
"set-remotes" %
|
||||
(clipp::command("set-remotes").set(mode_, modes::set_remotes),
|
||||
(clipp::required("-u", "--username") &
|
||||
clipp::value("USERNAME") >> username_) %
|
||||
"git username",
|
||||
|
||||
(clipp::required("-e", "--email")
|
||||
& clipp::value("EMAIL") >> email_)
|
||||
% "git email",
|
||||
(clipp::required("-e", "--email") &
|
||||
clipp::value("EMAIL") >> email_) %
|
||||
"git email",
|
||||
|
||||
(clipp::option("-k", "--key")
|
||||
& clipp::value("PATH") >> key_)
|
||||
% "path to putty key",
|
||||
(clipp::option("-k", "--key") & clipp::value("PATH") >> key_) %
|
||||
"path to putty key",
|
||||
|
||||
(clipp::option("-s", "--no-push").set(nopush_)
|
||||
% "disables pushing to 'upstream' by changing the push url "
|
||||
"to 'nopushurl' to avoid accidental pushes"),
|
||||
(clipp::option("-s", "--no-push").set(nopush_) %
|
||||
"disables pushing to 'upstream' by changing the push url "
|
||||
"to 'nopushurl' to avoid accidental pushes"),
|
||||
|
||||
(clipp::option("-p", "--push-origin").set(push_default_)
|
||||
% "sets the new 'origin' remote as the default push target"),
|
||||
(clipp::option("-p", "--push-origin").set(push_default_) %
|
||||
"sets the new 'origin' remote as the default push target"),
|
||||
|
||||
(clipp::opt_value("path") >> path_)
|
||||
% "only use this repo"
|
||||
)
|
||||
(clipp::opt_value("path") >> path_) % "only use this repo")
|
||||
|
||||
|
|
||||
|
|
||||
|
||||
"add-remote" %
|
||||
(clipp::command("add-remote").set(mode_, modes::add_remote),
|
||||
(clipp::required("-n", "--name")
|
||||
& clipp::value("NAME") >> remote_)
|
||||
% "name of new remote",
|
||||
"add-remote" %
|
||||
(clipp::command("add-remote").set(mode_, modes::add_remote),
|
||||
(clipp::required("-n", "--name") &
|
||||
clipp::value("NAME") >> remote_) %
|
||||
"name of new remote",
|
||||
|
||||
(clipp::required("-u", "--username")
|
||||
& clipp::value("USERNAME") >> username_)
|
||||
% "git username",
|
||||
(clipp::required("-u", "--username") &
|
||||
clipp::value("USERNAME") >> username_) %
|
||||
"git username",
|
||||
|
||||
(clipp::option("-k", "--key")
|
||||
& clipp::value("PATH") >> key_)
|
||||
% "path to putty key",
|
||||
(clipp::option("-k", "--key") & clipp::value("PATH") >> key_) %
|
||||
"path to putty key",
|
||||
|
||||
(clipp::option("-p", "--push-origin").set(push_default_)
|
||||
% "sets this new remote as the default push target"),
|
||||
(clipp::option("-p", "--push-origin").set(push_default_) %
|
||||
"sets this new remote as the default push target"),
|
||||
|
||||
(clipp::opt_value("path") >> path_)
|
||||
% "only use this repo"
|
||||
)
|
||||
(clipp::opt_value("path") >> path_) % "only use this repo")
|
||||
|
||||
|
|
||||
|
|
||||
|
||||
"ignore-ts" %
|
||||
(clipp::command("ignore-ts").set(mode_, modes::ignore_ts),
|
||||
(
|
||||
clipp::command("on").set(tson_, true) |
|
||||
clipp::command("off").set(tson_, false)
|
||||
)
|
||||
)
|
||||
"ignore-ts" % (clipp::command("ignore-ts").set(mode_, modes::ignore_ts),
|
||||
(clipp::command("on").set(tson_, true) |
|
||||
clipp::command("off").set(tson_, false)))
|
||||
|
||||
|
|
||||
|
|
||||
|
||||
"branches" %
|
||||
(clipp::command("branches").set(mode_, modes::branches),
|
||||
clipp::option("-a", "--all").set(all_branches_)
|
||||
% "shows all branches, including those on master"
|
||||
)
|
||||
);
|
||||
}
|
||||
"branches" % (clipp::command("branches").set(mode_, modes::branches),
|
||||
clipp::option("-a", "--all").set(all_branches_) %
|
||||
"shows all branches, including those on master"));
|
||||
}
|
||||
|
||||
int git_command::do_run()
|
||||
{
|
||||
switch (mode_)
|
||||
{
|
||||
case modes::set_remotes:
|
||||
{
|
||||
do_set_remotes();
|
||||
break;
|
||||
}
|
||||
int git_command::do_run()
|
||||
{
|
||||
switch (mode_) {
|
||||
case modes::set_remotes: {
|
||||
do_set_remotes();
|
||||
break;
|
||||
}
|
||||
|
||||
case modes::add_remote:
|
||||
{
|
||||
do_add_remote();
|
||||
break;
|
||||
}
|
||||
case modes::add_remote: {
|
||||
do_add_remote();
|
||||
break;
|
||||
}
|
||||
|
||||
case modes::ignore_ts:
|
||||
{
|
||||
do_ignore_ts();
|
||||
break;
|
||||
}
|
||||
case modes::ignore_ts: {
|
||||
do_ignore_ts();
|
||||
break;
|
||||
}
|
||||
|
||||
case modes::branches:
|
||||
{
|
||||
do_branches();
|
||||
break;
|
||||
}
|
||||
case modes::branches: {
|
||||
do_branches();
|
||||
break;
|
||||
}
|
||||
|
||||
case modes::none:
|
||||
default:
|
||||
u8cerr << "bad git mode " << static_cast<int>(mode_) << "\n";
|
||||
throw bailed();
|
||||
}
|
||||
case modes::none:
|
||||
default:
|
||||
u8cerr << "bad git mode " << static_cast<int>(mode_) << "\n";
|
||||
throw bailed();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string git_command::do_doc()
|
||||
{
|
||||
return
|
||||
"All the commands will go through all modorganizer repos, plus usvfs\n"
|
||||
"and NCC.\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
"set-remotes\n"
|
||||
" For each repo, this first sets the username and email. Then, it\n"
|
||||
" will rename the remote 'origin' to 'upstream' and create a new\n"
|
||||
" remote 'origin' with the given information. If the remote\n"
|
||||
" 'upstream' already exists in a repo, nothing happens.\n"
|
||||
"\n"
|
||||
"add-remote\n"
|
||||
" For each repo, adds a new remote with the given information. If a\n"
|
||||
" remote with the same name already exists, nothing happens.\n"
|
||||
"\n"
|
||||
"ignore-ts\n"
|
||||
" Toggles the --assume-changed status of all .ts files in all repos.\n"
|
||||
"\n"
|
||||
"branches\n"
|
||||
" Lists all git repos that are not on master. With -a, show all \n"
|
||||
" repos and their current branch.";
|
||||
}
|
||||
std::string git_command::do_doc()
|
||||
{
|
||||
return "All the commands will go through all modorganizer repos, plus usvfs\n"
|
||||
"and NCC.\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
"set-remotes\n"
|
||||
" For each repo, this first sets the username and email. Then, it\n"
|
||||
" will rename the remote 'origin' to 'upstream' and create a new\n"
|
||||
" remote 'origin' with the given information. If the remote\n"
|
||||
" 'upstream' already exists in a repo, nothing happens.\n"
|
||||
"\n"
|
||||
"add-remote\n"
|
||||
" For each repo, adds a new remote with the given information. If a\n"
|
||||
" remote with the same name already exists, nothing happens.\n"
|
||||
"\n"
|
||||
"ignore-ts\n"
|
||||
" Toggles the --assume-changed status of all .ts files in all repos.\n"
|
||||
"\n"
|
||||
"branches\n"
|
||||
" Lists all git repos that are not on master. With -a, show all \n"
|
||||
" repos and their current branch.";
|
||||
}
|
||||
|
||||
void git_command::do_set_remotes()
|
||||
{
|
||||
if (path_.empty())
|
||||
{
|
||||
const auto repos = get_repos();
|
||||
void git_command::do_set_remotes()
|
||||
{
|
||||
if (path_.empty()) {
|
||||
const auto repos = get_repos();
|
||||
|
||||
for (auto&& r : repos)
|
||||
do_set_remotes(r);
|
||||
}
|
||||
else
|
||||
{
|
||||
do_set_remotes(path_);
|
||||
}
|
||||
}
|
||||
for (auto&& r : repos)
|
||||
do_set_remotes(r);
|
||||
}
|
||||
else {
|
||||
do_set_remotes(path_);
|
||||
}
|
||||
}
|
||||
|
||||
void git_command::do_set_remotes(const fs::path& r)
|
||||
{
|
||||
u8cout << "setting up " << path_to_utf8(r.filename()) << "\n";
|
||||
void git_command::do_set_remotes(const fs::path& r)
|
||||
{
|
||||
u8cout << "setting up " << path_to_utf8(r.filename()) << "\n";
|
||||
|
||||
git_wrap(r).set_credentials(username_, email_);
|
||||
git_wrap(r).set_credentials(username_, email_);
|
||||
|
||||
git_wrap(r).set_origin_and_upstream_remotes(
|
||||
username_, key_, nopush_, push_default_);
|
||||
}
|
||||
git_wrap(r).set_origin_and_upstream_remotes(username_, key_, nopush_,
|
||||
push_default_);
|
||||
}
|
||||
|
||||
void git_command::do_add_remote()
|
||||
{
|
||||
u8cout
|
||||
<< "adding remote '" << remote_ << "' "
|
||||
<< "from '" << username_ << "' to repos\n";
|
||||
void git_command::do_add_remote()
|
||||
{
|
||||
u8cout << "adding remote '" << remote_ << "' "
|
||||
<< "from '" << username_ << "' to repos\n";
|
||||
|
||||
if (path_.empty())
|
||||
{
|
||||
const auto repos = get_repos();
|
||||
if (path_.empty()) {
|
||||
const auto repos = get_repos();
|
||||
|
||||
for (auto&& r : repos)
|
||||
do_add_remote(r);
|
||||
}
|
||||
else
|
||||
{
|
||||
do_add_remote(path_);
|
||||
}
|
||||
}
|
||||
for (auto&& r : repos)
|
||||
do_add_remote(r);
|
||||
}
|
||||
else {
|
||||
do_add_remote(path_);
|
||||
}
|
||||
}
|
||||
|
||||
void git_command::do_add_remote(const fs::path& r)
|
||||
{
|
||||
u8cout << path_to_utf8(r.filename()) << "\n";
|
||||
git_wrap(r).add_remote(remote_, username_, key_, push_default_);
|
||||
}
|
||||
void git_command::do_add_remote(const fs::path& r)
|
||||
{
|
||||
u8cout << path_to_utf8(r.filename()) << "\n";
|
||||
git_wrap(r).add_remote(remote_, username_, key_, push_default_);
|
||||
}
|
||||
|
||||
void git_command::do_ignore_ts()
|
||||
{
|
||||
if (tson_)
|
||||
u8cout << "ignoring .ts files\n";
|
||||
else
|
||||
u8cout << "un-ignoring .ts files\n";
|
||||
void git_command::do_ignore_ts()
|
||||
{
|
||||
if (tson_)
|
||||
u8cout << "ignoring .ts files\n";
|
||||
else
|
||||
u8cout << "un-ignoring .ts files\n";
|
||||
|
||||
if (path_.empty())
|
||||
{
|
||||
const auto repos = get_repos();
|
||||
if (path_.empty()) {
|
||||
const auto repos = get_repos();
|
||||
|
||||
for (auto&& r : repos)
|
||||
do_ignore_ts(r);
|
||||
}
|
||||
else
|
||||
{
|
||||
do_ignore_ts(path_);
|
||||
}
|
||||
}
|
||||
for (auto&& r : repos)
|
||||
do_ignore_ts(r);
|
||||
}
|
||||
else {
|
||||
do_ignore_ts(path_);
|
||||
}
|
||||
}
|
||||
|
||||
void git_command::do_ignore_ts(const fs::path& r)
|
||||
{
|
||||
u8cout << path_to_utf8(r.filename()) << "\n";
|
||||
git_wrap(r).ignore_ts(tson_);
|
||||
}
|
||||
void git_command::do_ignore_ts(const fs::path& r)
|
||||
{
|
||||
u8cout << path_to_utf8(r.filename()) << "\n";
|
||||
git_wrap(r).ignore_ts(tson_);
|
||||
}
|
||||
|
||||
void git_command::do_branches()
|
||||
{
|
||||
std::vector<std::pair<std::string, std::string>> v;
|
||||
void git_command::do_branches()
|
||||
{
|
||||
std::vector<std::pair<std::string, std::string>> v;
|
||||
|
||||
for (auto&& r : get_repos())
|
||||
{
|
||||
const auto b = git_wrap(r).current_branch();
|
||||
if (b == "master" && !all_branches_)
|
||||
continue;
|
||||
for (auto&& r : get_repos()) {
|
||||
const auto b = git_wrap(r).current_branch();
|
||||
if (b == "master" && !all_branches_)
|
||||
continue;
|
||||
|
||||
if (b.empty())
|
||||
v.push_back({r.filename().string(), "detached head"});
|
||||
else
|
||||
v.push_back({r.filename().string(), b});
|
||||
}
|
||||
if (b.empty())
|
||||
v.push_back({r.filename().string(), "detached head"});
|
||||
else
|
||||
v.push_back({r.filename().string(), b});
|
||||
}
|
||||
|
||||
u8cout << table(v, 0, 3) << "\n";
|
||||
}
|
||||
u8cout << table(v, 0, 3) << "\n";
|
||||
}
|
||||
|
||||
std::vector<fs::path> git_command::get_repos() const
|
||||
{
|
||||
std::vector<fs::path> v;
|
||||
std::vector<fs::path> git_command::get_repos() const
|
||||
{
|
||||
std::vector<fs::path> v;
|
||||
|
||||
// usvfs
|
||||
if (fs::exists(tasks::usvfs::source_path()))
|
||||
v.push_back(tasks::usvfs::source_path());
|
||||
// usvfs
|
||||
if (fs::exists(tasks::usvfs::source_path()))
|
||||
v.push_back(tasks::usvfs::source_path());
|
||||
|
||||
// ncc
|
||||
if (fs::exists(tasks::ncc::source_path()))
|
||||
v.push_back(tasks::ncc::source_path());
|
||||
const auto super = tasks::modorganizer::super_path();
|
||||
|
||||
// all directories in super except for those starting with a dot
|
||||
if (fs::exists(super)) {
|
||||
for (auto e : fs::directory_iterator(super)) {
|
||||
if (!e.is_directory())
|
||||
continue;
|
||||
|
||||
const auto super = tasks::modorganizer::super_path();
|
||||
const auto p = e.path();
|
||||
if (path_to_utf8(p.filename()).starts_with("."))
|
||||
continue;
|
||||
|
||||
// all directories in super except for those starting with a dot
|
||||
if (fs::exists(super))
|
||||
{
|
||||
for (auto e : fs::directory_iterator(super))
|
||||
{
|
||||
if (!e.is_directory())
|
||||
continue;
|
||||
v.push_back(p);
|
||||
}
|
||||
}
|
||||
|
||||
const auto p = e.path();
|
||||
if (path_to_utf8(p.filename()).starts_with("."))
|
||||
continue;
|
||||
return v;
|
||||
}
|
||||
|
||||
v.push_back(p);
|
||||
}
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace mob
|
||||
|
||||
+62
-79
@@ -1,100 +1,83 @@
|
||||
#include "pch.h"
|
||||
#include "commands.h"
|
||||
#include "../tasks/task_manager.h"
|
||||
#include "../tasks/task.h"
|
||||
#include "../tasks/task_manager.h"
|
||||
#include "../utility/io.h"
|
||||
#include "commands.h"
|
||||
|
||||
namespace mob
|
||||
{
|
||||
namespace mob {
|
||||
|
||||
command::meta_t list_command::meta() const
|
||||
{
|
||||
return
|
||||
{
|
||||
"list",
|
||||
"lists available tasks"
|
||||
};
|
||||
}
|
||||
command::meta_t list_command::meta() const
|
||||
{
|
||||
return {"list", "lists available tasks"};
|
||||
}
|
||||
|
||||
clipp::group list_command::do_group()
|
||||
{
|
||||
return clipp::group(
|
||||
clipp::command("list").set(picked_),
|
||||
clipp::group list_command::do_group()
|
||||
{
|
||||
return clipp::group(
|
||||
clipp::command("list").set(picked_),
|
||||
|
||||
(clipp::option("-h", "--help") >> help_)
|
||||
% "shows this message",
|
||||
(clipp::option("-h", "--help") >> help_) % "shows this message",
|
||||
|
||||
(clipp::option("-a", "--all") >> all_)
|
||||
% "shows all the tasks, including pseudo parallel tasks",
|
||||
(clipp::option("-a", "--all") >> all_) %
|
||||
"shows all the tasks, including pseudo parallel tasks",
|
||||
|
||||
(clipp::option("-i", "--aliases") >> aliases_)
|
||||
% "shows only aliases",
|
||||
(clipp::option("-i", "--aliases") >> aliases_) % "shows only aliases",
|
||||
|
||||
(clipp::opt_values(
|
||||
clipp::match::prefix_not("-"), "task", tasks_))
|
||||
% "with -a; when given, acts like the tasks given to `build` and "
|
||||
"shows only the tasks that would run"
|
||||
);
|
||||
}
|
||||
(clipp::opt_values(clipp::match::prefix_not("-"), "task", tasks_)) %
|
||||
"with -a; when given, acts like the tasks given to `build` and "
|
||||
"shows only the tasks that would run");
|
||||
}
|
||||
|
||||
int list_command::do_run()
|
||||
{
|
||||
auto& tm = task_manager::instance();
|
||||
int list_command::do_run()
|
||||
{
|
||||
auto& tm = task_manager::instance();
|
||||
|
||||
if (aliases_)
|
||||
{
|
||||
load_options();
|
||||
dump_aliases();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (all_)
|
||||
{
|
||||
if (!tasks_.empty())
|
||||
set_task_enabled_flags(tasks_);
|
||||
if (aliases_) {
|
||||
load_options();
|
||||
dump_aliases();
|
||||
}
|
||||
else {
|
||||
if (all_) {
|
||||
if (!tasks_.empty())
|
||||
set_task_enabled_flags(tasks_);
|
||||
|
||||
load_options();
|
||||
dump(tm.top_level(), 0);
|
||||
load_options();
|
||||
dump(tm.top_level(), 0);
|
||||
|
||||
u8cout << "\n\naliases:\n";
|
||||
dump_aliases();
|
||||
}
|
||||
else
|
||||
{
|
||||
for (auto&& t : tm.all())
|
||||
u8cout << " - " << join(t->names(), ", ") << "\n";
|
||||
}
|
||||
}
|
||||
u8cout << "\n\naliases:\n";
|
||||
dump_aliases();
|
||||
}
|
||||
else {
|
||||
for (auto&& t : tm.all())
|
||||
u8cout << " - " << join(t->names(), ", ") << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
void list_command::dump(const std::vector<task*>& v, std::size_t indent) const
|
||||
{
|
||||
for (auto&& t : v) {
|
||||
if (!t->enabled())
|
||||
continue;
|
||||
|
||||
void list_command::dump(const std::vector<task*>& v, std::size_t indent) const
|
||||
{
|
||||
for (auto&& t : v)
|
||||
{
|
||||
if (!t->enabled())
|
||||
continue;
|
||||
u8cout << std::string(indent * 4, ' ') << " - " << join(t->names(), ",")
|
||||
<< "\n";
|
||||
|
||||
u8cout
|
||||
<< std::string(indent*4, ' ')
|
||||
<< " - " << join(t->names(), ",")
|
||||
<< "\n";
|
||||
if (auto* pt = dynamic_cast<parallel_tasks*>(t))
|
||||
dump(pt->children(), indent + 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (auto* pt=dynamic_cast<parallel_tasks*>(t))
|
||||
dump(pt->children(), indent + 1);
|
||||
}
|
||||
}
|
||||
void list_command::dump_aliases() const
|
||||
{
|
||||
const auto v = task_manager::instance().aliases();
|
||||
if (v.empty())
|
||||
return;
|
||||
|
||||
void list_command::dump_aliases() const
|
||||
{
|
||||
const auto v = task_manager::instance().aliases();
|
||||
if (v.empty())
|
||||
return;
|
||||
for (auto&& [k, patterns] : v)
|
||||
u8cout << " - " << k << ": " << join(patterns, ", ") << "\n";
|
||||
}
|
||||
|
||||
for (auto&& [k, patterns] : v)
|
||||
u8cout << " - " << k << ": " << join(patterns, ", ") << "\n";
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace mob
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user