mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-28 00:35:30 +00:00
Fixed dirs.cpp for Mac OS X to behave same as on Unix (with the addition to look for .app directory content).
This commit is contained in:
parent
c25b9191f4
commit
3218265eed
@ -117,7 +117,7 @@ DIRS *filename_in_datadir(const char *filename)
|
||||
DIRS *dirs = dirs_new();
|
||||
char buf[1024];
|
||||
|
||||
#if defined ALLEGRO_UNIX
|
||||
#if defined ALLEGRO_UNIX || defined ALLEGRO_MACOSX
|
||||
|
||||
/* $HOME/.ase/filename */
|
||||
sprintf(buf, ".ase/%s", filename);
|
||||
@ -133,22 +133,18 @@ DIRS *filename_in_datadir(const char *filename)
|
||||
dirs_add_path(dirs, buf);
|
||||
#endif
|
||||
|
||||
#ifdef ALLEGRO_MACOSX
|
||||
/* $BINDIR/aseprite.app/Contents/Resources/data/filename */
|
||||
sprintf(buf, "aseprite.app/Contents/Resources/data/%s", filename);
|
||||
dirs_cat_dirs(dirs, filename_in_bindir(buf));
|
||||
#endif
|
||||
|
||||
#elif defined ALLEGRO_WINDOWS || defined ALLEGRO_DOS
|
||||
|
||||
/* $BINDIR/data/filename */
|
||||
sprintf(buf, "data/%s", filename);
|
||||
dirs_cat_dirs(dirs, filename_in_bindir(buf));
|
||||
|
||||
#elif defined ALLEGRO_MACOSX
|
||||
|
||||
/* $HOME/.ase/filename */
|
||||
sprintf(buf, ".ase/%s", filename);
|
||||
dirs_cat_dirs(dirs, filename_in_homedir(buf));
|
||||
|
||||
/* $BINDIR/aseprite.app/Contents/Resources/data/filename */
|
||||
sprintf(buf, "aseprite.app/Contents/Resources/data/%s", filename);
|
||||
dirs_cat_dirs(dirs, filename_in_bindir(buf));
|
||||
|
||||
#else
|
||||
|
||||
/* filename */
|
||||
@ -164,7 +160,7 @@ DIRS *filename_in_docsdir(const char *filename)
|
||||
DIRS *dirs = dirs_new();
|
||||
char buf[1024];
|
||||
|
||||
#if defined ALLEGRO_UNIX
|
||||
#if defined ALLEGRO_UNIX || defined ALLEGRO_MACOSX
|
||||
|
||||
/* $BINDIR/docs/filename */
|
||||
sprintf(buf, "docs/%s", filename);
|
||||
@ -176,18 +172,18 @@ DIRS *filename_in_docsdir(const char *filename)
|
||||
dirs_add_path(dirs, buf);
|
||||
#endif
|
||||
|
||||
#ifdef ALLEGRO_MACOSX
|
||||
/* $BINDIR/aseprite.app/Contents/Resources/docs/filename */
|
||||
sprintf(buf, "aseprite.app/Contents/Resources/docs/%s", filename);
|
||||
dirs_cat_dirs(dirs, filename_in_bindir(buf));
|
||||
#endif
|
||||
|
||||
#elif defined ALLEGRO_WINDOWS || defined ALLEGRO_DOS
|
||||
|
||||
/* $BINDIR/docs/filename */
|
||||
sprintf(buf, "docs/%s", filename);
|
||||
dirs_cat_dirs(dirs, filename_in_bindir(buf));
|
||||
|
||||
#elif defined ALLEGRO_MACOSX
|
||||
|
||||
/* $BINDIR/aseprite.app/Contents/Resources/docs/filename */
|
||||
sprintf(buf, "aseprite.app/Contents/Resources/docs/%s", filename);
|
||||
dirs_cat_dirs(dirs, filename_in_bindir(buf));
|
||||
|
||||
#else
|
||||
|
||||
/* filename */
|
||||
|
Loading…
x
Reference in New Issue
Block a user