mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-02-03 17:27:31 +01:00
Mac build changes.
This commit is contained in:
parent
79cc6d8069
commit
fbba2fb4ef
@ -26,13 +26,20 @@
|
||||
#ifndef BYGFOOT_H
|
||||
#define BYGFOOT_H
|
||||
|
||||
//#define MAC_BUILD
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef MAC_BUILD
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#else
|
||||
# include "config.h"
|
||||
#include <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "gettext_macros.h"
|
||||
|
18
src/main.c
18
src/main.c
@ -326,7 +326,6 @@ main_init(gint *argc, gchar ***argv)
|
||||
#endif
|
||||
|
||||
gchar buf[SMALL];
|
||||
gchar *pwd = g_get_current_dir();
|
||||
|
||||
support_directories = NULL;
|
||||
rand_generator = g_rand_new();
|
||||
@ -339,16 +338,31 @@ main_init(gint *argc, gchar ***argv)
|
||||
#endif
|
||||
|
||||
#ifdef G_OS_UNIX
|
||||
#ifndef MAC_BUILD
|
||||
file_add_support_directory_recursive(PACKAGE_DATA_DIR "/" PACKAGE "/support_files");
|
||||
sprintf(buf, "%s%s%s", g_get_home_dir(), G_DIR_SEPARATOR_S, HOMEDIRNAME);
|
||||
file_add_support_directory_recursive(buf);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef MAC_BUILD
|
||||
gchar *pwd = g_get_current_dir();
|
||||
sprintf(buf, "%s%ssupport_files", pwd, G_DIR_SEPARATOR_S);
|
||||
file_add_support_directory_recursive(buf);
|
||||
sprintf(buf, "%s%ssaves", pwd, G_DIR_SEPARATOR_S);
|
||||
file_add_support_directory_recursive(buf);
|
||||
g_free(pwd);
|
||||
#else
|
||||
CFURLRef newurlref;
|
||||
CFStringRef newstring = CFSTR("support_files");
|
||||
|
||||
newurlref = CFBundleCopyResourceURL(CFBundleGetMainBundle(), newstring, NULL, NULL);
|
||||
newstring = CFURLCopyPath(newurlref);
|
||||
CFStringGetCString(newstring, buf, SMALL + 1, kCFStringEncodingASCII);
|
||||
file_add_support_directory_recursive(buf);
|
||||
CFRelease(newurlref);
|
||||
CFRelease(newstring);
|
||||
#endif
|
||||
|
||||
main_init_variables();
|
||||
|
||||
@ -370,10 +384,12 @@ main (gint argc, gchar *argv[])
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#ifndef MAC_BUILD
|
||||
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef G_OS_WIN32
|
||||
int fd1 = open ("stdout.log", O_CREAT|O_WRONLY|O_TRUNC, 0666);
|
||||
dup2 (fd1, 1);
|
||||
|
@ -2,9 +2,15 @@
|
||||
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||
*/
|
||||
|
||||
#define MAC_BUILD
|
||||
|
||||
#ifndef MAC_BUILD
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#else
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user