Skip to content

Commit

Permalink
traymonitor redesign
Browse files Browse the repository at this point in the history
- traymonitor redesign by Frank Ueberschar
- traymon animated shows
- added bareos icon to traymon, installer
  and fd executable

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
  • Loading branch information
pstorz authored and Marco van Wieringen committed Feb 17, 2015
1 parent b2560ac commit c2480ff
Show file tree
Hide file tree
Showing 75 changed files with 2,073 additions and 1,207 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -43,6 +43,7 @@ Felix Schwarz
Francisco Reyes
Frank Kardel
Frank Sweetser
Frank Ueberschar
Graham Keeling
Grzegorz Grabowski
Howard Thomson
Expand Down
14 changes: 7 additions & 7 deletions autoconf/configure.in
Expand Up @@ -399,8 +399,8 @@ AC_ARG_ENABLE(traymonitor,
AC_HELP_STRING([--enable-traymonitor], [enable build of traymonitor @<:@default=no@:>@]),
[
if test x$enableval = xyes; then
AC_DEFINE(HAVE_TRAYMONITOR, 1, [Define to 1 if tray-monitor Qt4 GUI support should be enabled])
support_traymonitor=yes
AC_DEFINE(HAVE_TRAYMONITOR, 1, [Define to 1 if tray-monitor Qt4 GUI support should be enabled])
support_traymonitor=yes
fi
]
)
Expand All @@ -410,7 +410,7 @@ if test x$support_traymonitor = xyes; then
abc=`$PKGCONFIG --atleast-version=4.6 QtGui`
pkg=$?
if test $pkg = 0; then
TRAY_MONITOR_DIR=src/qt-console/tray-monitor
TRAY_MONITOR_DIR=src/qt-tray-monitor
else
AC_MSG_ERROR(Unable to find suitable Qt4 installation needed by tray-monitor)
fi
Expand Down Expand Up @@ -3719,9 +3719,9 @@ AC_OUTPUT([autoconf/Make.common \
src/include/host.h \
src/console/Makefile \
src/console/bconsole.conf \
src/qt-console/tray-monitor/bareos-tray-monitor.desktop \
src/qt-console/tray-monitor/tray-monitor.conf \
src/qt-console/tray-monitor/tray-monitor.pro \
src/qt-tray-monitor/bareos-tray-monitor.desktop \
src/qt-tray-monitor/tray-monitor.conf \
src/qt-tray-monitor/tray-monitor.pro \
src/qt-console/bat.conf \
src/qt-console/bat.desktop \
src/qt-console/bat.pro \
Expand Down Expand Up @@ -3799,7 +3799,7 @@ if test "${support_traymonitor}" = "yes" ; then
AC_MSG_ERROR([Could not find qmake $PATH. Check your Qt installation])
fi

cd src/qt-console/tray-monitor
cd src/qt-tray-monitor
echo "Creating tray-monitor Makefile"
# hack: required to get "make install" to work
touch bareos-tray-monitor
Expand Down
6 changes: 3 additions & 3 deletions platforms/win32/tray-monitor-conf.patch
@@ -1,6 +1,6 @@
diff -ruN bareos-12.11.orig/src/qt-console/tray-monitor/tray-monitor.conf.in bareos-12.11/src/qt-console/tray-monitor/tray-monitor.conf.in
--- bareos-12.11.orig/src/qt-console/tray-monitor/tray-monitor.conf.in 2012-11-12 11:28:21.000000000 +0100
+++ bareos-12.11/src/qt-console/tray-monitor/tray-monitor.conf.in 2012-11-17 00:59:17.000000000 +0100
diff -ruN bareos-12.11.orig/src/qt-tray-monitor/tray-monitor.conf.in bareos-12.11/src/qt-tray-monitor/tray-monitor.conf.in
--- bareos-12.11.orig/src/qt-tray-monitor/tray-monitor.conf.in 2012-11-12 11:28:21.000000000 +0100
+++ bareos-12.11/src/qt-tray-monitor/tray-monitor.conf.in 2012-11-17 00:59:17.000000000 +0100
@@ -15,15 +15,15 @@
Password = "@mon_fd_password@" # password for FileDaemon
}
Expand Down
8 changes: 3 additions & 5 deletions platforms/win32/winbareos-nsi.spec
Expand Up @@ -38,6 +38,7 @@ Source1: winbareos.nsi
Source2: clientdialog.ini
Source3: directordialog.ini
Source4: KillProcWMI.dll
Source5: bareos.ico

%description
bareos
Expand Down Expand Up @@ -83,11 +84,8 @@ for cfg in /etc/mingw64-winbareos/*.conf; do
cp $cfg $RPM_BUILD_ROOT/release64
done

find / | grep LICENSE

cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 %_sourcedir/LICENSE $RPM_BUILD_ROOT/release32
cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 %_sourcedir/LICENSE $RPM_BUILD_ROOT/release64

cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 %SOURCE5 %_sourcedir/LICENSE $RPM_BUILD_ROOT/release32
cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 %SOURCE5 %_sourcedir/LICENSE $RPM_BUILD_ROOT/release64

makensis -DPRODUCT_VERSION=%version-%release -DBIT_WIDTH=32 $RPM_BUILD_ROOT/release32/winbareos.nsi
makensis -DPRODUCT_VERSION=%version-%release -DBIT_WIDTH=64 $RPM_BUILD_ROOT/release64/winbareos.nsi
Expand Down
76 changes: 47 additions & 29 deletions platforms/win32/winbareos.nsi
Expand Up @@ -84,8 +84,10 @@ ${StrTrimNewLines}

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_ICON "bareos.ico"
!define MUI_UNICON "bareos.ico"
#!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
#!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

!insertmacro GetParameters
!insertmacro GetOptions
Expand Down Expand Up @@ -314,30 +316,33 @@ SectionIn 2

SectionEnd

#Section /o "Tray-Monitor" SEC_TRAYMON
#SectionIn 1 2
#
#
# SetShellVarContext all
# CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\bareos-tray-monitor.lnk" "$INSTDIR\bareos-tray-monitor.exe" '-c "$APPDATA\${PRODUCT_NAME}\tray-monitor.conf"'
#
# File "bareos-tray-monitor.exe"
## File "libbareos.dll"
## File "libcrypto-8.dll"
## File "libgcc_s_*-1.dll"
# File "libpng15-15.dll"
## File "libssl-8.dll"
## File "libstdc++-6.dll"
## File "pthreadGCE2.dll"
# File "QtCore4.dll"
# File "QtGui4.dll"
## File "zlib1.dll"
#
#
# !insertmacro InstallConfFile "tray-monitor.conf"
## File "tray-monitor.conf"
#
#SectionEnd
Section /o "Tray-Monitor" SEC_TRAYMON
SectionIn 1 2


SetShellVarContext all
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\bareos-tray-monitor.lnk" "$INSTDIR\bareos-tray-monitor.exe" '-c "$APPDATA\${PRODUCT_NAME}\tray-monitor.conf"'

# autostart
CreateShortCut "$SMSTARTUP\bareos-tray-monitor.lnk" "$INSTDIR\bareos-tray-monitor.exe" '-c "$APPDATA\${PRODUCT_NAME}\tray-monitor.conf"'

File "bareos-tray-monitor.exe"
# File "libbareos.dll"
# File "libcrypto-8.dll"
# File "libgcc_s_*-1.dll"
File "libpng15-15.dll"
# File "libssl-8.dll"
# File "libstdc++-6.dll"
# File "pthreadGCE2.dll"
File "QtCore4.dll"
File "QtGui4.dll"
# File "zlib1.dll"


!insertmacro InstallConfFile "tray-monitor.conf"
# File "tray-monitor.conf"

SectionEnd


Section /o "Qt Console (BAT)" SEC_BAT
Expand Down Expand Up @@ -388,7 +393,7 @@ SectionEnd
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_CLIENT} "Installs the Bareos File Daemon and required Files"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_BCONSOLE} "Installs the CLI client console (bconsole)"
# !insertmacro MUI_DESCRIPTION_TEXT ${SEC_TRAYMON} "Installs the tray Icon to monitor the Bareos client"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_TRAYMON} "Installs the tray Icon to monitor the Bareos client"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_BAT} "Installs the Qt Console (BAT)"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_FIREWALL} "Opens Port 9102/TCP for bareos-fd.exe (Client program) in the Windows Firewall"
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Expand Down Expand Up @@ -424,9 +429,11 @@ SectionEnd

Section -StartDaemon
nsExec::ExecToLog "net start bareos-fd"
${If} ${SectionIsSelected} ${SEC_TRAYMON}
MessageBox MB_OK|MB_ICONINFORMATION "The tray monitor will be started automatically on next login" /SD IDOK
${EndIf}
SectionEnd


# helper functions to find out computer name
Function GetComputerName
Push $R0
Expand Down Expand Up @@ -589,7 +596,7 @@ Function .onInit
# make first section mandatory
SectionSetFlags ${SEC_CLIENT} 17 # SF_SELECTED & SF_RO
# SectionSetFlags ${SEC_BCONSOLE} ${SF_SELECTED} # SF_SELECTED
#SectionSetFlags ${SEC_TRAYMON} ${SF_SELECTED} # SF_SELECTED
SectionSetFlags ${SEC_TRAYMON} ${SF_SELECTED} # SF_SELECTED

# find out the computer name
Call GetComputerName
Expand Down Expand Up @@ -771,6 +778,12 @@ Section Uninstall
nsExec::ExecToLog '"$INSTDIR\bareos-fd.exe" /remove'


# KillProcWMI::KillProc "bareos-fd.exe"
# kill tray monitor
KillProcWMI::KillProc "bareos-tray-monitor.exe"



# ask if existing config files should be kept
IfSilent +2
MessageBox MB_YESNO|MB_ICONQUESTION \
Expand Down Expand Up @@ -827,6 +840,11 @@ ConfDeleteSkip:
Delete "$SMPROGRAMS\${PRODUCT_NAME}\bconsole.lnk"
Delete "$SMPROGRAMS\${PRODUCT_NAME}\BAT.lnk"
Delete "$DESKTOP\BAT.lnk"
# traymon
Delete "$SMPROGRAMS\${PRODUCT_NAME}\bareos-tray-monitor.lnk"
# traymon autostart
Delete "$SMSTARTUP\bareos-tray-monitor.lnk"

Delete "$SMPROGRAMS\${PRODUCT_NAME}\Website.lnk"
Delete "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk"
RMDir "$SMPROGRAMS\${PRODUCT_NAME}"
Expand Down
2 changes: 1 addition & 1 deletion platforms/win32/winbareos32.spec
Expand Up @@ -106,7 +106,7 @@ cp qt-tray-monitor/bareos-tray-monitor.exe \
findlib/libbareosfind.dll \
plugins/fd/bpipe-fd.dll $RPM_BUILD_ROOT%{_mingw32_bindir}

for cfg in ../qt-console/tray-monitor/tray-monitor.conf.in \
for cfg in ../qt-tray-monitor/tray-monitor.conf.in \
../qt-console/bat.conf.in \
../filed/bareos-fd.conf.in \
../console/bconsole.conf.in \
Expand Down
2 changes: 1 addition & 1 deletion platforms/win32/winbareos64.spec
Expand Up @@ -106,7 +106,7 @@ cp qt-tray-monitor/bareos-tray-monitor.exe \
findlib/libbareosfind.dll \
plugins/fd/bpipe-fd.dll $RPM_BUILD_ROOT%{_mingw64_bindir}

for cfg in ../qt-console/tray-monitor/tray-monitor.conf.in \
for cfg in ../qt-tray-monitor/tray-monitor.conf.in \
../qt-console/bat.conf.in \
../filed/bareos-fd.conf.in \
../console/bconsole.conf.in \
Expand Down
4 changes: 2 additions & 2 deletions src/console/console.c
Expand Up @@ -945,7 +945,7 @@ static bool select_director(const char *director, DIRRES **ret_dir, CONRES **ret
if (get_cmd(stdin, _("Select Director by entering a number: "),
UA_sock, 600) < 0)
{
(void)WSACleanup(); /* Cleanup Windows sockets */
WSACleanup(); /* Cleanup Windows sockets */
return 0;
}
if (!is_a_number(UA_sock->msg)) {
Expand Down Expand Up @@ -1310,7 +1310,7 @@ static void terminate_console(int sig)
if (!no_conio) {
con_term();
}
(void)WSACleanup(); /* Cleanup Windows sockets */
WSACleanup(); /* Cleanup Windows sockets */
lmgr_cleanup_main();

if (sig != 0) {
Expand Down
File renamed without changes
78 changes: 78 additions & 0 deletions src/images/bat.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
6 changes: 3 additions & 3 deletions src/include/baconfig.h
Expand Up @@ -661,10 +661,10 @@ extern void pause_msg(const char *file, const char *func, int line, const char *
* Unix/Linix
*/
#define PathSeparator '/'
/* Define Winsock functions if we aren't on Windows */

#define WSA_Init() 0 /* 0 = success */
#define WSACleanup() 0 /* 0 = success */
/* Define Winsock functions if we aren't on Windows */
inline int WSA_Init() { return (0); } /* 0 = success */
inline int WSACleanup() { return (0); } /* 0 = success */

inline bool IsPathSeparator(int ch) { return ch == '/'; }
inline char *first_path_separator(char *path) { return strchr(path, '/'); }
Expand Down
8 changes: 4 additions & 4 deletions src/qt-console/bat.pro.in
Expand Up @@ -20,9 +20,9 @@ bins.files = bat
confs.path = /$(DESTDIR)@sysconfdir@
confs.commands = ./install_conf_file
help.path = /$(DESTDIR)@htmldir@
help.files = help/*.html images/status.png images/mail-message-new.png
help.files = help/*.html ../images/status.png ../images/mail-message-new.png
icons.path = /$(DESTDIR)@datarootdir@/pixmaps/
icons.files = images/bat.png images/bat.svg
icons.files = ../images/bat.png ../images/bat.svg
desktopentries.path = /$(DESTDIR)@datarootdir@/applications/
desktopentries.files = bat.desktop

Expand All @@ -31,15 +31,15 @@ TEMPLATE = app
TARGET = bat
DEPENDPATH += .
INCLUDEPATH += .. ../include .
LIBS += -L../lib -lbareoscfg -lbareos -L../findlib -lbareosfind @OPENSSL_LIBS@
LIBS += -L../lib -lbareoscfg -lbareos
LIBTOOL_LINK = @QMAKE_LIBTOOL@ --silent --tag=CXX --mode=link
LIBTOOL_INSTALL = @QMAKE_LIBTOOL@ --silent --mode=install
QMAKE_LINK = $${LIBTOOL_LINK} $(CXX)
QMAKE_INSTALL_PROGRAM = $${LIBTOOL_INSTALL} install -m @SBINPERM@ -p
QMAKE_CLEAN += .libs/* bat

macx {
ICON = images/bat.icns
ICON = ../images/bat.icns
}

RESOURCES = main.qrc
Expand Down

0 comments on commit c2480ff

Please sign in to comment.