-
-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #803 from musikid/meson
build: add meson build system
- Loading branch information
Showing
39 changed files
with
530 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Checks: 'clang-diagnostic-*,clang-analyser-*,-clang-diagnostic-unused-command-line-argument,google-*,bugprone-*,modernize-*,performance-*,portability-*,readability-*,-bugprone-easily-swappable-*,-readability-magic-numbers,-google-readability-todo' | ||
WarningsAsErrors: 'clang-diagnostic-*,clang-analyser-*,-clang-diagnostic-unused-command-line-argument,google-*,bugprone-*,modernize-*,performance-*,portability-*,readability-*,-bugprone-easily-swappable-*,-readability-magic-numbers,-google-readability-todo' | ||
CheckOptions: | ||
- key: readability-function-cognitive-complexity.Threshold | ||
value: '50' | ||
|
||
# vim:syntax=yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
env python3 "@script_path@" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
if meson.is_subproject() | ||
project('howdy-gtk', license: 'MIT', version: 'beta', meson_version: '>= 0.64.0') | ||
endif | ||
|
||
datadir = get_option('prefix') / get_option('datadir') / 'howdy-gtk' | ||
py_conf = configuration_data(paths_dict) | ||
py_conf.set('data_dir', datadir) | ||
|
||
|
||
py_paths = configure_file( | ||
input: 'src/paths.py.in', | ||
output: 'paths.py', | ||
configuration: py_conf, | ||
) | ||
|
||
sources = files( | ||
'src/authsticky.py', | ||
'src/i18n.py', | ||
'src/init.py', | ||
'src/onboarding.py', | ||
'src/paths_factory.py', | ||
'src/tab_models.py', | ||
'src/tab_video.py', | ||
'src/window.py', | ||
) | ||
|
||
py = import('python').find_installation( | ||
# modules: ['gi', 'elevate'] | ||
) | ||
py.dependency() | ||
|
||
if get_option('install_in_site_packages') | ||
pysourcesinstalldir = join_paths(py.get_install_dir(), 'howdy-gtk') | ||
else | ||
pysourcesinstalldir = get_option('py_sources_dir') != '' ? get_option('py_sources_dir') : join_paths(get_option('prefix'), get_option('libdir'), 'howdy-gtk') | ||
endif | ||
|
||
if get_option('install_in_site_packages') | ||
py.install_sources( | ||
sources, | ||
py_paths, | ||
subdir: 'howdy-gtk', | ||
install_mode: 'r--r--r--', | ||
install_tag: 'py_sources', | ||
) | ||
else | ||
install_data( | ||
sources, | ||
py_paths, | ||
install_dir: pysourcesinstalldir, | ||
install_mode: 'r--r--r--', | ||
install_tag: 'py_sources', | ||
) | ||
endif | ||
|
||
logos = files( | ||
'src/logo.png', | ||
'src/logo_about.png', | ||
) | ||
install_data(logos, install_dir: datadir) | ||
|
||
interface_files = files( | ||
'src/main.glade', | ||
'src/onboarding.glade', | ||
) | ||
install_data(interface_files, install_dir: datadir) | ||
|
||
cli_path = join_paths(pysourcesinstalldir, 'init.py') | ||
conf_data = configuration_data({ 'script_path': cli_path }) | ||
|
||
bin_name = 'howdy-gtk' | ||
bin = configure_file( | ||
input: 'bin/howdy-gtk.in', | ||
output: bin_name, | ||
configuration: conf_data | ||
) | ||
install_data( | ||
bin, | ||
install_mode: 'rwxr-xr-x', | ||
install_dir: get_option('prefix') / get_option('bindir'), | ||
install_tag: 'bin', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from pathlib import PurePath | ||
|
||
# Define the absolute path to the config directory | ||
config_dir = PurePath("@config_dir@") | ||
|
||
# Define the absolute path to the DLib models data directory | ||
dlib_data_dir = PurePath("@dlib_data_dir@") | ||
|
||
# Define the absolute path to the Howdy user models directory | ||
user_models_dir = PurePath("@user_models_dir@") | ||
|
||
# Define the absolute path to the Howdy data directory | ||
data_dir = PurePath("@data_dir@") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from pathlib import PurePath | ||
import paths | ||
|
||
|
||
def config_file_path() -> str: | ||
"""Return the path to the config file""" | ||
return str(paths.config_dir / "config.ini") | ||
|
||
|
||
def user_models_dir_path() -> PurePath: | ||
"""Return the path to the user models directory""" | ||
return paths.user_models_dir | ||
|
||
|
||
def logo_path() -> str: | ||
"""Return the path to the logo file""" | ||
return str(paths.data_dir / "logo.png") | ||
|
||
|
||
def onboarding_wireframe_path() -> str: | ||
"""Return the path to the onboarding wireframe file""" | ||
return str(paths.data_dir / "onboarding.glade") | ||
|
||
|
||
def main_window_wireframe_path() -> str: | ||
"""Return the path to the main window wireframe file""" | ||
return str(paths.data_dir / "main.glade") | ||
|
||
|
||
def dlib_data_dir_path() -> PurePath: | ||
"""Return the path to the dlib data directory""" | ||
return paths.dlib_data_dir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
debian/howdy.1 | ||
howdy.1 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
subdir('src') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
env python3 "@script_path@" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.