Skip to content

Commit

Permalink
Always enable debug log when run yarn vm
Browse files Browse the repository at this point in the history
  • Loading branch information
LuoYi committed Jul 30, 2022
1 parent fae54cd commit 9a28a05
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
14 changes: 8 additions & 6 deletions gulp/gi.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
// This gulp scripts used to generate @gi folder by ts-for-gir:
// https://github.com/sammydre/ts-for-gir

// The path to search libraries of mutter and gnome-shell
const extra_lib = [
'/usr/lib64/mutter-10',
'/usr/lib64/mutter-9',
'/usr/lib64/mutter-8',
'/usr/share/gnome-shell'
].join(':')

const { existsSync, statSync, writeFileSync, readFileSync, rmSync, rm, mkdirSync } = require('fs')
const { exec, execSync } = require('child_process')
const { parallel, series, src, dest } = require('gulp')
Expand Down Expand Up @@ -125,12 +133,6 @@ const generate_gi_ext = (cb) => {
return
}

const extra_lib = [
'/usr/lib64/mutter-10',
'/usr/lib64/mutter-9',
'/usr/lib64/mutter-8',
'/usr/share/gnome-shell'
].join(':')
mkdirSync('.tmp/ext', { recursive: true })
writeFileSync('.tmp/ext/docs.json', JSON.stringify({
'libraries': conf.libraries_ext,
Expand Down
13 changes: 12 additions & 1 deletion gulp/vagrant.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

const { series, parallel } = require("gulp");

// UUID of extensions
const UUID = require('../resources/metadata.json').uuid

const choice_init_script = () => {
// Choice scripts to init vm
const lang = process.env['LANG'].split('.')[0]
Expand Down Expand Up @@ -77,4 +80,12 @@ const watch_shell = () => run_cmd('vagrant', ['ssh', '-c', '"journalctl -f -o ca
// Display debug log for our preferences pages
const watch_gjs = () => run_cmd('vagrant', ['ssh', '-c', '"journalctl -f -o cat /usr/bin/gjs"'])

exports.vagrant = series(up, init_vm, parallel(watch_shell, watch_gjs))
// Enable debug-mode
const enable_debug = () => run_cmd('vagrant', [
'ssh', '-c',
'"gsettings --schemadir ' +
`/home/vagrant/.local/share/gnome-shell/extensions/${UUID}/schemas set ` +
'org.gnome.shell.extensions.rounded-window-corners debug-mode true"'
])

exports.vagrant = series(up, init_vm, parallel(enable_debug, watch_shell, watch_gjs))

0 comments on commit 9a28a05

Please sign in to comment.