Skip to content

Commit

Permalink
Merge branch 'macos-compile'
Browse files Browse the repository at this point in the history
  • Loading branch information
pentix committed Dec 25, 2020
2 parents 64a9613 + 138eafe commit 3032e58
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 8 deletions.
41 changes: 34 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
### A Qt-based Graphical User Interface for systemd's journalctl command


## About QJournalctl
## About QJournalctl
systemd provides `journalctl` to display and analyze its journal. Think of
the journal as a giant log file for the whole system. Different programs
(like e.g. different software/services on your system, but also the kernel) write their log entries into systemd's
Expand All @@ -24,19 +24,19 @@ Maybe you want to checkout the [Changelog](https://github.com/pentix/qjournalctl
## QJournalctl for Linux

### ArchLinux and Manjaro
QJournalctl is available in the community repository for the **Archlinux** and **Manjaro** Distributions:
QJournalctl is available in the community repository of **Archlinux** and **Manjaro**:

```bash
sudo pacman -S qjournalctl
```
For other distributions, it is at the moment required to build it from sources.

### Build Dependencies
### General build dependencies
* Make sure your compiler supports (at least) C++11 (E.g. `g++` ≥ 4.8.1, `clang` ≥ 3.3)
* QJournalctl relies on Qt5, please ensure to have the Qt5 development libaries (E.g. `qtbase5-dev` for Debian/Ubuntu) installed, when compiling!
* QJournalctl relies on Qt5, please ensure to have the Qt5 development libaries installed, when compiling! (E.g. `qtbase5-dev` for Debian/Ubuntu; on macOS these come with the `qt` Homebrew tap)
* To access remote hosts QJournalctl heavily relies on `libssh`[0.8.7](https://www.libssh.org/files/0.8/)

### Build Dependencies (Old Distros)
### How to install build dependencies (on Debian-based distributions)
Your distribution's supplied version of `libssh` might be too old for a successful build. You need
to build and install libssh yourself (< 2 minutes!)

Expand All @@ -52,11 +52,38 @@ to build and install libssh yourself (< 2 minutes!)

`cd ../..`

### How to build and install QJournalctl
1. Download the source code and extract it (or use `git clone https://github.com/pentix/qjournalctl.git`)
2. Run `./autogen.sh`
3. Run `make -j$(nproc)` to compile qjournalctl
4. Run `sudo make install`

### Building QJournalctl
1. Download the source code and extract it


## QJournalctl for macOS
### Build dependencies
To handle dependencies of macOS, we're going to use [homebrew](https://brew.sh/).
`brew install qt libssh`
As indicated in the caveats:

````
qt is keg-only, which means it was not symlinked into /usr/local,
because Qt 5 has CMake issues when linked.
If you need to have qt first in your PATH run:
echo 'export PATH="/usr/local/opt/qt/bin:$PATH"' >> /Users/user_name/.bash_profile
````

before building QJournalctl you'll indeed need to run:
`export PATH="/usr/local/opt/qt/bin:$PATH"`
(no need to make it persistent by using .bash_profile)


### How to build and install QJournalctl
1. Download the source code and extract it (or use `git clone https://github.com/pentix/qjournalctl.git`)
2. Run `./autogen.sh`
3. Run `make -j$(nproc)` to compile qjournalctl
4. Run `sudo make install`


## QJournalctl for Windows
Expand Down
7 changes: 6 additions & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@ if [ ! -f "$QMAKE_BIN" ]; then
exit 1
fi

QT_SELECT=qt5 $QMAKE_BIN qjournalctl.pro -r -spec linux-g++ CONFIG+=release
QMAKE_SPEC="linux-g++"
if [ "$(uname -s)" = "Darwin" ]; then
QMAKE_SPEC="macx-clang"
fi

QT_SELECT=qt5 $QMAKE_BIN qjournalctl.pro -r -spec $QMAKE_SPEC CONFIG+=release

0 comments on commit 3032e58

Please sign in to comment.