Page MenuHome

winblender2.patch

winblender2.patch

Index: source/creator/creator.c
===================================================================
--- source/creator/creator.c (revision 34507)
+++ source/creator/creator.c (working copy)
@@ -236,6 +236,7 @@
BLI_argsPrintArgDoc(ba, "--window-border");
BLI_argsPrintArgDoc(ba, "--window-borderless");
BLI_argsPrintArgDoc(ba, "--window-geometry");
+ BLI_argsPrintArgDoc(ba, "--start-console");
printf("\n");
printf ("Game Engine Specific Options:\n");
@@ -469,6 +470,13 @@
return 0;
}
+extern int wm_start_with_console; // blender/windowmanager/intern/wm_init_exit.c
+static int start_with_console(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
+{
+ wm_start_with_console = 1;
+ return 0;
+}
+
static int register_extension(int UNUSED(argc), char **UNUSED(argv), void *data)
{
#ifdef WIN32
@@ -1055,7 +1063,8 @@
BLI_argsAdd(ba, 2, "-p", "--window-geometry", "<sx> <sy> <w> <h>\n\tOpen with lower left corner at <sx>, <sy> and width and height as <w>, <h>", prefsize, NULL);
BLI_argsAdd(ba, 2, "-w", "--window-border", "\n\tForce opening with borders (default)", with_borders, NULL);
BLI_argsAdd(ba, 2, "-W", "--window-borderless", "\n\tForce opening without borders", without_borders, NULL);
- BLI_argsAdd(ba, 2, "-R", NULL, "\n\tRegister .blend extension (windows only)", register_extension, ba);
+ BLI_argsAdd(ba, 2, "-con", "--start-console", "\n\tStart with the console window open (ignored if -b is set)", start_with_console, NULL);
+ BLI_argsAdd(ba, 2, "-R", NULL, "\n\tRegister .blend extension (Windows only)", register_extension, ba);
/* third pass: disabling things and forcing settings */
BLI_argsAddCase(ba, 3, "-nojoystick", 1, NULL, 0, "\n\tDisable joystick support", no_joystick, syshandle);
Index: source/creator/CMakeLists.txt
===================================================================
--- source/creator/CMakeLists.txt (revision 34507)
+++ source/creator/CMakeLists.txt (working copy)
@@ -96,6 +96,17 @@
)
if(WIN32 AND NOT UNIX)
+ string(SUBSTRING ${BLENDER_VERSION} 0 1 bver1)
+ string(SUBSTRING ${BLENDER_VERSION} 2 1 bver2)
+ string(SUBSTRING ${BLENDER_VERSION} 3 1 bver3)
+ add_definitions(
+ -DBLEN_VER_RC_STR="${BLENDER_VERSION}"
+ -DBLEN_VER_RC_1=${bver1}
+ -DBLEN_VER_RC_2=${bver2}
+ -DBLEN_VER_RC_3=${bver3}
+ -DBLEN_VER_RC_4=0
+ )
+
list(APPEND SRC
../icons/winblender.rc
)
Index: source/blender/windowmanager/intern/wm_init_exit.c
===================================================================
--- source/blender/windowmanager/intern/wm_init_exit.c (revision 34507)
+++ source/blender/windowmanager/intern/wm_init_exit.c (working copy)
@@ -109,8 +109,8 @@
BKE_reports_clear(CTX_wm_reports(C));
}
+int wm_start_with_console = 0;
-
/* only called once, for startup */
void WM_init(bContext *C, int argc, char **argv)
{
@@ -118,11 +118,11 @@
if (!G.background) {
wm_ghost_init(C); /* note: it assigns C to ghost! */
wm_init_cursor_data();
+ WM_toggle_console(C, wm_start_with_console);
}
GHOST_CreateSystemPaths();
wm_operatortype_init();
-
set_free_windowmanager_cb(wm_close_and_free); /* library.c */
set_blender_test_break_cb(wm_window_testbreak); /* blender.c */
DAG_editors_update_cb(ED_render_id_flush_update); /* depsgraph.c */
@@ -347,6 +347,8 @@
sound_exit();
+ WM_toggle_console(C, 1); // never leave behind invisible consoles
+
/* first wrap up running stuff, we assume only the active WM is running */
/* modal handlers are on window level freed, others too? */
/* note; same code copied in wm_files.c */
Index: source/icons/winblender.rcscons
===================================================================
--- source/icons/winblender.rcscons (revision 34507)
+++ source/icons/winblender.rcscons (working copy)
@@ -1,2 +0,0 @@
-APPICON ICON "source\\icons\\winblender.ico"
-BLENDERFILE ICON "source\\icons\\winblenderfile.ico"
Index: source/icons/SConscript
===================================================================
--- source/icons/SConscript (revision 34507)
+++ source/icons/SConscript (working copy)
@@ -1,9 +1,12 @@
#!/usr/bin/python
Import ('env')
+import btools
-if env['OURPLATFORM'] == 'linuxcross':
- source = 'linuxcrossblender.rcscons'
-else:
- source = 'winblender.rcscons'
+env['RCFLAGS'].append("-DWINDRES")
+env['RCFLAGS'].append("-DBLEN_VER_RC_STR_M=" + btools.VERSION)
+env['RCFLAGS'].append("-DBLEN_VER_RC_1=" + btools.VERSION[0])
+env['RCFLAGS'].append("-DBLEN_VER_RC_2=" + btools.VERSION[2])
+env['RCFLAGS'].append("-DBLEN_VER_RC_3=" + btools.VERSION[3])
+env['RCFLAGS'].append("-DBLEN_VER_RC_4=0")
-env.BlenderRes('winresource', source, ['core'], priority=[95])
+env.BlenderRes('winresource', 'winblender.rc', ['core'], priority=[95])
Index: source/icons/winblender.rc
===================================================================
--- source/icons/winblender.rc (revision 34507)
+++ source/icons/winblender.rc (working copy)
@@ -1,2 +1,39 @@
-APPICON ICON "winblender.ico"
-BLENDERFILE ICON "winblenderfile.ico"
+#define BLENDERFILE 1
+#define IDR_VERSION1 1
+
+#ifdef WINDRES
+ #include "winresrc.h"
+ #define IDC_STATIC (-1)
+ #define STRINGIFY_(x) #x
+ #define STRINGIFY(x) STRINGIFY_(x)
+ #define BLEN_VER_RC_STR STRINGIFY(BLEN_VER_RC_STR_M)
+#endif
+
+APPICON ICON DISCARDABLE "winblender.ico"
+BLENDERFILE ICON DISCARDABLE "winblenderfile.ico"
+
+IDR_VERSION1 VERSIONINFO
+FILEVERSION BLEN_VER_RC_1, BLEN_VER_RC_2, BLEN_VER_RC_3, BLEN_VER_RC_4
+PRODUCTVERSION BLEN_VER_RC_1, BLEN_VER_RC_2, BLEN_VER_RC_3, BLEN_VER_RC_4
+FILEOS 0x00000004
+FILETYPE 0x00000001
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "04090000"
+ BEGIN
+ VALUE "FileVersion", BLEN_VER_RC_STR
+ VALUE "ProductVersion", BLEN_VER_RC_STR
+ VALUE "CompanyName", "Blender Foundation"
+ VALUE "FileDescription", "Blender"
+ VALUE "LegalCopyright", "GPLv2 (Blender Foundation)"
+ VALUE "OriginalFilename", "blender.exe"
+ VALUE "ProductName", "Blender"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x0000
+ END
+END
+
Index: source/icons/linuxcrossblender.rcscons
===================================================================
--- source/icons/linuxcrossblender.rcscons (revision 34507)
+++ source/icons/linuxcrossblender.rcscons (working copy)
@@ -1,2 +0,0 @@
-APPICON ICON "source/icons/winblender.ico"
-BLENDERFILE ICON "source/icons/winblenderfile.ico"

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
63/53/61e3325475b6ea04508f228db6d2

Event Timeline