Skip to content

Commit

Permalink
Fix windows rc files.
Browse files Browse the repository at this point in the history
- Add the right copyright info.
- Generate the rc files with the right version info at build time.
  • Loading branch information
Marco van Wieringen committed Feb 17, 2015
1 parent dba9319 commit 12d8cb7
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 81 deletions.
20 changes: 19 additions & 1 deletion src/win32/Makefile
@@ -1,11 +1,13 @@
include Makefile.inc

VERSION_STRING := $(shell grep 'VERSION "' ../include/version.h | cut -d ' ' -f3)

all_subdirs = lib findlib filed console plugins
ifeq ($(BUILD_QTGUI),yes)
all_subdirs += qt-console qt-tray-monitor
endif

all: qt-gui
all: rc-files qt-gui
@for I in ${all_subdirs}; \
do (cd $$I; echo "==>Entering directory `pwd`"; \
$(MAKE) WIN_VERSION=$(WIN_VERSION) DESTDIR=$(DESTDIR) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
Expand Down Expand Up @@ -34,13 +36,29 @@ distclean:
done

ifeq ($(BUILD_QTGUI),)
rc-files: console/consoleres.rc filed/filedres.rc

qt-gui:
else
rc-files: console/consoleres.rc filed/filedres.rc qt-console/batres.rc qt-tray-monitor/traymon.rc

qt-gui: qt-console/Makefile qt-tray-monitor/Makefile

qt-console/Makefile: qt-console/bat.pro
cd qt-console; $(QMAKE) bat.pro

qt-tray-monitor/Makefile: qt-tray-monitor/tray-monitor.pro
cd qt-tray-monitor; $(QMAKE) tray-monitor.pro

qt-console/batres.rc: qt-console/batres.rc.in
@sed -e 's/@VERSION@/$(VERSION_STRING)/' $< > $@

qt-tray-monitor/traymon.rc: qt-tray-monitor/traymon.rc.in
@sed -e 's/@VERSION@/$(VERSION_STRING)/' $< > $@
endif

console/consoleres.rc: console/consoleres.rc.in
@sed -e 's/@VERSION@/$(VERSION_STRING)/' $< > $@

filed/filedres.rc: filed/filedres.rc.in
@sed -e 's/@VERSION@/$(VERSION_STRING)/' $< > $@
26 changes: 0 additions & 26 deletions src/win32/console/consoleres.rc

This file was deleted.

32 changes: 32 additions & 0 deletions src/win32/console/consoleres.rc.in
@@ -0,0 +1,32 @@
id ICON "../../../platforms/win32/bareos.ico"
1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904E4"
BEGIN
VALUE "CompanyName", "Bareos GmbH & Co. KG"
VALUE "FileDescription", "Bareos Console"
VALUE "FileVersion", @VERSION@
VALUE "InternalName", "bconsole.exe"
VALUE "OriginalFilename", "bconsole"
VALUE "ProductName", "Bareos Console"
VALUE "ProductVersion", @VERSION@
VALUE "LegalCopyright", "Copyright 2000-2012 Free Software Foundation Europe e.V. "
"Copyright 2013-2013 Bareos GmbH & Co. KG "
VALUE "LegalTrademarks", "Licensed under GNU AGPLv3."
"This program is distributed in the hope that it will be useful, "
"but WITHOUT ANY WARRANTY; without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "
"GNU Affero General Public License for more details. "
END
END

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809, 1252
END
END

Expand Up @@ -9,12 +9,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Bareos GmbH & Co. KG"
VALUE "FileDescription", "Bareos File Daemon"
VALUE "FileVersion", "13.2.0"
VALUE "FileVersion", @VERSION@
VALUE "InternalName", "bareos-fd.exe"
VALUE "LegalCopyright", "See LICENSE File"
VALUE "OriginalFilename", "bareos-fd.exe"
VALUE "ProductName", "Bareos File Daemon"
VALUE "ProductVersion", "13.2.0"
VALUE "ProductVersion", @VERSION@
END
END

Expand Down
26 changes: 0 additions & 26 deletions src/win32/qt-console/batres.rc

This file was deleted.

32 changes: 32 additions & 0 deletions src/win32/qt-console/batres.rc.in
@@ -0,0 +1,32 @@
id ICON "../../../platforms/win32/bareos.ico"
1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904E4"
BEGIN
VALUE "CompanyName", "Bareos GmbH & Co. KG"
VALUE "FileDescription", "Bareos Admin Tool"
VALUE "FileVersion", @VERSION@
VALUE "InternalName", "bat.exe"
VALUE "OriginalFilename", "bat.exe"
VALUE "ProductName", "Bareos Admin Tool"
VALUE "ProductVersion", @VERSION@
VALUE "LegalCopyright", "Copyright 2000-2012 Free Software Foundation Europe e.V. "
"Copyright 2013-2013 Bareos GmbH & Co. KG "
VALUE "LegalTrademarks", "Licensed under GNU AGPLv3."
"This program is distributed in the hope that it will be useful, "
"but WITHOUT ANY WARRANTY; without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "
"GNU Affero General Public License for more details. "
END
END

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809, 1252
END
END

26 changes: 0 additions & 26 deletions src/win32/qt-tray-monitor/traymon.rc

This file was deleted.

32 changes: 32 additions & 0 deletions src/win32/qt-tray-monitor/traymon.rc.in
@@ -0,0 +1,32 @@
id ICON "../../../platforms/win32/bareos.ico"
1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904E4"
BEGIN
VALUE "CompanyName", "Bareos GmbH & Co. KG"
VALUE "FileDescription", "Bareos Tray Monitor"
VALUE "FileVersion", @VERSION@
VALUE "InternalName", "bareos-tray-monitor.exe"
VALUE "OriginalFilename", "bareos-tray-monitor.exe"
VALUE "ProductName", "Bareos Admin Tool"
VALUE "ProductVersion", @VERSION@
VALUE "LegalCopyright", "Copyright 2000-2012 Free Software Foundation Europe e.V. "
"Copyright 2013-2013 Bareos GmbH & Co. KG "
VALUE "LegalTrademarks", "Licensed under GNU AGPLv3."
"This program is distributed in the hope that it will be useful, "
"but WITHOUT ANY WARRANTY; without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "
"GNU Affero General Public License for more details. "
END
END

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809, 1252
END
END

0 comments on commit 12d8cb7

Please sign in to comment.