mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-19 14:33:16 -04:00
build: rename binaries and paths to allow side-by-side installation
Changed the binary names to mango-wl and mmsg-wl and the configuration paths to mango-wl/ to allow parallel installations of mango main branch and wl-roots only.
This commit is contained in:
parent
10b2b733c5
commit
5b19c8da93
5 changed files with 15 additions and 15 deletions
|
|
@ -1,8 +1,8 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Mango
|
||||
Name=Mango WL
|
||||
DesktopNames=mango;wlroots
|
||||
Comment=mango WM
|
||||
Exec=mango
|
||||
Exec=mango-wl
|
||||
Icon=mango
|
||||
Type=Application
|
||||
10
meson.build
10
meson.build
|
|
@ -90,7 +90,7 @@ if get_option('asan')
|
|||
link_args += '-fsanitize=address'
|
||||
endif
|
||||
|
||||
executable('mango',
|
||||
executable('mango-wl',
|
||||
'src/mango.c',
|
||||
'src/common/util.c',
|
||||
wayland_sources,
|
||||
|
|
@ -128,7 +128,7 @@ wayland_scanner_private_code = generator(
|
|||
)
|
||||
|
||||
# use generator in mmsg target
|
||||
executable('mmsg',
|
||||
executable('mmsg-wl',
|
||||
'mmsg/mmsg.c',
|
||||
wayland_scanner_private_code.process(dwl_ipc_protocol),
|
||||
wayland_scanner_client_header.process(dwl_ipc_protocol),
|
||||
|
|
@ -145,7 +145,7 @@ executable('mmsg',
|
|||
mandir = get_option('mandir')
|
||||
desktop_install_dir = join_paths(prefix, 'share/wayland-sessions')
|
||||
portal_install_dir = join_paths(prefix, 'share/xdg-desktop-portal')
|
||||
install_data('assets/mango.desktop', install_dir : desktop_install_dir)
|
||||
install_data('assets/mango-wl.desktop', install_dir : desktop_install_dir)
|
||||
install_data('assets/mango-portals.conf', install_dir : portal_install_dir)
|
||||
install_data('assets/config.conf', install_dir : join_paths(sysconfdir, 'mango'))
|
||||
install_data('mmsg/mmsg.1', install_dir : join_paths(mandir, 'man1'))
|
||||
install_data('assets/config.conf', install_dir : join_paths(sysconfdir, 'mango-wl'))
|
||||
install_data('mmsg/mmsg-wl.1', install_dir : join_paths(mandir, 'man1'))
|
||||
|
|
|
|||
|
|
@ -2797,7 +2797,7 @@ bool parse_config_file(Config *config, const char *file_path, bool must_exist) {
|
|||
"variable not set.\n");
|
||||
return false;
|
||||
}
|
||||
snprintf(full_path, sizeof(full_path), "%s/.config/mango/%s", home,
|
||||
snprintf(full_path, sizeof(full_path), "%s/.config/mango-wl/%s", home,
|
||||
file_path + 1);
|
||||
}
|
||||
file = fopen(full_path, "r");
|
||||
|
|
@ -3581,13 +3581,13 @@ bool parse_config(void) {
|
|||
return false;
|
||||
}
|
||||
// 构建日志文件路径
|
||||
snprintf(filename, sizeof(filename), "%s/.config/mango/config.conf",
|
||||
snprintf(filename, sizeof(filename), "%s/.config/mango-wl/config.conf",
|
||||
homedir);
|
||||
|
||||
// 检查文件是否存在
|
||||
if (access(filename, F_OK) != 0) {
|
||||
// 如果文件不存在,则使用 /etc/mango/config.conf
|
||||
snprintf(filename, sizeof(filename), "%s/mango/config.conf",
|
||||
// 如果文件不存在,则使用 /etc/mango-wl/config.conf
|
||||
snprintf(filename, sizeof(filename), "%s/mango-wl/config.conf",
|
||||
SYSCONFDIR);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7042,7 +7042,7 @@ int32_t main(int32_t argc, char *argv[]) {
|
|||
} else if (c == 'd') {
|
||||
cli_debug_log = true;
|
||||
} else if (c == 'v') {
|
||||
printf("mango " VERSION "\n");
|
||||
printf("mango-wl " VERSION "\n");
|
||||
return EXIT_SUCCESS;
|
||||
} else if (c == 'c') {
|
||||
cli_config_path = optarg;
|
||||
|
|
@ -7065,7 +7065,7 @@ int32_t main(int32_t argc, char *argv[]) {
|
|||
cleanup();
|
||||
return EXIT_SUCCESS;
|
||||
usage:
|
||||
printf("Usage: mango [OPTIONS]\n"
|
||||
printf("Usage: mango-wl [OPTIONS]\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -v Show mango version\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue