[Bf-blender-cvs] [cb7d430] master: Fix for blender.exe -r being registering blender-app.exe
Sergey Sharybin
noreply at git.blender.org
Fri Aug 29 13:37:59 CEST 2014
Commit: cb7d430c191b1c22b54637f1589cec56bdd25615
Author: Sergey Sharybin
Date: Fri Aug 29 17:36:59 2014 +0600
Branches: master
https://developer.blender.org/rBcb7d430c191b1c22b54637f1589cec56bdd25615
Fix for blender.exe -r being registering blender-app.exe
===================================================================
M source/blender/blenlib/intern/winstuff.c
===================================================================
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index 65ded37..a67e116 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -92,6 +92,7 @@ void RegisterBlendExtension(void)
const char *ThumbHandlerDLL;
char RegCmd[MAX_PATH * 2];
char MBox[256];
+ char *blender_app;
#ifndef WIN64
BOOL IsWOW64;
#endif
@@ -99,6 +100,12 @@ void RegisterBlendExtension(void)
printf("Registering file extension...");
GetModuleFileName(0, BlPath, MAX_PATH);
+ /* Replace the actual app name with the wrapper. */
+ blender_app = strstr(BlPath, "blender-app.exe");
+ if (blender_app != NULL) {
+ strcpy(blender_app, "blender.exe");
+ }
+
/* root is HKLM by default */
lresult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Classes", 0, KEY_ALL_ACCESS, &root);
if (lresult != ERROR_SUCCESS) {
More information about the Bf-blender-cvs
mailing list