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 Windows build instructions & contributing docs #4858

Merged
merged 34 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f3d9167
Update BUILDING_ON_WINDOWS.md
GongBingWong Oct 2, 2023
7b4f0e4
Update CONTRIBUTING.md
GongBingWong Oct 2, 2023
b34f557
Remove blank line
GongBingWong Oct 2, 2023
bc2e6f3
Better wording
GongBingWong Oct 2, 2023
08786e3
Update CHANGELOG.md
GongBingWong Oct 2, 2023
02b32fa
More accurate Qt information
GongBingWong Oct 2, 2023
6f84874
Removed unnecessary information
GongBingWong Oct 2, 2023
a113396
No changelog needed instead of updating CHANGELOG.md
GongBingWong Oct 2, 2023
295a9fa
Update CONTRIBUTING.md
GongBingWong Oct 2, 2023
c807430
Update step 4 of Qt PATH guide
GongBingWong Oct 2, 2023
9f56537
Update BUILDING_ON_WINDOWS.md
GongBingWong Oct 2, 2023
d6cf5d7
Remove unnecessary instruction
GongBingWong Oct 2, 2023
c351ea5
Grammatical fix
GongBingWong Oct 2, 2023
4bdd861
Clearer Qt PATH tutorial title
GongBingWong Oct 2, 2023
a59803b
Specify Windows start menu
GongBingWong Oct 2, 2023
94c7c34
Clearer and more concise step 2 PATH instruction
GongBingWong Oct 2, 2023
764be69
More concise step 3 PATH instruction
GongBingWong Oct 2, 2023
4ff4f32
Specify what c2 is
GongBingWong Oct 2, 2023
eb60291
Remove unnecessary 'cd ..'
GongBingWong Oct 2, 2023
111364c
Merge branch 'Chatterino:master' into betterdocs
GongBingWong Oct 9, 2023
e55bff8
Omit changelog guideline
GongBingWong Oct 9, 2023
71316f7
Update Qt version
GongBingWong Oct 9, 2023
63de1aa
run formatter
pajlada Oct 9, 2023
0fa996b
Use `C:\Users\example` to be consistent with the rest of the doc
pajlada Oct 9, 2023
a09150e
Udpate conan 2 installation hinnt to mention that it's only relevant if
pajlada Oct 9, 2023
79eba20
Update the second-to-last step with info that this is the python scripts
pajlada Oct 9, 2023
433f5cd
Update BUILDING_ON_WINDOWS.md
pajlada Oct 9, 2023
cb209ec
Update BUILDING_ON_WINDOWS.md
pajlada Oct 9, 2023
5f1a46c
replace 5.15.2 with 6.5.3, and Qt5 with Qt6
pajlada Oct 9, 2023
87bc2ac
add additional qt6 modules
pajlada Oct 9, 2023
ae11be5
Update BUILDING_ON_WINDOWS.md
pajlada Oct 9, 2023
891ee76
Update BUILDING_ON_WINDOWS.md
pajlada Oct 9, 2023
5f8f297
Update BUILDING_ON_WINDOWS.md
pajlada Oct 9, 2023
c0b8d23
Update BUILDING_ON_WINDOWS.md
pajlada Oct 9, 2023
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
27 changes: 26 additions & 1 deletion BUILDING_ON_WINDOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Notes:
1. Visit the [Qt Open Source Page](https://www.qt.io/download-open-source).
2. Scroll down to the bottom
3. Then select "Download the Qt Online Installer"
4. Within the installer, Qt will prompt you to create an account to access Qt downloads.

Notes:

Expand All @@ -37,6 +38,16 @@ Notes:
Note: This installation will take about 2 GB of disk space.

Once Qt is done installing, make sure you add its bin directory to your `PATH` (e.g. `C:\Qt\5.15.2\msvc2019_64\bin`)
<details>
<summary>How to add Qt to PATH</summary>

1. Type "path" in the Windows start menu and click `Edit the system environment variables`.
2. Click the `Environment Variables...` button bottom right.
3. In the `System variables` section, scroll down until you find `Path` and double click it.
pajlada marked this conversation as resolved.
Show resolved Hide resolved
4. Click the 'New' button top right and paste in the file path for your Qt installation (e.g. `C:\Qt\5.15.2\msvc2019_64\bin` by default).
GongBingWong marked this conversation as resolved.
Show resolved Hide resolved
5. Click `Ok`

</details>

### Advanced dependencies

Expand Down Expand Up @@ -82,19 +93,33 @@ Note: This installation will take about 200 MB of disk space.

Install [conan 2](https://conan.io/downloads.html) and make sure it's in your `PATH` (default setting).

<details>
<summary>How to add conan 2 to PATH</summary>
Copy link
Contributor

Choose a reason for hiding this comment

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

This adds python's scripts to PATH. Maybe this should read something like "Installing with pip" and include the pip install. Furthermore, I thought default python installations would add themselves to PATH by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, maybe its pip specific. I don't know if default python installations add themselves to PATH by default, I think I manually added conan 2 to PATH (don't remember if it was there before).

I'm probably just going to commit Felanbird's suggestion to remove it after I ask about something.

The reason I haven't committed it yet because I'm not sure if I should resolve a conversation (by doing a commit) when I still have a question about a related topic.


1. Type "path" in the start menu and click on the "Edit the system environment variables" result that shows up (this should open up the 'System Properties' window with the 'Advanced' tab selected).
2. Press on the "Environment Variables..." button near the bottom right of the 'System Properties' window to open up the 'Environment Variables' window.
3. Within 'Environment Variables', look at the bottom half of the window where it lists 'System variables' and double click on the variable named 'Path' to open up the 'Edit environment variable' window.
4. Press the 'New' button near the top right to create a new environment variable.
pajlada marked this conversation as resolved.
Show resolved Hide resolved
5. Open up your terminal with the Visual Studio environment variables (e.g. `x64 Native Tools Command Prompt for VS 2022`) and type "where conan" to find the file path (the folder that contains the conan.exe) to add.
pajlada marked this conversation as resolved.
Show resolved Hide resolved
6. Add conan 2's file path (e.g. `C:\Users\willg\AppData\Roaming\Python\Python311\Scripts`) to the blank text box that shows up.
7. Press the "OK" button.
pajlada marked this conversation as resolved.
Show resolved Hide resolved

</details>

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<details>
<summary>How to add conan 2 to PATH</summary>
1. Type "path" in the start menu and click on the "Edit the system environment variables" result that shows up (this should open up the 'System Properties' window with the 'Advanced' tab selected).
2. Press on the "Environment Variables..." button near the bottom right of the 'System Properties' window to open up the 'Environment Variables' window.
3. Within 'Environment Variables', look at the bottom half of the window where it lists 'System variables' and double click on the variable named 'Path' to open up the 'Edit environment variable' window.
4. Press the 'New' button near the top right to create a new environment variable.
5. Open up your terminal with the Visual Studio environment variables (e.g. `x64 Native Tools Command Prompt for VS 2022`) and type "where conan" to find the file path (the folder that contains the conan.exe) to add.
6. Add conan 2's file path (e.g. `C:\Users\willg\AppData\Roaming\Python\Python311\Scripts`) to the blank text box that shows up.
7. Press the "OK" button.
</details>

As noted by the instruction above, the default settings automatically setup PATH to recognize conan.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you're right. I didn't even notice the "default setting". xD

Also do you know if the 'where conan' command only works if conan 2 is in PATH?

If so, maybe it could be used to verify conan 2 is in PATH.

Then in a terminal, configure conan to use `NMake Makefiles` as its generator:

1. Generate a new profile
`conan profile detect`

#### Build

Open up your terminal with the Visual Studio environment variables (e.g. `x64 Native Tools Command Prompt for VS 2022`), cd to the cloned c2 directory and run the following commands:
Open up your terminal with the Visual Studio environment variables (e.g. `x64 Native Tools Command Prompt for VS 2022`), cd to the cloned chatterino2 directory and run the following commands:

1. `mkdir build`
1. `cd build`
1. `conan install .. -s build_type=Release -c tools.cmake.cmaketoolchain:generator="NMake Makefiles" --build=missing --output-folder=.`
1. `cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_PREFIX_PATH="C:\Qt\5.15.2\msvc2019_64" ..`
1. `cd ..`
GongBingWong marked this conversation as resolved.
Show resolved Hide resolved
GongBingWong marked this conversation as resolved.
Show resolved Hide resolved
1. `nmake`

To build a debug build, you'll also need to add the `-s compiler.runtime_type=Debug` flag to the `conan install` invocation. See [this StackOverflow post](https://stackoverflow.com/questions/59828611/windeployqt-doesnt-deploy-qwindowsd-dll-for-a-debug-application/75607313#75607313)
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This is a set of guidelines for contributing to Chatterino. The goal is to teach programmers without a C++ background (java/python/etc.), people who haven't used Qt, or otherwise have different experience, the idioms of the codebase. Thus we will focus on those which are different from those other environments. There are extra guidelines available [here](https://hackmd.io/@fourtf/chatterino-pendantic-guidelines) but they are considered as extras and not as important.

### General (non-code related) guidelines for contributing to Chatterino
- Make a specific branch for your pull request instead of using the master, main, or mainline branch. This will prevent future problems with updating your branch after your PR is merged.
- Update the CHANGELOG.md file to include bug fixes and features that you implemented. The number behind the changelog entry indicates the number of the pull request.
Copy link
Collaborator

Choose a reason for hiding this comment

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

While it is true the changelog check will cry without a changelog, I don't think first time contributors should feel like they need to come up with a changelog entry, where applicable we'll just write one for you if one isn't included.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah okay, should that info be mentioned then?

Copy link
Member

Choose a reason for hiding this comment

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

I'd say just omit the changelog stuff, the branch thing is handy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok.


# Tooling

## Formatting
Expand Down
Loading