build: Remove Hack manifest and profile
Now that the stable release is on the same codebase, it should be less necessary to have 2 development builds. Also since most performance issues have been fixed, it should not be necessary anymore to build the nightly version in release mode.
This commit is contained in:
parent
5e9e7600f4
commit
68291d7abc
11 changed files with 38 additions and 137 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -1,5 +1,4 @@
|
|||
build-aux/org.gnome.Fractal.Devel.json export-ignore
|
||||
build-aux/org.gnome.Fractal.Hack.json export-ignore
|
||||
build-aux/org.gnome.Fractal.json export-ignore
|
||||
.editorconfig export-ignore
|
||||
.gitattributes export-ignore
|
||||
|
|
|
@ -6,17 +6,12 @@ stages:
|
|||
|
||||
variables:
|
||||
FLATPAK_MODULE: "fractal"
|
||||
MANIFEST_PATH: "build-aux/org.gnome.Fractal.Devel.json"
|
||||
APP_ID: "org.gnome.Fractal.Devel"
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_TAG
|
||||
variables:
|
||||
MANIFEST_PATH: "build-aux/org.gnome.Fractal.Devel.json"
|
||||
APP_ID: "org.gnome.Fractal.Devel"
|
||||
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != "main"
|
||||
variables:
|
||||
MANIFEST_PATH: "build-aux/org.gnome.Fractal.Hack.json"
|
||||
APP_ID: "org.gnome.Fractal.Hack"
|
||||
- if: $CI_COMMIT_BRANCH || $CI_COMMIT_TAG
|
||||
|
||||
include:
|
||||
- local: .gitlab-ci/run_checks.yml
|
||||
|
|
|
@ -51,10 +51,6 @@ If you are building the flatpak manually you will also need flatpak-builder on y
|
|||
Using [GNOME Builder](https://wiki.gnome.org/Apps/Builder) with [flatpak](https://flatpak.org/) is
|
||||
the recommended way of building and installing Fractal.
|
||||
|
||||
By default, GNOME Builder should select the `org.gnome.Fractal.Devel.json` manifest, which is the
|
||||
manifest used for building the nightly version. It is recommended to switch to the
|
||||
`org.gnome.Fractal.Hack.json` manifest which will build much faster.
|
||||
|
||||
### Flatpak via fenv
|
||||
|
||||
As an alternative, [fenv](https://gitlab.gnome.org/ZanderBrown/fenv) allows to setup a flatpak
|
||||
|
@ -79,10 +75,10 @@ After that, move into the directory where you cloned Fractal and setup the proje
|
|||
|
||||
```sh
|
||||
# Setup the flatpak environment
|
||||
fenv gen build-aux/org.gnome.Fractal.Hack.json
|
||||
fenv gen build-aux/org.gnome.Fractal.Devel.json
|
||||
|
||||
# Initialize the build system
|
||||
fenv exec -- meson setup -Dprofile=hack --prefix=/app _build
|
||||
fenv exec -- meson setup -Dprofile=development --prefix=/app _build
|
||||
```
|
||||
|
||||
Finally, build and run the application:
|
||||
|
@ -110,13 +106,13 @@ GNOME Builder can export a flatpak of the app after it has been successfully bui
|
|||
Fractal can then be installed with:
|
||||
|
||||
```sh
|
||||
flatpak install --user --bundle path/to/org.gnome.Fractal.Hack.flatpak
|
||||
flatpak install --user --bundle path/to/org.gnome.Fractal.Devel.flatpak
|
||||
```
|
||||
|
||||
Alternatively, it can be built and installed with flatpak-builder:
|
||||
|
||||
```sh
|
||||
flatpak-builder --user --install app build-aux/org.gnome.Fractal.Hack.json
|
||||
flatpak-builder --user --install app build-aux/org.gnome.Fractal.Devel.json
|
||||
```
|
||||
|
||||
_Note that the `flatpak-builder` command can be replaced with `flatpak run org.flatpak.Builder`._
|
||||
|
@ -124,7 +120,7 @@ _Note that the `flatpak-builder` command can be replaced with `flatpak run org.f
|
|||
It can then be entirely removed from your system with:
|
||||
|
||||
```sh
|
||||
flatpak remove --delete-data org.gnome.Fractal.Hack
|
||||
flatpak remove --delete-data org.gnome.Fractal.Devel
|
||||
```
|
||||
|
||||
### GNU/Linux
|
||||
|
|
|
@ -22,6 +22,12 @@
|
|||
"build-options": {
|
||||
"append-ld-library-path": "/usr/lib/sdk/llvm16/lib",
|
||||
"append-path": "/usr/lib/sdk/llvm16/bin:/usr/lib/sdk/rust-stable/bin",
|
||||
"env": {
|
||||
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER": "clang",
|
||||
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS": "-C link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold --cfg=ruma_identifiers_storage=\"Arc\"",
|
||||
"CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER": "clang",
|
||||
"CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS": "-C link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold --cfg=ruma_identifiers_storage=\"Arc\""
|
||||
},
|
||||
"build-args": [
|
||||
"--share=network"
|
||||
],
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
{
|
||||
"app-id": "org.gnome.Fractal.Hack",
|
||||
"runtime": "org.gnome.Platform",
|
||||
"runtime-version": "master",
|
||||
"sdk": "org.gnome.Sdk",
|
||||
"sdk-extensions": [
|
||||
"org.freedesktop.Sdk.Extension.rust-stable",
|
||||
"org.freedesktop.Sdk.Extension.llvm16"
|
||||
],
|
||||
"command": "fractal",
|
||||
"finish-args": [
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--socket=pulseaudio",
|
||||
"--share=network",
|
||||
"--share=ipc",
|
||||
"--device=dri",
|
||||
"--env=RUST_LOG=fractal=debug,warn",
|
||||
"--env=G_MESSAGES_DEBUG=none",
|
||||
"--env=RUST_BACKTRACE=1"
|
||||
],
|
||||
"build-options": {
|
||||
"append-ld-library-path": "/usr/lib/sdk/llvm16/lib",
|
||||
"append-path": "/usr/lib/sdk/llvm16/bin:/usr/lib/sdk/rust-stable/bin",
|
||||
"env": {
|
||||
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER": "clang",
|
||||
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS": "-C link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold --cfg=ruma_identifiers_storage=\"Arc\"",
|
||||
"CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER": "clang",
|
||||
"CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS": "-C link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold --cfg=ruma_identifiers_storage=\"Arc\""
|
||||
},
|
||||
"build-args": [
|
||||
"--share=network"
|
||||
],
|
||||
"test-args": [
|
||||
"--socket=x11",
|
||||
"--share=network"
|
||||
]
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"name": "libshumate",
|
||||
"buildsystem": "meson",
|
||||
"config-opts": [
|
||||
"-Dgir=false",
|
||||
"-Dvapi=false",
|
||||
"-Dgtk_doc=false"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://download.gnome.org/sources/libshumate/1.1/libshumate-1.1.0.tar.xz",
|
||||
"sha256": "b3b7c4c2d3002f37b951c9ca99b09275d0aa82265c69f53374ce12faefd3b14e"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "fractal",
|
||||
"buildsystem": "meson",
|
||||
"run-tests": true,
|
||||
"config-opts": [
|
||||
"-Dprofile=hack"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "../"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,13 +1,6 @@
|
|||
if is_release
|
||||
icon_name = '@0@.svg'.format(base_id)
|
||||
else
|
||||
icon_name = '@0@.Devel.svg'.format(base_id)
|
||||
endif
|
||||
|
||||
install_data(
|
||||
icon_name,
|
||||
'@0@.svg'.format(application_id),
|
||||
install_dir: iconsdir / 'hicolor' / 'scalable' / 'apps',
|
||||
rename: '@0@.svg'.format(application_id)
|
||||
)
|
||||
|
||||
install_data(
|
||||
|
|
|
@ -26,9 +26,7 @@ if desktop_file_validate.found()
|
|||
endif
|
||||
|
||||
# Appdata
|
||||
if is_release
|
||||
development_release = ''
|
||||
else
|
||||
if profile == 'Devel'
|
||||
appstream_version = major_version
|
||||
if pre_release_version != ''
|
||||
appstream_version += '~' + pre_release_version
|
||||
|
@ -41,6 +39,8 @@ else
|
|||
<p>Development release.</p>
|
||||
</description>
|
||||
</release>'''.format(appstream_version, release_date)
|
||||
else
|
||||
development_release = ''
|
||||
endif
|
||||
appdata_conf = configuration_data()
|
||||
appdata_conf.set('app-id', application_id)
|
||||
|
|
45
meson.build
45
meson.build
|
@ -8,10 +8,17 @@ i18n = import('i18n')
|
|||
gnome = import('gnome')
|
||||
|
||||
base_id = 'org.gnome.Fractal'
|
||||
application_id = base_id
|
||||
|
||||
major_version = '5'
|
||||
pre_release_version = ''
|
||||
|
||||
version = major_version
|
||||
if pre_release_version != ''
|
||||
version += '.' + pre_release_version
|
||||
endif
|
||||
full_version = version
|
||||
|
||||
dependency('glib-2.0', version: '>= 2.72') # update when changing gtk version
|
||||
dependency('gio-2.0', version: '>= 2.72') # always same version as glib
|
||||
dependency('gtk4', version: '>= 4.10.0')
|
||||
|
@ -58,43 +65,23 @@ iconsdir = datadir / 'icons'
|
|||
podir = meson.project_source_root() / 'po'
|
||||
gettext_package = meson.project_name()
|
||||
|
||||
if get_option('profile') == 'hack'
|
||||
is_release = false
|
||||
profile = 'Hack'
|
||||
elif get_option('profile') == 'development'
|
||||
is_release = false
|
||||
if get_option('profile') == 'development'
|
||||
profile = 'Devel'
|
||||
elif get_option('profile') == 'beta'
|
||||
is_release = true
|
||||
profile = 'Beta'
|
||||
else
|
||||
is_release = true
|
||||
profile = 'Stable'
|
||||
endif
|
||||
|
||||
if is_release
|
||||
devel_version = ''
|
||||
release_date = '' # should be unused with released versions
|
||||
application_id = base_id
|
||||
else
|
||||
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
|
||||
if vcs_tag == ''
|
||||
devel_version = profile.to_lower()
|
||||
else
|
||||
devel_version = vcs_tag
|
||||
endif
|
||||
release_date = run_command('git', 'show', '-s', '--format=%cI').stdout().strip()
|
||||
application_id = '@0@.@1@'.format(base_id, profile)
|
||||
endif
|
||||
|
||||
version = major_version
|
||||
if pre_release_version != ''
|
||||
version += '.' + pre_release_version
|
||||
endif
|
||||
|
||||
full_version = version
|
||||
if devel_version != ''
|
||||
full_version += '-' + devel_version
|
||||
|
||||
release_date = run_command('git', 'show', '-s', '--format=%cI').stdout().strip()
|
||||
application_id += '.' + profile
|
||||
elif get_option('profile') == 'beta'
|
||||
profile = 'Beta'
|
||||
else
|
||||
profile = 'Stable'
|
||||
endif
|
||||
|
||||
meson.add_dist_script(
|
||||
|
@ -103,7 +90,7 @@ meson.add_dist_script(
|
|||
meson.project_source_root()
|
||||
)
|
||||
|
||||
if profile == 'Hack'
|
||||
if profile == 'Devel'
|
||||
# Setup pre-commit hook for ensuring coding style is always consistent
|
||||
message('Setting up git pre-commit hook..')
|
||||
run_command('cp', '-f', 'hooks/pre-commit.hook', '.git/hooks/pre-commit')
|
||||
|
|
|
@ -5,8 +5,7 @@ option(
|
|||
'default',
|
||||
'beta',
|
||||
'development',
|
||||
'hack',
|
||||
],
|
||||
value: 'default',
|
||||
description: 'The build profile for Fractal. One of "default", "beta", "development" or "hack".'
|
||||
description: 'The build profile for Fractal. One of "default", "beta" or "development".'
|
||||
)
|
||||
|
|
|
@ -202,10 +202,8 @@ pub enum AppProfile {
|
|||
Stable,
|
||||
/// A beta release.
|
||||
Beta,
|
||||
/// A nightly release.
|
||||
Devel,
|
||||
/// A development release.
|
||||
Hack,
|
||||
Devel,
|
||||
}
|
||||
|
||||
impl AppProfile {
|
||||
|
@ -215,13 +213,12 @@ impl AppProfile {
|
|||
Self::Stable => "stable",
|
||||
Self::Beta => "beta",
|
||||
Self::Devel => "devel",
|
||||
Self::Hack => "hack",
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether this `AppProfile` should use the `.devel` CSS class on windows.
|
||||
pub fn should_use_devel_class(&self) -> bool {
|
||||
matches!(self, Self::Devel | Self::Hack)
|
||||
matches!(self, Self::Devel)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ run_command(
|
|||
cargo_options = [ '--manifest-path', meson.project_source_root() / 'Cargo.toml' ]
|
||||
cargo_options += [ '--target-dir', meson.project_build_root() / 'src' ]
|
||||
|
||||
if profile == 'Hack'
|
||||
if profile == 'Devel'
|
||||
rust_target = 'debug'
|
||||
message('Building in debug mode')
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue