Save sys-info to file instead of a text block

The main reason for this change is this file is typically used when making bug reports,
its best if users attach this file to reports directly.
This commit is contained in:
Campbell Barton
2016-01-07 00:18:40 +11:00
parent cbc0a73ae4
commit 60c0c47dba
2 changed files with 23 additions and 14 deletions

View File

@@ -1388,16 +1388,32 @@ class WM_OT_appconfig_activate(Operator):
class WM_OT_sysinfo(Operator):
"""Generate system info text, accessible from Blender's internal text editor"""
"""Generate system information, saved into a text file"""
bl_idname = "wm.sysinfo"
bl_label = "System Info"
bl_label = "Save System Info"
filepath = StringProperty(
subtype='FILE_PATH',
options={'SKIP_SAVE'},
)
def execute(self, context):
import sys_info
sys_info.write_sysinfo(self)
sys_info.write_sysinfo(self.filepath)
return {'FINISHED'}
def invoke(self, context, event):
import os
if not self.filepath:
self.filepath = os.path.join(
os.path.expanduser("~"), "system-info.txt")
wm = context.window_manager
wm.fileselect_add(self)
return {'RUNNING_MODAL'}
class WM_OT_copy_prev_settings(Operator):
"""Copy settings from previous version"""