Compare commits

...
55 Commits
Author SHA1 Message Date
Alexander Shaduri 233aeb339a Tagged 1.0.0. 2017-06-16 13:18:30 +00:00
Alexander Shaduri 16f60c678b Fixed build under older gtk3. 2017-06-16 10:49:59 +00:00
Alexander Shaduri 1b8f7bd886 About dialog: Fixed mailto: links not working under Windows. 2017-06-16 10:26:21 +00:00
Alexander Shaduri 31278654a0 Fixed Help menu items not scolling to right locations. 2017-06-16 10:01:45 +00:00
Alexander Shaduri 80e87d7868 Tweaked default window sizes. 2017-06-16 09:58:13 +00:00
Alexander Shaduri e21ccb9671 Fixed NSIS installer issues. 2017-06-15 21:09:27 +00:00
Alexander Shaduri e6cdcc9ee2 Fixed win64 zip packaging. 2017-06-15 20:07:23 +00:00
Alexander Shaduri 4a579b5141 Fixed "Use system-installed smartctl" not working with newer smartmontools. 2017-06-15 19:54:11 +00:00
Alexander Shaduri dc166364de Implemented native file chooser dialogs (Windows). 2017-06-15 19:37:09 +00:00
Alexander Shaduri 4564fd2948 Disable client-side window decorations under Windows. 2017-06-15 18:16:00 +00:00
Alexander Shaduri c591823c3e Disable dpi-aware for now; it has some artifacts (titlebar, checkboxes, font
size) under 250%.
Make main window a bit larger.
2017-06-15 12:34:38 +00:00
Alexander Shaduri 7a1904c1ef Get rid of "More", make its children direct parts of the GUI. 2017-06-14 21:53:16 +00:00
Alexander Shaduri 5c5466d6b2 Fixed "More" button to show horizontal layout.
Fixed win-dist target not picking up glib-2.0 schemas and Adwaita icons.
2017-06-14 21:30:05 +00:00
Alexander Shaduri 6aaf467950 Don't require library packages in spec - they are auto-computed by OBS. 2017-05-19 21:24:39 +00:00
Alexander Shaduri 428abcb3e7 Fixed syntax error in spec file. 2017-05-19 21:13:01 +00:00
Alexander Shaduri 9dea31e3d7 Don't generate tar.gz distribution files.
Compatibility with gtk3 <= 3.8.
Updated spec file to avoid errors on Fedora.
2017-05-19 21:10:39 +00:00
Alexander Shaduri 154b609576 Removed logo from About dialog (it wasn't working).
Changed back to Windows 2000 compatibility - apparently gtk3 in cross/mingw supports XP.
Updated svn ignore flags for new autotools-generated files.
Updated debian and spec files to reflect new gtk3 requirements.
Enabled dpiAware flag for Windows - gtk3 should support it properly.
Rewrote win32/win64 packaging to pick proper files (including gtk3).
Removed nogtk distribution generation code (it doesn't make sense without gtk installer).
Changed configure-dev to support msys- and cross-based mingw (win32 and win64).
2017-05-19 20:33:43 +00:00
Alexander Shaduri 7bfb502aa0 Added msys configuration to configure-dev. 2017-05-19 16:16:05 +00:00
Alexander Shaduri ded7d3bc86 Properly expand menubar. 2017-05-18 16:42:34 +00:00
Alexander Shaduri 526c1f6a69 Make sure menubar is expanded horizontally. 2017-05-18 16:35:03 +00:00
Alexander Shaduri 6fd501d553 Fixed launching URLs in About dialog under Windows. 2017-05-18 15:57:39 +00:00
Alexander Shaduri 11aa08354e Fixed an error in process_signa.h (win32). 2017-05-18 15:44:31 +00:00
Alexander Shaduri 0bfbebeb8b Avoid unhandled exception Gtk::IconThemeError. 2017-05-18 15:35:14 +00:00
Alexander Shaduri 413ba1c1a9 Fixed autogen warnings about AR. 2017-05-18 15:34:23 +00:00
Alexander Shaduri fdec3e8151 Fixed "empty iconview" text displaying.
Disabled no-deprecation flags to avoid future incompatibilities.
Info window: Renamed "Identity" tab to "General".
2017-05-17 18:28:49 +00:00
Alexander Shaduri 0012f831a8 Fixed a crash on exit. 2017-05-17 17:35:48 +00:00
Alexander Shaduri c8962a4e67 Fix Info Identity tab to look like the gtk2 version. 2017-05-17 17:10:57 +00:00
Alexander Shaduri 74d09cf879 Initial (incomplete) port to GTK 3.4. 2017-05-17 16:49:20 +00:00
Alexander Shaduri afdb516386 Updated copyright years. 2017-05-11 08:42:23 +00:00
Alexander Shaduri 9a1f28fe9a Fixed some win32 installer issues. 2017-05-10 21:26:56 +00:00
Alexander Shaduri b4583a7cc6 Bumped version to 0.9.0. 2017-05-10 20:08:20 +00:00
Alexander Shaduri 9918b13214 Updated drive descriptions to drivedb.h r4430, 2017-05-03.
Fixed selective self-test section parsing (if it's unsupported).
2017-05-10 20:06:44 +00:00
Alexander Shaduri 3f9d830294 Added appdata metainfo file. 2017-05-08 17:54:25 +00:00
Alexander Shaduri 7b2627b236 Clear the drives and show "please rescan" message after the preferences are
updated; this ensures that no old settings are used.
2017-05-08 17:16:27 +00:00
Alexander Shaduri c40d87b3ae Require gtk2 2.6.0 until we move to 2.24.0.
Win32 drive detection: stop scanning only after 3 not-found drives, so that
we detect drives after old removed drives.
2017-05-08 16:47:52 +00:00
Alexander Shaduri 99f707b6c6 Require gtk2 2.24.0, for future compatibility with gtk3. 2017-05-08 10:51:27 +00:00
Alexander Shaduri a561d5fef6 Changed the license field in spec file to conform to OBS requirements. 2016-06-04 16:14:12 +00:00
Alexander Shaduri 1d305e7626 Fixed time formatting with VS. 2015-07-01 12:10:23 +00:00
Alexander Shaduri 194fb51f75 Disable dpiAware flag in win32 manifest since it's not supported that well. 2014-05-29 18:00:49 +00:00
Alexander Shaduri e2dc39bff2 Don't show the info window if there's nothing to show. 2014-05-05 10:37:24 +00:00
Alexander Shaduri 836aa73430 Avoid scientific notation when displaying the drive size. 2014-05-05 10:16:38 +00:00
Alexander Shaduri 63f5b885a3 Fixed glib 2.32 warnings. 2014-05-05 09:36:10 +00:00
Alexander Shaduri c68d017475 Updated to latest libhz. 2014-05-05 09:20:18 +00:00
Alexander Shaduri bbe3bac923 Make sure we write some data from the Info window on Save Output if only basic
data is available.
Fixed a harmless "Number of written bytes doesn't match the data size" warning.
Added support for SSD-only and HDD-only vendor attributes.
Added the latest (r3897 / 2014-04-28) attributes from smartmontools.
Increased the Info window size a bit.
2014-05-05 08:59:13 +00:00
Alexander Shaduri 2293e357f4 Increased main window size a bit to avoid the iconview shift down each time an
icon is selected.
Added some scsi-output properties to full parser to avoid console warnings.
Devices having only basic info can be displayed now in the info window.
2014-04-30 10:38:48 +00:00
Alexander Shaduri 85dbceb14d Fixed a crash at scan time (bad parsing of empty smartctl output sections).
Updated program descriptions to include SSD.
2014-04-16 20:04:04 +00:00
Alexander Shaduri 45cba39be7 RAID volumes which report having SMART are now detected and explicitly set to
not having SMART.
2013-10-17 10:26:53 +00:00
Alexander Shaduri a0b235dd8a Increased timeouts when executing commands before the "Cancel" dialog is
shown; this helps with constant focus stealing from other windows when
smartctl is too slow (usually under Windows).
2013-02-25 20:27:18 +00:00
Alexander Shaduri 7e3db9ec30 Implemented detection for some new "not supported" smartctl messages. 2013-02-24 20:07:51 +00:00
Alexander Shaduri 6cc8770599 Implemented Linux support for Areca controllers with enclosures (untested).
Implemented Windows support for Areca controllers (thanks to Richard Kagerer);
untested so far.
2013-02-24 20:02:30 +00:00
Alexander Shaduri 462d465f3a Modified all glade files to use gtk 2.8 compatibility (not sure if it works).
Removed "tooltip_text" properties from all glade files, "tooltip" should be
enough.
Set the "activates_default" property on all relevant entries in glade files;
this will make the Enter key activate the default dialog action when these
entries are focused.
Added some clarifying text to Add Device dialog.
Clarified the per-drive parameters section (what it does) in Preferences.
Added a confirmation dialog in case the user doesn't set the Parameters field
in one of the Per-Drive Parameters entries.
Added a "Smartctl Options" section to README/Help.
Clarified the difference between smartctl.exe and smartctl-nc.exe in a
tooltip.
Improved some other tooltips.
2013-02-11 11:09:00 +00:00
Alexander Shaduri 6ac62cd0de Device detection is a lot more verbose now.
The read /proc files are now cached to avoid needless re-reading.
Some other minor changes.
2013-02-10 20:55:58 +00:00
Alexander Shaduri 1174b62b8f Bumped version number to 0.8.8. 2012-12-23 19:27:47 +00:00
Alexander Shaduri ef713900a0 Implemented support for HP controllers behind cciss and hpsa/hpahcisr drivers. 2012-12-23 19:25:20 +00:00
Alexander Shaduri c60f6815fa Fixed BDRW drive detection (it was detected as a HDD).
Added support for recent smartctl -i changes.
2012-09-28 08:52:10 +00:00
321 changed files with 7243 additions and 6226 deletions
@@ -8,6 +8,8 @@ config.guess
config.sub
aclocal.m4
config.h.in
compile
ar-lib
missing
install-sh
*.glade.cpp
+1
View File
@@ -0,0 +1 @@
svn propset svn:ignore -F .svnignore.txt .
View File
View File
View File
+231
View File
@@ -0,0 +1,231 @@
# Add autoconf.m4 directory to local macro search path
ACLOCAL_AMFLAGS = -I autoconf.m4
SUBDIRS = data debian.dist src
# These files are actually needed for compilation.
noinst_DATA = AUTHORS.txt LICENSE_gsmartcontrol.txt README.txt
# For the files to be bundled with the distribution, specify them in
# one of the following.
# These will be installed into docdir.
# Some of these files are actually needed for compilation (see src/res/Makefile.am).
dist_doc_DATA = AUTHORS.txt ChangeLog NEWS README.txt \
LICENSE_boost_1_0.txt \
LICENSE_bsd-ac.txt \
LICENSE_bsd-ucb.txt \
LICENSE_gpl2.txt \
LICENSE_gpl3.txt \
LICENSE_gsmartcontrol.txt \
LICENSE_hz.txt \
LICENSE_pcrecpp.txt \
LICENSE_unlicense.txt \
LICENSE_zlib.txt
# nobase_ preserves their directory names.
nobase_dist_doc_DATA = contrib/cron-based_noadmin/README \
contrib/cron-based_noadmin/cron_gather_smart.sh \
contrib/cron-based_noadmin/crontab.example \
contrib/cron-based_noadmin/smartctl_subst.sh
# Extra files bundled with distribution.
# file2csource.sh is needed for building but not installed.
EXTRA_DIST = COPYING INSTALL configure autogen.sh \
gsmartcontrol.kdev4 \
file2csource.sh \
gsmartcontrol.spec
# rpm support
src-rpm: dist
rpmbuild -ts $(distdir).tar.bz2
# NSIS installer support.
# Requires installed NSIS, smartctl-nc.exe, smartctl.exe, update-smart-drivedb.exe.
# Gtkmm dlls and pcre dlls are required if linking against them.
# dos2unix on build machine.
# Execute only with win32 build present.
WIN_ZIP_NAME = $(PACKAGE)-$(VERSION)-@WINDOWS_SUFFIX@
win-dist: win-dist-nocleanup win-dist-cleanup
win-dist-nocleanup: win-dist-prepare nsis-dist-nocleanup win-zip-dist-nocleanup
win-dist-cleanup: win-zip-dist-cleanup nsis-dist-cleanup
rm -rf win-dist
win-dist-clean: win-dist-cleanup
rm -f gsmartcontrol-*.exe gsmartcontrol-*.zip
win-dist-prepare-all: nsis-dist-prepare win-zip-dist-prepare
# All of GTK+
GTK_BIN_FILES = gdk-pixbuf-query-loaders.exe \
gspawn-win32-helper-console.exe \
gspawn-win32-helper.exe \
gspawn-win64-helper-console.exe \
gspawn-win64-helper.exe \
gtk-query-immodules-3.0.exe \
gtk-update-icon-cache-3.0.exe \
libatk-1.*.dll \
libatkmm-1.*.dll \
libbz2-*.dll \
libcairo-*.dll \
libcairomm-1*.dll \
libepoxy-*.dll \
libffi-*.dll \
libexpat-*.dll \
libfontconfig-*.dll \
libfreetype-*.dll \
libgdk-3*.dll \
libgdk_pixbuf-2.*.dll \
libgdkmm-3.*.dll \
libgio-2.*.dll \
libgiomm-2.*.dll \
libglib-2.*.dll \
libglibmm*2.*.dll \
libgmodule-2.*.dll \
libgobject-2.*.dll \
libgraphite*.dll \
libgthread-2.*.dll \
libgtk-3*.dll \
libgtkmm-3*.dll \
libharfbuzz*.dll \
libiconv*.dll \
libintl*.dll \
libjasper*.dll \
libjpeg*.dll \
liblzma*.dll \
libpango*-1.*.dll \
libpixman*.dll \
libpng16-*.dll \
libsigc-2.*.dll \
libstdc++-*.dll \
libtiff-*.dll \
libwinpthread-*.dll \
libxml2-*.dll \
zlib1.dll
# Don't strip smartctl (it will only change the header), and
# don't strip update-smart-drivedb (it will break its CRC check).
win-dist-prepare: all
$(MKDIR_P) win-dist
cp $(top_srcdir)/data/icon_*.png win-dist/
$(MKDIR_P) win-dist/doc
cp data/nsis/distribution.txt win-dist/doc/
cp $(top_srcdir)/AUTHORS.txt $(top_srcdir)/LICENSE_* $(top_srcdir)/README.txt win-dist/doc/
cp $(top_srcdir)/NEWS win-dist/doc/NEWS.txt
cp src/gsmartcontrol.exe src/gsmartcontrol.exe.manifest win-dist/
unix2dos win-dist/doc/*.txt
cp -p "@WINDOWS_SYSROOT@"/bin/drivedb.h win-dist/
cp -p "@WINDOWS_SYSROOT@"/bin/smartctl-nc.exe win-dist/
cp -p "@WINDOWS_SYSROOT@"/bin/smartctl.exe win-dist/
cp -p "@WINDOWS_SYSROOT@"/bin/update-smart-drivedb.exe win-dist/
for file in $(GTK_BIN_FILES); do for f in "@WINDOWS_SYSROOT@/bin/"$$file; do if test -f "$${f}"; then cp -p "$${f}" win-dist/; fi; done; done
# <prefix>/etc should contain gtk-3.0/settings.ini
$(MKDIR_P) win-dist/etc
$(MKDIR_P) win-dist/etc/fonts
cp -p "@WINDOWS_SYSROOT@"/etc/fonts/fonts.conf win-dist/etc/fonts
cp -p -r "@WINDOWS_SYSROOT@"/etc/gtk-3.0 win-dist/etc
$(MKDIR_P) win-dist/share
cp -p -r "@WINDOWS_SYSROOT@"/share/themes win-dist/share
# needed for file chooser
$(MKDIR_P) win-dist/share/glib-2.0
cp -p -r "@WINDOWS_SYSROOT@"/share/glib-2.0/schemas win-dist/share/glib-2.0
# $(MKDIR_P) win-dist/share/icons
# cp -p "@WINDOWS_SYSROOT@"/share/icons/hicolor win-dist/share/icons
# needed for window titlebar (if using client-side decorations)
# $(MKDIR_P) win-dist/share/icons/Adwaita/16x16/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/actions/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/actions/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/actions/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/actions/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
# $(MKDIR_P) win-dist/share/icons/Adwaita/24x24/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/actions/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/actions/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/actions/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/actions/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
# $(MKDIR_P) win-dist/share/icons/Adwaita/32x32/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/actions/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/actions/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/actions/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/actions/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
# $(MKDIR_P) win-dist/share/icons/Adwaita/48x48/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/actions/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/actions/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/actions/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/actions/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
# $(MKDIR_P) win-dist/share/icons/Adwaita/64x64/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/actions/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/actions/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/actions/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/actions/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
# $(MKDIR_P) win-dist/share/icons/Adwaita/96x96/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/actions/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/actions/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/actions/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/actions/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
# other
cp -p "@WINDOWS_SYSROOT@"/bin/libgcc_s_*.dll win-dist/
cp -p "@WINDOWS_SYSROOT@"/bin/libpcre-1.dll win-dist/
nsis-dist-prepare: win-dist-prepare
cp -a win-dist nsis-dist
cp $(top_srcdir)/data/gsmartcontrol.ico nsis-dist/
cp data/nsis/*.nsi $(top_srcdir)/data/nsis/nsi_* nsis-dist/
unix2dos nsis-dist/*.nsi
nsis-dist-nocleanup: nsis-dist-prepare
cd nsis-dist && @NSIS_EXEC@ gsmartcontrol.nsi
mv nsis-dist/$(PACKAGE)-$(VERSION)-@WINDOWS_SUFFIX@.exe .
nsis-dist-cleanup:
rm -rf nsis-dist
nsis-dist: nsis-dist-prepare nsis-dist-nocleanup nsis-dist-cleanup
win-zip-dist-prepare: win-dist-prepare
cp -a win-dist $(WIN_ZIP_NAME)
win-zip-dist-nocleanup: win-zip-dist-prepare
zip -K -9r $(WIN_ZIP_NAME).zip $(WIN_ZIP_NAME)
win-zip-dist-cleanup:
rm -rf $(WIN_ZIP_NAME)
win-zip-dist: win-zip-dist-prepare win-zip-dist-nocleanup win-zip-dist-cleanup
distclean-local: win-dist-clean
+22
View File
@@ -1,4 +1,26 @@
Version 1.0.0, released on xxxxxxx
Ported to GTK+ 3.
Version 0.9.0, released on 2017-05-11
Implemented (untested) support for Linux-based Areca controllers with
enclosures.
Implemented (untested) support for Windows-based Areca controllers (thanks
to Richard Kagerer).
Implemented (untested) support for Linux-based HP controllers with cciss
and hpsa/hpahcisr drivers (thanks to Fabrice Bacchella).
Changes in Preferences no longer fail silently until rescan/restart.
Better drive detection under Windows after removable drives are detached.
Windows version is no longer marked as "dpi aware" since it's not
supported that well.
Drive attribute descriptions have been updated (including clarifications
for SSDs).
Added support for SSD-only and HDD-only vendor attributes.
Devices having only basic info can be displayed now in the info window.
Fixed BDRW drive detection (it was detected as a HDD).
Other minor improvements.
A number of issues have been fixed (including a crash).
Version 0.8.7, released on 2012-08-11
Implemented support for Adaptec RAID 5805 controller and possibly other
Adaptec models as well (Linux).
+50 -53
View File
@@ -1,19 +1,20 @@
About GSmartControl
GSmartControl - Hard disk drive health inspection tool.
GSmartControl - Hard disk drive and SSD health inspection tool.
GSmartControl is a graphical user interface for smartctl (from smartmontools
package, see http://smartmontools.sourceforge.net), which is a tool for
querying and controlling SMART (Self-Monitoring, Analysis, and Reporting
Technology) data on modern hard disk drives. It allows you to inspect the
drive's SMART data to determine its health, as well as run various tests on
it.
Technology) data on modern hard disk and solid-state drives. It allows you to
inspect the drive's SMART data to determine its health, as well as run various
tests on it.
Note: GSmartControl supports ATA drives (both PATA and SATA), various USB to
ATA bridges and drives behind 3ware RAID controllers.
ATA bridges and drives behind some RAID controllers (selected models of
3ware, Areca, Adaptec, Intel RAID controllers).
http://gsmartcontrol.berlios.de
http://gsmartcontrol.sourceforge.net
@@ -51,15 +52,15 @@ methods to predict certain kinds of failures with certain chance of success.
Long answer: read below.
Self-Monitoring, Analysis, and Reporting Technology, or SMART, is a
monitoring system for hard drives to detect and report various indicators of
reliability, in the hope of anticipating failures. It is implemented inside
the drives SMART provides several ways of monitoring hard drive health. It
may provide information about general health, various drive attributes (for
example, number of unreadable sectors), error logs, and so on. It may also
provide ways to instruct the drive to run various self-tests, which may report
valuable information. It may even automatically scan the disk surface in when
the drive is idle, and repair the defects, reallocating the data to more safe
areas.
monitoring system for hard drives and SSDs to detect and report various
indicators of reliability, in the hope of anticipating failures. SMART is
implemented inside the drives, providing several ways of monitoring the drive
health. It may present information about general health, various drive
attributes (for example, number of unreadable sectors), error logs, and so on.
It may also provide ways to instruct the drive to run various self-tests,
which may report valuable information. It may even automatically scan the disk
surface in when the drive is idle, repairing the defects while reallocating
the data to more safe areas.
While having SMART sounds really good, there are some nuances to consider. One
of the common pitfalls is that it may create a false sense of security. That
@@ -75,15 +76,15 @@ necessarily agree on precise attribute definitions and measurement units, the
exact meaning of the attributes may vary greatly across different drive
models.
At present SMART is implemented individually by manufacturers, and while some
At present SMART is implemented individually by manufacturers. While some
aspects are standardized for compatibility, others are not. In fact, most
manufacturers refer the users to their own health monitoring utilities, and
manufacturers refer the users to their own health monitoring utilities and
advice against taking SMART data seriously. Nevertheless, SMART may prove an
effective measure against data loss.
Yet another issue is that quite often the drives have bugs which prevent
correct SMART usage. This is usually due to buggy firmware, or the
manufacturer ignoring the standard. Luckily, smartmontools usually detects
manufacturer ignoring the standards. Luckily, smartmontools usually detects
these bugs and works around them.
@@ -96,32 +97,22 @@ You need to have the following software installed:
* smartmontools - see http://smartmontools.sourceforge.net .
* GTK+, version 2.6 or higher - see http://www.gtk.org .
* GTK+, version 3.4 or higher - see http://www.gtk.org .
* Gtkmm, version 2.6 or higher - see http://www.gtkmm.org .
* libglademm, version 2.4 or higher - see http://www.gtkmm.org .
Note: libglademm is not needed when using GTK+ / Gtkmm 2.12 or newer.
Note that having GTK+ 2.12 and Gtkmm 2.12 is HIGHLY recommended. While earlier
versions may work, they may produce suboptimal results and buggy behavior.
* Gtkmm, version 3.4 or higher - see http://www.gtkmm.org .
Most of these packages are probably already provided by your distribution.
Here are the packages you need to have to build GSmartControl on some Linux
distributions:
openSUSE, SLES, SLED:
gcc-c++, pcre-devel, gtkmm2-devel, (possibly) libglademm-devel.
gcc-c++, pcre-devel, gtkmm3-devel.
Fedora, CentOS, RHEL:
gcc-c++, pcre-devel, gtkmm24-devel, (possibly) libglademm24-devel.
Mandriva:
gcc-c++, gcc-cpp, libpcre-devel, gtkmm2.4-devel, (possibly)
libglademm2.4-devel.
gcc-c++, pcre-devel, gtkmm30-devel.
Ubuntu, Debian GNU/Linux:
g++, libpcre3-dev, libgtkmm-2.4-dev, (possibly) libglademm-2.4-dev.
g++, libpcre3-dev, libgtkmm-3.0-dev.
Note that usually you need to specify only these packages - the rest is
installed automatically by the package manager's dependency resolver. Keep in
@@ -131,30 +122,27 @@ Note: If using the official Windows package, the requirements are listed on
GSmartControl's website.
The following operating systems are supported:
* Linux - All the popular configurations should work.
* FreeBSD - Tested with DesktopBSD 1.6 (FreeBSD 6.3) / x86.
* FreeBSD - Tested with DesktopBSD / x86.
* NetBSD - Tested with NetBSD 4.0.1 / x86.
* NetBSD - Tested with NetBSD / x86.
* OpenBSD - Tested with OpenBSD 4.3 / x86-64 / gcc-3.3.5.
* Windows (2000 SP4 or newer) - Tested with Windows 2000 SP4, Windows XP SP3,
Windows Vista SP2 (32-bit and 64-bit), Windows 7 SP1 (32-bit and 64-bit). The
Windows port uses pd0, pd1, etc... for physical drives 0, 1, etc... .
* Solaris - Tested with Solaris 10 / x86 / gcc-3.4.3 / blastwave,
Solaris 10 / x86 / sunstudio12 / sunfreeware. OpenSolaris should work but has
not been tested yet.
* Mac OS X - 3rd-party testing by Fink project.
* OpenBSD - Tested with OpenBSD / x86-64.
* DragonFlyBSD - Code written but no testing has been performed yet. Expected
to work without any issues.
* Windows Vista SP2 (32-bit and 64-bit), Windows 7 SP1, Windows Server 2008,
Windows 8.1, Windows 10. The Windows port uses pd0, pd1, etc...
for physical drives 0, 1, etc... .
* Solaris.
* Mac OS X - 3rd-party testing by the MacPorts and Fink projects.
* QNX - Code written but no testing has been performed yet.
@@ -187,6 +175,18 @@ directly from the build directory.
Smartctl Options
GSmartControl tries its best to guard the user from having to specify smartctl
options. However, this is not always possible due to drive firmware bugs,
unimplemented features, and so on. The smartctl manual page contains all the
information you may need when dealing with smartctl.
See http://smartmontools.sourceforge.net/man/smartctl.8.html
Additional information is available at http://smartmontools.sourceforge.net
Command Line Options
GSmartControl inherits options from GTK+ and other libraries, so be sure to
@@ -286,7 +286,7 @@ For more information, see smartctl and smartd documentation.
Known Issues
Only ATA drives (both PATA and SATA), various USB to ATA bridges and drives
behind 3ware RAID controllers are supported for now. The main reasons are:
behind some RAID controllers are supported for now. The main reasons are:
* We can't support drives which don't work with smartmontools. This affects
drives which don't support SMART or don't export SMART data correctly (e.g.
@@ -296,7 +296,7 @@ some USB enclosures, RAIDs, etc...).
Also, SCSI drives are rarely found in desktop systems and the servers rarely
have X11 / Gtkmm running, so this is a low priority task.
* I only have ATA drives, so testing would be almost impossible.
* I only have ATA drives, so testing anything else is very difficult.
Immediate Offline Tests are not supported. I haven't found a way to reliably
monitor them yet. Besides, they run automatically anyway if Automatic Offline
@@ -308,9 +308,6 @@ information in capabilities.
Not all drives support disabling Automatic Offline Data Collection, even if
they report otherwise. Unfortunately, there's no way to detect such drives.
Running on GTK+ / Gtkmm versions earlier than 2.12 may cause visual artifacts,
usability issues (especially with tooltips and icons), instability, etc...
The texts probably contain a lot of grammatical errors, English being my third
language and all.
@@ -337,7 +334,7 @@ to fix the bug.
* Which version of GTK and Gtkmm you have installed. Finding this out is very
distribution-specific. For example, on openSUSE it would be
"rpm -q gtk2 gtkmm2". Some distributions have gtkmm24 instead. You may also
"rpm -q gtk3 gtkmm3". Some distributions have gtkmm30 instead. You may also
search them in your distribution's graphical package manager, if there is one.
* Execution log from the program, if possible. To obtain it, run the program
+38 -16
View File
@@ -28,9 +28,44 @@ Bugs / patches:
TODO:
Don't rely on smartctl return code (2), parse the output instead.
This will allow us to show the Info page.
?Fix not being able to quit while executing commands.
Cannot reproduce.
https://www.google.com/search?client=opera&q=IA__gtk_main_quit:+assertion+%60main_loops+!=+NULL'+failed&sourceid=opera&ie=utf-8&oe=utf-8&channel=suggest
https://developer.gnome.org/gtk2/2.24/gtk2-General.html#gtk-main-quit
https://www.google.com/search?num=50&hl=en&safe=off&client=opera&hs=Dr5&channel=suggest&q=calling+gtk_main_quit+during+gtk_main_iteration+warning&oq=calling+gtk_main_quit+during+gtk_main_iteration+warning&gs_l=serp.12...7064.8155.0.12753.8.8.0.0.0.0.216.935.0j6j1.7.0.les%3B..0.0...1c.1.4.serp.GUiDL5IM2U8
https://developer.gnome.org/glib/2.34/glib-The-Main-Event-Loop.html#g-main-loop-quit
In main window add multi-selection support and right-click menu with various
tests, so that it's possible to run multiple tests in parallel from there.
Areca detection
Linux:
Somehow differentiate between the cards with expanders (-d areca,N/E) and without (-d areca,N).
The expander ones seem to have "ix" (case-insensitive) as their name suffixes.
areca,N - N is [1,24].
areca,N/E - N is [1,128], E is [1,8].
We should limit these using some config key (36 for N and 4 for E seems ok).
N/E syntax is since smartmontools 5.43.
For older versions we get: /dev/<something>: Option -d areca,N requires N to be a non-negative integer
Add ability (through ctrl-C?) to copy individual rows from attributes page,
in tab-separated format (for easy pasting into libreoffice).
Investiage the new "-l ssd" and "-l devstat" options (since 5.42)
Check also other options in 5.42 and 5.43.
"-g all" looks promising alongside -i (shows APM and other stuff as well).
Add --identify option to context menu, for convenience.
Add menu item - "update drive database" (not sure about linux, should
check if it's supported first; also need to run it in terminal).
@@ -107,6 +142,9 @@ If a drive is not recognized, suggest using -d (sat, sat,12, ...)
RAID:
http://sourceforge.net/apps/trac/smartmontools/wiki/Supported_RAID-Controllers
Areca Windows:
Detection not supported by smartctl --scan-open.
Areca FreeBSD: since 5.42.
Call as: smartctl -a -d areca,[1-24] /dev/arcmsr1
@@ -135,22 +173,6 @@ RAID:
Detection: unknown.
TODO: Analyze sent info.
CCISS (HP (Compaq) Smart Array Controller) Linux:
Call as: smartctl -a -d cciss,[0-127] /dev/cciss/c0d0
c0d0 is the controller (d0 seems to be a logical drive, doesn't matter?).
/dev/cciss/c0d0p1 is the first ordinary partition (used in mount, etc...).
The port limit had a brief regression in 5.39.x (limited to 15).
5.39 doesn't seem to work at all (prereleases work with P400 controller)?
Possibly a 64-bit-only issue?
To detect controller presence: cat /proc/devices, contains "cciss0"
for controller 0.
There is a cciss_vol_status utility but it doesn't report anything except "OK" status.
It may not return the "SMART Health Status: OK" line in smartctl -i for some reason?
(It returns it in -a though, and in some freebsd output I found).
If no /dev/cciss exists, you may need to run "cd /dev; ./MAKEDEV cciss".
Smartctl SVN has some /dev/sg* stuff, check it out. (?)
May need "-d sat+cciss,N" for SATA.
CCISS (HP (Compaq) Smart Array Controller) FreeBSD:
Seems to be the same as Linux (uses the same driver?).
Detection: unknown.
@@ -61,7 +61,7 @@ AC_DEFUN([APP_COMPILER_OPTIONS], [
fi
app_cv_compiler_tmp_var="-Wall -Wcast-align -Wcast-qual -Wconversion \
-Wctor-dtor-privacy -Wfloat-equal -Wnon-virtual-dtor -Woverloaded-virtual \
-Wfloat-equal -Wnon-virtual-dtor -Woverloaded-virtual \
-Wpointer-arith -Wshadow -Wsign-compare -Wsign-promo -Wundef -Wwrite-strings";
if test "x$app_cv_compiler_common_options" = "xclang"; then
# these are really annoying
@@ -89,7 +89,7 @@ AC_DEFUN([APP_USE_SYSTEM_EXTENSIONS], [
# See sys/featuretest.h
;;
mingw32)
mingw*)
# This enables standards-compliant stdio behaviour (regarding printf and
# friends), as opposed to msvc-compatible one. This is usually enabled
# by default if one of the usual macros are encountered (_XOPEN_SOURCE,
@@ -98,14 +98,8 @@ AC_DEFUN([APP_USE_SYSTEM_EXTENSIONS], [
# Other things to consider: _NO_OLDNAMES (disable "deprecated"
# non-underscored names like chdir (use _chdir), etc...).
# See _mingw.h for details.
app_cv_target_extension_cflags="-D__USE_MINGW_ANSI_STDIO=1 -DWINVER=0x0500"
app_cv_target_extension_cxxflags="-D__USE_MINGW_ANSI_STDIO=1 -DWINVER=0x0500"
;;
mingw64)
# Same as ming32, but enable "from xp" mode, since there's no x86_64 2k.
app_cv_target_extension_cflags="-D__USE_MINGW_ANSI_STDIO=1 -DWINVER=0x0501"
app_cv_target_extension_cxxflags="-D__USE_MINGW_ANSI_STDIO=1 -DWINVER=0x0501"
app_cv_target_extension_cflags="-D__USE_MINGW_ANSI_STDIO=1 -DWINVER=0x0600" # Since Vista
app_cv_target_extension_cxxflags="-D__USE_MINGW_ANSI_STDIO=1 -DWINVER=0x0600"
;;
interix)
+1 -1
View File
@@ -16,7 +16,7 @@
# autoconf
autoreconf --verbose --install -W all
autoreconf --verbose --install -W all --force
rm -f config.cache
Executable
+77
View File
@@ -0,0 +1,77 @@
#!/bin/bash
# Configure a build directory according to developer flags
type="$1";
configure_script="$2";
if [ "$type" == "" ]; then
echo "Usage: $0 <type> [<configure_script>]"
echo "where <type> is one of:"
echo "debug optimized icc clang win32 win32-debug win64-debug sun portland open64";
echo "<configure_script> is ../configure by default"
exit 1;
fi
if [ "$configure_script" == "" ]; then
configure_script="../configure";
fi
flags="";
case $type in
gcc)
flags="--enable-optimize-options --enable-tests" ;;
gcc-debug)
flags="--enable-debug-options --enable-tests" ;;
clang-debug)
flags="CC=clang CXX=clang++ --enable-debug-options --enable-tests" ;;
icc-debug)
flags="CC=icc64 CXX=icpc64 --enable-debug-options --enable-tests" ;;
sun)
flags="CC=suncc CXX=sunCC CFLAGS=\"-errwarn=%all -I/opt/sun/target64/include\" \
CXXFLAGS=\"-I/opt/sun/target64/include\" PATH=\"/opt/sun/sunstudio/bin:$PATH\" \
LDFLAGS=\"-R/opt/sun/target64/lib64 -L/opt/sun/target64/lib64\" \
PKG_CONFIG_PATH=\"/opt/sun/target64/lib64/pkgconfig:/usr/lib64/pkgconfig\" \
PKG_CONFIG_LIBDIR=\"\" --enable-tests" ;;
win32-cross)
flags="PATH=\"/usr/i686-w64-mingw32/bin:/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH\" \
--with-nsis=/usr/bin/makensis --with-windows-sysroot=/usr/i686-w64-mingw32/sys-root/mingw \
--enable-optimize-options --enable-tests --host=i686-w64-mingw32" ;;
win32-cross-debug)
flags="PATH=\"/usr/i686-w64-mingw32/bin:/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH\" \
--enable-debug-options --enable-tests --host=i686-w64-mingw32" ;;
win64-cross)
flags="PATH=\"/usr/x86_64-w64-mingw32/bin:/usr/x86_64-w64-mingw32/sys-root/mingw/bin:$PATH\" \
--with-nsis=/usr/bin/makensis --with-windows-sysroot=/usr/x86_64-w64-mingw32/sys-root/mingw \
--enable-optimize-options --enable-tests --host=x86_64-w64-mingw32" ;;
win64-cross-debug)
flags="PATH=\"/usr/x86_64-w64-mingw32/bin:/usr/x86_64-w64-mingw32/sys-root/mingw/bin:$PATH\" \
--enable-debug-options --enable-tests --host=x86_64-w64-mingw32" ;;
win32-msys)
flags="PATH=\"/mingw32/i686-w64-mingw32:/mingw32/bin:$PATH\" \
--with-nsis=/mingw32/bin/makensis.exe --with-windows-sysroot=/mingw32 \
--enable-optimize-options --enable-tests --host=i686-w64-mingw32" ;;
win32-msys-debug)
flags="PATH=\"/mingw32/i686-w64-mingw32:/mingw32/bin:$PATH\" \
--enable-debug-options --enable-tests --host=i686-w64-mingw32" ;;
win64-msys)
flags="PATH=\"/mingw64/x86_64-w64-mingw32:/mingw64/bin:$PATH\" \
--with-nsis=/mingw64/bin/makensis.exe --with-windows-sysroot=/mingw64 \
--enable-optimize-options --enable-tests --host=x86_64-w64-mingw32" ;;
win64-msys-debug)
flags="PATH=\"/mingw64/x86_64-w64-mingw32:/mingw64/bin:$PATH\" \
--enable-debug-options --enable-tests --host=x86_64-w64-mingw32" ;;
esac
echo "Running:"
echo $configure_script $flags;
$configure_script $flags
exit $?
+41 -97
View File
@@ -1,5 +1,5 @@
AC_INIT([GSmartControl],[0.8.7],[],[gsmartcontrol])
AC_INIT([GSmartControl],[1.0.0],[],[gsmartcontrol])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_HEADERS([config.h])
@@ -22,6 +22,7 @@ AC_PROG_CXX
#AC_PROG_CXXCPP
#AM_PROG_LIBTOOL
AM_PROG_AR
# C++ support in checks
#AC_LANG([C])
@@ -175,8 +176,7 @@ AC_ARG_ENABLE(abort-if-no-gtkmm, AS_HELP_STRING([--disable-abort-if-no-gtkmm],
AC_MSG_NOTICE([Abort if no gtkmm is found: $app_cv_abort_if_no_gtkmm])
# iconview is available since 2.6.0. gthread is not enabled by default.
pkg_modules="gtkmm-2.4 >= 2.6.0" # gthread-2.0 >= 2.0
pkg_modules="gtkmm-3.0 >= 3.4.0"
# define ENABLE_GLIB and friends if it's found.
gtkmm_found="no"
@@ -201,24 +201,11 @@ if test "x$gtkmm_found" = "xno"; then
fi
fi
# GTK flags must be prepended, or glib_config.h conflict between
# gtk 2.x and 1.2 may occur.
#CFLAGS="$GTKMM_CFLAGS $CFLAGS"
CXXFLAGS="$GTKMM_CFLAGS $CXXFLAGS"
LIBS="$GTKMM_LIBS $LIBS"
# Detect libglade / gtkbuilder support
APP_CHOOSE_GLD_READER([C++], [LIBGLADE_])
if test "$app_cv_gld_reader" = "libglade"; then
CFLAGS="$CFLAGS $LIBGLADE_CFLAGS"
CXXFLAGS="$CXXFLAGS $LIBGLADE_CXXFLAGS"
LIBS="$LIBS $LIBGLADE_LIBS"
fi
# -------------------------------------------------------------------------------------
@@ -253,22 +240,6 @@ LIBS="$LIBS $PCRE_LIBS"
# -------------------------------------------------------------------------------------
# Test stuff here...
# <nothing>
#SDL_VERSION=1.2.0
#AM_PATH_SDL($SDL_VERSION, :,
# AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) )
#CFLAGS="$CFLAGS $SDL_CFLAGS"
#CXXFLAGS="$CXXFLAGS $SDL_CFLAGS "
#LIBS="$LIBS $SDL_LIBS"
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
# Win32 distribution support (NSIS, zip)
AC_ARG_WITH([nsis], [AS_HELP_STRING([--with-nsis=<location>|auto],
@@ -277,17 +248,13 @@ AC_ARG_WITH([nsis], [AS_HELP_STRING([--with-nsis=<location>|auto],
["~/.wine/drive_c/Program Files/NSIS/Unicode/makensis.exe" for others)])],
[with_nsis=${withval}], [with_nsis=auto])
AC_ARG_ENABLE([nsis-wine], [AS_HELP_STRING([--enable-nsis-wine=yes|no|auto],
[use wine to run makensis.exe when making NSIS packages (default: auto, which is no for windows, yes for others)])],
[with_nsis_wine=${enableval}], [with_nsis_wine=yes])
AC_ARG_ENABLE([nsis-wine], [AS_HELP_STRING([--enable-nsis-wine=yes|no],
[use wine to run makensis.exe when making NSIS packages (default: no)])],
[with_nsis_wine=${enableval}], [with_nsis_wine=no])
AC_ARG_WITH([windows-bindir], [AS_HELP_STRING([--with-windows-bindir],
[specify location of Windows dlls and executables when making Windows packages (default: /cross/w32/target/bin)])],
[with_windows_bindir=${withval}], [with_windows_bindir=auto])
AC_ARG_WITH([windows-gtk-name], [AS_HELP_STRING([--with-windows-gtk-name],
[specify name of Windows GTK+ runtime (installer and unpacked directory) when making Windows packages. It will be looked in windows-bindir.])],
[with_windows_gtk_name=${withval}], [with_windows_gtk_name=])
AC_ARG_WITH([windows-sysroot], [AS_HELP_STRING([--with-windows-sysroot],
[specify location of Windows system root directory when making Windows packages (default: /mingw32)])],
[with_windows_sysroot=${withval}], [with_windows_sysroot=auto])
if test "x$with_nsis" = "xauto" || test "x$with_nsis" = "x"; then
# if building on windows, use native paths
@@ -298,30 +265,26 @@ if test "x$with_nsis" = "xauto" || test "x$with_nsis" = "x"; then
fi
fi
if test "x$with_nsis_wine" = "xauto"; then
# if not building on windows, use wine
if test "x$app_cv_build_os_kernel" = "xwindows32" || test "x$app_cv_build_os_kernel" = "xwindows64"; then
with_nsis_wine="no";
else
with_nsis_wine="yes";
fi
fi
NSIS_EXEC="$with_nsis";
if test "x$with_nsis_wine" != "xno"; then
if test "x$with_nsis_wine" = "xyes"; then
NSIS_EXEC="wine $with_nsis";
fi
if test "x$with_windows_bindir" = "xauto" || test "x$with_windows_bindir" = "x"; then
with_windows_bindir="/cross/w32/target/bin"
if test "x$with_windows_sysroot" = "xauto" || test "x$with_windows_sysroot" = "x"; then
with_windows_sysroot="/mingw32"
fi
WINDOWS_BINDIR="$with_windows_bindir";
WINDOWS_SYSROOT="$with_windows_sysroot";
GTK_INSTALLER_NAME="$with_windows_gtk_name";
WINDOWS_SUFFIX="";
if test "x$app_cv_target_os_kernel" = "xwindows32"; then
WINDOWS_SUFFIX="win32"
elif test "x$app_cv_target_os_kernel" = "xwindows64"; then
WINDOWS_SUFFIX="win64"
fi
AC_SUBST(NSIS_EXEC)
AC_SUBST(WINDOWS_BINDIR)
AC_SUBST(GTK_INSTALLER_NAME)
AC_SUBST(WINDOWS_SYSROOT)
AC_SUBST(WINDOWS_SUFFIX)
# -------------------------------------------------------------------------------------
@@ -346,14 +309,14 @@ AC_SUBST(WINDOWS_ARCH)
# -------------------------------------------------------------------------------------
RES_FILES="src/res/gsc_about_dialog.glade \
src/res/gsc_add_device_window.glade \
src/res/gsc_executor_log_window.glade \
src/res/gsc_help_window.glade \
src/res/gsc_info_window.glade \
src/res/gsc_main_window.glade \
src/res/gsc_preferences_window.glade \
src/res/gsc_text_window.glade \
RES_FILES="src/res/gsc_about_dialog.ui \
src/res/gsc_add_device_window.ui \
src/res/gsc_executor_log_window.ui \
src/res/gsc_help_window.ui \
src/res/gsc_info_window.ui \
src/res/gsc_main_window.ui \
src/res/gsc_preferences_window.ui \
src/res/gsc_text_window.ui \
AUTHORS.txt LICENSE_gsmartcontrol.txt README.txt"
# Unfortunately, _SOURCES can't contain substitutions, so we use LIBADD.
@@ -361,11 +324,6 @@ RES_LIBADD="" # .o file to put into .a, libres_a_LIBADD, libres_a_DEPENDENCIES.
RES_DIST="" # only files in "res" directory, EXTRA_DIST
RES_TARGETS="" # entry for each file in makefile
RES_GLD_EXT="glade"
if test "$app_cv_gld_reader" = "gtkbuilder"; then
RES_GLD_EXT="ui"
fi
for RES_FILE in $RES_FILES;
do # on separate line for portability
RES_BASE=`echo "$RES_FILE" | sed 's/.*\///'` # "a/b/c" -> "c", "c" -> "c"
@@ -381,28 +339,14 @@ do # on separate line for portability
RES_FILE_CANON="\$(srcdir)/$RES_BASE" # shorter path, better make behaviour
fi
# We use separate source files for gtkbuilder and libglademm, because
# make dist should be able to bundle both of them separately.
if test "$RES_BASE_EXT" = "glade"; then
RES_LIBADD="$RES_LIBADD $RES_BASE_NOEXT.$RES_GLD_EXT.$ac_objext" # file.ui.o or file.glade.o
# Output both glade and ui rules. This way make dist will be able
# to build cpp files of both of them.
if test "$RES_BASE_EXT" = "ui"; then
RES_LIBADD="$RES_LIBADD $RES_BASE_NOEXT.ui.$ac_objext" # file.ui.o or file.glade.o
RES_TARGETS="$RES_TARGETS
$RES_BASE_NOEXT.ui.cpp: $RES_FILE_CANON
gtk-builder-convert \"$RES_FILE_CANON\" \"$RES_BASE_NOEXT\".tmp_ui
\"\$(top_srcdir)/file2csource.sh\" \"$RES_BASE_NOEXT\".tmp_ui \"$RES_BASE_NOEXT.ui.cpp\" \"$RES_BASE_NOEXT\"_ui
"
RES_TARGETS="$RES_TARGETS
$RES_BASE_NOEXT.glade.cpp: $RES_FILE_CANON
\"\$(top_srcdir)/file2csource.sh\" \"$RES_FILE_CANON\" \"$RES_BASE_NOEXT.glade.cpp\" \"$RES_BASE_NOEXT\"_ui
\"\$(top_srcdir)/file2csource.sh\" \"$RES_FILE_CANON\" \"$RES_BASE_NOEXT.ui.cpp\" \"$RES_BASE_NOEXT\"_ui
"
else # txt, etc...
SRC_FILE="$RES_BASE.cpp"
RES_LIBADD="$RES_LIBADD $RES_BASE.$ac_objext" # file.txt.o
@@ -453,13 +397,13 @@ ADDITIONAL_INCLUDES="-I\$(top_builddir) -I\$(top_srcdir)/src -I\$(top_srcdir)/sr
# Note: some gcc-frontend-based compilers may have to be added here
# (e.g. gccfss (gcc frontend / sun backend), etc...).
# We use -include only when using pch.
if test "x$app_cv_compiler_gcc_pch" = "xyes"; then
if test "$ax_cv_cxx_compiler_vendor" = "gnu" || test "$ax_cv_cxx_compiler_vendor" = "clang" \
|| test "$ax_cv_cxx_compiler_vendor" = "intel" || test "$ax_cv_cxx_compiler_vendor" = "pathscale"; then
# This auto-includes this file when compiling any file. Benefits include pch support.
ADDITIONAL_INCLUDES="$ADDITIONAL_INCLUDES -include global_macros.h"
fi
fi
# if test "x$app_cv_compiler_gcc_pch" = "xyes"; then
# if test "$ax_cv_cxx_compiler_vendor" = "gnu" || test "$ax_cv_cxx_compiler_vendor" = "clang" \
# || test "$ax_cv_cxx_compiler_vendor" = "intel" || test "$ax_cv_cxx_compiler_vendor" = "pathscale"; then
# # This auto-includes this file when compiling any file. Benefits include pch support.
# ADDITIONAL_INCLUDES="$ADDITIONAL_INCLUDES -include global_macros.h"
# fi
# fi
# our flags must be before all the others
#CFLAGS="$ADDITIONAL_INCLUDES $CFLAGS"
@@ -529,8 +473,8 @@ AC_SUBST(AUTODIRS)
# -------------------------------------------------------------------------------------
AC_CONFIG_FILES([ data/gsmartcontrol.desktop \
data/nsis/distribution.txt data/nsis/distribution-nogtk.txt data/nsis/gsmartcontrol.nsi \
AC_CONFIG_FILES([ data/gsmartcontrol.desktop data/gsmartcontrol.appdata.xml \
data/nsis/distribution.txt data/nsis/gsmartcontrol.nsi \
debian.dist/changelog \
src/gsc_winres.rc src/gsmartcontrol.exe.manifest \
gsmartcontrol.spec version compilation_flags ])

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

@@ -13,7 +13,7 @@ uninstall-extra-mans:
# This command is needed if installing with make install (the cache
# file is ignored for rpms).
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
gtk_update_icon_cache = gtk-update-icon-cache-3.0 -f -t $(datadir)/icons/hicolor
install-data-hook: install-extra-mans update-icon-cache
uninstall-hook: uninstall-extra-mans update-icon-cache
@@ -40,6 +40,10 @@ appdata_DATA = icon_cddvd.png icon_hdd.png
desktopdir = $(datadir)/applications
desktop_DATA = gsmartcontrol.desktop
# Appdata files
metainfodir = $(datadir)/metainfo
metainfo_DATA = gsmartcontrol.appdata.xml
# Application pixmap (fallback icon for desktop files).
# Same as 48/gsmartcontrol.png.
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
############################################################################
# Copyright:
# (C) 2008 - 2012 Alexander Shaduri <ashaduri 'at' gmail.com>
# (C) 2008 - 2014 Alexander Shaduri <ashaduri 'at' gmail.com>
# License: See LICENSE_zlib.txt file
############################################################################
@@ -1,6 +1,6 @@
.TH GSmartControl "1" "" "gsmartcontrol " "User Commands"
.SH NAME
GSmartControl \- Hard disk drive health inspection tool
GSmartControl \- Hard disk drive and SSD health inspection tool
.SH SYNOPSIS
\fBgsmartcontrol\fP [OPTIONS]
@@ -9,8 +9,8 @@ GSmartControl \- Hard disk drive health inspection tool
\fBGSmartControl\fP is a graphical user interface for smartctl (from
smartmontools), which is a tool for querying and controlling SMART
(Self-Monitoring, Analysis, and Reporting Technology) data on modern hard disk
drives. It allows you to inspect the drive's SMART data to determine its
health, as well as run various tests on it.
and solid-state drives. It allows you to inspect the drive's SMART data to
determine its health, as well as run various tests on it.
.PP
This manual page documents briefly the \fBgsmartcontrol\fP and
\fBgsmartcontrol\-root\fP commands.
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2017 GSmartControl developers -->
<component type="desktop">
<id>gsmartcontrol</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0 and GPL-3.0</project_license>
<name>GSmartControl</name>
<summary>Hard Disk and SSD Health Inspection</summary>
<description>
<p>
GSmartControl is a graphical user interface for smartctl, which is a tool for
querying and controlling SMART (Self-Monitoring, Analysis, and Reporting
Technology) data in hard disk and solid-state drives. It allows you to inspect
the drive's SMART data to determine its health, as well as run various tests
on it.
</p>
</description>
<launchable type="desktop-id">gsmartcontrol.desktop</launchable>
<url type="homepage">http://gsmartcontrol.sourceforge.net</url>
<screenshots>
<screenshot type="default">
<caption>Main window</caption>
<image>http://gsmartcontrol.sourceforge.net/home/images/main_ok.png</image>
</screenshot>
<screenshot>
<caption>Drive identity information</caption>
<image>http://gsmartcontrol.sourceforge.net/home/images/info_identity.png</image>
</screenshot>
<screenshot>
<caption>Attribute list of a failing drive</caption>
<image>http://gsmartcontrol.sourceforge.net/home/images/info_failing.png</image>
</screenshot>
</screenshots>
</component>
@@ -8,9 +8,9 @@ Categories=System;Monitor;
Name=GSmartControl
# short description, usually shown in parentheses after Name
GenericName=Hard Disk Health Inspection
GenericName=Hard Disk and SSD Health Inspection
# tooltip
Comment=Monitor and control SMART data on hard disks
Comment=Monitor and control SMART data on hard disk and solid-state drives
# If it's a name only, it looks for "name.[png|xpm]" file in
# $XDG_DATA_DIRS/icons and /usr/share/pixmaps.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

+24
View File
@@ -0,0 +1,24 @@
GSmartControl - Hard disk drive and SSD health inspection tool
Version @VERSION@
The latest version of this distribution, as well as the source code of
GSmartControl, can be found at
http://gsmartcontrol.sourceforge.net
and
https://sourceforge.net/projects/gsmartcontrol/files/
This distribution includes:
* GSmartControl binary (gsmartcontrol.exe) and associated resources.
The binary was compiled against Gtkmm (http://www.gtkmm.org/), GTK+
(http://gtk.org/) and related libraries, and PCRE (http://www.pcre.org/).
* Smartctl binaries (from smartmontools 6.5, http://smartmontools.sf.net/)
- smartctl-nc.exe (compiled without console output), smartctl.exe (compiled
with console output), update-smart-drivedb.exe (drive database updater).
The combined distribution is multi-licensed under GNU GPL versions 2 and 3.
See LICENSE_gpl2.txt and LICENSE_gpl3.txt for details.
@@ -4,23 +4,16 @@
; Compatible with NSIS Unicode 2.45.
; Public Domain
; pass /DNO_GTK to makensis to disable inclusion of gtk.
; gtk installer name for embedding
!define GTK_INSTALLER_EXE "@GTK_INSTALLER_NAME@.exe"
!define PRODUCT_VERSION "@VERSION@"
!define PRODUCT_NAME "GSmartControl"
!define PRODUCT_NAME_SMALL "gsmartcontrol"
!define PRODUCT_PUBLISHER "Alexander Shaduri"
!define PRODUCT_WEB_SITE "http://gsmartcontrol.berlios.de"
!define PRODUCT_WEB_SITE "http://gsmartcontrol.sourceforge.net"
;!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\AppMainExe.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define REGISTRY_APP_PATHS "Software\Microsoft\Windows\CurrentVersion\App Paths"
!include "FileFunc.nsh" ; GetOptions
@@ -42,16 +35,12 @@ CRCCheck On
Name "${PRODUCT_NAME}" ; ${PRODUCT_VERSION}
; Output File Name
!ifdef NO_GTK
OutFile "${PRODUCT_NAME_SMALL}-${PRODUCT_VERSION}-nogtk.exe"
!else
OutFile "${PRODUCT_NAME_SMALL}-${PRODUCT_VERSION}.exe"
!endif
OutFile "${PRODUCT_NAME_SMALL}-${PRODUCT_VERSION}-@WINDOWS_SUFFIX@.exe"
; The Default Installation Directory:
; Try to install to the same directory as runtime.
InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}"
; If already installed, try here
InstallDirRegKey HKLM "SOFTWARE\${PRODUCT_NAME}" "InstallationDirectory"
@@ -89,19 +78,11 @@ ShowUnInstDetails show
;!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
;!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
!ifdef NO_GTK
!define LICENSE_FILE "doc\distribution-nogtk.txt"
!else
!define LICENSE_FILE "doc\distribution.txt"
!endif
!define LICENSE_FILE "doc\distribution.txt"
; Pages to show during installation
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "${LICENSE_FILE}"
!ifndef NO_GTK
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE on_components_page_leave
!insertmacro MUI_PAGE_COMPONENTS
!endif
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
@@ -151,66 +132,28 @@ SectionIn 1 RO
; File "gsmartcontrol.conf"
SetOverwrite On
File gsmartcontrol.exe
File *.exe
File *.dll
File gsmartcontrol.exe.manifest
File gsmartcontrol.ico
File icon_*.png
; File *.dll
File smartctl-nc.exe
File smartctl.exe
File update-smart-drivedb.exe
File drivedb.h
; Include the "doc" directory completely, excluding the file we're not using (e.g. the -nogtk file in gtk installer).
!ifdef NO_GTK
File /r /x distribution.txt doc
!else
File /r /x distribution-nogtk.txt doc
!endif
; Include the "doc" directory completely.
File /r doc
; GTK and stuff
File /r etc
File /r share
; Add Shortcuts (this inherits the exe's run permissions)
CreateShortCut "$SMPROGRAMS\GSmartControl.lnk" "$INSTDIR\gsmartcontrol.exe" "" \
"$INSTDIR\gsmartcontrol.ico" "" SW_SHOWNORMAL "" "GSmartControl - Hard disk drive health inspection tool"
"$INSTDIR\gsmartcontrol.ico" "" SW_SHOWNORMAL "" "GSmartControl - Hard disk drive and SSD health inspection tool"
SectionEnd
!ifndef NO_GTK
; The SecGtkPrivate and SecGtkPublic sections are mutually exclusive.
Section "GTK+ (for this program only)" SecGtkPrivate
SectionIn 1
SetShellVarContext all ; use all user variables as opposed to current user
AddSize 12200 ; ~ size of unpacked gtk
SetOutPath "$INSTDIR"
File "${GTK_INSTALLER_EXE}"
; TODO: in the future, when we have translations for this program,
; make the GTK+ translations installation dependent on their installation status.
ExecWait '"${GTK_INSTALLER_EXE}" /sideeffects=no /dllpath=root /translations=no /compatdlls=no /S /D=$INSTDIR'
Delete "$INSTDIR\${GTK_INSTALLER_EXE}"
SectionEnd
; disabled by default
Section /o "GTK+ (shared installation)" SecGtkPublic
SectionIn 1
SetShellVarContext all ; use all user variables as opposed to current user
AddSize 12200 ; ~ size of unpacked gtk
SetOutPath "$INSTDIR"
File "${GTK_INSTALLER_EXE}"
ExecWait '"${GTK_INSTALLER_EXE}"'
Delete "$INSTDIR\${GTK_INSTALLER_EXE}"
SectionEnd
!endif ; !NO_GTK
!ifndef NO_GTK
var gtk_mode ; "public", "private" or "none"
var gtk_tmp ; temporary variable
!endif
; Executed on installation start
Function .onInit
SetShellVarContext all ; use all user variables as opposed to current user
@@ -220,119 +163,16 @@ Function .onInit
Call PreventMultipleInstances
Call DetectPrevInstallation
; ask for gtk only if it's a non-gtk installer.
!ifdef NO_GTK
Call AskForGtk
!endif
!ifndef NO_GTK
StrCpy $gtk_mode "private" ; default
!endif
FunctionEnd
function .onselchange
!ifndef NO_GTK
; Remember which gtk section was selected.
; Deselect the other section.
; If it was private, we check if public is checked and uncheck private.
StrCmp $gtk_mode "private" check_public ; old selection
StrCmp $gtk_mode "public" check_private ; old selection
goto check_exit
check_public:
SectionGetFlags ${SecGtkPublic} $gtk_tmp ; see if it's checked
IntOp $gtk_tmp $gtk_tmp & ${SF_SELECTED}
IntCmp $gtk_tmp ${SF_SELECTED} "" check_exit check_exit
SectionGetFlags ${SecGtkPrivate} $gtk_tmp ; unselect the other one
IntOp $gtk_tmp $gtk_tmp & ${SECTION_OFF}
SectionSetFlags ${SecGtkPrivate} $gtk_tmp
goto check_exit
check_private:
SectionGetFlags ${SecGtkPrivate} $gtk_tmp ; see if it's checked
IntOp $gtk_tmp $gtk_tmp & ${SF_SELECTED}
IntCmp $gtk_tmp ${SF_SELECTED} "" check_exit check_exit
SectionGetFlags ${SecGtkPublic} $gtk_tmp ; unselect the other one
IntOp $gtk_tmp $gtk_tmp & ${SECTION_OFF}
SectionSetFlags ${SecGtkPublic} $gtk_tmp
check_exit:
; store the current mode
StrCpy $gtk_mode "none"
SectionGetFlags ${SecGtkPrivate} $gtk_tmp
IntOp $gtk_tmp $gtk_tmp & ${SF_SELECTED}
IntCmp $gtk_tmp ${SF_SELECTED} "" mode_end_private mode_end_private
StrCpy $gtk_mode "private"
mode_end_private:
SectionGetFlags ${SecGtkPublic} $gtk_tmp
IntOp $gtk_tmp $gtk_tmp & ${SF_SELECTED}
IntCmp $gtk_tmp ${SF_SELECTED} "" mode_end_public mode_end_public
StrCpy $gtk_mode "public"
mode_end_public:
; MessageBox MB_ICONINFORMATION|MB_OK "gtk_mode: $gtk_mode" /SD IDOK
!endif ; !NO_GTK
functionend
!ifndef NO_GTK
Function on_components_page_leave
StrCmp $gtk_mode "none" "" noabort
Call AskForGtk
noabort:
FunctionEnd
!endif ; !NO_GTK
; Section descriptions
!ifndef NO_GTK ; this page is shown only when using gtk
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecMain} "GSmartControl - hard disk drive health inspection tool"
!insertmacro MUI_DESCRIPTION_TEXT ${SecGtkPrivate} "GTK+ libraries, needed by GSmartControl. \
This will install a private version of GTK+, usable only by GSmartControl."
!insertmacro MUI_DESCRIPTION_TEXT ${SecGtkPublic} "GTK+ libraries, needed by GSmartControl. \
This will install a system-wide version of GTK+, shareable with other programs."
!insertmacro MUI_FUNCTION_DESCRIPTION_END
!endif
; ------------------ POST INSTALL
var gtk_dll_abs_path
Section -post
SetShellVarContext all ; use all user variables as opposed to current user
; Don't set any paths for this exe if it has a private GTK+ installation.
!ifndef NO_GTK
StrCmp $gtk_mode "private" skip_exe_PATH
!endif
; set a special path for this exe, as GTK may not be in a global path.
ReadRegStr $gtk_dll_abs_path HKLM "SOFTWARE\GTK\2.0" "DllPath"
WriteRegStr HKLM "${REGISTRY_APP_PATHS}\gsmartcontrol.exe" "Path" "$gtk_dll_abs_path"
!ifndef NO_GTK
skip_exe_PATH:
!endif
!ifndef NO_GTK
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "GtkInstalledMode" "$gtk_mode"
!endif
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "InstallationDirectory" "$INSTDIR"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "Vendor" "${PRODUCT_PUBLISHER}"
@@ -378,57 +218,34 @@ Section Uninstall
SetShellVarContext all ; use all user variables as opposed to current user
SetAutoClose false
!ifndef NO_GTK
ReadRegStr $gtk_mode HKLM "SOFTWARE\${PRODUCT_NAME}" "GtkInstalledMode"
StrCmp $gtk_mode "private" "" skip_gtk_remove
; remove private GTK+, specify the same custom options are during installation
ExecWait "$INSTDIR\gtk2_runtime_uninst.exe /remove_config=yes /sideeffects=no /dllpath=root /translations=no /compatdlls=no /S"
; _?=$INSTDIR
; Delete "$INSTDIR\gtk2_runtime_uninst.exe" ; If using _? flag, it won't get deleted automatically, do it manually.
skip_gtk_remove:
!endif
; add delete commands to delete whatever files/registry keys/etc you installed here.
Delete "$INSTDIR\gsmartcontrol_uninst.exe"
DeleteRegKey HKLM "SOFTWARE\${PRODUCT_NAME}"
DeleteRegKey HKLM "${PRODUCT_UNINST_KEY}"
Delete "$INSTDIR\gsmartcontrol.exe"
Delete "$INSTDIR\*.exe"
Delete "$INSTDIR\*.dll"
Delete "$INSTDIR\gsmartcontrol.exe.manifest"
Delete "$INSTDIR\gsmartcontrol.ico"
Delete "$INSTDIR\icon_*.png"
; Delete "$INSTDIR\*.dll"
Delete "$INSTDIR\smartctl-nc.exe"
Delete "$INSTDIR\smartctl.exe"
Delete "$INSTDIR\update-smart-drivedb.exe"
; update-smart-drivedb may leave these
Delete "$INSTDIR\drivedb.h"
Delete "$INSTDIR\drivedb.h.new"
Delete "$INSTDIR\drivedb.h.old"
Delete "$INSTDIR\drivedb.h.error"
Delete "$INSTDIR\drivedb.h.lastcheck"
Delete "$INSTDIR\drivedb.h.*"
RMDir /r "$INSTDIR\doc"
; GTK and stuff
RMDir /r "$INSTDIR\etc"
RMDir /r "$INSTDIR\share"
; clean up generated stuff
Delete "$INSTDIR\*stdout.txt"
Delete "$INSTDIR\*stderr.txt"
RMDir "$INSTDIR" ; only if empty
; For some reason, sometimes it's not deleted in the sections, so do it here.
Delete "$INSTDIR\${GTK_INSTALLER_EXE}"
!ifndef NO_GTK
StrCmp $gtk_mode "private" skip_exe_PATH_remove
!endif
DeleteRegKey HKLM "${REGISTRY_APP_PATHS}\gsmartcontrol.exe"
!ifndef NO_GTK
skip_exe_PATH_remove:
!endif
Delete "$SMPROGRAMS\GSmartControl.lnk"
;Delete "$SMPROGRAMS\GSmartControl\Uninstall GSmartControl.lnk"
@@ -486,35 +303,6 @@ FunctionEnd
; detect GTK installation (any of available versions)
Function AskForGtk
SetShellVarContext all ; use all user variables as opposed to current user
push $R0
ReadRegStr $R0 HKLM "SOFTWARE\GTK\2.0" "DllPath"
StrCmp $R0 "" no_gtk have_gtk
no_gtk:
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
"GTK2-Runtime is not installed. This product needs it to function properly.$\n\
Please install GTK2-Runtime from http://gtk-win.sf.net/ first.$\n$\n\
Click 'Cancel' to abort the installation \
or 'OK' to continue anyway." \
/SD IDOK IDOK have_gtk
;Abort ; Abort has different meaning from onpage callbacks, so use Quit
Quit
goto end_gtk_check
have_gtk:
; do nothing
end_gtk_check:
pop $R0
FunctionEnd
; Prevent running multiple instances of the installer
Function PreventMultipleInstances
Push $R0

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

@@ -1,21 +1,19 @@
Source: gsmartcontrol
Section: utils
Priority: extra
Homepage: http://gsmartcontrol.berlios.de/
Homepage: http://gsmartcontrol.sourceforge.net/
Maintainer: Alexander Shaduri <ashaduriREMOVETHIS@gmail.com>
# libglademm is also needed if libgtkmm-2.4 < 2.12, but don't write it
# here - newer distributions don't contain it.
Build-Depends: debhelper (>= 5), autotools-dev,
libpcre3-dev, libgtkmm-2.4-dev (>= 2.6.0)
libpcre3-dev, libgtkmm-3.0-dev (>= 3.4.0)
Standards-Version: 3.7.3
Package: gsmartcontrol
Architecture: any
#Depends: ${shlibs:Depends}, ${misc:Depends}, smartmontools, menu
Depends: ${shlibs:Depends}, smartmontools, menu
Description: Hard disk drive health inspection tool
Description: Hard disk drive and SSD health inspection tool
GSmartControl is a graphical user interface for smartctl (from smartmontools
package), which is a tool for querying and controlling SMART
(Self-Monitoring, Analysis, and Reporting Technology) data on modern hard
disk drives. It allows you to inspect the drive's SMART data to determine its
health, as well as run various tests on it.
disk and solid-state drives. It allows you to inspect the drive's SMART data
to determine its health, as well as run various tests on it.
@@ -1,11 +1,11 @@
This package was debianized by Alexander Shaduri <ashaduri 'at' gmail.com> on
Sat, 15 Nov 2008 00:12:04 +0400.
It was downloaded from <http://gsmartcontrol.berlios.de/>
It was downloaded from <http://gsmartcontrol.sourceforge.net/>
Copyright:
Copyright (C) 2008 - 2012 Alexander Shaduri <ashaduri 'at' gmail.com>
Copyright (C) 2008 - 2017 Alexander Shaduri <ashaduri 'at' gmail.com>
License:
@@ -27,6 +27,6 @@ On Debian systems, the complete text of the GNU General
Public Licenses can be found in `/usr/share/common-licenses/GPL-2' and
`/usr/share/common-licenses/GPL-3'.
The Debian packaging is (C) 2008 - 2012 Alexander Shaduri <ashaduri 'at' gmail.com> and
The Debian packaging is (C) 2008 - 2017 Alexander Shaduri <ashaduri 'at' gmail.com> and
is licensed under the GPLv2 and GPLv3, see above.
@@ -1,4 +1,4 @@
?package(gsmartcontrol):needs="X11" section="Applications/System/Hardware"\
title="GSmartControl" command="/usr/bin/gsmartcontrol-root"\
longtitle="Hard Disk Health Inspection"\
longtitle="Hard Disk and SSD Health Inspection"\
icon="/usr/share/pixmaps/gsmartcontrol.xpm"
@@ -1,13 +1,13 @@
Name: gsmartcontrol
Version: @VERSION@
Release: 1as
License: GPLv2, GPLv3
Url: http://gsmartcontrol.berlios.de
License: GPL-2.0 AND GPL-3.0
Url: http://gsmartcontrol.sourceforge.net/
Vendor: Alexander Shaduri <ashaduri 'at' gmail.com>
# Packager: Alexander Shaduri <ashaduri 'at' gmail.com>
Source: gsmartcontrol-%{version}.tar.bz2
Source: http://sourceforge.net/projects/gsmartcontrol/files/%{version}/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: GSmartControl - Hard Disk Health Inspection Tool
Summary: GSmartControl - Hard Disk Drive and SSD Health Inspection Tool
%if 0%{?mandriva_version}
Group: System/Kernel and hardware
@@ -15,36 +15,23 @@ Group: System/Kernel and hardware
Group: Hardware/Other
%endif
# Empty debug packages cause errors in new RPM. Disable them.
%global debug_package %{nil}
# Dependencies for various distributions. The actual deps are:
# smartmontools, pcre, (gtkmm2 >= 2.12 || (gtkmm2 >= 2.6.0 && libglademm >= 2.4.0))
# smartmontools, pcre, gtkmm3 >= 3.4.0
# (with the respective -devel packages of the libraries for build requirements).
# For non-specified distributions we don't specify any dependencies to avoid errors.
# For mandriva, these contain the su programs.
# Suggests: libgnomesu, gksu, kdebase-progs
# SUSE / OpenSUSE. SLES also defines the correct suse_version.
%if 0%{?suse_version}
%if 0%{?%suse_version} >= 1030
Requires: smartmontools, pcre, gtkmm2 >= 2.12.0
BuildRequires: gcc-c++, libstdc++-devel, pcre-devel, gtkmm2-devel >= 2.12.0
%else
%if 0%{?%suse_version} == 1020
Requires: smartmontools, pcre, gtkmm2 >= 2.6.0, libglademm >= 2.4.0
BuildRequires: gcc-c++, libstdc++-devel, pcre-devel, gtkmm2-devel >= 2.6.0, libglademm-devel >= 2.4.0
%else
Requires: smartmontools, pcre, gtkmm24 >= 2.6.0, libglademm >= 2.4.0
BuildRequires: gcc-c++, libstdc++-devel, pcre-devel, gtkmm24-devel >= 2.6.0, libglademm-devel >= 2.4.0
%endif
%endif
Requires: smartmontools
BuildRequires: gcc-c++, libstdc++-devel, pcre-devel, gtkmm3-devel >= 3.4.0
BuildRequires: update-desktop-files
%if 0%{?suse_version} >= 1030
BuildRequires: fdupes
%endif
%endif
@@ -53,13 +40,8 @@ BuildRequires: fdupes
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
# I'm not sure about centos and rhel versions
%if 0%{?fedora_version} >= 8 || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
Requires: smartmontools, pcre, gtkmm24 >= 2.12.0
BuildRequires: gcc-c++, pcre-devel, gtkmm24-devel >= 2.12.0
%else
Requires: smartmontools, pcre, gtkmm24 >= 2.6.0, libglademm24 >= 2.4.0
BuildRequires: gcc-c++, pcre-devel, gtkmm24-devel >= 2.6.0, libglademm24-devel >= 2.4.0
%endif
Requires: smartmontools
BuildRequires: gcc-c++, pcre-devel, gtkmm30-devel >= 3.4.0
# Fedora with consolehelper.
# usermode-gtk is for consolehelper-gtk.
@@ -70,45 +52,21 @@ Requires: usermode-gtk
%endif
# Mandriva. Check the latest official spec file at
# http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gsmartcontrol/current/
%if 0%{?mandriva_version}
%if 0%{?mandriva_version} >= 2008
Requires: smartmontools, libpcre0, gtkmm2.4 >= 2.12.0
BuildRequires: gcc-c++, gcc-cpp, pcre-devel, gtkmm2.4-devel >= 2.12.0, desktop-file-utils
%else
Requires: smartmontools, libpcre0, gtkmm2.4 >= 2.6.0, libglademm2.4 >= 2.4.0
BuildRequires: gcc-c++, gcc-cpp, pcre-devel, gtkmm2.4-devel >= 2.6.0, libglademm2.4-devel >= 2.4.0, desktop-file-utils
%endif
%endif
%description
GSmartControl is a graphical user interface for smartctl, which is a tool for
querying and controlling SMART (Self-Monitoring, Analysis, and Reporting
Technology) data in hard disk drives. It allows you to inspect the drive's
SMART data to determine its health, as well as run various tests on it.
Technology) data in hard disk and solid-state drives. It allows you to inspect
the drive's SMART data to determine its health, as well as run various tests
on it.
%prep
%setup -q
%if 0%{?mandriva_version} <= 2006
%configure
%else
%configure --enable-optimize-options=auto
%endif
%build
# Set up for parallel builds
#numprocs=`grep -E -c ^cpu[0-9]+ /proc/stat || :`
#if [ "$numprocs" = "0" ]; then
# numprocs=1
#fi
#make -j$numprocs
make
make %{?_smp_mflags}
%install
@@ -118,15 +76,13 @@ make DESTDIR=%buildroot install-strip
# Remove the icon cache file "make install" generates, to avoid package conflicts.
rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache
%if 0%{?suse_version}
%suse_update_desktop_file -n %{name}
# There are some png file duplicates, hardlink them.
%if 0%{?suse_version} >= 1030
%fdupes
%endif
# We install icons, so this is needed.
%if 0%{?suse_version} >= 1140
@@ -178,15 +134,6 @@ EOF
%endif
%if 0%{?mandriva_version}
desktop-file-install --vendor="" \
--remove-category="Application" \
--add-category="System" \
--add-category="X-MandrivaLinux-System-Configuration-Hardware;Settings;HardwareSettings" \
--dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
%endif
%clean
rm -rf %buildroot
@@ -194,7 +141,13 @@ rm -rf %buildroot
%files
%defattr(-,root,root)
# In fedora /usr/bin/gsmartcontrol is linked to consolehelper, cannot set attrs on symlink.
%if 0%{?fedora_version}
%{_bindir}/*
%else
%attr(0755,root,root) %{_bindir}/*
%endif
# %%attr(0644,root,root) %%config(noreplace) %%{_sysconfdir}/*
%doc %{_datadir}/doc/gsmartcontrol
@@ -203,6 +156,7 @@ rm -rf %buildroot
%{_datadir}/gsmartcontrol
# %%{_datadir}/gsmartcontrol/*
%{_datadir}/applications/*.desktop
%{_datadir}/metainfo
%{_datadir}/icons/*
%{_datadir}/pixmaps/*
-155
View File
@@ -1,155 +0,0 @@
# Add autoconf.m4 directory to local macro search path
ACLOCAL_AMFLAGS = -I autoconf.m4
SUBDIRS = data debian.dist src
# These files are actually needed for compilation.
noinst_DATA = AUTHORS.txt LICENSE_gsmartcontrol.txt README.txt
# For the files to be bundled with the distribution, specify them in
# one of the following.
# These will be installed into docdir.
# Some of these files are actually needed for compilation (see src/res/Makefile.am).
dist_doc_DATA = AUTHORS.txt ChangeLog NEWS README.txt \
LICENSE_boost_1_0.txt \
LICENSE_bsd-ac.txt \
LICENSE_bsd-ucb.txt \
LICENSE_gpl2.txt \
LICENSE_gpl3.txt \
LICENSE_gsmartcontrol.txt \
LICENSE_hz.txt \
LICENSE_pcrecpp.txt \
LICENSE_unlicense.txt \
LICENSE_zlib.txt
# nobase_ preserves their directory names.
nobase_dist_doc_DATA = contrib/cron-based_noadmin/README \
contrib/cron-based_noadmin/cron_gather_smart.sh \
contrib/cron-based_noadmin/crontab.example \
contrib/cron-based_noadmin/smartctl_subst.sh
# Extra files bundled with distribution.
# file2csource.sh is needed for building but not installed.
EXTRA_DIST = COPYING INSTALL configure autogen.sh \
gsmartcontrol.kdev4 \
file2csource.sh \
gsmartcontrol.spec
# PCH support
global_macros.h.gch: $(top_srcdir)/src/global_macros.h
$(CXX) $(CXXFLAGS) $(DEFS) -x "c++-header" $(top_srcdir)/src/global_macros.h -o global_macros.h.gch
gch: global_macros.h.gch
gch-clean:
rm -f global_macros.h.gch
# rpm support
src-rpm: dist
rpmbuild -ts $(distdir).tar.bz2
# Don't use this - it does something weird, and gcc errors out with "long long long" errors, etc...
#rpm: dist
# rpmbuild -ta $(distdir).tar.bz2
# NSIS installer support.
# Requires wine, installed NSIS, smartctl-nc.exe, smartctl.exe, update-smart-drivedb.exe.
# Gtkmm dlls and pcre dlls are required if linking against them.
# dos2unix on build machine.
# Execute only with win32 build present.
WIN_ZIP_NAME = $(PACKAGE)-$(VERSION)-win32
WIN_ZIP_NOGTK_NAME = $(PACKAGE)-$(VERSION)-win32-nogtk
win-dist: win-dist-nocleanup win-dist-cleanup
win-dist-nocleanup: win-dist-prepare nsis-dist-nocleanup win-zip-dist-nocleanup
win-dist-cleanup: win-zip-dist-cleanup nsis-dist-cleanup
rm -rf win-dist
win-dist-clean: win-dist-cleanup
rm -f gsmartcontrol-*.exe gsmartcontrol-*.zip
win-dist-prepare-all: nsis-dist-prepare win-zip-dist-prepare
# Don't strip smartctl (it will only change the header), and
# don't strip update-smart-drivedb (it will break its CRC check).
win-dist-prepare: all
$(MKDIR_P) win-dist
cp $(top_srcdir)/data/icon_*.png win-dist/
$(MKDIR_P) win-dist/doc
cp data/nsis/distribution*.txt win-dist/doc/
cp $(top_srcdir)/AUTHORS.txt $(top_srcdir)/LICENSE_* $(top_srcdir)/README.txt win-dist/doc/
cp $(top_srcdir)/NEWS win-dist/doc/NEWS.txt
cp src/gsmartcontrol.exe src/gsmartcontrol.exe.manifest win-dist/
unix2dos win-dist/doc/*.txt
$(STRIP) win-dist/*.exe
cp -p "@WINDOWS_BINDIR@"/smartctl-nc.exe win-dist/
cp -p "@WINDOWS_BINDIR@"/smartctl.exe win-dist/
cp -p "@WINDOWS_BINDIR@"/update-smart-drivedb.exe win-dist/
nsis-dist-prepare: win-dist-prepare
cp -a win-dist nsis-dist
cp $(top_srcdir)/data/gsmartcontrol.ico nsis-dist/
cp data/nsis/*.nsi $(top_srcdir)/data/nsis/nsi_* nsis-dist/
unix2dos nsis-dist/*.nsi
cp "@WINDOWS_BINDIR@"/"@GTK_INSTALLER_NAME@".exe nsis-dist/
nsis-dist-nocleanup: nsis-dist-prepare
cd nsis-dist && @NSIS_EXEC@ gsmartcontrol.nsi
mv nsis-dist/$(PACKAGE)-$(VERSION).exe .
cd nsis-dist && @NSIS_EXEC@ /DNO_GTK gsmartcontrol.nsi
mv nsis-dist/$(PACKAGE)-$(VERSION)-nogtk.exe .
nsis-dist-cleanup:
rm -rf nsis-dist
nsis-dist: nsis-dist-nocleanup nsis-dist-cleanup
win-zip-dist-prepare:
cp -a win-dist $(WIN_ZIP_NAME)
cp -a win-dist $(WIN_ZIP_NOGTK_NAME)
cp -a "@WINDOWS_BINDIR@"/"@GTK_INSTALLER_NAME@"/* $(WIN_ZIP_NAME)/
win-zip-dist-nocleanup: win-zip-dist-prepare
zip -K -9r $(WIN_ZIP_NAME).zip $(WIN_ZIP_NAME) -x $(WIN_ZIP_NAME)/doc/distribution-nogtk.txt
zip -K -9r $(WIN_ZIP_NOGTK_NAME).zip $(WIN_ZIP_NOGTK_NAME) -x $(WIN_ZIP_NOGTK_NAME)/doc/distribution.txt
win-zip-dist-cleanup:
rm -rf $(WIN_ZIP_NAME)
rm -rf $(WIN_ZIP_NOGTK_NAME)
win-zip-dist: win-zip-dist-nocleanup win-zip-dist-cleanup
distclean-local: gch-clean win-dist-clean
@@ -1,157 +0,0 @@
############################################################################
# Copyright:
# (C) 2008 - 2009 Alexander Shaduri <ashaduri 'at' gmail.com>
# License: See LICENSE_zlib.txt file
############################################################################
# APP_CHOOSE_GLD_READER([C|C++][, flags_prefix])
# This macro detects whether GtkBuilder (from gtk >= 2.12) or libglade
# are present. If the first parameter is C++, then gtkmm and libglademm
# are searched for instead.
# flags_prefixCFLAGS, flags_prefixCXXFLAGS and flags_prefixLIBS
# will be initialized (or appended to) with the correct flags in case of libglade(mm).
# app_cv_gld_reader will be set to none, libglade or gtkbuilder.
# ENABLE_LIBGLADE or ENABLE_GTKBUILDER will be exported to config.h
# You must call AX_COMPILER_VENDOR before using this macro.
AC_DEFUN([APP_CHOOSE_GLD_READER], [
# These requirements check compile-time presence, not that they were called
AC_REQUIRE([AX_COMPILER_VENDOR])
AC_ARG_ENABLE(abort-if-no-glade-reader, AS_HELP_STRING([--disable-abort-if-no-glade-reader],
[disable abort if no glade file reader is found (default: configure aborts when glade file reader is not found)]),
[app_cv_abort_if_no_glade_reader=${enableval}], [app_cv_abort_if_no_glade_reader=yes])
AC_MSG_NOTICE([Abort if no glade file reader is found: $app_cv_abort_if_no_glade_reader])
# This is just in case
# PKG_PROG_PKG_CONFIG()
# this variable will have values "none", "libglade" or "gtkbuilder".
app_cv_gld_reader="none";
# in case libglade(mm) is found, these will contain the flags.
app_cv_gld_reader_CFLAGS="";
app_cv_gld_reader_CXXFLAGS="";
app_cv_gld_reader_LIBS="";
app_cv_gld_reader_libglade_name="libglade";
app_cv_gld_reader_libglade_pkg_name="libglade-2.0";
app_cv_gld_reader_gtk_name="gtk";
app_cv_gld_reader_gtk_pkg_name="gtk+-2.0";
if test "x$1" = "xC++"; then
app_cv_gld_reader_libglade_name="libglademm";
app_cv_gld_reader_libglade_pkg_name="libglademm-2.4";
app_cv_gld_reader_gtk_name="gtkmm";
app_cv_gld_reader_gtk_pkg_name="gtkmm-2.4";
fi
# Manual control. AC_ARG_ENABLE doesn't get bash variables, so we have
# to do it this way. If put inside a shell conditional, it still shows up in configure help.
AC_ARG_ENABLE(libglade, AS_HELP_STRING([--enable-libglade],
[use libglade(mm) instead of GtkBuilder (default: auto)]),
[with_libglade=${enableval}], [with_libglade=auto])
# Try gtkbuilder first
if test "x$with_libglade" = "xno" || test "x$with_libglade" = "xauto"; then
PKG_CHECK_EXISTS([$app_cv_gld_reader_gtk_pkg_name >= 2.12.0],
[app_cv_gld_reader="gtkbuilder"])
fi
if test "$with_libglade" = "no" && test "$app_cv_gld_reader" = "none"; then
AC_MSG_ERROR([GtkBuilder support not found (you need $app_cv_gld_reader_gtk_name version 2.12 or higher). Try using $app_cv_gld_reader_libglade_name instead.])
fi
# libglade specified, or auto and no gtkbuilder. gtkmm2.4-compatible libglademm is >= 2.4.0.
# (not sure about libglade version).
if test "x$app_cv_gld_reader" = "xnone"; then
if test "x$app_cv_gld_reader_libglade_name" = "xlibglade"; then
# libglade
PKG_CHECK_MODULES([LIBGLADE], [$app_cv_gld_reader_libglade_pkg_name >= 2.4.0],
[app_cv_gld_reader="libglade"], [AC_MSG_WARN([$LIBGLADE_PKG_ERRORS])])
app_cv_gld_reader_CFLAGS="$LIBGLADE_CFLAGS";
app_cv_gld_reader_CXXFLAGS="$LIBGLADE_CFLAGS";
app_cv_gld_reader_LIBS="$LIBGLADE_LIBS";
else
# libglademm
PKG_CHECK_MODULES([LIBGLADEMM], [$app_cv_gld_reader_libglade_pkg_name >= 2.4.0],
[app_cv_gld_reader="libglade"], [AC_MSG_WARN([$LIBGLADEMM_PKG_ERRORS])])
app_cv_gld_reader_CFLAGS=""
app_cv_gld_reader_CXXFLAGS="$LIBGLADEMM_CFLAGS";
app_cv_gld_reader_LIBS="$LIBGLADEMM_LIBS";
fi
# reset them so they don't interfere later
LIBGLADE_CFLAGS="";
LIBGLADE_LIBS="";
fi
if test "x$with_libglade" = "xyes" && test "x$app_cv_gld_reader" = "xnone"; then
AC_MSG_ERROR([$app_cv_gld_reader_libglade_name not found. Try building with GtkBuilder support (you need $app_cv_gld_reader_gtk_name version 2.12 or higher).])
fi
# still not found.
if test "$app_cv_gld_reader" = "none"; then
if test "x$app_cv_abort_if_no_glade_reader" = "xno"; then
AC_MSG_WARN([$LIBGLADE_PKG_ERRORS])
AC_MSG_WARN([Neither GtkBuilder nor $app_cv_gld_reader_libglade_name found. The program will be unable to compile fully.])
else
AC_MSG_WARN([Neither GtkBuilder nor $app_cv_gld_reader_libglade_name found.])
AC_MSG_ERROR([$LIBGLADE_PKG_ERRORS])
fi
fi
# export the flags
if test "x$2" != "x"; then
if test "x$$2[]CFLAGS" = "x"; then
$2[]CFLAGS="$app_cv_gld_reader_CFLAGS";
else
$2[]CFLAGS="$$2[]CFLAGS $app_cv_gld_reader_CFLAGS";
fi
if test "x$$2[]CXXFLAGS" = "x"; then
$2[]CXXFLAGS="$app_cv_gld_reader_CXXFLAGS";
else
$2[]CXXFLAGS="$$2[]CXXFLAGS $app_cv_gld_reader_CXXFLAGS";
fi
if test "x$$2[]LIBS" = "x"; then
$2[]LIBS="$app_cv_gld_reader_LIBS";
else
$2[]LIBS="$$2[]LIBS $app_cv_gld_reader_LIBS";
fi
fi
# export to automake.am-s
AM_CONDITIONAL([ENABLE_LIBGLADE], [test "$app_cv_gld_reader" = "libglade"])
AM_CONDITIONAL([ENABLE_GTKBUILDER], [test "$app_cv_gld_reader" = "gtkbuilder"])
# export to config.h
if test "$app_cv_gld_reader" = "libglade"; then
AC_DEFINE(ENABLE_LIBGLADE, 1, [Use libglade(mm) instead of GtkBuilder])
else
AC_DEFINE(ENABLE_LIBGLADE, 0, [Use libglade(mm) instead of GtkBuilder])
fi
if test "$app_cv_gld_reader" = "gtkbuilder"; then
AC_DEFINE(ENABLE_GTKBUILDER, 1, [Use GtkBuilder instead of libglademm])
else
AC_DEFINE(ENABLE_GTKBUILDER, 1, [Use GtkBuilder instead of libglademm])
fi
# If we move this to the start, some messages get in between, so we have to have it here.
AC_MSG_CHECKING([for glade file support])
AC_MSG_RESULT([$app_cv_gld_reader])
])
-19
View File
@@ -1,19 +0,0 @@
#!/bin/bash
stamp="../gsmartcontrol-`date +%F`"
echo $stamp
mkdir $stamp
cp -dp * $stamp/
rm -f $stamp/*pcs # kdevelop persistent store files
cp -a autoconf.m4/ $stamp/
cp -a data/ $stamp/
cp -a src/ $stamp/
cp -a templates/ $stamp/
# cp -a test-data/ $stamp/
tar cvf $stamp.tar $stamp
bzip2 -9 $stamp.tar
-72
View File
@@ -1,72 +0,0 @@
#!/bin/bash
# Configure a build directory according to developer flags
type="$1";
configure_script="$2";
if [ "$type" == "" ]; then
echo "Usage: $0 <type> [<configure_script>]"
echo "where <type> is one of:"
echo "debug optimized icc clang win32 win32-debug win64-debug sun portland open64";
echo "<configure_script> is ../configure by default"
exit 1;
fi
if [ "$configure_script" == "" ]; then
configure_script="../configure";
fi
flags="";
case $type in
optimized)
flags="--disable-user-flags --enable-optimize-options --enable-tests" ;;
debug)
flags="--enable-debug-options --enable-tests" ;;
clang)
flags="CC=clang CXX=clang++ --enable-debug-options --enable-tests" ;;
icc)
flags="CC=icc64 CXX=icpc64 --disable-user-flags --enable-tests" ;;
win32)
flags="CC=i386-pc-mingw32-gcc CXX=i386-pc-mingw32-g++ \
PKG_CONFIG_PATH=/cross/w32/target/lib/pkgconfig PKG_CONFIG_LIBDIR=\"\" \
PATH=\"/cross/w32/gcc-bin:/cross/w32/target/bin:$PATH\" \
--with-windows-gtk-name=gtk2-runtime-2.16.6-2010-05-12-ash --disable-user-flags \
--enable-optimize-options --enable-tests --build=i686-linux --host=i386-pc-mingw32" ;;
win32-debug)
flags="CC=i386-pc-mingw32-gcc CXX=i386-pc-mingw32-g++ \
PKG_CONFIG_PATH=/cross/w32/target/lib/pkgconfig PKG_CONFIG_LIBDIR=\"\" \
PATH=\"/cross/w32/gcc-bin:/cross/w32/target/bin:$PATH\" \
--disable-user-flags --enable-debug-options --enable-tests --build=i686-linux --host=i386-pc-mingw32" ;;
win64-debug)
flags="CC=x86_64-pc-mingw32-gcc CXX=x86_64-pc-mingw32-g++
PKG_CONFIG_PATH=/cross/w64/target/lib/pkgconfig \
PKG_CONFIG_LIBDIR=\"\" PATH=\"/cross/w64/gcc-bin:/cross/w64/target/bin:$PATH\" \
--disable-user-flags --enable-optimize-options --enable-tests --build=i686-linux \
--host=x86_64-pc-mingw32" ;;
sun)
flags="CC=suncc CXX=sunCC CFLAGS=\"-errwarn=%all -I/opt/sun/target64/include\" \
CXXFLAGS=\"-I/opt/sun/target64/include\" PATH=\"/opt/sun/sunstudio/bin:$PATH\" \
LDFLAGS=\"-R/opt/sun/target64/lib64 -L/opt/sun/target64/lib64\" \
PKG_CONFIG_PATH=\"/opt/sun/target64/lib64/pkgconfig:/usr/lib64/pkgconfig\" \
PKG_CONFIG_LIBDIR=\"\" --enable-tests" ;;
portland)
flags="CC=pgcc CXX=pgCC LDFLAGS=\"-s\" CFLAGS=\"-Minform=warn -Bstatic_pgi\" \
CXXFLAGS=\"-Minform=warn -Bstatic_pgi -noswitcherror -define_macro=HZ_NO_COMPILER_AUTOINCLUDE\" \
--enable-tests" ;;
open64)
flags="CC=/opt/open64/bin/opencc CXX=/opt/open64/bin/openCC CXXFLAGS=\"-Wall\" \
--enable-tests" ;;
esac
echo "Running:"
echo $configure_script $flags;
$configure_script $flags
exit $?
@@ -1,29 +0,0 @@
GSmartControl - Hard disk drive health inspection tool
Version @VERSION@
The latest version of this distribution, as well as the source code of
GSmartControl, can be found at
http://gsmartcontrol.berlios.de
and
http://developer.berlios.de/project/showfiles.php?group_id=10075
You need GTK+ for Windows Runtime package to use this program. You can get one
at http://gtk-win.sf.net (you must download at least version 2.16.6-2010-02-21
of gtk2-runtime).
This distribution includes:
* GSmartControl binary (gsmartcontrol.exe) and associated resources. The
binary was compiled for 32-bit Windows, and should work on both 32-bit and
64-bit Windows. The binary was statically compiled against Gtkmm
(http://www.gtkmm.org/) and related libraries, and PCRE (http://www.pcre.org/).
* Smartctl binaries (from smartmontools 5.43, http://smartmontools.sf.net/)
- smartctl-nc.exe (compiled without console output), smartctl.exe (compiled
with console output), update-smart-drivedb.exe (drive database updater).
The combined distribution is multi-licensed under GNU GPL versions 2 and 3.
See LICENSE_gpl2.txt and LICENSE_gpl3.txt for details.
@@ -1,28 +0,0 @@
GSmartControl - Hard disk drive health inspection tool
Version @VERSION@
The latest version of this distribution, as well as the source code of
GSmartControl, can be found at
http://gsmartcontrol.berlios.de
and
http://developer.berlios.de/project/showfiles.php?group_id=10075
This distribution includes:
* GSmartControl binary (gsmartcontrol.exe) and associated resources. The
binary was compiled for 32-bit Windows, and should work on both 32-bit and
64-bit Windows. The binary was statically compiled against Gtkmm
(http://www.gtkmm.org/) and related libraries, and PCRE (http://www.pcre.org/).
* Smartctl binaries (from smartmontools 5.43, http://smartmontools.sf.net/)
- smartctl-nc.exe (compiled without console output), smartctl.exe (compiled
with console output), update-smart-drivedb.exe (drive database updater).
* GTK+ for Windows Runtime package (@GTK_INSTALLER_NAME@)
from http://gtk-win.sf.net, either in original or unpacked form.
The combined distribution is multi-licensed under GNU GPL versions 2 and 3.
See LICENSE_gpl2.txt and LICENSE_gpl3.txt for details.
@@ -1,295 +0,0 @@
/**************************************************************************
Copyright:
(C) 2008 - 2012 Alexander Shaduri <ashaduri 'at' gmail.com>
License: See LICENSE_gsmartcontrol.txt
***************************************************************************/
/// \file
/// \author Alexander Shaduri
/// \ingroup applib
/// \weakgroup applib
/// @{
#include <gtkmm.h>
#include <gtk/gtk.h> // gtk_* stuff
#include <cstring> // std::strlen
#include <vector>
#include <glibmm.h>
#include "app_gtkmm_features.h" // APP_GTKMM_OLD_TOOLTIPS
#if defined APP_GTKMM_OLD_TOOLTIPS && APP_GTKMM_OLD_TOOLTIPS
#include <gtk/gtk.h> // gtk_tooltips_*
#endif
#include "app_pango_utils.h" // app_pango_strip_markup()
#include "app_gtkmm_utils.h"
// Note: This works only if the column has custom widget set.
Gtk::Widget* app_gtkmm_get_column_header(Gtk::TreeViewColumn& column)
{
Gtk::Widget* w = column.get_widget();
Gtk::Widget* p1 = 0;
Gtk::Widget* p2 = 0;
Gtk::Widget* p3 = 0;
// move up to GtkAlignment, then GtkHBox, then GtkButton.
if (w && (p1 = w->get_parent()) && (p2 = p1->get_parent()) && (p3 = p2->get_parent()))
return p3;
return NULL;
}
// Read column header text and create a label with that text, set it as column's custom widget.
Gtk::Widget* app_gtkmm_labelize_column(Gtk::TreeViewColumn& column)
{
Gtk::Label* label = Gtk::manage(new Gtk::Label(column.get_title()));
label->show();
column.set_widget(*label);
return label;
}
// A wrapper around set_tooltip_*() for portability across different gtkmm versions.
void app_gtkmm_set_widget_tooltip(Gtk::Widget& widget,
const Glib::ustring& tooltip_text, bool use_markup)
{
// set_tooltip_* is available since 2.12
#if !(defined APP_GTKMM_OLD_TOOLTIPS && APP_GTKMM_OLD_TOOLTIPS)
if (use_markup) {
widget.set_tooltip_markup(tooltip_text);
} else {
widget.set_tooltip_text(tooltip_text);
}
#else // use the old tooltips api
Gtk::Widget* toplevel = widget.get_toplevel();
if (toplevel && toplevel->is_toplevel()) { // orphan widgets return themselves, so check toplevelness.
GtkTooltips* tooltips = static_cast<GtkTooltips*>(toplevel->get_data("window_tooltips"));
if (tooltips) {
if (use_markup) {
// strip markup
Glib::ustring stripped;
if (app_pango_strip_markup(tooltip_text, stripped)) {
gtk_tooltips_set_tip(tooltips, widget.gobj(), stripped.c_str(), "");
}
} else {
gtk_tooltips_set_tip(tooltips, widget.gobj(), tooltip_text.c_str(), "");
}
}
}
#endif
}
// unset model on treeview, cross-gtkmm-version.
void app_gtkmm_treeview_unset_model(Gtk::TreeView* treeview)
{
// gtkmm's TreeView::unset_model() is since gtkmm 2.8
// (and there's no version info in docs), so use this instead.
if (treeview)
gtk_tree_view_set_model(treeview->gobj(), 0);
}
// unset model on combobox, cross-gtkmm-version.
void app_gtkmm_combobox_unset_model(Gtk::ComboBox* box)
{
// there's no ComboBox::unset_model() in gtkmm (huh?)
if (box)
gtk_combo_box_set_model(box->gobj(), 0);
}
#if defined APP_GTKMM_OLD_TOOLTIPS && APP_GTKMM_OLD_TOOLTIPS
namespace {
/// A helper function for gtkmm_set_treeview_tooltip_column()
inline bool app_on_treeview_motion_notify_event_tooltip(GdkEventMotion* event, Gtk::TreeView* treeview,
Gtk::TreeModelColumn<Glib::ustring> tooltip_column)
{
// debug_out_dump("app", DBG_FUNC_MSG << "x=" << int(event->x) << ", y=" << int(event->y) << "\n");
Gtk::TreePath path;
Gtk::TreeViewColumn* mouse_column = 0;
int cell_x = 0, cell_y = 0;
if (treeview->get_path_at_pos(static_cast<int>(event->x), static_cast<int>(event->y),
path, mouse_column, cell_x, cell_y)) { // returns true if we're on a cell
app_gtkmm_set_widget_tooltip(*treeview, (*(treeview->get_model()->get_iter(path)))[tooltip_column], true);
}
return false; // continue handling (no conflicts there?)
}
/// A helper function for gtkmm_set_iconview_tooltip_column()
inline bool app_on_iconview_motion_notify_event_tooltip(GdkEventMotion* event, Gtk::IconView* iconview,
Gtk::TreeModelColumn<Glib::ustring> tooltip_column, Glib::RefPtr<Gtk::ListStore> model)
{
// debug_out_dump("app", DBG_FUNC_MSG << "x=" << int(event->x) << ", y=" << int(event->y) << "\n");
// don't use get_item_at_pos() - it's not available in gtkmm < 2.8.
Gtk::TreePath tpath = iconview->get_path_at_pos(static_cast<int>(event->x), static_cast<int>(event->y));
if (tpath.gobj() && !tpath.empty()) { // without gobj() check gtkmm 2.6 (but not 2.12) prints lots of errors
// somehow, getting model from iconview doesn't work (segfault).
// Glib::RefPtr<Gtk::TreeModel> model = iconview->get_model();
if (tpath.gobj())
app_gtkmm_set_widget_tooltip(*iconview, (*(model->get_iter(tpath)))[tooltip_column], true);
}
return false; // continue handling (no conflicts there?)
}
}
#endif
void gtkmm_set_treeview_tooltip_column(Gtk::TreeView* treeview,
Gtk::TreeModelColumn<Glib::ustring>& col_tooltip)
{
if (!treeview)
return;
#if !(defined APP_GTKMM_OLD_TOOLTIPS && APP_GTKMM_OLD_TOOLTIPS)
treeview->set_tooltip_column(col_tooltip.index()); // gtkmm has only index-based api here
#else // manually set tooltips when hovering over cells
treeview->signal_motion_notify_event().connect( // connect before other events, or we'll get some screwed event data
sigc::bind(sigc::bind(sigc::ptr_fun(&app_on_treeview_motion_notify_event_tooltip), col_tooltip), treeview), false);
#endif
}
void gtkmm_set_iconview_tooltip_column(Gtk::IconView* iconview,
Gtk::TreeModelColumn<Glib::ustring>& col_tooltip, Glib::RefPtr<Gtk::ListStore> model)
{
if (!iconview)
return;
#if !(defined APP_GTKMM_OLD_TOOLTIPS && APP_GTKMM_OLD_TOOLTIPS)
iconview->set_tooltip_column(col_tooltip.index()); // gtkmm has only index-based api here
#else // manually set tooltips when hovering over cells
iconview->signal_motion_notify_event().connect( // connect before other events, or we'll get some screwed event data
sigc::bind(sigc::bind(sigc::bind(sigc::ptr_fun(&app_on_iconview_motion_notify_event_tooltip), model), col_tooltip), iconview), false);
#endif
}
bool app_gtkmm_icon_theme_has_icon(Glib::RefPtr<Gtk::IconTheme> theme,
const Glib::ustring& icon_name, int size)
{
if (!theme || !theme->has_icon(icon_name)) // check if it exists first, or exception may be thrown.
return false;
std::vector<int> sizes = theme->get_icon_sizes(icon_name);
for (std::vector<int>::const_iterator iter = sizes.begin(); iter != sizes.end(); ++iter) {
if (*iter == size || *iter == -1) // -1 means scalable
return true;
}
return false;
}
namespace {
/// This has been copied from _g_utf8_make_valid() (glib-2.20.4).
/// _g_utf8_make_valid() is GLib's private function for auto-correcting
/// the potentially invalid utf-8 data.
inline gchar* gsc_g_utf8_make_valid (const gchar* name)
{
GString* str;
const gchar* remainder, *invalid;
gint remaining_bytes, valid_bytes;
g_return_val_if_fail (name != NULL, NULL);
str = NULL;
remainder = name;
remaining_bytes = gint(std::strlen(name));
while (remaining_bytes != 0) {
if (g_utf8_validate (remainder, remaining_bytes, &invalid))
break;
valid_bytes = gint(invalid - remainder);
if (str == NULL)
str = g_string_sized_new (remaining_bytes);
g_string_append_len (str, remainder, valid_bytes);
/* append U+FFFD REPLACEMENT CHARACTER */
g_string_append (str, "\357\277\275");
remaining_bytes -= valid_bytes + 1;
remainder = invalid + 1;
}
if (str == NULL)
return g_strdup (name);
g_string_append (str, remainder);
g_assert (g_utf8_validate (str->str, -1, NULL));
return g_string_free (str, FALSE);
}
}
Glib::ustring app_utf8_make_valid(const Glib::ustring& str)
{
char* s = gsc_g_utf8_make_valid(str.c_str());
if (!s) {
return Glib::ustring();
}
Glib::ustring res(s);
g_free(s);
return res;
}
Glib::ustring app_output_make_valid(const Glib::ustring& str)
{
#ifdef _WIN32
try {
return app_utf8_make_valid(Glib::locale_to_utf8(str));
} catch (Glib::ConvertError& e) {
// nothing, try to fix as it is
}
#endif
return app_utf8_make_valid(str);
}
/// @}
@@ -1,582 +0,0 @@
/**************************************************************************
Copyright:
(C) 2008 - 2012 Alexander Shaduri <ashaduri 'at' gmail.com>
License: See LICENSE_unlicense.txt
***************************************************************************/
#include "hz/hz_config.h" // feature test macros (ENABLE_*)
// A simple empty window definition
#if defined ENABLE_LIBGLADE && ENABLE_LIBGLADE
extern const unsigned char app_ui_res_test_window_ui[] = {
0x3C,
0x3F,
0x78,
0x6D,
0x6C,
0x20,
0x76,
0x65,
0x72,
0x73,
0x69,
0x6F,
0x6E,
0x3D,
0x22,
0x31,
0x2E,
0x30,
0x22,
0x20,
0x65,
0x6E,
0x63,
0x6F,
0x64,
0x69,
0x6E,
0x67,
0x3D,
0x22,
0x55,
0x54,
0x46,
0x2D,
0x38,
0x22,
0x20,
0x73,
0x74,
0x61,
0x6E,
0x64,
0x61,
0x6C,
0x6F,
0x6E,
0x65,
0x3D,
0x22,
0x6E,
0x6F,
0x22,
0x3F,
0x3E,
0xA,
0x3C,
0x21,
0x44,
0x4F,
0x43,
0x54,
0x59,
0x50,
0x45,
0x20,
0x67,
0x6C,
0x61,
0x64,
0x65,
0x2D,
0x69,
0x6E,
0x74,
0x65,
0x72,
0x66,
0x61,
0x63,
0x65,
0x20,
0x53,
0x59,
0x53,
0x54,
0x45,
0x4D,
0x20,
0x22,
0x67,
0x6C,
0x61,
0x64,
0x65,
0x2D,
0x32,
0x2E,
0x30,
0x2E,
0x64,
0x74,
0x64,
0x22,
0x3E,
0xA,
0x3C,
0x67,
0x6C,
0x61,
0x64,
0x65,
0x2D,
0x69,
0x6E,
0x74,
0x65,
0x72,
0x66,
0x61,
0x63,
0x65,
0x3E,
0xA,
0x20,
0x20,
0x3C,
0x77,
0x69,
0x64,
0x67,
0x65,
0x74,
0x20,
0x63,
0x6C,
0x61,
0x73,
0x73,
0x3D,
0x22,
0x47,
0x74,
0x6B,
0x57,
0x69,
0x6E,
0x64,
0x6F,
0x77,
0x22,
0x20,
0x69,
0x64,
0x3D,
0x22,
0x61,
0x70,
0x70,
0x5F,
0x75,
0x69,
0x5F,
0x72,
0x65,
0x73,
0x5F,
0x74,
0x65,
0x73,
0x74,
0x5F,
0x77,
0x69,
0x6E,
0x64,
0x6F,
0x77,
0x22,
0x3E,
0xA,
0x20,
0x20,
0x20,
0x20,
0x3C,
0x70,
0x72,
0x6F,
0x70,
0x65,
0x72,
0x74,
0x79,
0x20,
0x6E,
0x61,
0x6D,
0x65,
0x3D,
0x22,
0x74,
0x69,
0x74,
0x6C,
0x65,
0x22,
0x20,
0x74,
0x72,
0x61,
0x6E,
0x73,
0x6C,
0x61,
0x74,
0x61,
0x62,
0x6C,
0x65,
0x3D,
0x22,
0x79,
0x65,
0x73,
0x22,
0x3E,
0x54,
0x65,
0x73,
0x74,
0x3C,
0x2F,
0x70,
0x72,
0x6F,
0x70,
0x65,
0x72,
0x74,
0x79,
0x3E,
0xA,
0x20,
0x20,
0x20,
0x20,
0x3C,
0x63,
0x68,
0x69,
0x6C,
0x64,
0x3E,
0xA,
0x20,
0x20,
0x20,
0x20,
0x20,
0x20,
0x3C,
0x70,
0x6C,
0x61,
0x63,
0x65,
0x68,
0x6F,
0x6C,
0x64,
0x65,
0x72,
0x2F,
0x3E,
0xA,
0x20,
0x20,
0x20,
0x20,
0x3C,
0x2F,
0x63,
0x68,
0x69,
0x6C,
0x64,
0x3E,
0xA,
0x20,
0x20,
0x3C,
0x2F,
0x77,
0x69,
0x64,
0x67,
0x65,
0x74,
0x3E,
0xA,
0x3C,
0x2F,
0x67,
0x6C,
0x61,
0x64,
0x65,
0x2D,
0x69,
0x6E,
0x74,
0x65,
0x72,
0x66,
0x61,
0x63,
0x65,
0x3E,
0xA,
0x0 };
extern const unsigned int app_ui_res_test_window_ui_size = 319;
#elif defined ENABLE_GTKBUILDER && ENABLE_GTKBUILDER
extern const unsigned char app_ui_res_test_window_ui[] = {
0x3C,
0x3F,
0x78,
0x6D,
0x6C,
0x20,
0x76,
0x65,
0x72,
0x73,
0x69,
0x6F,
0x6E,
0x3D,
0x22,
0x31,
0x2E,
0x30,
0x22,
0x3F,
0x3E,
0xA,
0x3C,
0x69,
0x6E,
0x74,
0x65,
0x72,
0x66,
0x61,
0x63,
0x65,
0x3E,
0xA,
0x20,
0x20,
0x3C,
0x6F,
0x62,
0x6A,
0x65,
0x63,
0x74,
0x20,
0x63,
0x6C,
0x61,
0x73,
0x73,
0x3D,
0x22,
0x47,
0x74,
0x6B,
0x57,
0x69,
0x6E,
0x64,
0x6F,
0x77,
0x22,
0x20,
0x69,
0x64,
0x3D,
0x22,
0x61,
0x70,
0x70,
0x5F,
0x75,
0x69,
0x5F,
0x72,
0x65,
0x73,
0x5F,
0x74,
0x65,
0x73,
0x74,
0x5F,
0x77,
0x69,
0x6E,
0x64,
0x6F,
0x77,
0x22,
0x3E,
0xA,
0x20,
0x20,
0x20,
0x20,
0x3C,
0x70,
0x72,
0x6F,
0x70,
0x65,
0x72,
0x74,
0x79,
0x20,
0x6E,
0x61,
0x6D,
0x65,
0x3D,
0x22,
0x74,
0x69,
0x74,
0x6C,
0x65,
0x22,
0x20,
0x74,
0x72,
0x61,
0x6E,
0x73,
0x6C,
0x61,
0x74,
0x61,
0x62,
0x6C,
0x65,
0x3D,
0x22,
0x79,
0x65,
0x73,
0x22,
0x3E,
0x54,
0x65,
0x73,
0x74,
0x3C,
0x2F,
0x70,
0x72,
0x6F,
0x70,
0x65,
0x72,
0x74,
0x79,
0x3E,
0xA,
0x20,
0x20,
0x20,
0x20,
0x3C,
0x63,
0x68,
0x69,
0x6C,
0x64,
0x3E,
0xA,
0x20,
0x20,
0x20,
0x20,
0x20,
0x20,
0x3C,
0x70,
0x6C,
0x61,
0x63,
0x65,
0x68,
0x6F,
0x6C,
0x64,
0x65,
0x72,
0x2F,
0x3E,
0xA,
0x20,
0x20,
0x20,
0x20,
0x3C,
0x2F,
0x63,
0x68,
0x69,
0x6C,
0x64,
0x3E,
0xA,
0x20,
0x20,
0x3C,
0x2F,
0x6F,
0x62,
0x6A,
0x65,
0x63,
0x74,
0x3E,
0xA,
0x3C,
0x2F,
0x69,
0x6E,
0x74,
0x65,
0x72,
0x66,
0x61,
0x63,
0x65,
0x3E,
0xA,
0x0 };
extern const unsigned int app_ui_res_test_window_ui_size = 224;
#endif
@@ -1,270 +0,0 @@
/**************************************************************************
Copyright:
(C) 2008 - 2012 Alexander Shaduri <ashaduri 'at' gmail.com>
License: See LICENSE_gsmartcontrol.txt
***************************************************************************/
/// \file
/// \author Alexander Shaduri
/// \ingroup applib
/// \weakgroup applib
/// @{
#include "hz/hz_config.h" // CONFIG_*
#if defined CONFIG_KERNEL_FAMILY_WINDOWS
#include <windows.h> // CreateFileA(), CloseHandle(), etc...
#include <glibmm.h>
#include <set>
#include "hz/win32_tools.h"
#include "hz/string_sprintf.h"
#include "rconfig/rconfig_mini.h"
#include "app_pcrecpp.h"
#include "storage_detector_win32.h"
#include "storage_detector_helpers.h"
/**
\file
<pre>
3ware Windows detection:
For 3ware 9xxx only.
Call as: smartctl -i sd[a-z],N
N is port, a-z is logical drive (unit) provided by controller.
N is limited to [0, 31] in the code.
The sd[a-z] device actually exists as \\\\.\\PhysicalDrive[0-N].
No idea how to check if it's 3ware.
Call as: smarctl -i tw_cli/cx/py
This runs tw_cli tool and parses the output; controller x, port y.
tw_cli may be needed for older controllers / drivers.
In tw_cli mode only limited information-gathering is supported.
tw_cli (part of 3DM2) is automatically added to system PATH,
no need to look for it.
3DM2 install can be detected by checking:
HKEY_USERS\\.DEFAULT\\Software\\3ware\\3DM2, InstallPath
Another option for detection (whether it's 3ware) would be getting
\\\\.\\PhysicalDrive0 properties, like smartctl does.
Newer (added after 5.39.1) smartctl supports --scan-open, which will give us:
/dev/sda,0 -d ata (opened)
/dev/sda,1 -d ata (opened)
-d 3ware is not needed under Windows. We should treat sda as pd0
and remove pd0 from PhysicalDrive-detected list.
Running smartctl on sda gives almost the same result as on sda,0.
Intel Matrix RAID (since smartmontools SVN version on 2011-02-04):
Call as: "/dev/csmi[0-9],N" where N is the port behind the logical
scsi controller "\\\\.\\Scsi[0-9]:".
The prefix "/dev/" is optional.
This is detected (with /dev/ prefix) by --scan-open.
The drives may be duplicated as pdX (with X and N being unrelated).
This usually happens when Intel RAID drivers are installed, even
if no RAID configuration is present. For example, on a laptop with
Intel chipset and Intel drivers installed, we have /dev/csmi0,0 and
pd0 for the first HDD, and /dev/csmi0,1 for DVD (no pdX entry there).
This is what --scan-open looks like:
------------------------------------------------------------------
/dev/sda -d ata # /dev/sda, ATA device
/dev/csmi0,0 -d ata # /dev/csmi0,0, ATA device
/dev/csmi0,1 -d ata # /dev/csmi0,1, ATA device
------------------------------------------------------------------
We filter out pdX devices using serial numbers (unless "-q noserial"
is given to smartctl), and prefer csmi to pd (since csmi provides more features).
smartctl --scan-open output for win32 with 3ware RAID:
------------------------------------------------------------------
/dev/sda,0 -d ata (opened)
/dev/sda,1 -d ata (opened)
------------------------------------------------------------------
</pre>
*/
namespace {
/// Run "smartctl --scan-open" and pick the devices which have
/// a port parameter. We don't pick the others because the may
/// conflict with pd* devices, and we like pd* better than sd*.
std::string get_scan_open_multiport_devices(std::vector<StorageDeviceRefPtr>& drives,
ExecutorFactoryRefPtr ex_factory, std::set<int>& equivalent_pds)
{
hz::intrusive_ptr<CmdexSync> smartctl_ex = ex_factory->create_executor(ExecutorFactory::ExecutorSmartctl);
std::string smartctl_binary = get_smartctl_binary();
if (smartctl_binary.empty()) {
debug_out_error("app", DBG_FUNC_MSG << "Smartctl binary is not set in config.\n");
return "Smartctl binary is not specified in configuration.";
}
std::string smartctl_def_options;
rconfig::get_data("system/smartctl_options", smartctl_def_options);
if (!smartctl_def_options.empty())
smartctl_def_options += " ";
smartctl_ex->set_command(Glib::shell_quote(smartctl_binary),
smartctl_def_options + "--scan-open");
if (!smartctl_ex->execute() || !smartctl_ex->get_error_msg().empty()) {
debug_out_warn("app", DBG_FUNC_MSG << "Error while executing smartctl binary.\n");
return smartctl_ex->get_error_msg();
}
// any_to_unix is needed for windows
std::string output = hz::string_trim_copy(hz::string_any_to_unix_copy(smartctl_ex->get_stdout_str()));
if (output.empty()) {
debug_out_error("app", DBG_FUNC_MSG << "Smartctl returned an empty output.\n");
return "Smartctl returned an empty output.";
}
// if we've reached smartctl port limit (older versions may have smaller limits), abort.
if (app_pcre_match("/UNRECOGNIZED OPTION/mi", output)) {
return "Smartctl doesn't support --scan-open switch.";
}
std::vector<std::string> lines;
hz::string_split(output, '\n', lines, true);
// /dev/sda,0 -d ata (opened)
// /dev/sda,1 -d ata (opened)
// /dev/sda -d sat # /dev/sda [SAT], ATA device
// /dev/sde,2 -d ata [ATA] (opened)
// we only pick the ones with ports
pcrecpp::RE port_re = app_pcre_re("/^(/dev/[a-z0-9]+),([0-9]+)[ \\t]+-d[ \\t]+([^ \\t\\n]+)/i");
pcrecpp::RE dev_re = app_pcre_re("/^/dev/sd([a-z])$/");
for (std::size_t i = 0; i < lines.size(); ++i) {
std::string dev, port_str, type;
if (port_re.PartialMatch(hz::string_trim_copy(lines.at(i)), &dev, &port_str, &type)) {
std::string letter;
if (dev_re.PartialMatch(dev, &letter)) {
// don't use pd* devices equivalent to these sd* devices.
equivalent_pds.insert(letter.at(0) - 'a');
}
std::string full_dev = dev + "," + port_str;
drives.push_back(StorageDeviceRefPtr(new StorageDevice(full_dev, type)));
}
}
return std::string();
}
}
// smartctl accepts various variants, the most straight being pdN,
// (or /dev/pdN, /dev/ being optional) where N comes from
// "\\.\PhysicalDriveN" (winnt only).
// http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx
std::string detect_drives_win32(std::vector<StorageDeviceRefPtr>& drives, ExecutorFactoryRefPtr ex_factory)
{
hz::intrusive_ptr<CmdexSync> smartctl_ex = ex_factory->create_executor(ExecutorFactory::ExecutorSmartctl);
// Fetch multiport devices using --scan-open.
std::set<int> used_pds;
std::string error_msg = get_scan_open_multiport_devices(drives, ex_factory, used_pds);
bool multiport_found = !drives.empty();
// Find out their serial numbers
std::set<std::string> serials;
for (std::size_t i = 0; i < drives.size(); ++i) {
std::string local_error = drives.at(i)->fetch_basic_data_and_parse(smartctl_ex);
if (!local_error.empty()) {
debug_out_info("app", "Smartctl returned with an error: " << error_msg << "\n");
// Don't exit, just report it.
}
if (!drives.at(i)->get_serial_number().empty()) {
// add model as well, who knows, there may be duplicates across vendors
serials.insert(drives.at(i)->get_model_name() + "_" + drives.at(i)->get_serial_number());
}
}
// Scan PhysicalDrive entries
for (int drive_num = 0; ; ++drive_num) {
// If the drive was already encountered in --scan-open (with a port number), skip it.
if (used_pds.count(drive_num) > 0) {
continue;
}
std::string name = hz::string_sprintf("\\\\.\\PhysicalDrive%d", drive_num);
// If the drive is openable, then it's there. Yes, CreateFile() is open, not create.
// NOTE: Administrative privileges are required to open it.
// We don't use any long/unopenable files here, so use the ANSI version.
HANDLE h = CreateFileA(name.c_str(), 0, FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, 0, NULL);
// The numbers seem to be consecutive, so break on first invalid.
if (h == INVALID_HANDLE_VALUE)
break;
CloseHandle(h);
StorageDeviceRefPtr drive(new StorageDevice(hz::string_sprintf("pd%d", drive_num)));
// Sometimes, a single physical drive may be accessible from both "/.//PhysicalDriveN"
// and "/.//Scsi2" (e.g. pd0 and csmi2,1). Prefer the port-having ones (which is from --scan-open),
// they contain more information.
// The only way to detect these duplicates is to compare them using serial numbers.
if (!serials.empty()) {
std::string local_error = drive->fetch_basic_data_and_parse(smartctl_ex);
if (!local_error.empty()) {
debug_out_info("app", "Smartctl returned with an error: " << error_msg << "\n");
// Don't exit, just report it.
}
// A serial may be empty if "-q noserial" was given to smartctl.
if (!drive->get_serial_number().empty()
&& serials.count(drive->get_model_name() + "_" + drive->get_serial_number()) > 0) {
debug_out_info("app", "Skipping duplicate drive: model: \"" << drive->get_model_name()
<< "\", S/N: \"" << drive->get_serial_number() << "\".\n");
continue;
}
}
drives.push_back(drive);
}
// If smartctl --scan-open returns no "sd*,port"-style devices,
// check if 3dm2 is installed and execute "tw_cli show" to get
// the controllers, then use the tw_cli variant of smartctl.
if (!multiport_found) {
std::string inst_path;
hz::win32_get_registry_value_string(HKEY_USERS, ".DEFAULT\\Software\\3ware\\3DM2", "InstallPath", inst_path);
if (!inst_path.empty()) {
std::vector<int> controllers;
error_msg = tw_cli_get_controllers(ex_factory, controllers);
// ignore the error message above, it's of no use.
for (std::size_t i = 0; i < controllers.size(); ++i) {
// don't specify device, it's ignored in tw_cli mode
tw_cli_get_drives("", controllers.at(i), drives, ex_factory, true);
}
}
}
return std::string();
}
#endif // CONFIG_KERNEL_FAMILY_WINDOWS
/// @}
File diff suppressed because it is too large Load Diff
-138
View File
@@ -1,138 +0,0 @@
/**************************************************************************
Copyright:
(C) 2008 - 2012 Alexander Shaduri <ashaduri 'at' gmail.com>
License: See LICENSE_gsmartcontrol.txt
***************************************************************************/
/// \file
/// \author Alexander Shaduri
/// \ingroup applib
/// \weakgroup applib
/// @{
#ifndef WRAPPING_LABEL_H
#define WRAPPING_LABEL_H
#include <gtkmm/label.h>
#include "app_gtkmm_features.h" // APP_GTKMM_CONNECT_VIRTUAL
/// An auto-wrapping label. The GtkLabel widget has a bug
/// (or "design decision", as gtk devs say), when the widget can't
/// control its wrapping width according to parent container's size.
/// This class should fix that.
class WrappingLabel : public Gtk::Label {
public:
/// Constructor
WrappingLabel(const Glib::ustring& label, Gtk::AlignmentEnum xalign,
Gtk::AlignmentEnum yalign = Gtk::ALIGN_CENTER, bool mnemonic = false)
: Gtk::Label(label, xalign, yalign, mnemonic)
{
this->construct();
}
/// Constructor
WrappingLabel(const Glib::ustring& label, float xalign, float yalign, bool mnemonic = false)
: Gtk::Label(label, xalign, yalign, mnemonic)
{
this->construct();
}
/// Constructor
WrappingLabel (const Glib::ustring& label, bool mnemonic=false)
: Gtk::Label(label, mnemonic)
{
this->construct();
}
/// Constructor
WrappingLabel()
{
this->construct();
}
// Reimplemented from Gtk::Label
virtual void set_text(const Glib::ustring& label)
{
Label::set_text(label);
set_width(width_);
}
// Reimplemented from Gtk::Label
virtual void set_markup(const Glib::ustring& label)
{
Label::set_markup(label);
set_width(width_);
}
// Reimplemented from Gtk::Label
virtual void set_label(const Glib::ustring& label)
{
Label::set_label(label);
set_width(width_);
}
protected:
/// size_allocate handler
void on_size_allocate_before(Gtk::Allocation& alloc)
{
Gtk::Label::on_size_allocate(alloc);
set_width(alloc.get_width());
}
/// size_request handler
void on_size_request_before(Gtk::Requisition* req)
{
int w = 0, h = 0;
get_layout()->get_pixel_size(w, h);
req->width = -1;
req->height = h;
}
/// Set widget width
void set_width(int width)
{
if (width == 0)
return;
get_layout()->set_width(width * Pango::SCALE);
if (width_ != width) {
width_ = width;
queue_resize();
}
}
private:
/// Called from constructors
void construct()
{
width_ = 0;
// set_line_wrap_mode is from 2.10, so use this instead.
get_layout()->set_wrap(Pango::WRAP_WORD_CHAR);
typedef WrappingLabel self_type;
APP_GTKMM_CONNECT_VIRTUAL(size_allocate);
APP_GTKMM_CONNECT_VIRTUAL(size_request);
}
int width_; ///< wrapping width
};
#endif
/// @}
-148
View File
@@ -1,148 +0,0 @@
/**************************************************************************
Copyright:
(C) 2008 - 2012 Alexander Shaduri <ashaduri 'at' gmail.com>
License: See LICENSE_zlib.txt file
***************************************************************************/
/// \file
/// \author Alexander Shaduri
/// \ingroup hz
/// \weakgroup hz
/// @{
#ifndef HZ_LAUNCH_URL_H
#define HZ_LAUNCH_URL_H
#include "hz_config.h" // feature macros
#include <string>
#include <glib.h> // g_*
#include <gdk/gdk.h> // gdk_spawn_command_line_on_screen, GdkScreen
#ifdef _WIN32
#include <windows.h> // seems to be needed by shellapi.h
#include <shellapi.h> // ShellExecuteW()
#include "scoped_array.h"
#include "win32_tools.h" // hz::win32_utf8_to_utf16
#else
#include "scoped_ptr.h"
#include "env_tools.h"
#endif
namespace hz {
namespace internal {
/// Spawn the command (internal helper function)
inline bool launch_url_helper_do_launch(const std::string& command, GError** errorptr, GdkScreen* screen)
{
if (screen)
return gdk_spawn_command_line_on_screen(screen, command.c_str(), errorptr);
return g_spawn_command_line_async(command.c_str(), errorptr);
}
}
/// Open URL in browser or mailto: link in mail client.
/// Return error message on error, empty string otherwise.
/// The link is in utf-8 in windows.
/// Note: This works using Glib / GDK only.
inline std::string launch_url(const std::string& link, GdkScreen* screen = 0)
{
// TODO: Use gtk_show_uri() if gtk 2.14.
if (link.empty())
return "Error while executing a command: Empty URI specified.";
#ifdef _WIN32
hz::scoped_array<wchar_t> wlink(hz::win32_utf8_to_utf16(link.c_str()));
if (!wlink)
return "Error while executing a command: The specified URI contains non-UTF-8 characters.";
HINSTANCE inst = ShellExecuteW(0, L"open", wlink.get(), NULL, NULL, SW_SHOWNORMAL);
if (inst > reinterpret_cast<HINSTANCE>(32)) {
return std::string();
}
return "Error while executing a command: Internal error.";
#else
bool is_email = (link.compare(0, 7, "mailto:") == 0);
std::string browser;
// susehelp lists this, with alternative being TEXTBROWSER
hz::env_get_value("XBROWSER", browser);
if (browser.empty())
hz::env_get_value("BROWSER", browser); // this is the common method
// try xfce first - it has the most sensible launcher.
if (browser.empty())
browser = "exo-open";
std::string qlink;
{
// will this break its embedded parameters?
hz::scoped_ptr<gchar> browser_cstr(g_shell_quote(browser.c_str()), g_free);
if (browser_cstr)
browser = browser_cstr.get();
hz::scoped_ptr<gchar> qlink_cstr(g_shell_quote(link.c_str()), g_free);
if (qlink_cstr)
qlink = qlink_cstr.get();
}
std::string command = browser + " " + qlink;
hz::scoped_ptr<GError> error(0, g_error_free);
bool status = internal::launch_url_helper_do_launch(command.c_str(), &error.get_ref(), screen);
if (!status) { // try kde4
status = internal::launch_url_helper_do_launch(std::string("kde-open ") + qlink, 0, screen);
}
if (!status) { // try kde3
// launches both konq and kmail on mailto:.
status = internal::launch_url_helper_do_launch(std::string("kfmclient openURL") + qlink, 0, screen);
}
if (!status) { // try gnome
// errors out with "no handler" on mailto: on my system.
status = internal::launch_url_helper_do_launch(std::string("gnome-open ") + qlink, 0, screen);
}
if (!status && !is_email) { // try XDG
// doesn't support emails at all.
status = internal::launch_url_helper_do_launch(std::string("xdg-open ") + qlink, 0, screen);
}
// we use the error of the first command, because it could have user-specified.
std::string error_msg;
if (!status) {
error_msg = std::string("Error while executing a command: ")
+ ((error && error->message) ? (std::string(": ") + error->message) : ".");
}
return error_msg;
#endif
}
} // ns
#endif
/// @}
-248
View File
@@ -1,248 +0,0 @@
/**************************************************************************
Copyright:
(C) 2008 - 2012 Alexander Shaduri <ashaduri 'at' gmail.com>
License: See LICENSE_zlib.txt file
***************************************************************************/
#ifndef HZ_SYNC_POLICY_GLIB_H
#define HZ_SYNC_POLICY_GLIB_H
#include "hz_config.h" // feature macros
#include <glib.h>
#include "sync.h"
/**
\file
Glib-based policy.
*/
/// Lock GStaticMutex
#define hz_glib_static_mutex_lock(mutex) \
g_mutex_lock(g_static_mutex_get_mutex(mutex))
/// Try locking GStaticMutex
#define hz_glib_static_mutex_trylock(mutex) \
g_mutex_trylock(g_static_mutex_get_mutex(mutex))
/// Unlock GStaticMutex
#define hz_glib_static_mutex_unlock(mutex) \
g_mutex_unlock(g_static_mutex_get_mutex(mutex))
namespace hz {
/// C++ Wrapper for Glib mutex
class MutexGlib : public hz::noncopyable {
public:
typedef GStaticMutex native_type;
static void native_lock(native_type& mutex)
{
hz_glib_static_mutex_lock(&mutex);
}
static bool native_trylock(native_type& mutex)
{
return hz_glib_static_mutex_trylock(&mutex);
}
static void native_unlock(native_type& mutex)
{
hz_glib_static_mutex_unlock(&mutex);
}
MutexGlib() { g_static_mutex_init(&mutex_); }
~MutexGlib() { g_static_mutex_free(&mutex_); }
void lock() { native_lock(mutex_); }
bool trylock() { return native_trylock(mutex_); }
void unlock() { native_unlock(mutex_); }
private:
GStaticMutex mutex_; // use StaticMutex, I think it uses less heap memory
};
/// C++ Wrapper for Glib recursive mutex
class RecMutexGlib : public hz::noncopyable {
public:
typedef GStaticRecMutex native_type;
static void native_lock(native_type& mutex)
{
g_static_rec_mutex_lock(&mutex);
}
static bool native_trylock(native_type& mutex)
{
return g_static_rec_mutex_trylock(&mutex);
}
static void native_unlock(native_type& mutex)
{
g_static_rec_mutex_unlock(&mutex);
}
RecMutexGlib() { g_static_rec_mutex_init(&mutex_); }
~RecMutexGlib() { g_static_rec_mutex_free(&mutex_); }
void lock() { native_lock(mutex_); }
bool trylock() { return native_trylock(mutex_); }
void unlock() { native_unlock(mutex_); }
private:
GStaticRecMutex mutex_;
};
/// C++ Wrapper for Glib RW lock
class RWMutexGlib : public hz::noncopyable {
public:
typedef GStaticRWLock native_type;
static void native_lock(native_type& mutex, bool for_write = false)
{
if (for_write) {
g_static_rw_lock_writer_lock(&mutex);
} else {
g_static_rw_lock_reader_lock(&mutex);
}
}
static bool native_trylock(native_type& mutex, bool for_write = false)
{
return (for_write ? g_static_rw_lock_writer_trylock(&mutex) : g_static_rw_lock_reader_trylock(&mutex));
}
static void native_unlock(native_type& mutex, bool for_write = false)
{
if (for_write) {
g_static_rw_lock_writer_unlock(&mutex);
} else {
g_static_rw_lock_reader_unlock(&mutex);
}
}
RWMutexGlib() { g_static_rw_lock_init(&mutex_); }
~RWMutexGlib() { g_static_rw_lock_free(&mutex_); }
void lock(bool for_write = false) { native_lock(mutex_, for_write); }
bool trylock(bool for_write = false) { return native_trylock(mutex_, for_write); }
void unlock(bool for_write = false) { native_unlock(mutex_, for_write); }
private:
GStaticRWLock mutex_;
};
/// Native type notes:
/// MutexGlib's underlying structure is neither guaranteed to be
/// recursive nor to be non-recursive.
/// All these mutexes won't do anything unless gthread is initialized.
///
/// Note: For this policy to work, you MUST initialize GThread system
/// by calling one of the following (doesn't matter which exactly) beforehand:
/// Glib::thread_init(); // glibmm
/// or
/// g_thread_init(NULL); // glib
/// or
/// SyncPolicyGlib::init(); // sync's wrapper
///
/// If you don't do it, the operations will silently do nothing.
///
/// Glib doesn't provide any means to detect errors, so no exceptions here.
struct SyncPolicyGlib : public SyncScopedLockProvider<SyncPolicyGlib> {
// Types:
typedef MutexGlib Mutex;
typedef Mutex::native_type NativeMutex;
typedef RecMutexGlib RecMutex;
typedef RecMutex::native_type NativeRecMutex;
typedef RWMutexGlib RWMutex;
typedef RWMutex::native_type NativeRWMutex;
typedef GenericScopedLock<Mutex> ScopedLock;
typedef GenericScopedTryLock<Mutex> ScopedTryLock;
typedef GenericScopedLock<NativeMutex> ScopedNativeLock;
typedef GenericScopedTryLock<NativeMutex> ScopedNativeTryLock;
typedef GenericScopedLock<RecMutex> ScopedRecLock;
typedef GenericScopedTryLock<RecMutex> ScopedRecTryLock;
typedef GenericScopedLock<NativeRecMutex> ScopedNativeRecLock;
typedef GenericScopedTryLock<NativeRecMutex> ScopedNativeRecTryLock;
typedef GenericScopedRWLock<RWMutex> ScopedRWLock;
typedef GenericScopedRWTryLock<RWMutex> ScopedRWTryLock;
typedef GenericScopedRWLock<NativeRWMutex> ScopedNativeRWLock;
typedef GenericScopedRWTryLock<NativeRWMutex> ScopedNativeRWTryLock;
// Static methods
/// If glib threads are unavailable, this will abort.
static bool init() { if (!g_thread_supported()) g_thread_init(NULL); return true; }
static void lock(Mutex& m) { m.lock(); }
static bool trylock(Mutex& m) { return m.trylock(); }
static void unlock(Mutex& m) { m.unlock(); }
static void lock(NativeMutex& m) { Mutex::native_lock(m); }
static bool trylock(NativeMutex& m) { return Mutex::native_trylock(m); }
static void unlock(NativeMutex& m) { Mutex::native_unlock(m); }
static void lock(RecMutex& m) { m.lock(); }
static bool trylock(RecMutex& m) { return m.trylock(); }
static void unlock(RecMutex& m) { m.unlock(); }
static void lock(NativeRecMutex& m) { RecMutex::native_lock(m); }
static bool trylock(NativeRecMutex& m) { return RecMutex::native_trylock(m); }
static void unlock(NativeRecMutex& m) { RecMutex::native_unlock(m); }
static void lock(RWMutex& m, bool for_write = false) { m.lock(for_write); }
static bool trylock(RWMutex& m, bool for_write = false) { return m.trylock(for_write); }
static void unlock(RWMutex& m, bool for_write = false) { m.unlock(for_write); }
static void lock(NativeRWMutex& m, bool for_write = false) { RWMutex::native_lock(m, for_write); }
static bool trylock(NativeRWMutex& m, bool for_write = false) { return RWMutex::native_trylock(m, for_write); }
static void unlock(NativeRWMutex& m, bool for_write = false) { RWMutex::native_unlock(m, for_write); }
};
// mutex -> policy
template<> struct SyncGetPolicy<SyncPolicyGlib::Mutex> { typedef SyncPolicyGlib type; };
template<> struct SyncGetPolicy<SyncPolicyGlib::NativeMutex> { typedef SyncPolicyGlib type; };
template<> struct SyncGetPolicy<SyncPolicyGlib::RecMutex> { typedef SyncPolicyGlib type; };
template<> struct SyncGetPolicy<SyncPolicyGlib::NativeRecMutex> { typedef SyncPolicyGlib type; };
template<> struct SyncGetPolicy<SyncPolicyGlib::RWMutex> { typedef SyncPolicyGlib type; };
template<> struct SyncGetPolicy<SyncPolicyGlib::NativeRWMutex> { typedef SyncPolicyGlib type; };
} // ns
#endif
-97
View File
@@ -1,97 +0,0 @@
# Disable implicit suffix rules for these extensions.
# The problem is that make sees the .glade.cpp or .ui.cpp files
# with their .glade prerequisites, and decides to rebuild the
# (already existing) .glade files by using .glade.cpp files.
# Implicit rules are to blame, so disable them for .glade.
SUFFIXES = .glade .txt
AM_CPPFLAGS =
METASOURCES = AUTO
noinst_LIBRARIES = libres.a
libres_a_SOURCES =
# List _all_ sources that may be compiled. This is basically the same list as
# in configure.ac, but with .cpp extensions and without paths.
EXTRA_libres_a_SOURCES = gsc_about_dialog.glade.cpp gsc_about_dialog.ui.cpp \
gsc_add_device_window.glade.cpp gsc_add_device_window.ui.cpp \
gsc_executor_log_window.glade.cpp gsc_executor_log_window.ui.cpp \
gsc_help_window.glade.cpp gsc_help_window.ui.cpp \
gsc_info_window.glade.cpp gsc_info_window.ui.cpp \
gsc_main_window.glade.cpp gsc_main_window.ui.cpp \
gsc_preferences_window.glade.cpp gsc_preferences_window.ui.cpp \
gsc_text_window.glade.cpp gsc_text_window.ui.cpp \
AUTHORS.txt.cpp LICENSE_gsmartcontrol.txt.cpp README.txt.cpp
# list all intermediate files here (.tmp_ui files are cleaned automatically by make, but it won't hurt)
mostlyclean-local:
rm -f *.glade.cpp *.ui.cpp *.tmp_ui *.txt.cpp
# This lists all objects that are actually built.
libres_a_LIBADD = $(RES_LIBADD)
libres_a_DEPENDENCIES = $(RES_LIBADD)
# This lists all resources in this directory (otherwise they don't get bundled,
# noinst_DATA doesn't put them into distribution (why?)).
EXTRA_DIST = $(RES_DIST)
# This lists the actual makefile rules for each target.
@RES_TARGETS@
# # List all local resource files here. Note: noinst_DATA doesn't put them into distribution (why?)
# EXTRA_DIST = gsc_about_dialog.glade gsc_executor_log_window.glade \
# gsc_help_window.glade gsc_info_window.glade gsc_main_window.glade \
# gsc_preferences_window.glade gsc_text_window.glade
#
# Note: All .cpp files will be generated during "make dist" and bundled with
# the distribution.
#
# libres_a_SOURCES = AUTHORS.txt.cpp LICENSE_gsmartcontrol.txt.cpp README.txt.cpp
#
#
# if ENABLE_GTKBUILDER
# # list all .glade.cpp files here
# libres_a_SOURCES += gsc_about_dialog.ui.cpp gsc_executor_log_window.ui.cpp \
# gsc_help_window.ui.cpp gsc_info_window.ui.cpp gsc_main_window.ui.cpp \
# gsc_preferences_window.ui.cpp gsc_text_window.ui.cpp
# endif
#
# if ENABLE_LIBGLADE
# # list all .ui.cpp files here
# libres_a_SOURCES += gsc_about_dialog.glade.cpp gsc_executor_log_window.glade.cpp \
# gsc_help_window.glade.cpp gsc_info_window.glade.cpp gsc_main_window.glade.cpp \
# gsc_preferences_window.glade.cpp gsc_text_window.glade.cpp
# endif
#
# # Note: GNU patterns here. Can't convert them to suffix rules
# # because paths in targets don't seem to be supported by them.
#
# # Note: We use abs_top_srcdir (instead of top_srcdir) because without
# # it we get "file name too long" errors when compiling in this directory.
# # (automake bug?)
#
# # GtkBuilder support
# %.tmp_ui: $(abs_top_srcdir)/src/res/%.glade
# gtk-builder-convert $< $@
#
# %.ui.cpp: %.tmp_ui
# $(top_srcdir)/file2csource.sh $< $@ $*_ui
#
#
# # Libglade support
# %.glade.cpp: $(abs_top_srcdir)/src/res/%.glade
# $(top_srcdir)/file2csource.sh $< $@ $*_ui
#
# # Common compiled-in files (resources)
#
# # This covers the files in top srcdir only.
# %.txt.cpp: $(abs_top_srcdir)/%.txt
# $(top_srcdir)/file2csource.sh $< $@ $*_txt
#

Some files were not shown because too many files have changed in this diff Show More