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]
|
[Desktop Entry]
|
||||||
Encoding=UTF-8
|
Encoding=UTF-8
|
||||||
Name=Mango
|
Name=Mango WL
|
||||||
DesktopNames=mango;wlroots
|
DesktopNames=mango;wlroots
|
||||||
Comment=mango WM
|
Comment=mango WM
|
||||||
Exec=mango
|
Exec=mango-wl
|
||||||
Icon=mango
|
Icon=mango
|
||||||
Type=Application
|
Type=Application
|
||||||
10
meson.build
10
meson.build
|
|
@ -90,7 +90,7 @@ if get_option('asan')
|
||||||
link_args += '-fsanitize=address'
|
link_args += '-fsanitize=address'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
executable('mango',
|
executable('mango-wl',
|
||||||
'src/mango.c',
|
'src/mango.c',
|
||||||
'src/common/util.c',
|
'src/common/util.c',
|
||||||
wayland_sources,
|
wayland_sources,
|
||||||
|
|
@ -128,7 +128,7 @@ wayland_scanner_private_code = generator(
|
||||||
)
|
)
|
||||||
|
|
||||||
# use generator in mmsg target
|
# use generator in mmsg target
|
||||||
executable('mmsg',
|
executable('mmsg-wl',
|
||||||
'mmsg/mmsg.c',
|
'mmsg/mmsg.c',
|
||||||
wayland_scanner_private_code.process(dwl_ipc_protocol),
|
wayland_scanner_private_code.process(dwl_ipc_protocol),
|
||||||
wayland_scanner_client_header.process(dwl_ipc_protocol),
|
wayland_scanner_client_header.process(dwl_ipc_protocol),
|
||||||
|
|
@ -145,7 +145,7 @@ executable('mmsg',
|
||||||
mandir = get_option('mandir')
|
mandir = get_option('mandir')
|
||||||
desktop_install_dir = join_paths(prefix, 'share/wayland-sessions')
|
desktop_install_dir = join_paths(prefix, 'share/wayland-sessions')
|
||||||
portal_install_dir = join_paths(prefix, 'share/xdg-desktop-portal')
|
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/mango-portals.conf', install_dir : portal_install_dir)
|
||||||
install_data('assets/config.conf', install_dir : join_paths(sysconfdir, 'mango'))
|
install_data('assets/config.conf', install_dir : join_paths(sysconfdir, 'mango-wl'))
|
||||||
install_data('mmsg/mmsg.1', install_dir : join_paths(mandir, 'man1'))
|
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");
|
"variable not set.\n");
|
||||||
return false;
|
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_path + 1);
|
||||||
}
|
}
|
||||||
file = fopen(full_path, "r");
|
file = fopen(full_path, "r");
|
||||||
|
|
@ -3581,13 +3581,13 @@ bool parse_config(void) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 构建日志文件路径
|
// 构建日志文件路径
|
||||||
snprintf(filename, sizeof(filename), "%s/.config/mango/config.conf",
|
snprintf(filename, sizeof(filename), "%s/.config/mango-wl/config.conf",
|
||||||
homedir);
|
homedir);
|
||||||
|
|
||||||
// 检查文件是否存在
|
// 检查文件是否存在
|
||||||
if (access(filename, F_OK) != 0) {
|
if (access(filename, F_OK) != 0) {
|
||||||
// 如果文件不存在,则使用 /etc/mango/config.conf
|
// 如果文件不存在,则使用 /etc/mango-wl/config.conf
|
||||||
snprintf(filename, sizeof(filename), "%s/mango/config.conf",
|
snprintf(filename, sizeof(filename), "%s/mango-wl/config.conf",
|
||||||
SYSCONFDIR);
|
SYSCONFDIR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7042,8 +7042,8 @@ int32_t main(int32_t argc, char *argv[]) {
|
||||||
} else if (c == 'd') {
|
} else if (c == 'd') {
|
||||||
cli_debug_log = true;
|
cli_debug_log = true;
|
||||||
} else if (c == 'v') {
|
} else if (c == 'v') {
|
||||||
printf("mango " VERSION "\n");
|
printf("mango-wl " VERSION "\n");
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
} else if (c == 'c') {
|
} else if (c == 'c') {
|
||||||
cli_config_path = optarg;
|
cli_config_path = optarg;
|
||||||
} else if (c == 'p') {
|
} else if (c == 'p') {
|
||||||
|
|
@ -7065,7 +7065,7 @@ int32_t main(int32_t argc, char *argv[]) {
|
||||||
cleanup();
|
cleanup();
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
usage:
|
usage:
|
||||||
printf("Usage: mango [OPTIONS]\n"
|
printf("Usage: mango-wl [OPTIONS]\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -v Show mango version\n"
|
" -v Show mango version\n"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue