Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1f44154d3 | ||
|
|
6e8628b1df | ||
|
|
2b19afe66d | ||
|
|
7236841d64 | ||
|
|
49fb65ce71 | ||
|
|
ad87baee70 | ||
|
|
5e8fef98ec | ||
|
|
83baafa615 | ||
|
|
9f39db9517 | ||
|
|
19f2bcf286 | ||
|
|
02e8876acc | ||
|
|
4f78e3dd90 | ||
|
|
6888d0862d | ||
|
|
a95be84eac | ||
|
|
b76b5f2227 | ||
|
|
7a12c0880f | ||
|
|
58b0b1fab2 | ||
|
|
16b5c322d5 | ||
|
|
16d5b82ac8 | ||
|
|
be66a8749c | ||
|
|
5192a9d447 | ||
|
|
b9160ec173 | ||
|
|
675fad3fc1 | ||
|
|
f7c01d6c7b | ||
|
|
5bc6318dcd | ||
|
|
3d8b0c94df | ||
|
|
73fec7fa3f | ||
|
|
22971e8567 | ||
|
|
3df4cdae56 | ||
|
|
062096a0b4 | ||
|
|
978e7d41b7 | ||
|
|
33028f81d9 | ||
|
|
4cb12c5e0c | ||
|
|
b01acfeef3 | ||
|
|
b7676aaba8 | ||
|
|
e0a13c6867 | ||
|
|
9f5db6d034 | ||
|
|
5c3bfe8db0 | ||
|
|
5926e43bc5 | ||
|
|
f21f076386 | ||
|
|
da403b28c9 | ||
|
|
faba9270a0 | ||
|
|
9ca87eb296 | ||
|
|
b2b97f2c9a | ||
|
|
8494880943 | ||
|
|
0f8f38f0e1 | ||
|
|
8544163c46 | ||
|
|
fdcd190592 | ||
|
|
40e08796d1 | ||
|
|
1e72729056 | ||
|
|
731122e891 | ||
|
|
ebb3ab6017 | ||
|
|
3d2fe7fd50 | ||
|
|
9a70345f4a | ||
|
|
897a4efa96 | ||
|
|
6ab53c5436 |
@@ -8,8 +8,6 @@ config.guess
|
||||
config.sub
|
||||
aclocal.m4
|
||||
config.h.in
|
||||
compile
|
||||
ar-lib
|
||||
missing
|
||||
install-sh
|
||||
*.glade.cpp
|
||||
@@ -0,0 +1,154 @@
|
||||
|
||||
# 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
|
||||
|
||||
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,19 +1,3 @@
|
||||
Version 1.0.2, released on 2017-07-21
|
||||
Fixed incomplete capturing of smartctl output under Windows.
|
||||
Added missing icons under Windows.
|
||||
Fixed being able to turn on AODC even if unsupported.
|
||||
|
||||
Version 1.0.1, released on 2017-06-19
|
||||
Fixed compilation under macOS.
|
||||
Fixed compilation under Fedora Rawhide.
|
||||
Don't use -mtune=generic for all targets.
|
||||
|
||||
Version 1.0.0, released on 2017-06-16
|
||||
Ported to GTK+ 3.
|
||||
Tweaked the user interface a bit.
|
||||
Dropped support for Windows XP, 2000 and 2003 (they are no longer
|
||||
supported by GTK+).
|
||||
Fixed detection of newer system-installed smartmontools under Windows.
|
||||
|
||||
Version 0.9.0, released on 2017-05-11
|
||||
Implemented (untested) support for Linux-based Areca controllers with
|
||||
@@ -97,22 +97,32 @@ You need to have the following software installed:
|
||||
|
||||
* smartmontools - see http://smartmontools.sourceforge.net .
|
||||
|
||||
* GTK+, version 3.4 or higher - see http://www.gtk.org .
|
||||
* GTK+, version 2.6 or higher - see http://www.gtk.org .
|
||||
|
||||
* Gtkmm, version 3.4 or higher - see http://www.gtkmm.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.
|
||||
|
||||
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, gtkmm3-devel.
|
||||
gcc-c++, pcre-devel, gtkmm2-devel, (possibly) libglademm-devel.
|
||||
|
||||
Fedora, CentOS, RHEL:
|
||||
gcc-c++, pcre-devel, gtkmm30-devel.
|
||||
gcc-c++, pcre-devel, gtkmm24-devel, (possibly) libglademm24-devel.
|
||||
|
||||
Mandriva:
|
||||
gcc-c++, gcc-cpp, libpcre-devel, gtkmm2.4-devel, (possibly)
|
||||
libglademm2.4-devel.
|
||||
|
||||
Ubuntu, Debian GNU/Linux:
|
||||
g++, libpcre3-dev, libgtkmm-3.0-dev.
|
||||
g++, libpcre3-dev, libgtkmm-2.4-dev, (possibly) libglademm-2.4-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
|
||||
@@ -126,23 +136,25 @@ The following operating systems are supported:
|
||||
|
||||
* Linux - All the popular configurations should work.
|
||||
|
||||
* FreeBSD - Tested with DesktopBSD / x86.
|
||||
* FreeBSD - Tested with DesktopBSD 1.6 (FreeBSD 6.3) / x86.
|
||||
|
||||
* NetBSD - Tested with NetBSD / x86.
|
||||
* NetBSD - Tested with NetBSD 4.0.1 / x86.
|
||||
|
||||
* OpenBSD - Tested with OpenBSD / x86-64.
|
||||
* 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 the MacPorts and Fink projects.
|
||||
|
||||
* 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.
|
||||
|
||||
|
||||
@@ -308,6 +320,9 @@ 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.
|
||||
|
||||
@@ -334,7 +349,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 gtk3 gtkmm3". Some distributions have gtkmm30 instead. You may also
|
||||
"rpm -q gtk2 gtkmm2". Some distributions have gtkmm24 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
|
||||
@@ -28,7 +28,6 @@ Bugs / patches:
|
||||
|
||||
TODO:
|
||||
|
||||
|
||||
Don't rely on smartctl return code (2), parse the output instead.
|
||||
This will allow us to show the Info page.
|
||||
|
||||
@@ -39,6 +38,9 @@ Don't rely on smartctl return code (2), parse the output instead.
|
||||
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
|
||||
|
||||
Port to GTK2 with disable-deprecated flags, then GTK3.
|
||||
Drop support for old distros.
|
||||
|
||||
|
||||
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.
|
||||
@@ -53,6 +55,11 @@ Areca detection
|
||||
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
|
||||
Windows Detection:
|
||||
Credit Richard Kagerer.
|
||||
|
||||
|
||||
Credit Fabrice Bacchella for Linux CCISS detection.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
|
||||
############################################################################
|
||||
# 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])
|
||||
|
||||
])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ AC_DEFUN([APP_COMPILER_OPTIONS], [
|
||||
|
||||
AC_ARG_ENABLE(common-options, AS_HELP_STRING([--enable-common-options=<compiler>|auto|none],
|
||||
[enable useful compilation options (warnings, mostly). Accepted values are auto, none, gnu, clang, intel, sun. (Default: auto)]),
|
||||
[app_cv_compiler_common_options=${enableval}], [app_cv_compiler_common_options=none])
|
||||
[app_cv_compiler_common_options=${enableval}], [app_cv_compiler_common_options=auto])
|
||||
|
||||
# the default value is "yes" (if no value given after =), treat it as auto.
|
||||
if test "x$app_cv_compiler_common_options" = "xyes" || test "x$app_cv_compiler_common_options" = "xauto"; then
|
||||
@@ -54,14 +54,14 @@ AC_DEFUN([APP_COMPILER_OPTIONS], [
|
||||
|| test "x$app_cv_target_os_env" = "xcygwin"; then
|
||||
# mingw gcc options:
|
||||
# -mno-cygwin - generate non-cygwin executables in cygwin's mingw.
|
||||
# -mms-bitfields - make structures compatible with msvc. recommended default for non-cygwin. Default for mingw.
|
||||
# -mms-bitfields - make structures compatible with msvc. recommended default for non-cygwin.
|
||||
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -mms-bitfields"
|
||||
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -mms-bitfields"
|
||||
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -mms-bitfields"
|
||||
fi
|
||||
|
||||
app_cv_compiler_tmp_var="-Wall -Wcast-align -Wcast-qual -Wconversion \
|
||||
-Wfloat-equal -Wnon-virtual-dtor -Woverloaded-virtual \
|
||||
-Wctor-dtor-privacy -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
|
||||
@@ -183,23 +183,10 @@ AC_DEFUN([APP_COMPILER_OPTIONS], [
|
||||
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -g0 -O3 -s -march=i686";
|
||||
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -g0 -O3 -s -march=i686";
|
||||
else # mingw64, cygwin (they have new gcc), others.
|
||||
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -g0 -O3 -s";
|
||||
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -g0 -O3 -s";
|
||||
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -g0 -O3 -s";
|
||||
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -g0 -O3 -s -mtune=generic";
|
||||
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -g0 -O3 -s -mtune=generic";
|
||||
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -g0 -O3 -s -mtune=generic";
|
||||
fi
|
||||
# -mtune=generic is only for x86*
|
||||
case "$target" in
|
||||
i686-*)
|
||||
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -mtune=generic";
|
||||
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -mtune=generic";
|
||||
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -mtune=generic";
|
||||
;;
|
||||
x86_64-*)
|
||||
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -mtune=generic";
|
||||
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -mtune=generic";
|
||||
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -mtune=generic";
|
||||
;;
|
||||
esac
|
||||
|
||||
# intel / gnu
|
||||
elif test "x$app_cv_compiler_optimize_options" = "xintel" && test "x$app_cv_target_os_env" = "xgnu"; then
|
||||
@@ -89,7 +89,7 @@ AC_DEFUN([APP_USE_SYSTEM_EXTENSIONS], [
|
||||
# See sys/featuretest.h
|
||||
;;
|
||||
|
||||
mingw*)
|
||||
mingw32)
|
||||
# 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,8 +98,14 @@ 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=0x0600" # Since Vista
|
||||
app_cv_target_extension_cxxflags="-D__USE_MINGW_ANSI_STDIO=1 -DWINVER=0x0600"
|
||||
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"
|
||||
;;
|
||||
|
||||
interix)
|
||||
@@ -16,7 +16,7 @@
|
||||
# autoconf
|
||||
|
||||
|
||||
autoreconf --verbose --install -W all --force
|
||||
autoreconf --verbose --install -W all
|
||||
|
||||
|
||||
rm -f config.cache
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/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
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
#!/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.24.10-2012-10-10-ash --disable-user-flags \
|
||||
--with-nsis=/root/.wine/drive_c/Programs_x86/NSIS/makensis.exe \
|
||||
--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,5 +1,5 @@
|
||||
|
||||
AC_INIT([GSmartControl],[1.0.2],[],[gsmartcontrol])
|
||||
AC_INIT([GSmartControl],[0.9.0],[],[gsmartcontrol])
|
||||
|
||||
AC_CONFIG_SRCDIR([configure.ac])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
@@ -22,7 +22,6 @@ AC_PROG_CXX
|
||||
#AC_PROG_CXXCPP
|
||||
|
||||
#AM_PROG_LIBTOOL
|
||||
AM_PROG_AR
|
||||
|
||||
# C++ support in checks
|
||||
#AC_LANG([C])
|
||||
@@ -176,7 +175,8 @@ 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])
|
||||
|
||||
pkg_modules="gtkmm-3.0 >= 3.4.0"
|
||||
# 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
|
||||
|
||||
# define ENABLE_GLIB and friends if it's found.
|
||||
gtkmm_found="no"
|
||||
@@ -201,11 +201,24 @@ 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
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
@@ -240,6 +253,22 @@ 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],
|
||||
@@ -248,13 +277,17 @@ 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],
|
||||
[use wine to run makensis.exe when making NSIS packages (default: no)])],
|
||||
[with_nsis_wine=${enableval}], [with_nsis_wine=no])
|
||||
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_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])
|
||||
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=])
|
||||
|
||||
if test "x$with_nsis" = "xauto" || test "x$with_nsis" = "x"; then
|
||||
# if building on windows, use native paths
|
||||
@@ -265,26 +298,30 @@ 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" = "xyes"; then
|
||||
if test "x$with_nsis_wine" != "xno"; then
|
||||
NSIS_EXEC="wine $with_nsis";
|
||||
fi
|
||||
|
||||
if test "x$with_windows_sysroot" = "xauto" || test "x$with_windows_sysroot" = "x"; then
|
||||
with_windows_sysroot="/mingw32"
|
||||
if test "x$with_windows_bindir" = "xauto" || test "x$with_windows_bindir" = "x"; then
|
||||
with_windows_bindir="/cross/w32/target/bin"
|
||||
fi
|
||||
WINDOWS_SYSROOT="$with_windows_sysroot";
|
||||
WINDOWS_BINDIR="$with_windows_bindir";
|
||||
|
||||
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
|
||||
GTK_INSTALLER_NAME="$with_windows_gtk_name";
|
||||
|
||||
AC_SUBST(NSIS_EXEC)
|
||||
AC_SUBST(WINDOWS_SYSROOT)
|
||||
AC_SUBST(WINDOWS_SUFFIX)
|
||||
AC_SUBST(WINDOWS_BINDIR)
|
||||
AC_SUBST(GTK_INSTALLER_NAME)
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
@@ -309,14 +346,14 @@ AC_SUBST(WINDOWS_ARCH)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
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 \
|
||||
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 \
|
||||
AUTHORS.txt LICENSE_gsmartcontrol.txt README.txt"
|
||||
|
||||
# Unfortunately, _SOURCES can't contain substitutions, so we use LIBADD.
|
||||
@@ -324,6 +361,11 @@ 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"
|
||||
@@ -339,14 +381,28 @@ do # on separate line for portability
|
||||
RES_FILE_CANON="\$(srcdir)/$RES_BASE" # shorter path, better make behaviour
|
||||
fi
|
||||
|
||||
if test "$RES_BASE_EXT" = "ui"; then
|
||||
RES_LIBADD="$RES_LIBADD $RES_BASE_NOEXT.ui.$ac_objext" # file.ui.o or file.glade.o
|
||||
# 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.
|
||||
|
||||
RES_TARGETS="$RES_TARGETS
|
||||
$RES_BASE_NOEXT.ui.cpp: $RES_FILE_CANON
|
||||
\"\$(top_srcdir)/file2csource.sh\" \"$RES_FILE_CANON\" \"$RES_BASE_NOEXT.ui.cpp\" \"$RES_BASE_NOEXT\"_ui
|
||||
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
|
||||
"
|
||||
|
||||
else # txt, etc...
|
||||
|
||||
SRC_FILE="$RES_BASE.cpp"
|
||||
RES_LIBADD="$RES_LIBADD $RES_BASE.$ac_objext" # file.txt.o
|
||||
|
||||
@@ -397,13 +453,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"
|
||||
@@ -474,7 +530,7 @@ AC_SUBST(AUTODIRS)
|
||||
|
||||
|
||||
AC_CONFIG_FILES([ data/gsmartcontrol.desktop data/gsmartcontrol.appdata.xml \
|
||||
data/nsis/distribution.txt data/nsis/gsmartcontrol.nsi \
|
||||
data/nsis/distribution.txt data/nsis/distribution-nogtk.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-3.0 -f -t $(datadir)/icons/hicolor
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook: install-extra-mans update-icon-cache
|
||||
uninstall-hook: uninstall-extra-mans update-icon-cache
|
||||
|
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 |
@@ -0,0 +1,29 @@
|
||||
|
||||
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/
|
||||
|
||||
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 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.
|
||||
@@ -11,14 +11,18 @@ 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/).
|
||||
* 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 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).
|
||||
|
||||
* 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.
|
||||
@@ -4,6 +4,11 @@
|
||||
; 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"
|
||||
@@ -14,6 +19,8 @@
|
||||
!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
|
||||
|
||||
@@ -35,12 +42,16 @@ CRCCheck On
|
||||
Name "${PRODUCT_NAME}" ; ${PRODUCT_VERSION}
|
||||
|
||||
; Output File Name
|
||||
OutFile "${PRODUCT_NAME_SMALL}-${PRODUCT_VERSION}-@WINDOWS_SUFFIX@.exe"
|
||||
!ifdef NO_GTK
|
||||
OutFile "${PRODUCT_NAME_SMALL}-${PRODUCT_VERSION}-nogtk.exe"
|
||||
!else
|
||||
OutFile "${PRODUCT_NAME_SMALL}-${PRODUCT_VERSION}.exe"
|
||||
!endif
|
||||
|
||||
|
||||
; The Default Installation Directory:
|
||||
; Try to install to the same directory as runtime.
|
||||
InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}"
|
||||
InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
|
||||
; If already installed, try here
|
||||
InstallDirRegKey HKLM "SOFTWARE\${PRODUCT_NAME}" "InstallationDirectory"
|
||||
|
||||
@@ -78,11 +89,19 @@ ShowUnInstDetails show
|
||||
;!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
|
||||
;!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
|
||||
|
||||
!define LICENSE_FILE "doc\distribution.txt"
|
||||
!ifdef NO_GTK
|
||||
!define LICENSE_FILE "doc\distribution-nogtk.txt"
|
||||
!else
|
||||
!define LICENSE_FILE "doc\distribution.txt"
|
||||
!endif
|
||||
|
||||
; 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
|
||||
|
||||
@@ -132,19 +151,21 @@ SectionIn 1 RO
|
||||
; File "gsmartcontrol.conf"
|
||||
|
||||
SetOverwrite On
|
||||
File *.exe
|
||||
File *.dll
|
||||
File gsmartcontrol.exe
|
||||
File gsmartcontrol.exe.manifest
|
||||
File gsmartcontrol.ico
|
||||
File icon_*.png
|
||||
File drivedb.h
|
||||
; File *.dll
|
||||
File smartctl-nc.exe
|
||||
File smartctl.exe
|
||||
File update-smart-drivedb.exe
|
||||
|
||||
; Include the "doc" directory completely.
|
||||
File /r doc
|
||||
|
||||
; GTK and stuff
|
||||
File /r etc
|
||||
File /r share
|
||||
; 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
|
||||
|
||||
; Add Shortcuts (this inherits the exe's run permissions)
|
||||
CreateShortCut "$SMPROGRAMS\GSmartControl.lnk" "$INSTDIR\gsmartcontrol.exe" "" \
|
||||
@@ -154,6 +175,42 @@ 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
|
||||
@@ -163,16 +220,119 @@ 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 and SSD 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}"
|
||||
|
||||
@@ -218,26 +378,41 @@ 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\*.exe"
|
||||
Delete "$INSTDIR\*.dll"
|
||||
Delete "$INSTDIR\gsmartcontrol.exe"
|
||||
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.*"
|
||||
Delete "$INSTDIR\drivedb.h.new"
|
||||
Delete "$INSTDIR\drivedb.h.old"
|
||||
Delete "$INSTDIR\drivedb.h.error"
|
||||
Delete "$INSTDIR\drivedb.h.lastcheck"
|
||||
|
||||
RMDir /r "$INSTDIR\doc"
|
||||
|
||||
; GTK and stuff
|
||||
RMDir /r "$INSTDIR\etc"
|
||||
; leftover from gtk
|
||||
RMDir /r "$INSTDIR\share"
|
||||
|
||||
; clean up generated stuff
|
||||
@@ -246,6 +421,17 @@ Section Uninstall
|
||||
|
||||
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"
|
||||
|
||||
@@ -303,6 +489,35 @@ 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 |
@@ -3,8 +3,10 @@ Section: utils
|
||||
Priority: extra
|
||||
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-3.0-dev (>= 3.4.0)
|
||||
libpcre3-dev, libgtkmm-2.4-dev (>= 2.6.0)
|
||||
Standards-Version: 3.7.3
|
||||
|
||||
Package: gsmartcontrol
|
||||
@@ -5,7 +5,7 @@ It was downloaded from <http://gsmartcontrol.sourceforge.net/>
|
||||
|
||||
Copyright:
|
||||
|
||||
Copyright (C) 2008 - 2017 Alexander Shaduri <ashaduri 'at' gmail.com>
|
||||
Copyright (C) 2008 - 2012 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 - 2017 Alexander Shaduri <ashaduri 'at' gmail.com> and
|
||||
The Debian packaging is (C) 2008 - 2012 Alexander Shaduri <ashaduri 'at' gmail.com> and
|
||||
is licensed under the GPLv2 and GPLv3, see above.
|
||||
|
||||
@@ -2,10 +2,10 @@ Name: gsmartcontrol
|
||||
Version: @VERSION@
|
||||
Release: 1as
|
||||
License: GPL-2.0 AND GPL-3.0
|
||||
Url: http://gsmartcontrol.sourceforge.net/
|
||||
Url: http://gsmartcontrol.sourceforge.net
|
||||
Vendor: Alexander Shaduri <ashaduri 'at' gmail.com>
|
||||
# Packager: Alexander Shaduri <ashaduri 'at' gmail.com>
|
||||
Source: http://sourceforge.net/projects/gsmartcontrol/files/%{version}/%{name}-%{version}.tar.bz2
|
||||
Source: gsmartcontrol-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Summary: GSmartControl - Hard Disk Drive and SSD Health Inspection Tool
|
||||
|
||||
@@ -15,23 +15,36 @@ 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, gtkmm3 >= 3.4.0
|
||||
# smartmontools, pcre, (gtkmm2 >= 2.12 || (gtkmm2 >= 2.6.0 && libglademm >= 2.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}
|
||||
|
||||
Requires: smartmontools
|
||||
BuildRequires: gcc-c++, libstdc++-devel, pcre-devel, gtkmm3-devel >= 3.4.0
|
||||
%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
|
||||
BuildRequires: update-desktop-files
|
||||
|
||||
%if 0%{?suse_version} >= 1030
|
||||
BuildRequires: fdupes
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
@@ -40,8 +53,13 @@ BuildRequires: fdupes
|
||||
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
|
||||
|
||||
# I'm not sure about centos and rhel versions
|
||||
Requires: smartmontools
|
||||
BuildRequires: gcc-c++, pcre-devel, gtkmm30-devel >= 3.4.0
|
||||
%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
|
||||
|
||||
# Fedora with consolehelper.
|
||||
# usermode-gtk is for consolehelper-gtk.
|
||||
@@ -52,6 +70,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
|
||||
@@ -61,11 +94,21 @@ on it.
|
||||
|
||||
%prep
|
||||
|
||||
%setup -q
|
||||
%configure
|
||||
|
||||
%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 %{?_smp_mflags}
|
||||
|
||||
|
||||
@@ -76,13 +119,15 @@ 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
|
||||
@@ -134,6 +179,15 @@ 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
|
||||
|
||||
@@ -141,13 +195,7 @@ 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
|
||||
@@ -157,6 +205,7 @@ rm -rf %buildroot
|
||||
# %%{_datadir}/gsmartcontrol/*
|
||||
%{_datadir}/applications/*.desktop
|
||||
%{_datadir}/metainfo
|
||||
%{_datadir}/metainfo/*.appdata.xml
|
||||
%{_datadir}/icons/*
|
||||
%{_datadir}/pixmaps/*
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
svn propset svn:ignore -F .svnignore.txt .
|
||||
@@ -1,260 +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
|
||||
|
||||
|
||||
|
||||
# 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),
|
||||
# tree sorting indicators, GUI icons.
|
||||
$(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
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/actions/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/actions/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/16x16/status
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/status/dialog-information.png win-dist/share/icons/Adwaita/16x16/status
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/22x22/status
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/22x22/status/dialog-information.png win-dist/share/icons/Adwaita/22x22/status
|
||||
$(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
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/actions/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/actions/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/24x24/status
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/status/dialog-information.png win-dist/share/icons/Adwaita/24x24/status
|
||||
$(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
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/actions/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/actions/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/32x32/status
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/status/dialog-information.png win-dist/share/icons/Adwaita/32x32/status
|
||||
$(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
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/actions/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/actions/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/48x48/status
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/status/dialog-information.png win-dist/share/icons/Adwaita/48x48/status
|
||||
$(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
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/actions/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/actions/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
|
||||
# $(MKDIR_P) win-dist/share/icons/Adwaita/64x64/status
|
||||
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/status/dialog-information.png win-dist/share/icons/Adwaita/64x64/status
|
||||
$(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
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/actions/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/actions/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
|
||||
# $(MKDIR_P) win-dist/share/icons/Adwaita/96x96/status
|
||||
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/status/dialog-information.png win-dist/share/icons/Adwaita/96x96/status
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/256x256/status
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/256x256/status/dialog-information.png win-dist/share/icons/Adwaita/256x256/status
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
|
||||
@@ -1,83 +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 "none debug optimized gcc-debug clang-debug icc-debug sun win32-cross win32-cross-debug \
|
||||
win64-cross win64-cross-debug win32-msys win32-msys-debug win64-msys win64-msys-debug";
|
||||
echo "<configure_script> is ../configure by default"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [ "$configure_script" == "" ]; then
|
||||
configure_script="../configure";
|
||||
fi
|
||||
|
||||
|
||||
flags="";
|
||||
|
||||
case $type in
|
||||
none)
|
||||
flags="--enable-tests" ;;
|
||||
debug)
|
||||
flags="--enable-debug-options --enable-tests" ;;
|
||||
optimized)
|
||||
flags="--enable-optimize-options --enable-tests" ;;
|
||||
|
||||
gcc-debug)
|
||||
flags="CC=gcc CXX=g++ --enable-common-options=gnu --enable-debug-options --enable-tests" ;;
|
||||
clang-debug)
|
||||
flags="CC=clang CXX=clang++ --enable-common-options=clang --enable-debug-options --enable-tests" ;;
|
||||
icc-debug)
|
||||
flags="CC=icc64 CXX=icpc64 --enable-common-options=intel --enable-debug-options --enable-tests" ;;
|
||||
sun)
|
||||
flags="CC=suncc CXX=sunCC --enable-common-options=sun 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 $?
|
||||
@@ -1,175 +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 <glibmm.h>
|
||||
#include <glib.h>
|
||||
#include <cstring> // std::strlen
|
||||
#include <vector>
|
||||
|
||||
#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)
|
||||
{
|
||||
if (use_markup) {
|
||||
widget.set_tooltip_markup(tooltip_text);
|
||||
} else {
|
||||
widget.set_tooltip_text(tooltip_text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
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_ustring_from_gchar(gchar* str)
|
||||
{
|
||||
if (!str) {
|
||||
return Glib::ustring();
|
||||
}
|
||||
Glib::ustring ustr(str);
|
||||
g_free(str);
|
||||
return ustr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
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,242 +0,0 @@
|
||||
/**************************************************************************
|
||||
Copyright:
|
||||
(C) 2008 - 2012 Alexander Shaduri <ashaduri 'at' gmail.com>
|
||||
License: See LICENSE_unlicense.txt
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
// A simple empty window definition
|
||||
|
||||
|
||||
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;
|
||||
|
||||
|
||||
@@ -1,82 +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 <gtk/gtk.h>
|
||||
|
||||
#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"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
namespace hz {
|
||||
|
||||
|
||||
|
||||
/// 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.
|
||||
inline std::string launch_url(GtkWindow* window, const std::string& link)
|
||||
{
|
||||
// For some reason, gtk_show_uri() crashes on windows, so use our manual implementation.
|
||||
#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
|
||||
|
||||
hz::scoped_ptr<GError> error(0, g_error_free);
|
||||
#if GTK_CHECK_VERSION(3, 22, 0)
|
||||
bool status = gtk_show_uri_on_window(window, link.c_str(), GDK_CURRENT_TIME, &error.get_ref());
|
||||
#else
|
||||
GdkScreen* screen = (window ? gtk_window_get_screen(window) : 0);
|
||||
bool status = gtk_show_uri(screen, link.c_str(), GDK_CURRENT_TIME, &error.get_ref());
|
||||
#endif
|
||||
|
||||
if (!status) {
|
||||
return std::string("Cannot open URL: ")
|
||||
+ ((error && error->message) ? (std::string(": ") + error->message) : ".");
|
||||
}
|
||||
return std::string();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // ns
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/// @}
|
||||
@@ -1,45 +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 = .ui .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.ui.cpp \
|
||||
gsc_add_device_window.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 \
|
||||
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 *.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@
|
||||
|
||||
|
||||
@@ -1,200 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.4"/>
|
||||
<object class="GtkWindow" id="gsc_main_window">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">GSmartControl</property>
|
||||
<property name="default_width">600</property>
|
||||
<property name="default_height">540</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="menubar_vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_right">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="status_name_label_hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="status_health_label_hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="status_name_left_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><b>Drive information:</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><b>Basic health check:</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><b>Model family:</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="selectable">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="status_family_label_hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkIconView" id="drive_iconview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="is_focus">True</property>
|
||||
<property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="margin">10</property>
|
||||
<property name="item_width">130</property>
|
||||
<property name="spacing">3</property>
|
||||
<property name="row_spacing">8</property>
|
||||
<property name="column_spacing">5</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_right">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="status_smart_enabled_check">
|
||||
<property name="label" translatable="yes">enable smart (action-replaced text)</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="status_aodc_enabled_check">
|
||||
<property name="label" translatable="yes">enable aodc (action-replaced text)</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,125 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.4"/>
|
||||
<object class="GtkWindow" id="gsc_text_window">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">GSmartControl</property>
|
||||
<property name="default_width">800</property>
|
||||
<property name="default_height">600</property>
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="main_textview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="is_focus">True</property>
|
||||
<property name="editable">False</property>
|
||||
<property name="left_margin">5</property>
|
||||
<property name="right_margin">5</property>
|
||||
<property name="cursor_visible">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="save_as_button">
|
||||
<property name="label">gtk-save-as</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Saved displayed text as...</property>
|
||||
<property name="use_stock">True</property>
|
||||
<accelerator key="S" signal="activate" modifiers="GDK_CONTROL_MASK"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="close_window_button">
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Close this window</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -11,7 +11,7 @@ noinst_HEADERS = app_gtkmm_features.h app_gtkmm_utils.h app_pango_utils.h \
|
||||
selftest.h smartctl_executor.h smartctl_executor_gui.h smartctl_parser.h \
|
||||
storage_detector.h storage_detector_helpers.h storage_detector_linux.h storage_detector_other.h \
|
||||
storage_detector_win32.h storage_device.h storage_property.h storage_property_colors.h \
|
||||
storage_property_descr.h storage_settings.h
|
||||
storage_property_descr.h storage_settings.h wrapping_label.h
|
||||
|
||||
# don't use absolute path for the current dir's .a, because the make
|
||||
# dependency resolver won't get it (needed for parallel builds)
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef APP_GTKMM_FEATURES_H
|
||||
#define APP_GTKMM_FEATURES_H
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtkmmconfig.h>
|
||||
|
||||
|
||||
/// \def APP_GTKMM_CHECK_VERSION(major, minor, micro)
|
||||
@@ -29,6 +29,14 @@
|
||||
|
||||
|
||||
|
||||
/// \def APP_GTKMM_OLD_TOOLTIPS
|
||||
/// Defined to 1 if the new (since gtkmm 2.12) tooltips API is not available.
|
||||
#if !APP_GTKMM_CHECK_VERSION(2, 12, 0)
|
||||
#define APP_GTKMM_OLD_TOOLTIPS 1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
// If default virtual on_* members are disabled in gtkmm, use this in constructors
|
||||
// to connect on_signal_name methods.
|
||||