Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation README #131

Merged
merged 9 commits into from
May 25, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 27 additions & 18 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,38 @@


## Quick start
```
```ps
Twinki14 marked this conversation as resolved.
Show resolved Hide resolved
> git clone https://github.com/ModOrganizer2/mob
> cd mob
> bootstrap
> mob -d c:\somewhere build
```

## Slow start
- Install Qt 6.5.1 ([Installer](https://download.qt.io/official_releases/online_installers/qt-unified-windows-x64-online.exe)) and select these components:
## Extended start

### Qt - CLI Install using [aqt](https://github.com/miurahr/aqtinstall)
- Install [Python 3.9](https://www.python.org/downloads/release/python-390/)
- Install [aqt](https://github.com/miurahr/aqtinstall), a CLI installer for Qt, this makes installing Qt extremely quick and painless, and doesn't require a login
- Open a terminal with administrative rights, and run
```ps
aqt install-qt --outputdir "C:\Qt" windows desktop 6.5.3 win64_msvc2019_64 -m qtwebengine qtimageformats qtpositioning qtserialport qtwebchannel qtwebsockets
```

### Qt - Manual installation
- Install Qt 6.5.3 ([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)
- 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 WebChannel (required by QtWebEngine)
- Qt WebSockets (Nexus api/download)
- Optional:
- Qt Source Files
- Qt Debug Files

### Visual Studio
- 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++
- Desktop .NET desktop development (needed by OMOD and FOMOD installers)
Expand All @@ -56,20 +68,17 @@
- 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)
Twinki14 marked this conversation as resolved.
Show resolved Hide resolved
- 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.
- Do:
```
mkdir C:\dev
cd C:\dev
git clone https://github.com/ModOrganizer2/mob
cd mob
bootstrap
mob -d C:\dev\modorganizer build
```

## Setting up MOB
- Start the _x64 Native Tools Command Prompt for VS 2022, as Administrator, we need this for cmake & git (not needed if you have either available in your PATH)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely shouldn't need admin permissions, and using them is more likely to introduce problems (if you've needed admin permissions, it's likely because you've previously run something with admin permissions you weren't supposed to, and that's meant a file or directory was created with admin ownership). If you're not running software that was originally written for Windows XP or earlier, running things as admin absolutely shouldn't be in your toolbox as a troubleshooting step. If you're hitting problems, the software's got a bug (or you're using it incorrectly), and giving potentially buggy software greater powers to ruin your system is like giving a toddler an uzi because they're shooting a nerf gun at things they're not supposed to - it's dangerous and there's no logical reason to expect it'd help.

I also don't particularly like the swap between a regular shell being the default and the MSVC-activated one being the default. I'm confident it's a minority of people who use the Microsoft repacks of Git for Windows and CMake that are provided by the Visual Studio installer instead of the official distributions, and it's only those people who benefit from the x64 Native Tools Command Prompt (or any of its siblings) as the regular Git and CMake installers put them on the PATH, and if you remove them, using the MSVC shell won't put them back.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I second this, there are no reasons to either use an administrator prompt, and using the VS command prompt just to get the shipped CMake / Git is a bit overkill.

Copy link
Contributor Author

@Twinki14 Twinki14 May 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visual Studio doesn't install cmake to the windows PATH when selected in the VS installer, which causes mob to outright fail when the VS x64 native tools cmd isn't used, unless CMake is installed outside of the VS installer.

I've assumed Git is the same, but I could be wrong. I agree we should be advising the use of the modern terminal, but that means re-writing a large part of the readme to switch to advising using package managers like winget or choco instead of using the VS installer to install the needed/suggested tools.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with some clarifications

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no suggestion to rely on VS for Git or CMake (except for the optional stuff) in the README. We should add git and CMake as dependencies before Qt or anything.

We do not have to advise installing tools with winget, choco, custom installer, or whatever - Just listing the required tools is enough (that also applies for my aqt comment). If someone does not manage to install git or cmake when told to, I think they're going to face some issues trying to work on MO2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really see a difference between either statements, regardless I've pushed another update to appease.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not have to advise installing tools with winget, choco, custom installer, or whatever - Just listing the required tools is enough (that also applies for my aqt comment). If someone does not manage to install git or cmake when told to, I think they're going to face some issues trying to work on MO2.

When I'm writing this kind of guide, I do tend to list the names of chocolatey packages for any dependency I mention. While I expect people following the guide to be able to install these tools, it's much less hassle to copy and paste a package name than to search for a package and check it's the same tool as the guide wants.

I don't like adding instructions for a specific package manager because it tends to make it look like you need that particular package manager, which is clearly not the case. And adding instructions for every relevant package managers out there (+ manual installation) is not something we want.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's really a matter of how it's phrased. It's perfectly possible to do it without making the package manager(s) seem like a requirement or going overboard with detail.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The true issue would be how we are going to agree on which package manager(s) should be present. 🤡

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chocolatey's the most widely used, so is a shoo-in. Scoop is less popular and generally has a less complete library, so can be skipped. WinGet has Microsoft's backing, so might be worth including. Everything else is so niche that no one will care if it's excluded.

- Pick a folder to develop MO2 in, for these steps it'll be `C:\dev`
- Execute these commands
```ps
mkdir C:\dev
cd C:\dev
git clone https://github.com/ModOrganizer2/mob
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`.


Expand Down
Loading