Advertisement
dominus

Untitled

Dec 10th, 2023
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. #ifdef MACOSX
  2. string app_path;
  3. string bundle_res;
  4. string bundle_data;
  5. string bundle_lib;
  6. if (is_system_path_defined("<APPBUNDLE>")) {
  7. app_path = get_system_path("<APPBUNDLE>");
  8. if (U7exists(app_path)) {
  9. bundle_res = app_path;
  10. bundle_res += "/Contents/Resources";
  11. bundle_data = bundle_res;
  12. bundle_data += "/share";
  13. bundle_lib = bundle_res;
  14. bundle_lib += "/lib";
  15. const gchar *bdata = bundle_data.ToCharArray()[0];
  16. g_setenv("XDG_DATA_DIRS", bdata, 0);
  17. g_setenv("GTK_DATA_PREFIX", bundle_res, 0);
  18. g_setenv("GTK_EXE_PREFIX", bundle_res, 0);
  19. g_setenv("GTK_PATH", bundle_res, 0);
  20. g_setenv("GDK_PIXBUF_MODULE_FILE", bundle_lib + "/gdk-pixbuf-2.0/2.10.0/loaders.cache", 0);
  21. g_setenv("GTK_IM_MODULE_FILE", bundle_lib + "/gtk-3.0/3.0.0/immodules.cache", 0);
  22. }
  23. }
  24. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement