From: darco Date: Thu, 23 Feb 2006 20:17:17 +0000 (+0000) Subject: Added "--with-userdir" to configure script to change the default user settings directory X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=32d54ad4e87fa4b94c09e5d85e90a0da2b71cc8d;p=synfig.git Added "--with-userdir" to configure script to change the default user settings directory git-svn-id: http://svn.voria.com/code@127 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/config/configure.ac b/synfig-studio/trunk/config/configure.ac index 02187fd..f40b42d 100755 --- a/synfig-studio/trunk/config/configure.ac +++ b/synfig-studio/trunk/config/configure.ac @@ -95,6 +95,22 @@ windowsys="gtkmm" AC_DEFINE(STUDIO_WINSYS_H,"gtkmm/winsys.h",[blah]) AM_CONDITIONAL(WINDOWSYS_GTKMM,true) +AC_ARG_WITH(userdir,[ + --with-userdir=(dirname) Relative path to user directory],[ +],[ +case "$host" in + *mingw* | *cygwin*) + with_userdir="Synfig" + ;; + *darwin*) + with_userdir="Library/Synfig" + ;; + *) + with_userdir="Synfig" + ;; +esac +]) +AC_DEFINE_UNQUOTED(SYNFIG_USER_APP_DIR,"$with_userdir",[Synfig User Data Directory]) # --- FMOD CHECK ------------- AC_ARG_WITH(libfmod,[ diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index 14fc4b1..14c962e 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -131,6 +131,14 @@ using namespace studio; /* === M A C R O S ========================================================= */ +#ifndef SYNFIG_USER_APP_DIR +#ifdef __APPLE__ +#define SYNFIG_USER_APP_DIR "Library/Synfig" +#else +#define SYNFIG_USER_APP_DIR "Synfig" +#endif +#endif + #ifndef DPM2DPI #define DPM2DPI(x) (float(x)/39.3700787402f) #define DPI2DPM(x) (float(x)*39.3700787402f) @@ -1340,11 +1348,7 @@ App::~App() String App::get_user_app_directory() { -#ifdef __APPLE__ - return Glib::build_filename(Glib::get_home_dir(),"Library/Synfig"); -#else - return Glib::build_filename(Glib::get_home_dir(),"Synfig"); -#endif + return Glib::build_filename(Glib::get_home_dir(),SYNFIG_USER_APP_DIR); } synfig::String