| 44 | | exe_path = g_path_get_dirname (exe_filename); |
| 45 | | g_free (exe_filename); |
| | 54 | prefix_temp = g_path_get_dirname (exe_filename); |
| | 55 | g_print ("prefix_temp %s\n", prefix_temp); |
| | 56 | gchar *basename = g_path_get_basename (prefix_temp); |
| | 57 | g_print ("basename %s\n", basename); |
| | 58 | |
| | 59 | if (strcmp (basename, LIBDIR_SUFFIX) == 0) { |
| | 60 | g_print ("we are in a libtool temporary directory, adjusting path...\n"); |
| | 61 | |
| | 62 | prefix_temp = g_strdup (prefix_temp); |
| | 63 | prefix_temp[strlen (prefix_temp) - strlen (LIBDIR_SUFFIX) - 1] = '\0'; |
| | 64 | } |
| | 65 | |
| | 66 | g_free (basename); |
| | 67 | |
| | 68 | basename = g_path_get_basename (prefix_temp); |
| | 69 | |
| | 70 | if (strcmp (basename, "src") == 0) |
| | 71 | in_source_dir = TRUE; |
| | 72 | else |
| | 73 | in_source_dir = FALSE; |
| | 74 | |
| | 75 | prefix_temp[strlen (prefix_temp) - strlen (basename)] = '\0'; |
| | 76 | |
| | 77 | g_free (basename); |
| | 78 | |
| | 79 | |
| 48 | | gchar *makefile_name = g_build_filename (exe_path, "Makefile.am", NULL); |
| 49 | | gchar *data_path_temp = NULL; |
| 50 | | if (g_file_test (makefile_name, G_FILE_TEST_EXISTS)) { |
| 51 | | g_print ("%s exists, we are in the source directory\n", makefile_name); |
| | 82 | g_print ("base path %s --- ", prefix_temp); |
| | 83 | if (in_source_dir) { |
| | 84 | g_print ("source directory\n"); |
| 59 | | #ifdef G_OS_WIN32 |
| 60 | | bin_path = g_build_path (G_DIR_SEPARATOR_S, path, "bin", NULL); |
| 61 | | // lib_path = g_build_path (G_DIR_SEPARATOR_S, path, "lib", NULL); |
| 62 | | data_path_temp = g_build_path (G_DIR_SEPARATOR_S, path, "share", NULL); |
| 63 | | #else |
| 64 | | bin_path = gbr_find_lib_dir (PREFIX "/bin"); |
| 65 | | // lib_path = gbr_find_lib_dir (PREFIX "/lib"); |
| 66 | | data_path_temp = gbr_find_data_dir (PREFIX "/share/fm_gui"); |
| 67 | | #endif |
| 68 | | data_path = g_build_path (G_DIR_SEPARATOR_S, data_path_temp, "fm_gui", NULL); |
| | 93 | prefix = g_strdup (prefix_temp); |
| | 94 | bin_path = g_build_path (G_DIR_SEPARATOR_S, prefix, "bin", NULL); |
| | 95 | data_path = g_build_path (G_DIR_SEPARATOR_S, prefix, "share", PACKAGE, NULL); |
| | 96 | |