Browse Source

fix static building on windows, add resource files (closes #1163)

pull/1168/head
R4SAS 7 years ago
parent
commit
396cba7339
  1. 7
      qt/i2pd_qt/i2pd.qrc
  2. 32
      qt/i2pd_qt/i2pd.rc
  3. 4
      qt/i2pd_qt/i2pd_qt.pro
  4. 2
      qt/i2pd_qt/mainwindow.cpp
  5. BIN
      qt/i2pd_qt/resources/icons/mask.ico
  6. 0
      qt/i2pd_qt/resources/images/icon.png

7
qt/i2pd_qt/i2pd.qrc

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>images/icon.png</file>
</qresource>
<qresource prefix="/icons">
<file alias="mask">resources/icons/mask.ico</file>
<file alias="icon">resources/images/icon.png</file>
</qresource>
</RCC>

32
qt/i2pd_qt/i2pd.rc

@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
IDI_ICON1 ICON DISCARDABLE "resources/icons/mask.ico"
#include <windows.h> // needed for VERSIONINFO
#include "../../libi2pd/version.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION I2PD_VERSION_MAJOR,I2PD_VERSION_MINOR,I2PD_VERSION_MICRO,I2PD_VERSION_PATCH
PRODUCTVERSION I2P_VERSION_MAJOR,I2P_VERSION_MINOR,I2P_VERSION_MICRO,I2P_VERSION_PATCH
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "PurpleI2P"
VALUE "FileDescription", "I2Pd Qt"
VALUE "FileVersion", I2PD_VERSION
VALUE "InternalName", "i2pd-qt"
VALUE "LegalCopyright", "Copyright (C) 2013-2018, The PurpleI2P Project"
VALUE "LegalTrademarks1", "Distributed under the BSD 3-Clause software license, see the accompanying file COPYING or https://opensource.org/licenses/BSD-3-Clause."
VALUE "OriginalFilename", "i2pd_qt.exe"
VALUE "ProductName", "i2pd-qt"
VALUE "ProductVersion", I2P_VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal)
END
END

4
qt/i2pd_qt/i2pd_qt.pro

@ -274,10 +274,12 @@ linux:!android { @@ -274,10 +274,12 @@ linux:!android {
windows {
message("Using Windows settings")
RC_FILE = i2pd.rc
DEFINES += BOOST_USE_WINDOWS_H WINDOWS _WINDOWS WIN32_LEAN_AND_MEAN MINIUPNP_STATICLIB
DEFINES -= UNICODE _UNICODE
BOOST_SUFFIX = -mt
QMAKE_LDFLAGS = -s -Wl,-rpath,/usr/local/lib -Wl,-Bstatic -static-libgcc -static-libstdc++ -mwindows
QMAKE_CXXFLAGS = -Os
QMAKE_LFLAGS = -s -Wl,-Bstatic -static-libgcc -static-libstdc++ -mwindows
LIBS = -lminiupnpc \
-lboost_system$$BOOST_SUFFIX \

2
qt/i2pd_qt/mainwindow.cpp

@ -449,7 +449,7 @@ void MainWindow::createTrayIcon() { @@ -449,7 +449,7 @@ void MainWindow::createTrayIcon() {
}
void MainWindow::setIcon() {
QIcon icon(":/images/icon.png");
QIcon icon(":icons/mask");
trayIcon->setIcon(icon);
setWindowIcon(icon);

BIN
qt/i2pd_qt/resources/icons/mask.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

0
qt/i2pd_qt/images/icon.png → qt/i2pd_qt/resources/images/icon.png

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Loading…
Cancel
Save