Fixed for win32

This commit is contained in:
Yevgen Muntyan 2006-03-13 05:52:54 -06:00
parent b168742345
commit 08b727aeb1
7 changed files with 8 additions and 21 deletions

View File

@ -579,7 +579,7 @@ moo_app_get_data_dir (MooApp *app,
{
g_return_val_if_fail (MOO_IS_APP (app), NULL);
#ifdef MOO_OS_WIN32
#ifdef __WIN32__
g_return_val_if_fail (app->priv->argv && app->priv->argv[0], g_strdup ("."));
return g_path_get_dirname (app->priv->argv[0]);
#else
@ -603,7 +603,7 @@ moo_app_get_user_data_dir (MooApp *app,
G_GNUC_UNUSED char *basename;
char *dir;
#ifdef MOO_OS_WIN32
#ifdef __WIN32__
dir = g_build_filename (g_get_home_dir (), app->priv->info->short_name, NULL);
#else
basename = g_strdup_printf (".%s", app->priv->info->short_name);
@ -966,10 +966,6 @@ moo_app_init_real (MooApp *app)
app->priv->new_app = TRUE;
gdk_set_program_class (app->priv->info->full_name);
#ifdef __WIN32__
app_dir = moo_app_get_application_dir (app);
#endif
rc_file = moo_app_get_rc_file_name (app);
if (!moo_prefs_load (rc_file, &error))
@ -991,8 +987,9 @@ moo_app_init_real (MooApp *app)
#if defined(__WIN32__) && defined(MOO_BUILD_TERM)
if (app->priv->use_terminal)
{
moo_term_set_helper_directory (app_dir);
g_message ("app dir: %s", app_dir);
char *dir = moo_app_get_data_dir (app, MOO_APP_DATA_LIB);
moo_term_set_helper_directory (dir);
g_free (dir);
}
#endif /* __WIN32__ && MOO_BUILD_TERM */

View File

@ -943,7 +943,7 @@ moo_plugin_init_builtin (void)
#endif
#endif
_moo_active_strings_plugin_init ();
#if defined(MOO_USE_PYGTK) && !defined(__WIN32__)
#ifdef MOO_USE_PYGTK
_moo_python_plugin_init ();
#endif
}

0
moo/moopython/codegen/codegen.py Normal file → Executable file
View File

View File

@ -105,6 +105,7 @@ moo_python_api_init (void)
return FALSE;
}
g_assert (moo_python_running ());
Py_Initialize ();
main_mod = PyImport_AddModule ((char*)"__main__");

View File

@ -154,12 +154,10 @@ moopython_built_sources += $(moopygtk_built_sources)
moopython_cleanfiles += $(moopygtk_cleanfiles)
if MOO_USE_PYGTK
if !MOO_OS_MINGW
moo_built_sources += $(moopython_built_sources)
moo_nodist_sources += $(moopython_nodist_sources)
moo_cleanfiles += $(moopython_cleanfiles)
moo_sources += $(moopython_sources)
endif
endif
moo_extra_dist += $(moopygtk_extra_dist)

View File

@ -15,16 +15,6 @@ headers
#include "moopython/pygtk/moo-pygtk.h"
#ifdef __WIN32__
GType moo_cmd_view_get_type (void)
{
static int n = 0;
g_return_val_if_fail (!n++, 0);
return 0;
}
#endif
%%
modulename _moo_edit
%%

View File

@ -13,6 +13,7 @@
#include "mooutils/moouseractions.h"
#include "mooutils/mooscript/mooscript-parser.h"
#include "mooutils/moocompat.h"
#include <string.h>