- fixed 'double-click on blend file' errors on Windows -- INTERNATIONAL stuff now also checks the installation directory for /.blender, etc

- registering .blend files for WinNT/2000/XP now works correctly (settings remain after a reboot).
This commit is contained in:
2003-05-22 18:06:25 +00:00
parent b8f2835ba2
commit d617df4793
6 changed files with 74 additions and 13 deletions

View File

@@ -41,6 +41,7 @@
#include "BLI_blenlib.h"
#include "BLI_linklist.h" /* linknode */
#include "BLI_winstuff.h"
#include "BIF_language.h"
#include "BIF_space.h" /* allqueue() */
@@ -174,13 +175,19 @@ void start_interface_font(void) {
U.fontsize= 11;
U.encoding= 0;
#ifdef __APPLE__
#if defined (__APPLE__)
bundlepath = BLI_getbundle();
strcpy(tstr, bundlepath);
strcat(tstr, "/Contents/Resources/");
strcat(tstr, ".bfont.ttf");
result = FTF_SetFont(tstr, U.fontsize);
sprintf(U.fontname, ".blender/.bfont.ttf\0");
#elif defined (WIN32)
BLI_getInstallationDir(tstr);
strcat(tstr, "/.blender/.bfont.ttf\0");
result = FTF_SetFont(tstr, U.fontsize);
sprintf(U.fontname, ".blender/.bfont.ttf\0");
#else
sprintf(U.fontname, ".blender/.bfont.ttf\0");
@@ -273,10 +280,14 @@ int read_languagefile(void) {
if(lines == NULL) {
/* If not found in home, try current dir
* (Resources folder of app bundle on OS X) */
#ifdef __APPLE__
#if defined (__APPLE__)
char *bundlePath = BLI_getbundle();
strcpy(name, bundlePath);
strcat(name, "/Contents/Resources/.Blanguages");
#elif defined (WIN32)
/* Check the installation dir in Windows */
BLI_getInstallationDir(name);
strcat(name,"/.blender/.Blanguages");
#else
strcpy(name, ".blender/.Blanguages");
#endif
@@ -287,8 +298,8 @@ int read_languagefile(void) {
strcpy(name, ".Blanguages");
lines= BLI_read_file_as_lines(name);
if(lines == NULL) {
error("File \".Blanguages\" not found");
return 0;
error("File \".Blanguages\" not found");
return 0;
}
}
}