void utils_start_new_geany_instance(const gchar *doc_path) {
- const gchar *command = is_osx_bundle() ? "open" : "geany";
- gchar *exec_path = g_find_program_in_path(command);
- gchar **argv;
- int i, persistent;
- int argc;
- GError *error = NULL;
- for (i = 0, persistent = 0; optentries[i].long_name; i++)
if (optentries_aux[i].persistent)
persistent++;
- argv = g_new0(gchar *, persistent + 5); /* exectuable, -i, --, doc_path, NULL */
- argv[0] = g_build_filename(utils_resource_dir(RESOURCE_DIR_PREFIX), "bin", "geany", NULL);
It is. Since I don't want an unneeded RESOURCE_DIR_PREFIX under OSX, and g_build_filename() scattered in utils_resource_dir() and utils_start_new_geany_instance(), I'll do the following:
- Rename utils_resource_dir() to utils_resource_path(). - Rename RESOURCE_DIR_PREFIX to RESOURCE_FILE_GEANY or something (please suggest a name). - Alter utils_resource_path(RESOURCE_FILE_GEANY) to return gtkosx_application_get_executable_path() under OSX or prefix/bin/geany otherwise.
It is the executable name that we really need from utils_resource_path(), not the RESOURCE_DIR_PREFIX.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/637/files#r38777321
github-comments@lists.geany.org