Skip to content

Commit d37061e

Browse files
Port to meson
1 parent 1fcdd68 commit d37061e

32 files changed

+168
-107
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ColumnLimit: '0'
3333
CompactNamespaces: 'false'
3434
Language: Cpp
3535
PointerAlignment: Left
36-
SortIncludes: 'false'
36+
SortIncludes: 'true'
3737
SpaceBeforeAssignmentOperators: 'true'
3838
SpaceBeforeInheritanceColon: 'false'
3939
SpaceBeforeParens: ControlStatements

.github/workflows/build.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
2-
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
31
name: Build
42

53
on: [push, pull_request]
64

75
env:
8-
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
9-
BUILD_TYPE: Release
6+
BUILD_TYPE: release
107

118
jobs:
129
build:
13-
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
14-
# You can convert this to a matrix build if you need cross-platform coverage.
15-
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
1610
runs-on: ubuntu-latest
1711

1812
steps:
@@ -25,16 +19,14 @@ jobs:
2519
- name: "Install dependencies"
2620
run: |
2721
sudo apt -y update
28-
sudo apt -y install libgtk-3-dev libalpm-dev libarchive-dev libcurl4-openssl-dev libgpgme-dev
22+
sudo apt -y install meson libgtk-3-dev libalpm-dev libarchive-dev libcurl4-openssl-dev libgpgme-dev
2923
30-
- name: Configure CMake
31-
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
32-
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
33-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
24+
- name: Configure
25+
run: meson setup build -Dtracy_enable=false -Dbuildtype=${{env.BUILD_TYPE}}
3426

3527
- name: Build
3628
# Build your program with the given configuration
37-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
29+
run: meson compile -C build
3830

3931
- name: Set Build number
4032
shell: bash
@@ -49,8 +41,10 @@ jobs:
4941
run: |
5042
mkdir artifacts
5143
cp build/pepv artifacts/
52-
cp pepv.ui artifacts/
53-
cp pepv.png artifacts/
44+
cp data/pepv.ui artifacts/
45+
cp data/pepv.desktop artifacts/
46+
cp data/icons/pepv.png artifacts/
47+
cp data/icons/sizes/* artifacts/
5448
5549
5650
- name: Upload artifacts

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.vscode
22
.idea
33

4+
subprojects/*/
5+
subprojects/*/**
46
compile_commands.json
57
build/
68
.cache

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 0 additions & 49 deletions
This file was deleted.

README.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,39 @@
1717
* No installing packages
1818
* No updating packages
1919
* Only support for `core`, `extra` and `multilib` repositories
20+
* Also supports viewing AUR/locally built packages
2021

2122
## Why?
2223
* Because i want this program only to work as a viewer, everything regarding actually messing with your system should be in your own hands with you knowing what you are doing instead of me deciding what packages stay and go blindly
2324

25+
# Installing
26+
* AUR: https://aur.archlinux.org/packages/pepv-git
27+
28+
2429
# Building
30+
## Requirements
31+
* Meson (1.1 or higher)
32+
* git
33+
## Instructions
2534
* git clone this repository
26-
* Open a terminal in the directory of the repo and run the next commands
27-
* `mkdir build && cd build`
28-
* `cmake ..`
29-
* `cmake --build . --config Release`
30-
* pepv needs the files `pepv.ui` and `pepv.png` to be somewhere it can find them together, list of paths is in order
31-
* `../pepv.ui` Only in debug build for debug purposes
32-
* `pepv.ui`
35+
* Open a terminal in the directory of the repo and run the next commands for a release build
36+
* `meson setup build -Dtracy_enable=false -Dbuildtype=release`
37+
* `meson compile -C build`
38+
* `meson install -C build` To install locally using built binary, this also includes:
39+
* Desktop entry
40+
* Icons
41+
* README.md in doc
42+
* UI file
43+
* pepv will also look for `pepv.ui` in other paths, list of paths is in order
44+
* `../data/pepv.ui` Only in debug build for debug purposes
45+
* `PREFIX "/" DATADIR "/pepv/pepv.ui"` (PREFIX and DATADIR may be set by meson options for packaging purposes)
3346
* `/usr/share/pepv/pepv.ui`
47+
* `/usr/local/share/pepv/pepv.ui`
3448
* `/app/share/pepv/pepv.ui`
3549
* `/app/share/runtime/share/pepv/pepv.ui`
3650
* `/run/host/user-share/pepv/pepv.ui`
3751
* `/run/host/share/pepv/pepv.ui`
3852

39-
* If you want you can also resize the logo to multiple resolutions and put the images in `usr/share/icons/hicolor/SIZExSIZE/apps/pepv.png` so GTK chooses the correct resolution automatically
40-
41-
# I dont know how to code but i want to use this program.
53+
# I dont know how to code but i want to use this program in a distro that doesnt have AUR.
4254
* Follow the instructions above, you dont need to understand them
43-
* If you are scared of basic computer usage then you can wait for someone to package this program in your arch-based distro and i may add it in this readme
44-
45-
# Installing
46-
* AUR: https://aur.archlinux.org/packages/pepv-git
55+
* If you are scared of basic computer usage then you can wait for someone to package this program in your distro and i may add it in this README or you can just open a new issue to ask for help
File renamed without changes.

data/icons/sizes/pepv-1024.png

74.9 KB
Loading

data/icons/sizes/pepv-128.png

8.01 KB
Loading

data/icons/sizes/pepv-16.png

1.87 KB
Loading

0 commit comments

Comments
 (0)