mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 00:11:59 +02:00
Use proper ID for remote app
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
#!@GJS@
|
#!@GJS@
|
||||||
|
|
||||||
|
/* pkg init enforces the imports path to the folder
|
||||||
|
* named after the pkg name, but I would prefer to have
|
||||||
|
* the bundled subprocess stored in the same directory */
|
||||||
|
imports.searchPath.unshift('@datadir@/@PROJECT_NAME@');
|
||||||
|
|
||||||
const Package = imports.package;
|
const Package = imports.package;
|
||||||
|
|
||||||
Package.init({
|
Package.init({
|
||||||
|
@@ -1,14 +1,15 @@
|
|||||||
bin_conf = configuration_data()
|
|
||||||
bin_conf.set('GJS', find_program('gjs').path())
|
|
||||||
bin_conf.set('PACKAGE_VERSION', meson.project_version())
|
|
||||||
bin_conf.set('PACKAGE_NAME', meson.project_name())
|
|
||||||
bin_conf.set('prefix', get_option('prefix'))
|
|
||||||
bin_conf.set('libdir', join_paths(get_option('prefix'), get_option('libdir')))
|
|
||||||
bin_conf.set('datadir', join_paths(get_option('prefix'), get_option('datadir')))
|
|
||||||
|
|
||||||
clapper_apps = [ '', 'Remote' ]
|
clapper_apps = [ '', 'Remote' ]
|
||||||
|
|
||||||
foreach id_postfix : clapper_apps
|
foreach id_postfix : clapper_apps
|
||||||
|
bin_conf = configuration_data()
|
||||||
|
bin_conf.set('GJS', find_program('gjs').path())
|
||||||
|
bin_conf.set('PROJECT_NAME', meson.project_name())
|
||||||
|
bin_conf.set('PACKAGE_NAME', meson.project_name() + id_postfix)
|
||||||
|
bin_conf.set('PACKAGE_VERSION', meson.project_version())
|
||||||
|
bin_conf.set('prefix', get_option('prefix'))
|
||||||
|
bin_conf.set('libdir', join_paths(get_option('prefix'), get_option('libdir')))
|
||||||
|
bin_conf.set('datadir', join_paths(get_option('prefix'), get_option('datadir')))
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'com.github.rafostar.Clapper' + id_postfix + '.in',
|
input: 'com.github.rafostar.Clapper' + id_postfix + '.in',
|
||||||
output: 'com.github.rafostar.Clapper' + id_postfix,
|
output: 'com.github.rafostar.Clapper' + id_postfix,
|
||||||
|
@@ -14,13 +14,12 @@ class ClapperAppBase extends Gtk.Application
|
|||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
|
|
||||||
let defaults = {
|
let defaults = {
|
||||||
idPostfix: '',
|
|
||||||
playlist: [],
|
playlist: [],
|
||||||
};
|
};
|
||||||
Object.assign(this, defaults, opts);
|
Object.assign(this, defaults, opts);
|
||||||
|
|
||||||
super._init({
|
super._init({
|
||||||
application_id: Misc.appId + this.idPostfix
|
application_id: Misc.appId,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.doneFirstActivate = false;
|
this.doneFirstActivate = false;
|
||||||
|
@@ -4,14 +4,13 @@ imports.gi.versions.Gtk = '4.0';
|
|||||||
const { AppRemote } = imports.clapper_src.appRemote;
|
const { AppRemote } = imports.clapper_src.appRemote;
|
||||||
const Misc = imports.clapper_src.misc;
|
const Misc = imports.clapper_src.misc;
|
||||||
|
|
||||||
const opts = {
|
const ID_POSTFIX = 'Remote';
|
||||||
idPostfix: 'Remote',
|
|
||||||
};
|
|
||||||
|
|
||||||
Misc.clapperPath = pkg.datadir + '/' +
|
Misc.clapperPath = `${pkg.datadir}/${Misc.appId}`;
|
||||||
pkg.name.substring(0, pkg.name.lastIndexOf(opts.idPostfix));
|
Misc.appName += ID_POSTFIX;
|
||||||
|
Misc.appId += '.' + ID_POSTFIX;
|
||||||
|
|
||||||
function main()
|
function main()
|
||||||
{
|
{
|
||||||
new AppRemote(opts).run();
|
new AppRemote().run();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user