Author SHA1 Message Date
Mikaël Capelle c9f527b1c8 Remove option to use USVFS prebuilt. 2024-06-02 16:34:25 +02:00
Twinki 27483d6ddc Updated README for 6.7.0 (#134)
* Updated README for 6.7.0
2024-05-27 20:51:48 +02:00
Mikaël Capelle 73d7d3dd2b Use MO2 formatting action. (#133)
* Use MO2 formatting action.
* Fix format for clang-format 17.
2024-05-26 10:26:44 +02:00
4 changed files with 16 additions and 161 deletions
+1 -2
View File
@@ -89,7 +89,6 @@ lz4 = true
openssl = true
pyqt = true
python = true
usvfs = false
[versions]
vs = 17
@@ -117,7 +116,7 @@ qt = 6.7.0
qt_vs = 2019
zlib = v1.3.1
libbsarch = 0.0.9
usvfs = qt6
usvfs = master
explorerpp = 1.4.0
ss_paper_lad_6788 = 7.2
+3 -2
View File
@@ -52,11 +52,11 @@
#### Using aqt
- Open a terminal with administrative rights, and run
```powershell
aqt install-qt --outputdir "C:\Qt" windows desktop 6.5.0 win64_msvc2019_64 -m qtwebengine qtimageformats qtpositioning qtserialport qtwebchannel qtwebsockets
aqt install-qt --outputdir "C:\Qt" windows desktop 6.7.0 win64_msvc2019_64 -m qtwebengine qtimageformats qtpositioning qtserialport qtwebchannel qtwebsockets
```
### Qt - Manual installation
- Install Qt 6.5.0 ([Installer](https://download.qt.io/official_releases/online_installers/qt-unified-windows-x64-online.exe)) and select these components:
- Install Qt 6.7.0 ([Installer](https://download.qt.io/official_releases/online_installers/qt-unified-windows-x64-online.exe)) and select these components:
- MSVC 2019 64-bit
- Additional Libraries:
- Qt WebEngine (display nexus pages)
@@ -91,6 +91,7 @@ aqt install-qt --outputdir "C:\Qt" windows desktop 6.5.0 win64_msvc2019_64 -m qt
mkdir C:\dev
cd C:\dev
git clone https://github.com/ModOrganizer2/mob
./bootstrap.ps1
mob -d C:\dev\modorganizer build
```
- Once `mob` is finished, everything will be in `C:\dev\modorganizer`. Mod Organizer can be run from `install\bin\ModOrganizer.exe`. The Visual Studio solution for Mod Organizer itself is `build\modorganizer_super\modorganizer\vsbuild\organizer.sln`.
-11
View File
@@ -646,21 +646,10 @@ namespace mob::tasks {
void do_build_and_install() override;
private:
void fetch_prebuilt();
void fetch_from_source();
void build_and_install_prebuilt();
void build_and_install_from_source();
void download_from_appveyor(arch a);
void copy_prebuilt(arch a);
msbuild create_msbuild_tool(arch a, msbuild::ops o = msbuild::build) const;
std::vector<std::shared_ptr<downloader>>
create_appveyor_downloaders(arch a,
downloader::ops o = downloader::download) const;
std::string prebuilt_directory_name(arch a) const;
};
class zlib : public basic_task<zlib> {
+12 -146
View File
@@ -22,7 +22,7 @@ namespace mob::tasks {
bool usvfs::prebuilt()
{
return conf().prebuilt().get<bool>("usvfs");
return false;
}
fs::path usvfs::source_path()
@@ -32,68 +32,29 @@ namespace mob::tasks {
void usvfs::do_clean(clean c)
{
if (prebuilt()) {
if (is_set(c, clean::redownload)) {
// the `downloader` class knows how to delete its own files, so
// create the same downloaders and ask them to clean
// delete the whole directory
if (is_set(c, clean::reclone)) {
git_wrap::delete_directory(cx(), source_path());
const auto x86_dls =
create_appveyor_downloaders(arch::x86, downloader::clean);
const auto x64_dls =
create_appveyor_downloaders(arch::x64, downloader::clean);
for (auto dl : x86_dls)
run_tool(*dl);
for (auto dl : x64_dls)
run_tool(*dl);
}
// nothing more to do
return;
}
else {
// delete the whole directory
if (is_set(c, clean::reclone)) {
git_wrap::delete_directory(cx(), source_path());
// nothing more to do
return;
}
if (is_set(c, clean::rebuild)) {
// msbuild clean
run_tool(create_msbuild_tool(arch::x86, msbuild::clean));
run_tool(create_msbuild_tool(arch::x64, msbuild::clean));
}
if (is_set(c, clean::rebuild)) {
// msbuild clean
run_tool(create_msbuild_tool(arch::x86, msbuild::clean));
run_tool(create_msbuild_tool(arch::x64, msbuild::clean));
}
}
void usvfs::do_fetch()
{
if (prebuilt())
fetch_prebuilt();
else
fetch_from_source();
fetch_from_source();
}
void usvfs::do_build_and_install()
{
if (prebuilt())
build_and_install_prebuilt();
else
build_and_install_from_source();
}
void usvfs::fetch_prebuilt()
{
fetch_from_source();
download_from_appveyor(arch::x64);
download_from_appveyor(arch::x86);
}
void usvfs::build_and_install_prebuilt()
{
copy_prebuilt(arch::x86);
copy_prebuilt(arch::x64);
build_and_install_from_source();
}
void usvfs::fetch_from_source()
@@ -110,41 +71,6 @@ namespace mob::tasks {
run_tool(create_msbuild_tool(arch::x64));
}
void usvfs::download_from_appveyor(arch a)
{
// create all downloaders, run them in parallel
parallel_functions v;
for (auto dl : create_appveyor_downloaders(a))
v.emplace_back("usvfs", [this, dl] {
run_tool(*dl);
});
parallel(v);
}
void usvfs::copy_prebuilt(arch a)
{
const auto path = conf().path();
const auto src = path.build() / prebuilt_directory_name(a);
// dlls and exes to install/bin/
op::copy_glob_to_dir_if_better(cx(), src / "*.dll", path.install_bin(),
op::copy_files);
op::copy_glob_to_dir_if_better(cx(), src / "*.exe", path.install_bin(),
op::copy_files);
// pdbs
op::copy_glob_to_dir_if_better(cx(), src / "*.pdb", path.install_pdbs(),
op::copy_files);
// libs
op::copy_glob_to_dir_if_better(cx(), src / "*.lib", path.install_libs(),
op::copy_files);
}
msbuild usvfs::create_msbuild_tool(arch a, msbuild::ops o) const
{
// usvfs doesn't use "Win32" for 32-bit, it uses "x86"
@@ -171,64 +97,4 @@ namespace mob::tasks {
.set("BOOST_PATH", path_to_utf8(boost::source_path()))));
}
std::vector<std::shared_ptr<downloader>>
usvfs::create_appveyor_downloaders(arch a, downloader::ops o) const
{
std::string arch_s;
switch (a) {
case arch::x86:
arch_s = "x86";
break;
case arch::x64:
arch_s = "x64";
break;
case arch::dont_care:
default:
cx().bail_out(context::generic, "bad arch");
}
// returns an appveyor downloader for the given filename that outputs into
// build/usvfs_bin[_32]/
auto make_dl = [&](std::string filename) {
const auto u = make_appveyor_artifact_url(a, "usvfs", filename);
const std::string dir = prebuilt_directory_name(a);
auto dl = std::make_shared<downloader>(o);
dl->url(u);
dl->file(conf().path().build() / dir / u.filename());
return dl;
};
std::vector<std::shared_ptr<downloader>> v;
// five downloaders for the pdbs, dlls, libs and exes
v.push_back(make_dl("lib/usvfs_" + arch_s + ".pdb"));
v.push_back(make_dl("lib/usvfs_" + arch_s + ".dll"));
v.push_back(make_dl("lib/usvfs_" + arch_s + ".lib"));
v.push_back(make_dl("bin/usvfs_proxy_" + arch_s + ".exe"));
v.push_back(make_dl("bin/usvfs_proxy_" + arch_s + ".pdb"));
return v;
}
std::string usvfs::prebuilt_directory_name(arch a) const
{
switch (a) {
case arch::x86:
return "usvfs_bin_32";
case arch::x64:
return "usvfs_bin";
case arch::dont_care:
default:
cx().bail_out(context::generic, "bad arch");
}
}
} // namespace mob::tasks