Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ColumnLimit: '0'
CompactNamespaces: 'false'
Language: Cpp
PointerAlignment: Left
SortIncludes: 'false'
SortIncludes: 'true'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeInheritanceColon: 'false'
SpaceBeforeParens: ControlStatements
Expand Down
24 changes: 9 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# 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.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: Build

on: [push, pull_request]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
BUILD_TYPE: release

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

steps:
Expand All @@ -25,16 +19,14 @@ jobs:
- name: "Install dependencies"
run: |
sudo apt -y update
sudo apt -y install libgtk-3-dev libalpm-dev libarchive-dev libcurl4-openssl-dev libgpgme-dev
sudo apt -y install meson libgtk-3-dev libalpm-dev libarchive-dev libcurl4-openssl-dev libgpgme-dev

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Configure
run: meson setup build -Dtracy_enable=false -Dbuildtype=${{env.BUILD_TYPE}}

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

- name: Set Build number
shell: bash
Expand All @@ -49,8 +41,10 @@ jobs:
run: |
mkdir artifacts
cp build/pepv artifacts/
cp pepv.ui artifacts/
cp pepv.png artifacts/
cp data/pepv.ui artifacts/
cp data/pepv.desktop artifacts/
cp data/icons/pepv.png artifacts/
cp data/icons/sizes/* artifacts/


- name: Upload artifacts
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.vscode
.idea

subprojects/*/
subprojects/.wraplock
subprojects/*/**
compile_commands.json
build/
.cache
Expand All @@ -9,4 +12,4 @@ build/
*.gui~
*.gui#
*.ui~
*.ui#
*.ui#
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

49 changes: 0 additions & 49 deletions CMakeLists.txt

This file was deleted.

37 changes: 23 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,39 @@
* No installing packages
* No updating packages
* Only support for `core`, `extra` and `multilib` repositories
* Also supports viewing AUR/locally built packages

## Why?
* 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

# Installing
* AUR: https://aur.archlinux.org/packages/pepv-git


# Building
## Requirements
* Meson (1.1 or higher)
* git
## Instructions
* git clone this repository
* Open a terminal in the directory of the repo and run the next commands
* `mkdir build && cd build`
* `cmake ..`
* `cmake --build . --config Release`
* pepv needs the files `pepv.ui` and `pepv.png` to be somewhere it can find them together, list of paths is in order
* `../pepv.ui` Only in debug build for debug purposes
* `pepv.ui`
* Open a terminal in the directory of the repo and run the next commands for a release build
* `meson setup build -Dtracy_enable=false -Dbuildtype=release`
* `meson compile -C build`
* `meson install -C build --skip-subprojects` To install locally using built binary, this also includes:
* Desktop entry
* Icons
* README.md in doc
* UI file
* pepv will also look for `pepv.ui` in other paths, list of paths is in order
* `../data/pepv.ui` Only in debug build for debug purposes
* `PREFIX "/" DATADIR "/pepv/pepv.ui"` (PREFIX and DATADIR may be set by meson options for packaging purposes)
* `/usr/share/pepv/pepv.ui`
* `/usr/local/share/pepv/pepv.ui`
* `/app/share/pepv/pepv.ui`
* `/app/share/runtime/share/pepv/pepv.ui`
* `/run/host/user-share/pepv/pepv.ui`
* `/run/host/share/pepv/pepv.ui`

* 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

# I dont know how to code but i want to use this program.
# I dont know how to code but i want to use this program in a distro that doesnt have AUR.
* Follow the instructions above, you dont need to understand them
* 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

# Installing
* AUR: https://aur.archlinux.org/packages/pepv-git
* 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
Binary file added data/icons/sizes/pepv-1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/sizes/pepv-128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/sizes/pepv-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/sizes/pepv-22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/sizes/pepv-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/sizes/pepv-256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/sizes/pepv-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/sizes/pepv-36.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/sizes/pepv-48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/sizes/pepv-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/sizes/pepv-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/sizes/pepv-72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/sizes/pepv-96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions data/pepv.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.0
Categories=System;
Name=pepv
Icon=pepv
Exec=pepv
Terminal=false
20 changes: 19 additions & 1 deletion pepv.ui → data/pepv.ui
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
<column type="gint64"/>
<!-- column-name repo -->
<column type="gchararray"/>
<!-- column-name requiredBy -->
<column type="gint"/>
</columns>
</object>
<object class="GtkWindow" id="window">
Expand Down Expand Up @@ -572,7 +574,7 @@
<object class="GtkTreeViewColumn" id="c3">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Num. Deps</property>
<property name="title" translatable="yes">Dependencies</property>
<property name="clickable">True</property>
<property name="reorderable">True</property>
<property name="sort-column-id">3</property>
Expand Down Expand Up @@ -648,6 +650,22 @@
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="c8">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Required By</property>
<property name="clickable">True</property>
<property name="reorderable">True</property>
<property name="sort-column-id">8</property>
<child>
<object class="GtkCellRendererText" id="cx8"/>
<attributes>
<attribute name="text">8</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
Expand Down
1 change: 0 additions & 1 deletion external/tracy
Submodule tracy deleted from c55683
68 changes: 68 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
project(
'pepv',
'c',
'cpp',
default_options: ['c_std=c18', 'cpp_std=c++20'],
meson_version: '>=1.1',
)

# TODO: Add versioning

if get_option('buildtype') == 'debug'
add_project_arguments('-DDEBUG', language: 'cpp')
endif

threads = dependency('threads')
gtk = dependency('gtk+-3.0')
libalpm = dependency('libalpm')
tracy = dependency('tracy')

message('prefix: ' + get_option('prefix'))
message('datadir: ' + get_option('datadir'))
message('buildtype: ' + get_option('buildtype'))

if get_option('tracy_enable') and get_option('buildtype') != 'debugoptimized'
warning('Profiling builds should set -- buildtype = debugoptimized')
endif

executable(
'pepv',
['src/events.cpp', 'src/main.cpp', 'src/pkgs.cpp', 'src/utils.cpp'],
dependencies: [threads, gtk, libalpm, tracy],
export_dynamic: true, # GTK needs this
cpp_args: [
'-DPROJECTNAME="' + meson.project_name() + '"',
'-DPREFIX="' + get_option('prefix') + '"',
'-DDATADIR="' + get_option('datadir') + '"',
'-Werror',
],
install: true,
)

install_data('data/pepv.ui')

install_data(
'data/pepv.desktop',
install_dir: get_option('prefix') / get_option('datadir') / 'applications',
)

install_data(
'README.md',
install_dir: get_option('prefix') / get_option('datadir') / 'doc' / meson.project_name(),
)

install_data(
'LICENSE',
rename: 'COPYING',
install_dir: get_option('prefix') / get_option('datadir') / 'licenses' / meson.project_name(),
)

# TODO: better install dir for this to make desktop and gtk icons work on debug builds/uninstalled tests
foreach size : [16, 22, 24, 32, 36, 48, 64, 72, 96, 128, 256, 512, 1024]
install_data(
'data/icons/sizes/pepv-@0@.png'.format(size),
install_dir: get_option('prefix') / get_option('datadir') / 'icons/hicolor/@0@x@0@/apps/'.format(size),
rename: meson.project_name() + '.png',
install_mode: 'rw-r--r--',
)
endforeach
1 change: 1 addition & 0 deletions meson.options
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
option('tracy_enable', type: 'boolean', value: true, description: 'Enable profiling')
Loading