init_texmacs.cpp (TeXmacs-2.1.1-src) | : | init_texmacs.cpp (TeXmacs-2.1.2-src) | ||
---|---|---|---|---|
skipping to change at line 407 | skipping to change at line 407 | |||
// Set extra environment variables for Cygwin | // Set extra environment variables for Cygwin | |||
#ifdef OS_CYGWIN | #ifdef OS_CYGWIN | |||
set_env ("CYGWIN", "check_case:strict"); | set_env ("CYGWIN", "check_case:strict"); | |||
set_env ("COMSPEC", ""); | set_env ("COMSPEC", ""); | |||
set_env ("ComSpec", ""); | set_env ("ComSpec", ""); | |||
#endif | #endif | |||
} | } | |||
static void | ||||
setup_inkscape_extension () { | ||||
debug_boot << "attempt install of inkscape extension \n "; | ||||
#ifdef OS_MINGW | ||||
url ink_ext = url ("$APPDATA/inkscape/extensions"); | ||||
#else | ||||
url ink_ext = "~/.config/inkscape/extensions/"; | ||||
#endif | ||||
if ( exists (ink_ext)) { | ||||
url f1 = url (ink_ext * "texmacs.inx"); | ||||
url f2 = url (ink_ext * "texmacs_reedit.py"); | ||||
url f3 = url (ink_ext * "texmacs_latex.sty"); | ||||
url plug_source = url ("$TEXMACS_PATH/misc/inkscape_extension/"); | ||||
debug_boot << "installing or updating inkscape extension\n"; | ||||
copy (url (plug_source * "texmacs.inx"), f1); | ||||
copy (url (plug_source * "texmacs_reedit.py"), f2); | ||||
copy (url (plug_source * "texmacs_latex.sty"), f3); | ||||
if (!(exists (f1) && exists (f2))) { | ||||
debug_boot << "automatic install of inkscape extension failed\n; "; | ||||
debug_boot << "see documentation for manual install\n"; | ||||
} | ||||
} | ||||
} | ||||
/****************************************************************************** | /****************************************************************************** | |||
* Deprecated initializations | * Deprecated initializations | |||
******************************************************************************/ | ******************************************************************************/ | |||
static void | static void | |||
init_deprecated () { | init_deprecated () { | |||
#ifndef OS_WIN32 | #ifndef OS_WIN32 | |||
// Check for Macaulay 2 | // Check for Macaulay 2 | |||
if (get_env ("M2HOME") == "") | if (get_env ("M2HOME") == "") | |||
if (exists_in_path ("M2")) { | if (exists_in_path ("M2")) { | |||
skipping to change at line 486 | skipping to change at line 462 | |||
******************************************************************************/ | ******************************************************************************/ | |||
void | void | |||
setup_texmacs () { | setup_texmacs () { | |||
url settings_file= "$TEXMACS_HOME_PATH/system/settings.scm"; | url settings_file= "$TEXMACS_HOME_PATH/system/settings.scm"; | |||
debug_boot << "Welcome to TeXmacs " TEXMACS_VERSION "\n"; | debug_boot << "Welcome to TeXmacs " TEXMACS_VERSION "\n"; | |||
debug_boot << HRULE; | debug_boot << HRULE; | |||
set_setting ("VERSION", TEXMACS_VERSION); | set_setting ("VERSION", TEXMACS_VERSION); | |||
setup_tex (); | setup_tex (); | |||
setup_inkscape_extension (); | ||||
string s= scheme_tree_to_block (texmacs_settings); | string s= scheme_tree_to_block (texmacs_settings); | |||
//cout << "settings_t= " << texmacs_settings << "\n"; | //cout << "settings_t= " << texmacs_settings << "\n"; | |||
//cout << "settings_s= " << s << "\n"; | //cout << "settings_s= " << s << "\n"; | |||
if (save_string (settings_file, s) || load_string (settings_file, s, false)) { | if (save_string (settings_file, s) || load_string (settings_file, s, false)) { | |||
failed_error << HRULE; | failed_error << HRULE; | |||
failed_error << "I could not save or reload the file\n\n"; | failed_error << "I could not save or reload the file\n\n"; | |||
failed_error << "\t" << settings_file << "\n\n"; | failed_error << "\t" << settings_file << "\n\n"; | |||
failed_error << "Please give me full access control over this file and\n"; | failed_error << "Please give me full access control over this file and\n"; | |||
failed_error << "rerun 'TeXmacs'.\n"; | failed_error << "rerun 'TeXmacs'.\n"; | |||
End of changes. 2 change blocks. | ||||
25 lines changed or deleted | 0 lines changed or added |