Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
237d565
cmake: modernise build — C17/C++17, drop Qt4/SDL1, compile_commands
mkoloberdin Apr 12, 2026
8299bbd
cleanup: remove dead Qt4/ISLEGACYGL and SDL1 code paths
mkoloberdin Apr 12, 2026
ba8b57a
cmake: consolidate add_executable calls
mkoloberdin Apr 12, 2026
ffbd195
cmake: unify Qt5/Qt6 version blocks with find_package(QT NAMES ...)
mkoloberdin Apr 12, 2026
224a367
cmake: declare options, remove dead IBM/USEIBM block
mkoloberdin Apr 12, 2026
fea11ab
xdg: build plumbing and vendored xdgpp library
mkoloberdin Apr 11, 2026
3efc030
xdg: XDG resource framework primitives in xcore.h
mkoloberdin Apr 11, 2026
0392ad6
xdg: migrate conf.path to fs::path and route all call sites through X…
mkoloberdin Apr 11, 2026
bb5dd39
xdg: add resource-aware xTreeBox picker and remove legacy bridge
mkoloberdin Apr 11, 2026
a355302
xdg: parametrize resource layout with Config/Data base selector
mkoloberdin Apr 18, 2026
7860a6f
xdg: add ResourceKind::Keymap and route keymap I/O through it
mkoloberdin Apr 18, 2026
31d649c
xdg: add ResourceKind::Gamepad and route pad map I/O through it
mkoloberdin Apr 18, 2026
0a136fe
xdg cleanup: drop dead font field, stale comments, unused QDir includes
mkoloberdin Apr 18, 2026
b7c1bf4
xdg: factor conf_init with xdg helpers, moveAcrossDevices, unified la…
mkoloberdin Apr 18, 2026
c526400
xdg: unify resource-UI enumeration via forEachResource, ResourceOrigi…
mkoloberdin Apr 18, 2026
b45256a
palette: simplify loadColors and saveColors with RAII, narrower scope…
mkoloberdin Apr 18, 2026
e3ce706
xdg: flag missing ROMs and respect system-shipped defaults
mkoloberdin Apr 18, 2026
4fe84dc
cmake: install bundled palettes to share/samstyle/xpeccy/palettes
mkoloberdin Apr 18, 2026
3aac99e
xdgpp: add StateHomeDir and UserDirs (local extensions)
mkoloberdin Apr 18, 2026
09802ed
xdg: route debuga.layout through CacheHomeDir
mkoloberdin Apr 18, 2026
8b03bf0
xdg: route profile cmos/nvram through StateHomeDir
mkoloberdin Apr 18, 2026
ff5feec
xdg: add ResourceKind::Boot for TRDOS boot loader
mkoloberdin Apr 18, 2026
a642fd8
xdg: default screenshot dir to xdg::PicturesDir
mkoloberdin Apr 18, 2026
18477e1
xdg: install icon per Icon Theme Spec and polish .desktop entry
mkoloberdin Apr 18, 2026
b4e50d9
xdgpp: split UserDir into pure line-parser + I/O driver
mkoloberdin Apr 18, 2026
68fffa7
xdg: consolidate migration toolkit in xcore/migrate
mkoloberdin Apr 19, 2026
ea0ecf2
profiles: add profileConfigDir / profileStateDir helpers, de-stutter …
mkoloberdin Apr 19, 2026
6afaca0
xdg: unify conf_init platform branches via PlatformRoots aggregate
mkoloberdin Apr 19, 2026
5032cb9
xdg: drop dead ec parameters, simplify screenshot-dir init
mkoloberdin Apr 19, 2026
777b4d9
cleanup: simplify prfSetRomset and d_style
mkoloberdin Apr 19, 2026
ff6735c
xdg: replace ResourceKind enum dispatch with named ResourceDirs fields
mkoloberdin Apr 19, 2026
f2f269b
xdg: hide migrate internals, drop unused includes
mkoloberdin Apr 19, 2026
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
14 changes: 14 additions & 0 deletions 3rdparty/xdgpp/.builds/archlinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
image: archlinux
packages:
- gcc
- clang
- catch2
sources:
- https://git.sr.ht/~danyspin97/xdgpp
tasks:
- test-gcc: |
cd xdgpp
CXX=g++ make clean && make test -j2
- test-clang: |
cd xdgpp
CXX=clang++ make clean && make test -j2
5 changes: 5 additions & 0 deletions 3rdparty/xdgpp/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -4
IndentWidth: 4
37 changes: 37 additions & 0 deletions 3rdparty/xdgpp/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,misc-*,modernize-*,performance-*,readability-*,portability-*,cppcoreguidelines-*,bugprone-*,hicpp-*'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: none
CheckOptions:
- key: cert-dcl16-c.NewSuffixes
value: 'L;LL;LU;LLU'
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
value: '0'
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
value: '1'
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: '1'
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: llvm-qualified-auto.AddConstToQualified
value: '0'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-pass-by-value.IncludeStyle
value: google
- key: modernize-replace-auto-ptr.IncludeStyle
value: google
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
...

2 changes: 2 additions & 0 deletions 3rdparty/xdgpp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.o
xdg_test
20 changes: 20 additions & 0 deletions 3rdparty/xdgpp/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright © 2020 Danilo Spinella <oss@danyspin97.org>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

21 changes: 21 additions & 0 deletions 3rdparty/xdgpp/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CXX?=g++
CXXFLAGS?=
DEFAULT_CXXFLAGS:=-std=c++17 -Werror -Wall
CXXFLAGS+=$(DEFAULT_CXXFLAGS)
CATCH2_CXXFLAGS:=-DCATCH_CONFIG_MAIN -DCATCH_CONFIG_FAST_COMPILE
CXXFLAGS+=$(CATCH2_CXXFLAGS)
INCLUDES:=-I.
NAME:=xdg_test

SOURCES=xdg_test.cpp
OBJ=$(SOURCES:.cpp=.o)

xdg_test: $(OBJ)
$(CXX) $(CXXFLAGS) $(INCLUDES) $^ -o $(NAME)

test: xdg_test
./xdg_test

.PHONY: clean
clean:
rm -f $(OBJ) $(NAME)
70 changes: 70 additions & 0 deletions 3rdparty/xdgpp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# xdgpp

[![builds.sr.ht status](https://builds.sr.ht/~danyspin97/xdgpp.svg)](https://builds.sr.ht/~danyspin97/xdgpp?)
![Liberapay receiving](https://img.shields.io/liberapay/receives/danyspin97?logo=liberapay)

C++17 header-only implementation of the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html).

## Installation

Copy `xdg.hpp` into your source tree.

## Usage

```cpp
#include <iostream>

#include "xdg.hpp"

int main() {
std::cout << "$XDG_DATA_HOME = " << xdg::DataHomeDir() << std::endl;
std::cout << "$XDG_CONFIG_HOME = " << xdg::ConfigHomeDir() << std::endl;
std::cout << "$XDG_CACHE_HOME = " << xdg::CacheHomeDir() << std::endl;

auto data_dirs = xdg::DataDirs();
std::cout << "$XDG_DATA_DIRS = \"" << data_dirs.front().c_str();
for (int i = 1; i < data_dirs.size(); i++) {
std::cout << ":" << data_dirs.at(i).c_str();
}
std::cout << "\"" << std::endl;

auto config_dirs = xdg::ConfigDirs();
std::cout << "$XDG_CONFIG_DIRS = \"" << config_dirs.front().c_str();
for (int i = 1; i < config_dirs.size(); i++) {
std::cout << ":" << config_dirs.at(i).c_str();
}
std::cout << "\"" << std::endl;

// XDG_RUNTIME_DIR might not be set, the API returns a std::optional
auto runtime_dir = xdg::RuntimeDir();
if (runtime_dir) {
std::cout << "$XDG_RUNTIME_DIR = " << runtime_dir.value();
}

return 0;
}
```

Alternatively you can create and use an instance of `xdg::BaseDirectories` like:

```cpp
#include <iostream>

#include "xdg.hpp"

int main() {
xdg::BaseDirectories dirs;
std::cout << "$XDG_DATA_HOME = " << dirs.DataHome() << std::endl;
}
```

## Contributing

Pull requests are welcome.

**xdgpp** follows the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html); run `clang-format` on changes to automatically format the code.

## License

**xdgpp** is licensed under [the Mit License](https://mit-license.org/).

Loading