mirror of
https://github.com/ModOrganizer2/mob.git
synced 2026-07-27 14:07:05 -07:00
Compare commits
13
Commits
dev/extensions
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5602cba88e | ||
|
|
e0ba155231 | ||
|
|
d06ee4e54b | ||
|
|
e3ef6d11f3 | ||
|
|
b0a473f321 | ||
|
|
52e9840494 | ||
|
|
a3a976e5e9 | ||
|
|
64c62ad9a8 | ||
|
|
98a71eae17 | ||
|
|
3eea9f228f | ||
|
|
facd852e3f | ||
|
|
8bf4671496 | ||
|
|
612ef324bc |
@@ -2,15 +2,20 @@ name: Build Mob
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
branches: [master]
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
env:
|
||||
VCPKG_BINARY_SOURCES: ${{ vars.AZ_BLOB_VCPKG_URL != '' && format('clear;x-azblob,{0},{1},readwrite', vars.AZ_BLOB_VCPKG_URL, secrets.AZ_BLOB_SAS) || '' }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- name: Build Mob
|
||||
shell: pwsh
|
||||
run: ./bootstrap.ps1 -Verbose
|
||||
run: |
|
||||
$env:VCPKG_ROOT = $env:VCPKG_INSTALLATION_ROOT
|
||||
./bootstrap.ps1 -Verbose
|
||||
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v6
|
||||
- name: Check format
|
||||
uses: ModOrganizer2/check-formatting-action@master
|
||||
with:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
rev: v6.0.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
exclude: '^(third-party|licenses)/.*$'
|
||||
@@ -11,7 +11,7 @@ repos:
|
||||
- id: check-case-conflict
|
||||
exclude: '^(third-party|licenses)/.*$'
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v19.1.5
|
||||
rev: v22.1.5
|
||||
hooks:
|
||||
- id: clang-format
|
||||
'types_or': [c++, c]
|
||||
|
||||
+6
-1
@@ -1,6 +1,11 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(mob)
|
||||
project(mob LANGUAGES CXX)
|
||||
|
||||
find_package(clipp CONFIG REQUIRED)
|
||||
find_package(nlohmann_json CONFIG REQUIRED)
|
||||
find_package(CURL REQUIRED)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT mob)
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"version": 6,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "vcpkg",
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"architecture": "x64",
|
||||
"binaryDir": "${sourceDir}/build/",
|
||||
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
||||
"cacheVariables": {
|
||||
"VCPKG_TARGET_TRIPLET": "x64-windows-static-md",
|
||||
"CMAKE_CONFIGURATION_TYPES": "Debug;Release;RelWithDebInfo"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "Base",
|
||||
"hidden": true,
|
||||
"nativeToolOptions": [
|
||||
"-m",
|
||||
"-noLogo",
|
||||
"-p:UseMultiToolTask=true",
|
||||
"-p:EnforceProcessCountAcrossBuilds=true"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug",
|
||||
"configurePreset": "vcpkg",
|
||||
"inherits": "Base",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "Release",
|
||||
"configurePreset": "vcpkg",
|
||||
"inherits": "Base",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "RelWithDebInfo",
|
||||
"configurePreset": "vcpkg",
|
||||
"inherits": "Base",
|
||||
"configuration": "RelWithDebInfo"
|
||||
}
|
||||
]
|
||||
}
|
||||
+6
-31
@@ -11,41 +11,16 @@ if (!$root) {
|
||||
$root = "."
|
||||
}
|
||||
|
||||
$output = if ($Verbose) { "Out-Default" } else { "Out-Null" }
|
||||
$logLevel = if ($Verbose) { "STATUS" } else { "ERROR" }
|
||||
|
||||
cmake -B $root/build -G "Visual Studio 17 2022" $root | & $output
|
||||
cmake --preset vcpkg --log-level=$logLevel
|
||||
|
||||
$installationPath = & $root\third-party\bin\vswhere.exe -products * -nologo -prerelease -latest -property installationPath
|
||||
if (! $?) {
|
||||
Write-Error "vswhere returned $LastExitCode"
|
||||
exit $LastExitCode
|
||||
if ($Verbose) {
|
||||
cmake --build --preset $Config --verbose
|
||||
} else {
|
||||
cmake --build --preset $Config
|
||||
}
|
||||
|
||||
if (! $installationPath) {
|
||||
Write-Error "Empty installation path"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$opts = ""
|
||||
$opts += " $root\build\mob.sln"
|
||||
$opts += " -m"
|
||||
$opts += " -p:Configuration=${Config}"
|
||||
$opts += " -noLogo"
|
||||
$opts += " -p:UseMultiToolTask=true"
|
||||
$opts += " -p:EnforceProcessCountAcrossBuilds=true"
|
||||
|
||||
if (!$Verbose) {
|
||||
$opts += " -clp:ErrorsOnly;Verbosity=minimal"
|
||||
}
|
||||
|
||||
$vsDevCmd = "$installationPath\Common7\Tools\VsDevCmd.bat"
|
||||
if (!(Test-Path "$vsDevCmd")) {
|
||||
Write-Error "VdDevCmd.bat not found at $vsDevCmd"
|
||||
exit 1
|
||||
}
|
||||
|
||||
& "${env:COMSPEC}" /c "`"$vsDevCmd`" -no_logo -arch=amd64 -host_arch=amd64 && msbuild $opts"
|
||||
|
||||
if (! $?) {
|
||||
Write-Error "Build failed"
|
||||
exit $LastExitCode
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
||||
"name": "zlib",
|
||||
"version-string": "zlib-ng overlay",
|
||||
"dependencies": [
|
||||
"zlib-ng"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
|
||||
set(ZLIB_COMPAT ON)
|
||||
set(nlohmann-json_IMPLICIT_CONVERSIONS OFF)
|
||||
+3
-3
@@ -3,7 +3,7 @@
|
||||
License for use and distribution
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
7-Zip Copyright (C) 1999-2024 Igor Pavlov.
|
||||
7-Zip Copyright (C) 1999-2026 Igor Pavlov.
|
||||
|
||||
The licenses for files are:
|
||||
|
||||
@@ -58,7 +58,7 @@ BSD 3-clause License in 7-Zip code
|
||||
|
||||
Copyright (c) 2015-2016, Apple Inc. All rights reserved.
|
||||
Copyright (c) Facebook, Inc. All rights reserved.
|
||||
Copyright (c) 2023-2024 Igor Pavlov.
|
||||
Copyright (c) 2023-2026 Igor Pavlov.
|
||||
|
||||
Text of the "BSD 3-clause License"
|
||||
----------------------------------
|
||||
@@ -102,7 +102,7 @@ BSD 2-clause License in 7-Zip code
|
||||
XXH64 code in 7-Zip was derived from the original XXH64 code developed by Yann Collet.
|
||||
|
||||
Copyright (c) 2012-2021 Yann Collet.
|
||||
Copyright (c) 2023-2024 Igor Pavlov.
|
||||
Copyright (c) 2023-2026 Igor Pavlov.
|
||||
|
||||
Text of the "BSD 2-clause License"
|
||||
----------------------------------
|
||||
|
||||
@@ -1,177 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
https://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
+2
-4
@@ -83,10 +83,8 @@ grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
|
||||
analyze, test, perform and/or display publicly, prepare derivative works,
|
||||
distribute, and otherwise use Python alone or in any derivative version,
|
||||
provided, however, that PSF's License Agreement and PSF's notice of copyright,
|
||||
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Python Software Foundation;
|
||||
All Rights Reserved" are retained in Python alone or in any derivative version
|
||||
prepared by Licensee.
|
||||
i.e., "Copyright (c) 2001-2024 Python Software Foundation; All Rights Reserved"
|
||||
are retained in Python alone or in any derivative version prepared by Licensee.
|
||||
|
||||
3. In the event Licensee prepares a derivative work that is based on
|
||||
or incorporates Python or any part thereof, and wants to make
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
Copyright 2024 Phil Thompson <phil@riverbankcomputing.com>
|
||||
Copyright 2025 Phil Thompson <phil@riverbankcomputing.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
@@ -23,4 +23,3 @@ 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://raw.githubusercontent.com/fmtlib/fmt/master/LICENSE
|
||||
|
||||
|
||||
@@ -90,8 +90,8 @@ vs = 17
|
||||
vs_year = 2022
|
||||
vs_toolset = 14.3
|
||||
sdk = 10.0.26100.0
|
||||
pyqt = 6.7.1
|
||||
qt = 6.7.3
|
||||
pyqt = 6.11.0
|
||||
qt = 6.11.1
|
||||
qt_vs = 2022
|
||||
usvfs = master
|
||||
explorerpp = 1.4.0
|
||||
|
||||
@@ -33,6 +33,7 @@ check the [ModOrganizer2 Wiki](https://github.com/ModOrganizer2/modorganizer/wik
|
||||
```powershell
|
||||
git clone https://github.com/ModOrganizer2/mob
|
||||
cd mob
|
||||
$env:VCPKG_ROOT = "C:\path\to\vcpkg"
|
||||
./bootstrap
|
||||
mob -d c:\somewhere build
|
||||
```
|
||||
@@ -51,6 +52,21 @@ installing Qt extremely quick and painless, and doesn't require a login.
|
||||
Check the [documentation](https://aqtinstall.readthedocs.io/en/latest/installation.html)
|
||||
to install **aqt** itself.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> As of version 3.3.0, **aqt** is unable to install Qt version 6.11.0 on the
|
||||
> `win64_msvc2022_64` target architecture due to a non-standard download URL (see:
|
||||
> miurahr/aqtinstall#919). The [Holt59/aqtinstall fork](https://github.com/Holt59/aqtinstall)
|
||||
> provides a workaround for this issue and can be installed using the following command
|
||||
> (requires Python 3.9 or above):
|
||||
> ```powershell
|
||||
> pip install git+https://github.com/Holt59/aqtinstall.git#egg=aqtinstall
|
||||
> ```
|
||||
> If you already installed **aqt** before, you first need to uninstall it before
|
||||
> installing the fork:
|
||||
> ```powershell
|
||||
> pip uninstall aqtinstall
|
||||
> ```
|
||||
|
||||
When using **aqt**, you can choose which modules to install but we recommend installing
|
||||
all of them in case of changes.
|
||||
|
||||
@@ -62,7 +78,7 @@ aqt install-qt --outputdir "C:\Qt" windows desktop ${QT_VERSION} win64_msvc2022_
|
||||
|
||||
#### Manual installation
|
||||
|
||||
- Install Qt ([Installer](https://download.qt.io/official_releases/online_installers/qt-unified-windows-x64-online.exe)) and select these components:
|
||||
- Install Qt ([Installer](https://download.qt.io/official_releases/online_installers/qt-online-installer-windows-x64-online.exe)) and select these components:
|
||||
- MSVC 2022 64-bit
|
||||
- Additional Libraries:
|
||||
- Qt WebEngine (display nexus pages)
|
||||
@@ -71,6 +87,7 @@ aqt install-qt --outputdir "C:\Qt" windows desktop ${QT_VERSION} win64_msvc2022_
|
||||
- Qt Serial Port (required by Qt Core)
|
||||
- Qt WebChannel (required by QtWebEngine)
|
||||
- Qt WebSockets (Nexus api/download)
|
||||
- Qt TaskTree (required by Qt Core)
|
||||
- Optional:
|
||||
- Qt Source Files
|
||||
- Qt Debug Files
|
||||
@@ -93,15 +110,32 @@ aqt install-qt --outputdir "C:\Qt" windows desktop ${QT_VERSION} win64_msvc2022_
|
||||
- Git for Windows (Skip if you have this already installed outside of the VS installer)
|
||||
- CMake tools for Windows (Skip if you have this already installed outside of the VS installer)
|
||||
|
||||
### vcpkg
|
||||
|
||||
`mob` now uses **vcpkg** to manage its third-party dependencies (like libcurl).
|
||||
|
||||
1. **Install vcpkg**: If you don't have it, follow the [official instructions](https://learn.microsoft.com/en-us/vcpkg/get_started/get-started).
|
||||
2. **Set Environment Variable**: `mob` requires the `VCPKG_ROOT` environment variable to locate the toolchain.
|
||||
|
||||
```powershell
|
||||
$env:VCPKG_ROOT = "C:\path\to\vcpkg"
|
||||
$env:PATH = "$env:VCPKG_ROOT;$env:PATH"
|
||||
```
|
||||
|
||||
3. **Static Triplet**: `mob` builds with the `x64-windows-static-md` triplet by default to ensure a standalone executable. The `bootstrap.ps1` script handles this automatically if `VCPKG_ROOT` is set.
|
||||
|
||||
## Setting up MOB
|
||||
|
||||
```powershell
|
||||
mkdir C:\dev
|
||||
cd C:\dev
|
||||
|
||||
# close this repository
|
||||
# clone this repository
|
||||
git clone https://github.com/ModOrganizer2/mob
|
||||
|
||||
# set vcpkg path, or use `vcpkg integrate install` instead
|
||||
$env:VCPKG_ROOT = "C:\path\to\your\vcpkg"
|
||||
|
||||
# build mob itself - this will create mob.exe in the current directory
|
||||
./bootstrap.ps1
|
||||
|
||||
@@ -118,7 +152,7 @@ The Visual Studio solution for Mod Organizer itself is `build\modorganizer_super
|
||||
`mob` has two ways of setting options: from INI files, the `MOBINI` environment
|
||||
variable, or from the command line.
|
||||
|
||||
### OVerride options using INI files
|
||||
### Override options using INI files
|
||||
|
||||
`mob` builds a list of available INI files in order of priority. Higher numbers
|
||||
override lower numbers:
|
||||
@@ -239,7 +273,7 @@ The versions for all the tasks.
|
||||
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\6.7.3\msvc2022_64\`. The other path `qt_bin` will be derived from it, it's just `$qt_install/bin/`.
|
||||
It's typically something like `C:\Qt\6.11.0\msvc2022_64\`. The other path `qt_bin` will be derived from it, it's just `$qt_install/bin/`.
|
||||
|
||||
## Command line
|
||||
|
||||
|
||||
+14
-18
@@ -1,22 +1,18 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
file(GLOB_RECURSE source_files *.cpp)
|
||||
file(GLOB_RECURSE header_files *.h)
|
||||
file(GLOB_RECURSE source_files CONFIGURE_DEPENDS "*.cpp")
|
||||
file(GLOB_RECURSE header_files CONFIGURE_DEPENDS "*.h")
|
||||
|
||||
add_executable(mob ${source_files} ${header_files})
|
||||
set_target_properties(mob PROPERTIES CXX_STANDARD 20)
|
||||
|
||||
target_compile_definitions(mob PUBLIC NOMINMAX)
|
||||
target_compile_options(mob PUBLIC "/MT")
|
||||
target_include_directories(mob PUBLIC ${CMAKE_SOURCE_DIR}/third-party/include)
|
||||
target_link_libraries(mob PUBLIC
|
||||
wsock32 ws2_32 crypt32 wldap32 dbghelp shlwapi version
|
||||
optimized ${CMAKE_SOURCE_DIR}/third-party/lib/libcurl.lib
|
||||
debug ${CMAKE_SOURCE_DIR}/third-party/lib/libcurl-d.lib
|
||||
optimized ${CMAKE_SOURCE_DIR}/third-party/lib/zlib.lib
|
||||
debug ${CMAKE_SOURCE_DIR}/third-party/lib/zlibd.lib)
|
||||
target_compile_features(mob PRIVATE cxx_std_20)
|
||||
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PREFIX src
|
||||
FILES ${source_files} ${header_files})
|
||||
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT mob)
|
||||
target_compile_definitions(
|
||||
mob PRIVATE _WIN32_WINNT=0x0A00 NTDDI_VERSION=0x0A000007 WIN32_LEAN_AND_MEAN
|
||||
NOMINMAX NOCOMM)
|
||||
|
||||
target_link_libraries(mob PRIVATE clipp::clipp nlohmann_json::nlohmann_json
|
||||
CURL::libcurl dbghelp shlwapi version)
|
||||
|
||||
source_group(
|
||||
TREE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PREFIX src
|
||||
FILES ${source_files} ${header_files})
|
||||
|
||||
+6
-5
@@ -236,7 +236,7 @@ namespace mob {
|
||||
|
||||
for (auto&& item : json["items"]) {
|
||||
// ex: https://api.github.com/repos/ModOrganizer2/modorganizer-Installer
|
||||
const std::string url = item["repository_url"];
|
||||
const std::string url = item["repository_url"].get<std::string>();
|
||||
|
||||
const auto last_slash = url.find_last_of("/");
|
||||
if (last_slash == std::string::npos) {
|
||||
@@ -246,7 +246,7 @@ namespace mob {
|
||||
|
||||
const auto repo = url.substr(last_slash + 1);
|
||||
|
||||
pr_info info = {repo, author, branch, item["title"],
|
||||
pr_info info = {repo, author, branch, item["title"].get<std::string>(),
|
||||
std::to_string(item["number"].get<int>())};
|
||||
|
||||
if (!repos.emplace(repo, info).second) {
|
||||
@@ -287,9 +287,10 @@ namespace mob {
|
||||
const auto output = dl.steal_output();
|
||||
json = nlohmann::json::parse(output);
|
||||
|
||||
const std::string repo = json["head"]["repo"]["name"];
|
||||
const std::string author = json["head"]["repo"]["user"]["login"];
|
||||
const std::string branch = json["head"]["ref"];
|
||||
const std::string repo = json["head"]["repo"]["name"].get<std::string>();
|
||||
const std::string author =
|
||||
json["head"]["repo"]["user"]["login"].get<std::string>();
|
||||
const std::string branch = json["head"]["ref"].get<std::string>();
|
||||
|
||||
return {repo, author, branch};
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
// global warnings
|
||||
#pragma warning(disable : 4464) // relative include path
|
||||
#pragma warning(disable : 4820) // padding added
|
||||
@@ -62,10 +64,12 @@
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#include <Shlobj.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include <dbghelp.h>
|
||||
#include <fcntl.h>
|
||||
#include <imagehlp.h>
|
||||
#include <io.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include <clipp.h>
|
||||
|
||||
Vendored
BIN
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user