Author SHA1 Message Date
Mikaël Capelle 60eb00e04e Start working on extensions.
- Update translations task to put translations under extensions.
- Put translations in the right place.
- Remove INI bakery plugin.
- Use mo2- prefixed extensions for translations.
- Generate metadata for the translations extension.
2023-11-10 13:10:20 +01:00
Mikaël Capelle fe14219400 Merge pull request #109 from ModOrganizer2/fix/transifex-new-api
Switch to the new transfiex client.
2023-07-14 14:39:16 +02:00
Mikaël Capelle b8fe18effa Switch to the new transfiex client. 2023-07-14 14:38:55 +02:00
Mikaël Capelle a9be58aaa3 Merge pull request #108 from Qudix/dev/task/zlib
Change `zlib` task to use github repo
2023-07-09 20:17:21 +02:00
Qudix 35083f28e8 Change zlib task to use github repo 2023-07-09 13:09:45 -05:00
Mikaël Capelle a433afe54f Merge pull request #107 from ModOrganizer2/dev/fallback-mo-branch
Allow for a fallback branch when building.
2023-07-09 19:48:07 +02:00
Mikaël Capelle 0b839834a5 Allow for a fallback branch when building. 2023-07-09 19:46:01 +02:00
Mikaël Capelle 932e639850 Merge pull request #106 from ModOrganizer2/dev/propagate-bailing-out
Propagate bailing out of tasks to get proper exit code.
2023-07-09 19:28:31 +02:00
Mikaël Capelle 6a4f047a13 Propagate bailing out of tasks to get proper exit code. 2023-07-09 19:28:16 +02:00
Mikaël Capelle 3f2aad38cd Set default branch to master again. 2023-07-08 14:40:43 +02:00
Mikaël Capelle 0039738ca2 Merge pull request #105 from Holt59/dev/up-versions
Bump versions + Fixes
2023-07-02 20:09:24 +02:00
Mikaël Capelle 93ec9f2409 Update Qt version in README. 2023-07-02 15:57:00 +02:00
Mikaël Capelle 862e6d3684 Fix SIP. 2023-07-02 15:18:45 +02:00
Mikaël Capelle f9bb4a15d8 Bump 7z exe to 23.01. 2023-07-02 14:54:52 +02:00
Mikaël Capelle ad06c600ab Bump Qt. 2023-07-02 14:06:31 +02:00
Mikaël Capelle 25bcd55b3b Use pip instead of legacy install for sip. 2023-07-02 14:04:21 +02:00
Mikaël Capelle a2e9b63b65 Bump third-parties versions. 2023-07-02 14:04:12 +02:00
Mikaël Capelle f0fdead031 Add NMake. 2023-07-02 14:03:38 +02:00
Mikaël Capelle cc5e49ba5c Merge pull request #104 from Holt59/fix/msvc-14.36-modules
Fix MSVC 14.36 and modules
2023-06-28 10:52:03 +02:00
Mikaël Capelle 9df84177d1 Disable building C++23 ISO modules due to errors in MSVC 14.36. 2023-06-27 21:53:39 +02:00
Al 7d38877fa4 Merge pull request #102 from evelynmarie/qt6
Update LOOT to 0.19.3.
2023-04-07 17:24:23 +02:00
Evelyn Marie abcd5aef03 tasks(libloot): remove unnecessary hash(), branch() 2023-04-06 17:22:31 -06:00
Evelyn Marie a526409349 dependencies: update loot 2023-04-06 17:19:21 -06:00
Jeremy Rimpo 55b57aa44b Add Fallout 76 support plugin 2022-10-23 02:22:26 -05:00
Jeremy Rimpo a3857ae64b Update to latest zlib 2022-10-21 00:37:59 -05:00
Jeremy Rimpo 676a9c1911 Update readme 2022-10-08 00:23:21 -05:00
Jeremy Rimpo 9d9e3b38fb Dependency bump 2022-10-08 00:19:46 -05:00
Mikaël Capelle 6712f78dd4 Merge pull request #99 from Ryan-rsm-McKenzie/qt6
Fixup instructions & build error
2022-06-19 11:45:46 +02:00
ryan-rsm-mckenzie 0266fc0133 resolve dependent typename 2022-06-18 17:28:50 -07:00
ryan-rsm-mckenzie 19ec6fbf2e fixup quickstart 2022-06-18 17:08:12 -07:00
Mikaël Capelle 3f4eed9e2a Add possibility to specify host for VS generator. 2022-05-15 11:30:13 +02:00
AL 3e8f5b83e2 Fix for PR feature not using the correct username for the repository 2022-05-08 15:07:17 +02:00
Mikaël Capelle b98e4ae653 Merge pull request #97 from ModOrganizer2/qt6-cmake-install-message
Qt6 cmake install message
2022-05-08 14:04:28 +02:00
Mikaël Capelle 57453530b4 Add a [cmake] section with install_message key. 2022-05-08 14:04:02 +02:00
Mikaël Capelle fb0b446e13 Remove unused functions from boost task. 2022-05-08 14:03:03 +02:00
Al e2493b5da2 Fix qt version 2022-05-03 13:46:48 +02:00
Al e397eae7b1 Updated readme for qt 6.0.3 and VS2022 2022-05-03 13:36:42 +02:00
Mikaël Capelle a6f2cbee45 Fix release. 2022-05-02 23:04:51 +02:00
Mikaël Capelle b7de6c4dfa Merge pull request #96 from ModOrganizer2/python-rework
Python rework
2022-05-02 20:31:52 +02:00
Mikaël Capelle a3c0c72644 Remove Python from build. 2022-05-02 20:30:19 +02:00
Mikaël Capelle 8d70ec1ca6 Fix issue with GTest runtime. 2022-05-02 15:21:39 +02:00
Mikaël Capelle e8c4835bc9 Add pybind11. 2022-05-02 15:21:39 +02:00
Mikaël Capelle 6cc1883492 Remove most Python file installations. 2022-05-02 15:21:39 +02:00
Jeremy Rimpo 80b002cffa Use libloot 0.18.0 2022-05-02 02:07:11 -05:00
Mikaël Capelle 7c677c142e Merge pull request #95 from ModOrganizer2/update-cmake-common-qt6
Update cmake common qt6
2022-04-28 17:54:27 +02:00
Mikaël Capelle 5398952bad Remove NCC and NMM. 2022-04-21 21:56:55 +02:00
Mikaël Capelle 720cd53d3d Remove unwanted differences with origin/qt6. 2022-04-21 19:30:41 +02:00
Mikaël Capelle 8ce78c529d Remove NCC. 2022-04-19 23:23:20 +02:00
Mikaël Capelle 8a16685805 Remove game_features. 2022-04-18 23:05:58 +02:00
Mikaël Capelle 863364b7ac Bump fmt for spdlog. 2022-04-18 23:05:22 +02:00
Mikaël Capelle f1f9ec72cc Bump spdlog to 1.10.0. 2022-04-18 23:05:00 +02:00
Jeremy Rimpo 936d0f7d37 Reactivate prebuilts 2022-04-18 00:47:43 -05:00
Jeremy Rimpo ec573c1266 Update dependencies 2022-04-17 20:06:57 -05:00
Jeremy Rimpo e2747c4163 Merge remote-tracking branch 'origin/master' into qt6 2022-04-17 01:58:12 -05:00
Al 327a9fbe17 Merge pull request #93 from Dakraid/fix/zlib-version-bump
Update zlib in mob.ini to 1.2.12
2022-04-12 13:15:07 +02:00
Kristian Schlikow f63066e123 Update mob.ini
Minimal version bump for zlib as 1.2.11 returns a 404
2022-04-11 20:45:47 +02:00
Chris Bessent 875b99f861 Merge pull request #92 from LostDragonist/trosski
Trosski
2022-01-15 12:14:02 -07:00
Chris Bessent e5e497f8c1 Add to .gitignore 2022-01-15 12:00:36 -07:00
Chris Bessent 7dcce4bc85 Update Trosski stylesheets 2022-01-15 12:00:33 -07:00
Chris Bessent 066001efb1 Don't push personal stuff 2021-12-19 12:24:03 -07:00
Chris Bessent 995ab2dbba Merge pull request #91 from LostDragonist/libloot
Update libloot to 0.17.1
2021-12-19 12:17:08 -07:00
Chris Bessent 4cdcedf60c Update libloot to 0.17.1 2021-12-19 11:26:13 -07:00
Jeremy Rimpo 1bcda87303 Changes to better support translation updates 2021-12-10 09:31:15 -06:00
Jeremy Rimpo 1874e6287f Python 3.10 support 2021-12-09 16:44:41 -06:00
Jeremy Rimpo af407c8ea8 Update to use new prebuilts 2021-12-08 00:36:52 -06:00
Jeremy Rimpo 196390e5f2 License updates 2021-12-07 17:21:23 -06:00
Jeremy Rimpo 8af608de5a Revert OpenSSL version change 2021-12-07 16:24:11 -06:00
Jeremy Rimpo ed0f05a96e Fix PyQt5 dependencies, update openssl to 3.0, set dev branch 2021-12-07 00:02:47 -06:00
Jeremy Rimpo 359f277dff Qt6 Base Changes + Other Dependency Updates 2021-12-05 03:40:30 -06:00
Chris Bessent 99b6ad045c Change gtest branch from master to main 2021-11-23 20:22:35 -07:00
Mikaël Capelle 6681cb3a02 Merge pull request #90 from LostDragonist/nehrim
Add Nehrim repo
2021-08-23 08:13:53 +02:00
Mikaël Capelle 6997a6ef08 Merge pull request #87 from Holt59/update-libloot
Update libloot to 0.16.3.
2021-08-23 08:09:35 +02:00
Chris Bessent dc6f03a915 Add Nehrim repo 2021-08-22 11:05:35 -07:00
Al f5c0b3e223 Merge pull request #89 from erri120/erri120-patch-1
Update README
2021-08-06 16:28:47 +02:00
Al ae95c2e643 Merge pull request #88 from erri120/sip-codepage
Change code page from 850 to 65001 for sip
2021-08-06 16:28:23 +02:00
erri120 3d7412f958 Update README
Remove .NET Framework 4.6.1 and add .NET Framework 4.8
2021-08-06 13:57:11 +00:00
erri120 505ff0359a Change code page from 850 to 65001 for sip 2021-08-06 15:29:52 +02:00
Mikaël Capelle 41ef172815 Update libloot to 0.16.3. 2021-08-01 13:23:37 +02:00
Mikaël Capelle 21c5c5ea28 Merge pull request #86 from Holt59/uibase-lib
Generate archive for uibase library when releasing.
2021-07-19 21:01:01 +02:00
Mikaël Capelle 6707a03289 Generate archive for uibase library when releasing. 2021-07-19 20:27:40 +02:00
Chris Bessent 9227716a44 Strip out top-level folders for stylesheets downloads 2021-05-02 01:13:28 -07:00
109 changed files with 18784 additions and 20559 deletions
+26
View File
@@ -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
+7
View File
@@ -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
+9
View File
@@ -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
View File
@@ -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
View File
@@ -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.
+25
View File
@@ -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
View File
@@ -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
+4
View File
@@ -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
View File
@@ -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
*/
+47 -35
View File
@@ -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 =
-23
View File
@@ -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"
-29
View File
@@ -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
-11
View File
@@ -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 -9
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff
+423 -477
View File
File diff suppressed because it is too large Load Diff
+191 -234
View File
@@ -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
View File
@@ -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