Skip to content

Commit

Permalink
Just have a use-old-zenity option to avoid issues with zenity version…
Browse files Browse the repository at this point in the history
… detection.

This time around it was issues with detection in mock, so let's just avoid all these troubles with auto-detection and roll an option to use the old zenity if needed.
  • Loading branch information
JoshStrobl committed Apr 26, 2023
1 parent 7bb0172 commit be7698b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
- run: sudo apt update
- run: sudo apt remove libunwind-14-dev
- run: sudo apt install meson ninja-build zenity gnome-screensaver gnome-settings-daemon-dev gtk-doc-tools intltool libaccountsservice-dev libasound2-dev libcanberra-dev libcanberra-gtk3-dev libgee-0.8-dev libgnome-bluetooth-dev libgnome-desktop-3-dev libgnome-menu-3-dev libgtk-3-dev libibus-1.0-dev libmutter-10-dev libpeas-dev libpolkit-agent-1-dev libpulse-dev libupower-glib-dev libwnck-3-dev sassc uuid-dev valac libgstreamer1.0-dev libgee-0.8-dev
- run: meson build -Dwith-gnome-screensaver=true
- run: meson build -Duse-old-zenity=true -Dwith-gnome-screensaver=true
- run: meson compile -C build
7 changes: 4 additions & 3 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
option('with-stateless', type: 'boolean', value: false, description: 'Enable stateless XDG paths')
option('use-old-zenity', type: 'boolean', value: false, description: 'Use old zenity CLI API for out-of-process dialog handling')
option('with-bluetooth', type: 'boolean', value: true, description: 'Enable Bluetooth (Vala option)')
option('with-gnome-screensaver', type: 'boolean', value: false, description: 'Build using gnome-screensaver as a dependency')
option('with-gtk-doc', type: 'boolean', value: true, description: 'Build gtk-doc documentation')
option('with-hibernate', type: 'boolean', value: true, description: 'Include support for system hibernation')
option('with-libuuid-time-safe', type: 'boolean', value: true, description: 'Enable use of LIBUUID.generate_time_safe (Vala option)')
option('with-polkit', type: 'boolean', value: true, description: 'Enable PolKit support')
option('with-gtk-doc', type: 'boolean', value: true, description: 'Build gtk-doc documentation')
option('with-stateless', type: 'boolean', value: false, description: 'Enable stateless XDG paths')
option('xdg-appdir', type: 'string', description: 'XDG autostart path')
option('with-gnome-screensaver', type: 'boolean', value: false, description: 'Build using gnome-screensaver as a dependency')
11 changes: 5 additions & 6 deletions src/wm/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ budgie_wm_sources = [

budgie_wm_status_vala_args = []

# Yes I know version() exists and that would be simpler, I need to support Ubuntus that don't have modern meson so this is the hack
zenity = find_program('zenity', required: false)
assert(zenity.found(), 'Zenity is a required program at build and run-time for dialog support in budgie-wm. Please include it in both build and run deps.')
assert(zenity.found(), 'Zenity is a required program at build and run-time for dialog support in budgie-wm. Please include it in both build and run deps, as well as check if you need to set use-old-zenity.')

zenity_version = run_command('zenity', ['--version'], capture: true)
use_old_zenity = get_option('use-old-zenity')

if zenity_version.stdout().version_compare('>=3.90') == true
message('Found new zenity, using new zenity flags')
if use_old_zenity == false
message('Using new zenity flags')
budgie_wm_status_vala_args += ['-D', 'HAVE_NEW_ZENITY']
else
message('Found old zenity, using old zenity flags')
message('Using old zenity flags')
endif

dep_graphene = dependency('graphene-gobject-1.0', version: '>= 1.10')
Expand Down

0 comments on commit be7698b

Please # to comment.