diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 0039095..a8f047a 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -6,15 +6,20 @@ Known issues - Mailsend does not support multibyte chars when sending emails under Windows, so not all special characters can be used in warning emails - Unattended installations are not possible when upstream package is installed -Todo: - -- check for smartd upstream service before upgrading -- check if smartd needs uninstall, launch uninstall function instead of sc - - Changelog --------- +[v6.6-1] 10 Apr 2018 +- Updated default configuration to include temperature warnings +- UI now asks for UAC privileges +- Various installer and UI fixes +- Updated upstream release to v6.6 +- Updated python from 3.4 to 3.6.4 + - Switched from py2exe to cx_freeze + - Resolved issue where special characters like 'ö' could make erroraction_config.py fail + - Prevent earlier python versions to interfere with current installation +- Updated pygubu from 0.9.8.1 to 0.9.8.2 +- Faster installation process [v6.5-2-dev] 12 May 2017 - General work to render smartmontools-win upstream friendly @@ -22,8 +27,18 @@ Changelog - Allow smartd-pyngui solo installation for usage with upstream package, with smartd.conf file detection - Check for upstream service presence before installing smartd service - Uninstallation checks if current smartd service belongs to smartmontools-win, if not asks if it should be uninstalled +- Multiple improvements and fixes in smartd_pyngui + - Made uncorrectable sectors monitoring options more precise + - Made current pending sectors monitoring options more precise + - Added temperature monitoring options + - Fix selftest regexes weren't corretly generated + - Fix script for -M exec needs singlequotes instead of doublequotes to make smartd -q showtests happy + - Made scrollbars follow resized window + - Updated UI text for disambigution about enery saving - Initial log file is not overwritten by new installations - Added more explicit error messages on service failures +- Updated pygubu from 0.9.7.8 to 0.9.8.1 +- Updated py2exe to 0.9.2.2 [v6.5-1] 25 Avr 2017 diff --git a/erroraction_config/cxsetup.py b/erroraction_config/cxsetup.py new file mode 100644 index 0000000..91c4ed2 --- /dev/null +++ b/erroraction_config/cxsetup.py @@ -0,0 +1,37 @@ +from cx_Freeze import setup, Executable + + +import os.path +PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__)) + +os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6') +os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6') + +options = { + 'build_exe': { + 'include_files':[ + os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tk86t.dll'), + os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tcl86t.dll'), + 'erroraction_config.ui', + 'smartd_pyngui.ui', + ], + #'includes':["pygubu.builder"], + #'excludes':["PyQt4.QtSql", "sqlite3", + # "scipy.lib.lapack.flapack", + # "PyQt4.QtNetwork", + # "PyQt4.QtScript", + # "numpy.core._dotblas", + # "PyQt5", "email", "http", "pyodoc_data", "unittest", "xml", "urllib"], + "optimize": 2, + }, +} + + +# On appelle la fonction setup +setup( + options = options, + name = "smartd_pyngui", + version = "0.3.0.2", + description = "Smartmontools-win GUI", + executables = [Executable("erroraction_config.py", icon= 'erroraction_config.ico', base = None), Executable("smartd_pyngui.py", icon= 'smartd_pyngui.ico', base = None)] +) diff --git a/smartmontools for Windows main.iss b/smartmontools for Windows main.iss index 98fd816..428dc32 100644 --- a/smartmontools for Windows main.iss +++ b/smartmontools for Windows main.iss @@ -1,21 +1,21 @@ ; smartmontools for Windows package -#define BuildNumber "2017050301" +#define BuildNumber "2018032701" #define AppName "smartmontools for Windows" #define AppShortName "smartmontools-win" -#define MajorVersion "6.5" -#define MinorVersion "2" -#define SubBuild "2" +#define MajorVersion "6.6" +#define MinorVersion "1" +#define SubBuild "3" ; Define build type -dev -beta -rc for WIP, leave empty for RTM -#define BuildType "-dev" +#define BuildType "" #define AppPublisher "Orsiris de Jong" #define AppURL "http://www.netpower.fr" -#define CopyrightYears="2012-2017" +#define CopyrightYears="2012-2018" #define BaseDir "C:\ODJ\BTC\Smartmontools for Windows" -#define SmartmonToolsDir "smartmontools-6.5-1.win32-setup" +#define SmartmonToolsDir "smartmontools-6.6-1.win32-setup" #define smartdPynguiDir "smartd-pyngui" -#define erroractionGuiDir "erroraction-gui" +;#define erroractionGuiDir "erroraction-gui" #define SendEmailDir "sendEmail-v156" #define MailsendDir "mailsend1.19" #define GzipDir "gzip-1.3.12-1-bin" @@ -97,8 +97,8 @@ Source: "{#BaseDir}\{#SmartmontoolsDir}\bin64\smartctl-nc.exe"; DestDir: "{app}\ Source: "{#BaseDir}\{#SmartmontoolsDir}\bin64\smartd.exe"; DestDir: "{app}\bin"; Components: core; Flags: 64bit; Check: IsWin64; AfterInstall: TestForExistingSmartdUpstream(); Source: "{#BaseDir}\{#SmartmontoolsDir}\bin64\wtssendmsg.exe"; DestDir: "{app}\bin"; Components: core\service\localalert; Flags: 64bit; Check: IsWin64 Source: "{#BaseDir}\{#SmartmontoolsDir}\doc\*"; DestDir: "{app}\doc\smartmontools"; Components: core; Flags: ignoreversion recursesubdirs createallsubdirs -Source: "{#BaseDir}\{#smartdPynguiDir}\*"; DestDir: "{app}\bin\{#smartdPynguiDir}"; Components: core\service\gui; Flags: recursesubdirs createallsubdirs -Source: "{#BaseDir}\{#erroractionGuiDir}\*"; DestDir: "{app}\bin\{#smartdPynguiDir}"; Components: core\service\gui; Flags: recursesubdirs createallsubdirs +Source: "{#BaseDir}\{#smartdPynguiDir}\*"; Excludes: "tzdata,demos,msgs,images"; DestDir: "{app}\bin\{#smartdPynguiDir}"; Components: core\service\gui; Flags: recursesubdirs createallsubdirs +;Source: "{#BaseDir}\{#erroractionGuiDir}\*"; DestDir: "{app}\bin\{#smartdPynguiDir}"; Components: core\service\gui; Flags: recursesubdirs createallsubdirs Source: "{#BaseDir}\{#vcRedistDir}\msvcr100.dll"; DestDir: "{app}\bin\{#smartdPynguiDir}"; Components: core\service\gui; Source: "{#BaseDir}\{#MailSendDir}\mailsend.exe"; DestDir: "{app}\bin"; Components: core\service\mailalert; Source: "{#BaseDir}\{#MailSendDir}\COPYRIGHT.TXT"; DestDir: "{app}\doc\mailsend"; Components: core\service\mailalert; @@ -119,26 +119,22 @@ Source: "{#BaseDir}\erroraction.cmd"; DestDir: "{app}\bin"; Components: core\ser Source: "{#BaseDir}\erroraction_config.cmd"; DestDir: "{app}\bin"; Components: core\service; Flags: confirmoverwrite; Check: NoExternalErroractionFile(); AfterInstall: UpdateErroractionConfFile(); Source: "{#BaseDir}\ScheduledTask.xml"; DestDir: "{app}\bin"; Components: core\scheduledtestalerts; AfterInstall: WriteScheduledTest(); Source: "{#BaseDir}\smartd.conf"; DestDir: "{app}\bin"; Components: core\service; Flags: confirmoverwrite; Check: NoExternalSmartdFile(); AfterInstall: UpdateSmartdConfFile(); -Source: "{#BaseDir}\{#smartdPynguiDir}\*"; DestDir: "{app}\bin\{#smartdPynguiDir}"; Components: smartdpyngui; Flags: recursesubdirs createallsubdirs +Source: "{#BaseDir}\{#smartdPynguiDir}\*"; Excludes: "tzdata,demos,msgs,images"; DestDir: "{app}\bin\{#smartdPynguiDir}"; Components: smartdpyngui; Flags: recursesubdirs createallsubdirs [Run] -;Filename: {sys}\sc.exe; Parameters: "create ""{#SmartServiceName}"" binPath= ""\""{app}\bin\smartd.exe\"" --service -c \""{app}\bin\smartd.conf\"""" start= auto DisplayName= ""S.M.A.R.T. Harddisk lifeguard for Windows service"""; Components: core\service; OnlyBelowVersion: 6.0; Flags: runhidden -;Filename: {sys}\sc.exe; Parameters: "create ""{#SmartServiceName}"" binPath= ""\""{app}\bin\smartd.exe\"" --service -c \""{app}\bin\smartd.conf\"""" start= delayed-auto DisplayName= ""S.M.A.R.T. Harddisk lifeguard for Windows service"""; Components: core\service; MinVersion: 6.0; Flags: runhidden -;Filename: {sys}\sc.exe; Parameters: "delete {#SmartServiceName}"; Components: core\service; Check: IsUpdateInstall(); StatusMSG: "Removing any old smart service instance."; Flags: runhidden waituntilterminated Filename: {app}\bin\update-smart-drivedb.exe; Parameters: "/S"; Components: core\updatedb; StatusMSG: "Updating drive database."; Flags: waituntilterminated -;Filename: {app}\bin\smartd.exe; Parameters: "install -c ""{app}\bin\smartd.conf"""; Components: core\service; StatusMSG: "Setting up smart service."; Flags: runhidden Filename: {app}\bin\{#smartdPynguiDir}\smartd_pyngui.exe; Parameters: "-c ""{app}\bin\smartd.conf"""; Components: core\service\gui; StatusMSG: "Setup Smartd service"; Flags: waituntilterminated skipifsilent Filename: {app}\bin\{#smartdPynguiDir}\smartd_pyngui.exe; Components: smartdpyngui; StatusMSG: "Setup Smartd service"; Flags: waituntilterminated skipifsilent Filename: {app}\bin\{#smartdPynguiDir}\erroraction_config.exe; Parameters: "-c ""{app}\bin\erroraction_config.cmd"""; Components: core\service\gui; StatusMSG: "Setup alert settings"; Flags: waituntilterminated skipifsilent Filename: {app}\bin\scheduled_send.cmd; Components: core\scheduledtestalerts; StatusMsg: "Setting up scheduled test send"; Flags: runhidden [Icons] -Name: {group}\Reconfigure SMART service; Filename: "{app}\bin\{#smartdPynguiDir}\smartd_pyngui.exe"; Parameters: "-c ""{app}\bin\smartd.conf"""; Components: core\service\gui; IconFilename: "{app}\bin\{#smartdPynguiDir}\smartd_pyngui.ico" -Name: {group}\Reconfigure SMART service; Filename: "{app}\bin\{#smartdPynguiDir}\smartd_pyngui.exe"; Components: smartdpyngui; IconFilename: "{app}\bin\{#smartdPynguiDir}\smartd_pyngui.ico" -Name: {group}\Reconfigure SMART Alert settings; Filename: "{app}\bin\{#smartdPynguiDir}\erroraction_config.exe"; Parameters: "-c ""{app}\bin\erroraction_config.cmd"""; Components: core\service\gui; IconFilename: "{app}\bin\{#smartdPynguiDir}\erroraction_config.ico" +Name: {group}\Reconfigure SMART service; Filename: "{app}\bin\{#smartdPynguiDir}\smartd_pyngui.exe"; Parameters: "-c ""{app}\bin\smartd.conf"""; Components: core\service\gui; +Name: {group}\Reconfigure SMART service; Filename: "{app}\bin\{#smartdPynguiDir}\smartd_pyngui.exe"; Components: smartdpyngui; +Name: {group}\Reconfigure SMART Alert settings; Filename: "{app}\bin\{#smartdPynguiDir}\erroraction_config.exe"; Parameters: "-c ""{app}\bin\erroraction_config.cmd"""; Components: core\service\gui; Name: {group}\Visit NetPower.fr; Filename: http://www.netpower.fr; Components: authorlinks; Name: {group}\Visit smartmontools Site; Filename: http://smartmontools.sourceforge.net; Components: authorlinks; -Name: {group}\Fix Bad sectors (use at own risk!); Filename: "{app}\bin\fix_badsectors.cmd"; Components: fixbadsecttools +;Name: {group}\Fix Bad sectors (use at own risk!); Filename: "{app}\bin\fix_badsectors.cmd"; Components: fixbadsecttools Name: "{group}\{cm:UninstallProgram, {#=AppName}}"; Filename: {uninstallexe}; [Registry] @@ -153,6 +149,10 @@ Root: HKLM; Subkey: SOFTWARE\Classes\Drive\shell\smartctllongtest\command; Value ; TODO: check if smartd should remain because of upstream package ;Filename: {sys}\sc.exe; Parameters: "delete ""{#SmartServiceName}"""; Components: core\service; Flags: runhidden +; Remove earlier versions of smartd-pyngui in order to avoid python conflicts +[InstallDelete] +Type: filesandordirs; Name: "{app}\bin\{#smartdPynguiDir}"; + [UninstallDelete] Type: Files; Name: "{app}\bin\erroraction.cmd"; Type: Files; Name: "{app}\bin\erroraction_config.cmd"; @@ -234,8 +234,6 @@ begin InitialLogFile := ExpandConstant('{app}\smartmontools-install-{#MajorVersion}-{#MinorVersion}.log'); SaveStringToFile(InitialLogFile, '# Smartmontools for Windows installed on ' + GetDateTimeString('dd mmm yyyy hh:nn:ss', #0, #0) + #13#10 + #13#10, True); ShellExec('', ExpandConstant('{cmd}') ,ExpandConstant('/c for /f "delims= " %i in (' + #39 + '"{app}\bin\smartctl" --scan' + #39 +') do "{app}\bin\smartctl.exe" -a %i >> "' + InitialLogFile + '"'), '', SW_HIDE, ewWaitUntilTerminated, resultcode) - if resultcode <> 0 then - MsgBox('Cannot create initial log file in [' + InitialLogFile + '].', mbError, MB_OK); end; //// ScheduledTask command file @@ -269,6 +267,8 @@ begin InstallService; end else + if (ServiceExists('{#SmartServiceName}') = true) then + UninstallService('{#SmartServiceName}') InstallService; end; diff --git a/smartmontools for Windows strings.iss b/smartmontools for Windows strings.iss index 09af6bd..7350545 100644 --- a/smartmontools for Windows strings.iss +++ b/smartmontools for Windows strings.iss @@ -1,4 +1,4 @@ -// String file for smartmontools for Windows installer v6.5-2+ +// String file for smartmontools for Windows installer v6.6-1+ ; Installation dialog @@ -80,4 +80,4 @@ de.smarttestlong=Langen SMART-Test durchf en.warningmessage=WARNING: One of your hard disks has SMART errors. Please write down this message and contact your technical support as soon as possible. fr.warningmessage=ATTENTION: Un de vos disques durs rencontre des erreurs SMART. Merci de bien vouloir noter ce message et contacter votre support technique aussi rapidement que possible. -de.warningmessage=WARNUNG: Eine Ihrer Festplatten hat SMART-Fehler. Bitte schreiben Sie diese Nachricht auf und kontaktieren Sie Ihren technischen Support so schnell wie möglich. +de.warningmessage=WARNUNG: Eine Ihrer Festplatten hat SMART-Fehler. Bitte schreiben Sie diese Nachricht auf und kontaktieren Sie Ihren technischen Support.