Skip to content
Snippets Groups Projects
Commit b2ccc5b2 authored by chrfranke's avatar chrfranke
Browse files

Windows: Provide a non-console version of smartctl for GSmartControl.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2768 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 5a662d1c
No related branches found
No related tags found
No related merge requests found
CHANGELOG for smartmontools
$Id: CHANGELOG,v 1.789 2009/03/19 18:00:35 chrfranke Exp $
$Id: CHANGELOG,v 1.790 2009/03/22 17:17:39 chrfranke Exp $
The most recent version of this file is:
http://smartmontools.cvs.sourceforge.net/smartmontools/sm5/CHANGELOG?view=markup
......@@ -41,6 +41,12 @@ NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
[CF] Windows: Provide a non-console version of smartctl.exe
as smartctl-nc.exe. This prevents that a new console is
opened when smartctl is run from a GUI program with
stdio redirected.
Used by GSmartControl (http://gsmartcontrol.berlios.de/).
[CF] Remove support for platforms without getopt_long() in
smartctl.cpp and smartd.cpp. If getopt_long() is missing,
./configure aborts with an explanatory message.
......
## Process this file with automake to produce Makefile.in
#
# $Id: Makefile.am,v 1.94 2009/01/12 23:57:58 dlukes Exp $
# $Id: Makefile.am,v 1.95 2009/03/22 17:17:39 chrfranke Exp $
#
@SET_MAKE@
......@@ -479,6 +479,7 @@ exedir_win32 = $(distdir_win32)/bin
docdir_win32 = $(distdir_win32)/doc
FILES_WIN32 = $(exedir_win32)/smartctl.exe \
$(exedir_win32)/smartctl-nc.exe \
$(exedir_win32)/smartd.exe \
$(docdir_win32)/AUTHORS.txt \
$(docdir_win32)/CHANGELOG.txt \
......@@ -496,7 +497,9 @@ FILES_WIN32 = $(exedir_win32)/smartctl.exe \
$(docdir_win32)/smartd.conf.5.html \
$(docdir_win32)/smartd.conf.5.txt
CLEANFILES += $(FILES_WIN32) $(exedir_win32)/syslogevt.exe distdir.mkdir syslogevt.check
CLEANFILES += $(FILES_WIN32) $(exedir_win32)/syslogevt.exe \
smartctl-nc.exe smartctl-nc.exe.tmp \
distdir.mkdir syslogevt.check
# Textfile converter from cygutils
UNIX2DOS = unix2dos -D
......@@ -567,6 +570,22 @@ $(docdir_win32)/%.conf: $(srcdir)/%.conf
$(UNIX2DOS) < $< > $@
touch -r $< $@
# Build non-console version of smartctl for GSmartControl.
# The script below changes the word at offset 220 (Subsystem) from 3
# (Console) to 2 (GUI) in a copy of smartctl.exe.
# This will be changed when a tool (like 'editbin') is available in
# the Cygwin distribution
smartctl-nc.exe: smartctl.exe
@rm -f $@
cp -p smartctl.exe $@.tmp
@if test `od -A n -j 220 -N 2 -d $@.tmp` -eq 3; then :; \
else echo "invalid EXE header"; exit 1; fi
@echo "editbin /subsystem:windows $@.tmp"
@echo -ne '\002' | dd bs=1 seek=220 count=1 conv=notrunc of=$@.tmp 2>/dev/null
@if test `od -A n -j 220 -N 2 -d $@.tmp` -eq 2; then :; \
else echo "EXE patch failed"; exit 1; fi
mv -f $@.tmp $@
# Build {config,cvsversion}_vc8.h for MSVC8 from MinGW {config,cvsversion}.h
......
;
; installer.nsi - NSIS install script for smartmontools
;
; Copyright (C) 2006-8 Christian Franke <smartmontools-support@lists.sourceforge.net>
; Copyright (C) 2006-9 Christian Franke <smartmontools-support@lists.sourceforge.net>
;
; Project home page is: http://smartmontools.sourceforge.net
;
; Download and install NSIS from: http://nsis.sourceforge.net/Download
; Process with makensis to create installer (tested with NSIS 2.29)
; Process with makensis to create installer (tested with NSIS 2.44)
;
; $Id: installer.nsi,v 1.4 2008/03/04 22:09:48 ballen4705 Exp $
; $Id: installer.nsi,v 1.5 2009/03/22 17:17:39 chrfranke Exp $
;
......@@ -106,6 +106,15 @@ SectionGroup "!Program files"
SectionEnd
Section "smartctl-nc (GSmartControl)" SMARTCTL_NC_SECTION
SectionIn 1 2
SetOutPath "$INSTDIR\bin"
File "${INPDIR}\bin\smartctl-nc.exe"
SectionEnd
SectionGroupEnd
Section "!Documentation" DOC_SECTION
......@@ -378,6 +387,7 @@ Section "Uninstall"
; Remove files
Delete "$INSTDIR\bin\smartctl.exe"
Delete "$INSTDIR\bin\smartctl-nc.exe"
Delete "$INSTDIR\bin\smartd.exe"
Delete "$INSTDIR\bin\syslogevt.exe"
Delete "$INSTDIR\bin\smartctl-run.bat"
......@@ -462,6 +472,7 @@ FunctionEnd
Function SkipProgPath
!insertmacro CheckSection ${SMARTCTL_SECTION}
!insertmacro CheckSection ${SMARTCTL_NC_SECTION}
!insertmacro CheckSection ${SMARTD_SECTION}
!insertmacro CheckSection ${DOC_SECTION}
!insertmacro CheckSection ${MENU_SECTION}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment