Update macOS build instructions & fix release artifacts (#4545)

This commit is contained in:
pajlada 2023-04-15 14:23:33 +02:00 committed by GitHub
parent bf6350ad79
commit 8fd975270a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 21 deletions

View file

@ -359,52 +359,63 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # allows for tags access
- uses: actions/download-artifact@v3
name: Windows Qt5.15.2
with:
name: chatterino-windows-x86-64-Qt-5.15.2.zip
path: release-artifacts/
- uses: actions/download-artifact@v3
name: Windows Qt5.15 symbols
with:
name: chatterino-windows-x86-64-Qt-5.15.2-symbols.pdb.7z
path: release-artifacts/
- uses: actions/download-artifact@v3
name: Windows Qt6.5.0
with:
name: chatterino-windows-x86-Qt-64-6.5.0.zip
name: chatterino-windows-x86-64-Qt-6.5.0.zip
path: release-artifacts/
- uses: actions/download-artifact@v3
name: Windows Qt6.5.0 symbols
with:
name: chatterino-windows-x86-64-Qt-6.5.0-symbols.pdb.7z
path: release-artifacts/
- uses: actions/download-artifact@v3
name: Linux Qt5.12.12 AppImage
with:
name: Chatterino-x86_64-5.12.12.AppImage
path: release-artifacts/
- uses: actions/download-artifact@v3
name: Ubuntu 20.04 Qt5.12.12 deb
with:
name: Chatterino-ubuntu-20.04-Qt-5.12.12.deb
path: release-artifacts/
- uses: actions/download-artifact@v3
name: Ubuntu 22.04 Qt5.15.2 deb
with:
name: Chatterino-ubuntu-22.04-Qt-5.15.2.deb
path: release-artifacts/
- uses: actions/download-artifact@v3
name: Ubuntu 22.04 Qt6.2.4 deb
with:
name: Chatterino-ubuntu-22.04-Qt-6.2.4.deb
path: release-artifacts/
- uses: actions/download-artifact@v3
name: macOS x86_64 Qt5.15.2 dmg
with:
name: chatterino-osx-Qt-5.15.2.dmg
path: release-artifacts/
- uses: actions/download-artifact@v3
name: macOS x86_64 Qt6.5.0 dmg
with:
name: chatterino-osx-Qt-6.5.0.dmg
path: release-artifacts/

View file

@ -1,32 +1,32 @@
# Building on macOS
#### Note - If you want to develop Chatterino 2 you might also want to install Qt Creator (make sure to install **Qt 5.12 or newer**), it is not required though and any C++ IDE (might require additional setup for cmake to find Qt libraries) or a normal text editor + running cmake from terminal should work as well
Chatterino2 is built in CI on Intel on macOS 12.
Local dev machines for testing are available on Apple Silicon on macOS 13.
#### Note - Chatterino 2 is only tested on macOS 10.14 and above - anything below that is considered unsupported. It may or may not work on earlier versions
## Installing dependencies
1. Install Xcode and Xcode Command Line Utilities
1. Start Xcode, go into Settings -> Locations, and activate your Command Line Tools
1. Install brew https://brew.sh/
1. Install the dependencies using `brew install boost openssl rapidjson cmake`
1. Install Qt5 using `brew install qt@5`
1. (_OPTIONAL_) Install [ccache](https://ccache.dev) (used to speed up compilation by using cached results from previous builds) using `brew install ccache`
1. Go into the project directory
1. Create a build folder and go into it (`mkdir build && cd build`)
1. Compile using `cmake .. && make`
1. Install [Homebrew](https://brew.sh/#install)
We use this for dependency management on macOS
1. Install all dependencies:
`brew install boost openssl@1.1 rapidjson cmake qt@5`
If the Project does not build at this point, you might need to add additional Paths/Libs, because brew does not install openssl and boost in the common path. You can get their path using
## Building
`brew info openssl`
`brew info boost`
### Building from terminal
If brew doesn't link OpenSSL properly then you should be able to link it yourself by using these two commands:
1. Open a terminal
1. Go to the project directory where you cloned Chatterino2 & its submodules
1. Create a build directory and go into it:
`mkdir build && cd build`
1. Run cmake:
`cmake -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/qt@5 -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@1.1 ..`
1. Build:
`make`
- `ln -s /usr/local/opt/openssl/lib/* /usr/local/lib`
- `ln -s /usr/local/opt/openssl/include/openssl /usr/local/include/openssl`
Your binary can now be found under bin/chatterino.app/Contents/MacOS/chatterino directory
The lines which you need to add to your project file should look similar to this
### Other building methods
```
INCLUDEPATH += /usr/local/opt/openssl/include
LIBS += -L/usr/local/opt/openssl/lib
```
You can achieve similar results by using an IDE like Qt Creator, although this is undocumented but if you know the IDE you should have no problems applying the terminal instructions to your IDE.