mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-10-06 09:37:52 +00:00
Merge pull request #118 from tfuxu/next
Allow users to compile builds without flatpak
This commit is contained in:
commit
dd1064dfae
4 changed files with 75 additions and 1 deletions
41
README.md
41
README.md
|
@ -20,7 +20,46 @@ Gradience, originally Adwaita Manager (AdwCustomizer) is a tool for customizing
|
||||||
|
|
||||||
## Building and Installing
|
## Building and Installing
|
||||||
|
|
||||||
See `next` branch for UI rework and latest commit.
|
**[NOTE]** See `next` branch for UI rework and latest commits.
|
||||||
|
|
||||||
|
## Requirements:
|
||||||
|
- Python 3 `python`
|
||||||
|
- PyGObject `python-gobject`
|
||||||
|
- Blueprint <code>[blueprint-compiler](https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/setup.html)</code>
|
||||||
|
- GTK4 `gtk4`
|
||||||
|
- libadwaita (>= 1.2.alpha) `libadwaita`
|
||||||
|
- Meson `meson`
|
||||||
|
- Ninja `ninja`
|
||||||
|
|
||||||
|
## Building from source:
|
||||||
|
|
||||||
|
Install required Python libraries:
|
||||||
|
```sh
|
||||||
|
pip install -r requirements.txt
|
||||||
|
pip3 install $(pwd)/monet/material_color_utilities_python-0.1.0-py3-none-any.whl
|
||||||
|
```
|
||||||
|
|
||||||
|
### Global installation:
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/AdwCustomizerTeam/AdwCustomizer.git
|
||||||
|
cd AdwCustomizer
|
||||||
|
meson builddir --prefix=/usr/local
|
||||||
|
sudo ninja -C builddir install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Local build (for testing and development purposes):
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/AdwCustomizerTeam/AdwCustomizer.git
|
||||||
|
cd AdwCustomizer
|
||||||
|
meson builddir
|
||||||
|
meson configure builddir -Dprefix="$(pwd)/builddir/testdir"
|
||||||
|
ninja -C builddir install
|
||||||
|
ninja -C builddir run
|
||||||
|
```
|
||||||
|
|
||||||
|
**[NOTE]** During testing and developement, as a convenience, you can use the `local.sh` script to quickly rebuild local builds.
|
||||||
|
|
||||||
|
### Building using flatpak-builder:
|
||||||
|
|
||||||
1. Open Terminal
|
1. Open Terminal
|
||||||
2. Run `git clone https://github.com/AdwCustomizerTeam/AdwCustomizer.git && cd AdwCustomizer`
|
2. Run `git clone https://github.com/AdwCustomizerTeam/AdwCustomizer.git && cd AdwCustomizer`
|
||||||
|
|
21
local.sh
Executable file
21
local.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
read -p "Do you want to install Python requirements? (yes, no): " answer
|
||||||
|
|
||||||
|
if [[ "$answer" == "yes" ]]; then
|
||||||
|
pip3 install --user -r requirements.txt
|
||||||
|
pip3 install $(pwd)/monet/material_color_utilities_python-0.1.0-py3-none-any.whl
|
||||||
|
elif [[ "$answer" == "no" ]]; then
|
||||||
|
echo "Skipping requirements installation"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Cleaning builddir directory"
|
||||||
|
rm -r builddir
|
||||||
|
|
||||||
|
echo "Rebuilding"
|
||||||
|
meson builddir
|
||||||
|
meson configure builddir -Dprefix="$(pwd)/builddir/testdir"
|
||||||
|
ninja -C builddir install
|
||||||
|
|
||||||
|
echo "Running"
|
||||||
|
ninja -C builddir run
|
|
@ -28,6 +28,14 @@ pkgdatadir = '@PKGDATA_DIR@'
|
||||||
localedir = '@LOCALE_DIR@'
|
localedir = '@LOCALE_DIR@'
|
||||||
version = '@VERSION@'
|
version = '@VERSION@'
|
||||||
|
|
||||||
|
builddir = os.environ.get('MESON_BUILD_ROOT')
|
||||||
|
|
||||||
|
if builddir:
|
||||||
|
sys.dont_write_bytecode = True
|
||||||
|
sys.path.insert(1, os.environ['MESON_SOURCE_ROOT'])
|
||||||
|
data_dir = os.path.join(builddir, '@DATA_DIR@')
|
||||||
|
os.putenv('XDG_DATA_DIRS', '%s:%s' % (data_dir, os.getenv('XDG_DATA_DIRS', '/usr/local/share/:/usr/share/')))
|
||||||
|
|
||||||
sys.path.insert(1, pkgdatadir)
|
sys.path.insert(1, pkgdatadir)
|
||||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||||
gettext.install('adwcustomizer', localedir)
|
gettext.install('adwcustomizer', localedir)
|
||||||
|
|
|
@ -37,6 +37,12 @@ configure_file(
|
||||||
install_dir: MODULE_DIR
|
install_dir: MODULE_DIR
|
||||||
)
|
)
|
||||||
|
|
||||||
|
launcher = join_paths(meson.project_build_root(), 'src', meson.project_name())
|
||||||
|
|
||||||
|
run_target('run',
|
||||||
|
command: [launcher]
|
||||||
|
)
|
||||||
|
|
||||||
# Install sources
|
# Install sources
|
||||||
adwcustomizer_sources = [
|
adwcustomizer_sources = [
|
||||||
'__init__.py',
|
'__init__.py',
|
||||||
|
|
Loading…
Reference in a new issue