Skip to content

Commit

Permalink
build: Allow Awesome to be built with luarock LGI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Elv13 committed Oct 5, 2019
1 parent 9c0e16e commit 271e282
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions build-utils/lgi-check.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <stdlib.h>

const char commands[] =
"pcall(require, 'luarocks.loader')\n"
"print(string.format('Building for %s.', jit and jit.version or _VERSION))\n"
"local lgi_version = require('lgi.version')\n"
"print(string.format('Found lgi %s.', lgi_version))\n"
Expand Down
2 changes: 2 additions & 0 deletions docs/_parser.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
pcall(require, "luarocks.loader")

local gio = require("lgi").Gio
local gobject = require("lgi").GObject
local glib = require("lgi").GLib
Expand Down
1 change: 1 addition & 0 deletions tests/_client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ local spawn = require("awful.spawn")
-- It is used to test the `awful.rules`

local test_client_source = [[
pcall(require, 'luarocks.loader')
local lgi = require 'lgi'
local Gdk = lgi.require('Gdk')
local Gtk = lgi.require('Gtk')
Expand Down
2 changes: 2 additions & 0 deletions tests/examples/shims/_common_template.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
pcall(require, "luarocks.loader")

-- luacheck: globals string
function string.wlen(self)
return #self
Expand Down
1 change: 1 addition & 0 deletions tests/test-titlebar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ local rules = require("awful.rules")
local spawn = require("awful.spawn")

local tiny_client_code_template = [[
pcall(require, 'luarocks.loader')
local Gtk, class = require('lgi').require('Gtk'), 'client'
Gtk.init()
window = Gtk.Window {default_width=100, default_height=100, title='title'}
Expand Down

0 comments on commit 271e282

Please sign in to comment.