Compare commits

...

7 Commits

Author SHA1 Message Date
mrbesen 47504fdd41
remove unnecessary check 2022-09-05 17:14:16 +02:00
mrbesen d178716463
updated Log version 2022-09-05 17:06:10 +02:00
mrbesen ea1d72514c
add ico file for exe 2022-09-05 16:41:55 +02:00
mrbesen 9c60193f24
convert the text to polygon 2022-09-05 16:27:14 +02:00
mrbesen 6ab09c8caf
add qrc_res.cpp to gitignore 2022-09-05 15:50:01 +02:00
mrbesen 4618a20a33
updated translations 2022-09-05 15:49:43 +02:00
mrbesen 7789e7cfbb
use resource file for translation and icon 2022-09-05 15:33:40 +02:00
10 changed files with 97 additions and 103 deletions

1
.gitignore vendored
View File

@ -25,4 +25,5 @@ Makefile
AppDir/
*.AppImage
qrc_res.cpp

View File

@ -99,8 +99,8 @@ INCLUDEPATH += $$PWD/include/ \
LANGUAGES = de_DE en
TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/ts/, .ts)
TRANSLATIONSQM = $$prependAll(LANGUAGES, $$PWD/ts/, .qm)
TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/resources/ts/, .ts)
TRANSLATIONSQM = $$prependAll(LANGUAGES, $$PWD/resources/ts/, .qm)
makelang.commands = lrelease $$_PRO_FILE_
updatelang.commands = lupdate $$_PRO_FILE_
@ -113,23 +113,26 @@ QMAKE_CLEAN += $$TRANSLATIONSQM
unix {
linuxdeploy-x86_64.AppImage.commands = wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod u+x linuxdeploy-x86_64.AppImage
lolautoaccept.png.depends = lolautoaccept.svg
lolautoaccept.png.commands = rsvg-convert -w 512 -h 512 lolautoaccept.svg -o lolautoaccept.png
resources/lolautoaccept.png.depends = resources/lolautoaccept.svg
resources/lolautoaccept.png.commands = rsvg-convert -w 512 -h 512 resources/lolautoaccept.svg -o resources/lolautoaccept.png
appimg.depends = linuxdeploy-x86_64.AppImage $${TARGET} lolautoaccept.png
appimg.depends = linuxdeploy-x86_64.AppImage $${TARGET} resources/lolautoaccept.png
appimg.commands = rm -rf AppDir ; \
mkdir -p AppDir/ts ; \
cp ./ts/*.qm ./AppDir/ts ; \
./linuxdeploy-x86_64.AppImage --appdir=AppDir -e lolautoaccept -i lolautoaccept.png -d lolautoaccept.desktop --output appimage
cp ./resources/ts/*.qm ./AppDir/ts ; \
./linuxdeploy-x86_64.AppImage --appdir=AppDir -e lolautoaccept -i resources/lolautoaccept.png -d resources/lolautoaccept.desktop --output appimage
QMAKE_EXTRA_TARGETS += appimg linuxdeploy-x86_64.AppImage lolautoaccept.png
QMAKE_EXTRA_TARGETS += appimg linuxdeploy-x86_64.AppImage resources/lolautoaccept.png
QMAKE_CLEAN += linuxdeploy-x86_64.AppImage lolautoaccept.png
QMAKE_CLEAN += linuxdeploy-x86_64.AppImage resources/lolautoaccept.png
}
win32 {
INCLUDEPATH += $$PWD/../curl/include/
LIBS += $$PWD/../curl/lib/libbrotlicommon.a $$PWD/../curl/lib/libbrotlidec.a $$PWD/../curl/lib/libcrypto.a $$PWD/../curl/lib/libcurl.a $$PWD/../curl/lib/libcurl.dll.a $$PWD/../curl/lib/libgsasl.a $$PWD/../curl/lib/libidn2.a $$PWD/../curl/lib/libnghttp2.a $$PWD/../curl/lib/libnghttp3.a $$PWD/../curl/lib/libngtcp2.a $$PWD/../curl/lib/libngtcp2_crypto_openssl.a $$PWD/../curl/lib/libssh2.a $$PWD/../curl/lib/libssl.a $$PWD/../curl/lib/libz.a $$PWD/../curl/lib/libzstd.a
# to create the ico: convert -density 300 -define icon:auto-resize=256,128,96,64,48,32,16 -background none resources/lolautoaccept.svg resources/lolautoaccept.ico
RC_ICONS = resources/lolautoaccept.ico
}
# Default rules for deployment.
@ -139,3 +142,6 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
# https://wiki.qt.io/Automating_generation_of_qm_files
RESOURCES += \
resources/res.qrc

BIN
resources/lolautoaccept.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

View File

@ -17,10 +17,19 @@
<circle cx="512" cy="512" r="508" fill="none" stroke-width="4" stroke="black" />
<circle cx="512" cy="512" r="500" fill="none" stroke-width="4" stroke="black" />
<!-- A A -->
<text x="48" y="786" fill="black" font-size="768px" clip-path="url(#text-circle-cutoff)" font-family="monospace">
<!-- A A (imagemagick convert does not like text in svg)-->
<!--text x="48" y="786" fill="black" font-size="768px" clip-path="url(#text-circle-cutoff)" font-family="monospace">
AA
</text>
</text-->
<!-- left A -->
<polygon points="234,226 324,226 496,785 418,785 377,639 180,639 139,785 62,785" clip-path="url(#text-circle-cutoff)" />
<polygon points="278,293 279,293 358,578 199,578" style="fill:#005e84;" />
<!-- right A -->
<polygon points="697,226 787,226 959,785 881,785 840,639 643,639 602,785 525,785" clip-path="url(#text-circle-cutoff)" />
<polygon points="741,293 742,293 821,578 662,578" style="fill:#005e84;" />
<!-- Pointer -->
<polygon points="512,786 354,226 500,226 488,48 536,48 524,226 670,226" />

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

8
resources/res.qrc Normal file
View File

@ -0,0 +1,8 @@
<RCC>
<qresource prefix="/">
<file>ts/de_DE.qm</file>
<file>ts/de_DE.ts</file>
<file>lolautoaccept.png</file>
<file>lolautoaccept.svg</file>
</qresource>
</RCC>

View File

@ -4,12 +4,12 @@
<context>
<name>ChampionSearch</name>
<message>
<location filename="../ui/championsearch.ui" line="14"/>
<location filename="../../ui/championsearch.ui" line="14"/>
<source>Champion Search</source>
<translation>Champion Suche</translation>
</message>
<message>
<location filename="../ui/championsearch.ui" line="20"/>
<location filename="../../ui/championsearch.ui" line="20"/>
<source>Champion:</source>
<translation>Champion:</translation>
</message>
@ -17,62 +17,62 @@
<context>
<name>MainWindow</name>
<message>
<location filename="../ui/mainwindow.ui" line="20"/>
<location filename="../../ui/mainwindow.ui" line="20"/>
<source>LoL-Auto-Accept</source>
<translation>LoL-Auto-Accept</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="45"/>
<location filename="../../ui/mainwindow.ui" line="45"/>
<source>Mainswitch</source>
<translation>Hauptschalter</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="52"/>
<location filename="../../ui/mainwindow.ui" line="52"/>
<source>Enable LoL-Auto-Accept</source>
<translation>Spiel automatisch annehmen</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="59"/>
<location filename="../../ui/mainwindow.ui" line="59"/>
<source>Spam &quot;smite&quot; in the chat when there is not exactly 1 player with smite equiped in champ select</source>
<translation>Wenn nicht genau 1 Spieler Smite ausgewählt hat, wird &quot;smite&quot; in den Chat gespammt</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="62"/>
<location filename="../../ui/mainwindow.ui" line="62"/>
<source>Enable Smite Warning</source>
<translation>Smite Warnung</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="91"/>
<location filename="../../ui/mainwindow.ui" line="91"/>
<source>This Tab is used, when you are in a gamemode with no fixed roles</source>
<translation>Dieser Tab wird verwendet, wenn der Gamemode keine festen Rollen hat</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="97"/>
<location filename="../../ui/mainwindow.ui" line="97"/>
<source>Default</source>
<translation>Default</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="105"/>
<location filename="../../ui/mainwindow.ui" line="105"/>
<source>Top</source>
<translation>Top</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="113"/>
<location filename="../../ui/mainwindow.ui" line="113"/>
<source>Jungle</source>
<translation>Jungle</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="121"/>
<location filename="../../ui/mainwindow.ui" line="121"/>
<source>Middle</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="129"/>
<location filename="../../ui/mainwindow.ui" line="129"/>
<source>Bottom</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="137"/>
<location filename="../../ui/mainwindow.ui" line="137"/>
<source>Support</source>
<translation></translation>
</message>
@ -89,22 +89,22 @@
<translation type="vanished">Bannen</translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="56"/>
<location filename="../../src/mainwindow.cpp" line="56"/>
<source>League of Legends Client not found!</source>
<translation>League of Legends Client nicht gefunden!</translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="66"/>
<location filename="../../src/mainwindow.cpp" line="66"/>
<source>Auto-Acceptor started!</source>
<translation></translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="70"/>
<location filename="../../src/mainwindow.cpp" line="70"/>
<source>Auto-Acceptor stoped!</source>
<translation>Auto Acceptor gestoppt!</translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="118"/>
<location filename="../../src/mainwindow.cpp" line="118"/>
<source>Auto-Acceptor failed!</source>
<translation>Auto-Acceptor fehlgeschlagen!</translation>
</message>
@ -112,7 +112,7 @@
<context>
<name>QWidget</name>
<message>
<location filename="../src/champrow.cpp" line="16"/>
<location filename="../../src/champrow.cpp" line="16"/>
<source>Champion: %1
Type: %2
Title: %3
@ -126,30 +126,30 @@ ID: %4</translation>
<context>
<name>RuneDisplay</name>
<message>
<location filename="../ui/runedisplay.ui" line="14"/>
<location filename="../../ui/runedisplay.ui" line="14"/>
<source>Form</source>
<translation></translation>
</message>
<message>
<location filename="../ui/runedisplay.ui" line="23"/>
<location filename="../../ui/runedisplay.ui" line="23"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select a Runepage and modify it to this runes.&lt;br/&gt;The page used is the first that:&lt;/p&gt;&lt;ol style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;matches this Runes&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;has a name starting with &amp;quot;AA:&amp;quot;&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;is currently selected&lt;/li&gt;&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Eine Runenseite auswählen und entsprechend modifizieren.&lt;br/&gt;Die ausgewählte Seite ist die erste, die die erste der Eigenschaften erfüllt:&lt;/p&gt;&lt;ol style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;schon die richtigen Runen enthält&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;einen Namen der mit &amp;quot;AA:&amp;quot; anfängt hat&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;gerade ausgewählt ist&lt;/li&gt;&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../ui/runedisplay.ui" line="26"/>
<location filename="../../ui/runedisplay.ui" line="26"/>
<source>Apply Runes</source>
<translation>Runnen Anwenden</translation>
<translation>Runen Anwenden</translation>
</message>
</context>
<context>
<name>SettingsTab</name>
<message>
<location filename="../ui/settingstab.ui" line="32"/>
<location filename="../../ui/settingstab.ui" line="32"/>
<source>Ban</source>
<translation>Bannen</translation>
</message>
<message>
<location filename="../ui/settingstab.ui" line="54"/>
<location filename="../../ui/settingstab.ui" line="54"/>
<source>Pick</source>
<translation>Picken</translation>
</message>
@ -161,7 +161,7 @@ ID: %4</translation>
<translation type="vanished">Champion:</translation>
</message>
<message>
<location filename="../src/stagesettings.cpp" line="25"/>
<location filename="../../src/stagesettings.cpp" line="25"/>
<source>Enable %1</source>
<translation>Aktiviere %1</translation>
</message>
@ -180,12 +180,12 @@ Titel: %3
ID: %4</translation>
</message>
<message>
<location filename="../ui/stagesettings.ui" line="74"/>
<location filename="../../ui/stagesettings.ui" line="74"/>
<source>Add Champion</source>
<translation>Champion hinzufügen</translation>
</message>
<message>
<location filename="../ui/stagesettings.ui" line="87"/>
<location filename="../../ui/stagesettings.ui" line="87"/>
<source>Remove Champion</source>
<translation>Champion entfernen</translation>
</message>

View File

@ -4,12 +4,12 @@
<context>
<name>ChampionSearch</name>
<message>
<location filename="../ui/championsearch.ui" line="14"/>
<location filename="../../ui/championsearch.ui" line="14"/>
<source>Champion Search</source>
<translation>Champion Search</translation>
</message>
<message>
<location filename="../ui/championsearch.ui" line="20"/>
<location filename="../../ui/championsearch.ui" line="20"/>
<source>Champion:</source>
<translation>Champion:</translation>
</message>
@ -17,62 +17,62 @@
<context>
<name>MainWindow</name>
<message>
<location filename="../ui/mainwindow.ui" line="20"/>
<location filename="../../ui/mainwindow.ui" line="20"/>
<source>LoL-Auto-Accept</source>
<translation>LoL-Auto-Accept</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="45"/>
<location filename="../../ui/mainwindow.ui" line="45"/>
<source>Mainswitch</source>
<translation>Mainswitch</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="52"/>
<location filename="../../ui/mainwindow.ui" line="52"/>
<source>Enable LoL-Auto-Accept</source>
<translation>Automatically accept game</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="59"/>
<location filename="../../ui/mainwindow.ui" line="59"/>
<source>Spam &quot;smite&quot; in the chat when there is not exactly 1 player with smite equiped in champ select</source>
<translation>Spam &quot;smite&quot; in the chat when there is not exactly 1 player with smite equiped in champ select</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="62"/>
<location filename="../../ui/mainwindow.ui" line="62"/>
<source>Enable Smite Warning</source>
<translation>Enable Smite Warning</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="91"/>
<location filename="../../ui/mainwindow.ui" line="91"/>
<source>This Tab is used, when you are in a gamemode with no fixed roles</source>
<translation>This Tab is used, when you are in a gamemode with no fixed roles</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="97"/>
<location filename="../../ui/mainwindow.ui" line="97"/>
<source>Default</source>
<translation>Default</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="105"/>
<location filename="../../ui/mainwindow.ui" line="105"/>
<source>Top</source>
<translation>Top</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="113"/>
<location filename="../../ui/mainwindow.ui" line="113"/>
<source>Jungle</source>
<translation>Jungle</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="121"/>
<location filename="../../ui/mainwindow.ui" line="121"/>
<source>Middle</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="129"/>
<location filename="../../ui/mainwindow.ui" line="129"/>
<source>Bottom</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="137"/>
<location filename="../../ui/mainwindow.ui" line="137"/>
<source>Support</source>
<translation></translation>
</message>
@ -89,22 +89,22 @@
<translation type="vanished">Ban</translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="56"/>
<location filename="../../src/mainwindow.cpp" line="56"/>
<source>League of Legends Client not found!</source>
<translation>League of Legends Client not found!</translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="66"/>
<location filename="../../src/mainwindow.cpp" line="66"/>
<source>Auto-Acceptor started!</source>
<translation>Auto-Acceptor started!</translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="70"/>
<location filename="../../src/mainwindow.cpp" line="70"/>
<source>Auto-Acceptor stoped!</source>
<translation>Auto-Acceptor stopped!</translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="118"/>
<location filename="../../src/mainwindow.cpp" line="118"/>
<source>Auto-Acceptor failed!</source>
<translation>Auto-Acceptor failed!</translation>
</message>
@ -112,7 +112,7 @@
<context>
<name>QWidget</name>
<message>
<location filename="../src/champrow.cpp" line="16"/>
<location filename="../../src/champrow.cpp" line="16"/>
<source>Champion: %1
Type: %2
Title: %3
@ -126,17 +126,17 @@ ID: %4</translation>
<context>
<name>RuneDisplay</name>
<message>
<location filename="../ui/runedisplay.ui" line="14"/>
<location filename="../../ui/runedisplay.ui" line="14"/>
<source>Form</source>
<translation></translation>
</message>
<message>
<location filename="../ui/runedisplay.ui" line="23"/>
<location filename="../../ui/runedisplay.ui" line="23"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select a Runepage and modify it to this runes.&lt;br/&gt;The page used is the first that:&lt;/p&gt;&lt;ol style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;matches this Runes&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;has a name starting with &amp;quot;AA:&amp;quot;&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;is currently selected&lt;/li&gt;&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select a Runepage and modify it to this runes.&lt;br/&gt;The page used is the first that:&lt;/p&gt;&lt;ol style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;matches this Runes&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;has a name starting with &amp;quot;AA:&amp;quot;&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;is currently selected&lt;/li&gt;&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../ui/runedisplay.ui" line="26"/>
<location filename="../../ui/runedisplay.ui" line="26"/>
<source>Apply Runes</source>
<translation>Apply Runes</translation>
</message>
@ -144,12 +144,12 @@ ID: %4</translation>
<context>
<name>SettingsTab</name>
<message>
<location filename="../ui/settingstab.ui" line="32"/>
<location filename="../../ui/settingstab.ui" line="32"/>
<source>Ban</source>
<translation>Ban</translation>
</message>
<message>
<location filename="../ui/settingstab.ui" line="54"/>
<location filename="../../ui/settingstab.ui" line="54"/>
<source>Pick</source>
<translation>Pick</translation>
</message>
@ -161,7 +161,7 @@ ID: %4</translation>
<translation type="vanished">Champion:</translation>
</message>
<message>
<location filename="../src/stagesettings.cpp" line="25"/>
<location filename="../../src/stagesettings.cpp" line="25"/>
<source>Enable %1</source>
<translation>Enable %1</translation>
</message>
@ -180,12 +180,12 @@ Title: %3
ID: %4</translation>
</message>
<message>
<location filename="../ui/stagesettings.ui" line="74"/>
<location filename="../../ui/stagesettings.ui" line="74"/>
<source>Add Champion</source>
<translation>Add Champion</translation>
</message>
<message>
<location filename="../ui/stagesettings.ui" line="87"/>
<location filename="../../ui/stagesettings.ui" line="87"/>
<source>Remove Champion</source>
<translation>Remove Champion</translation>
</message>

View File

@ -14,62 +14,32 @@
#include "clientaccess.h"
#include "clientapi.h"
#ifdef WIN32
static std::string getBaseString(char** argv) {
// TODO
(void) argv;
return "./";
}
#else
static std::string getBaseString(char** argv) {
std::string base;
char* appbase = getenv("APPDIR");
if(appbase) {
return std::string(appbase) + '/';
}
char* cresolved = realpath(argv[0], NULL);
std::string resolved(cresolved);
free(cresolved);
return resolved.substr(0, resolved.rfind('/')+1);
}
#endif
int main(int argc, char** argv) {
Log::init();
Log::setConsoleLogLevel(Log::Level::INFO);
Log::setConsoleLogLevel(Log::Level::info);
#if __unix__
Log::setColoredOutput(true);
#endif
if(argc == 0) {
Log::fatal << "arg[0] is not set";
return 1;
}
Args args = parseArgs(argc, argv);
if(args.debugLog) {
Log::setConsoleLogLevel(Log::Level::TRACE);
Log::addLogfile("log.txt", Log::Level::TRACE);
Log::setConsoleLogLevel(Log::Level::trace);
Log::addLogfile("log.txt", Log::Level::trace);
Log::debug << "debug Log enabled";
}
Log::info << "Hello, World!";
Log::note << "Using Locale: " << QLocale().name().toStdString();
std::string base = getBaseString(argv);
Log::info << "appbase: " << base;
QApplication app(argc, argv);
QTranslator translator;
if(translator.load(QLocale().name(), QString::fromStdString(base + "ts"))) {
if(translator.load(QLocale().name(), ":/ts")) {
app.installTranslator(&translator);
} else {
Log::warn << "translation not found";
}
MainWindow win;
QIcon icon(QString::fromStdString(base + "lolautoaccept.png"));
QIcon icon(":/lolautoaccept.png");
win.setWindowIcon(icon);
win.show();

2
thirdparty/Log vendored

@ -1 +1 @@
Subproject commit 5bf9e688b125ac042292d8f554711d7337fe88c0
Subproject commit e1475e798e2429d171b8f58fc3c96c81db25639c