Page MenuHome

winstuff.patch

winstuff.patch

Index: source/creator/creator.c
===================================================================
--- source/creator/creator.c (revision 34453)
+++ 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 34453)
+++ source/creator/CMakeLists.txt (working copy)
@@ -96,6 +96,18 @@
)
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_TITLE_RC="Blender ${BLENDER_VERSION}"
+ -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 34453)
+++ 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.rc
===================================================================
--- source/icons/winblender.rc (revision 34453)
+++ source/icons/winblender.rc (working copy)
@@ -1,2 +1,31 @@
-APPICON ICON "winblender.ico"
-BLENDERFILE ICON "winblenderfile.ico"
+#define BLENDERFILE 1
+#define IDR_VERSION1 1
+
+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", BLEN_TITLE_RC
+ VALUE "LegalCopyright", "GPLv2 (Blender Foundation)"
+ VALUE "OriginalFilename", "blender.exe"
+ VALUE "ProductName", "Blender"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x0000
+ END
+END
+

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
22/09/54b52fe4bae3b81a1e2a8669caeb

Event Timeline