Add command line argument to allow start in portable mode
parent
d3832929c7
commit
7887fdd0ed
|
@ -736,7 +736,7 @@
|
|||
<location filename="../mainwindow.ui" line="1266"/>
|
||||
<location filename="../mainwindow.ui" line="1277"/>
|
||||
<location filename="../mainwindow.ui" line="1288"/>
|
||||
<location filename="../mainwindow.cpp" line="958"/>
|
||||
<location filename="../mainwindow.cpp" line="996"/>
|
||||
<source>select color</source>
|
||||
<translation>Farbe auswählen</translation>
|
||||
</message>
|
||||
|
@ -892,7 +892,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.ui" line="2397"/>
|
||||
<location filename="../mainwindow.cpp" line="939"/>
|
||||
<location filename="../mainwindow.cpp" line="977"/>
|
||||
<source>About MinetestMapper</source>
|
||||
<translation>Über MinetestMapper</translation>
|
||||
</message>
|
||||
|
@ -941,7 +941,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.ui" line="2537"/>
|
||||
<location filename="../mainwindow.cpp" line="971"/>
|
||||
<location filename="../mainwindow.cpp" line="1009"/>
|
||||
<source>New Profile</source>
|
||||
<translation>Neues Profil</translation>
|
||||
</message>
|
||||
|
@ -951,7 +951,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.ui" line="2545"/>
|
||||
<location filename="../mainwindow.cpp" line="401"/>
|
||||
<location filename="../mainwindow.cpp" line="434"/>
|
||||
<source>Expert Mode</source>
|
||||
<translation>Expertenmodus</translation>
|
||||
</message>
|
||||
|
@ -966,211 +966,233 @@
|
|||
<translation>Im Expertenmodus werden die Parameter angezeigt, die du verändern kannst.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="157"/>
|
||||
<location filename="../mainwindow.cpp" line="190"/>
|
||||
<source>Current Language changed to %1</source>
|
||||
<translation>Sprache wurde auf %1 geändert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.ui" line="2496"/>
|
||||
<location filename="../mainwindow.cpp" line="925"/>
|
||||
<location filename="../mainwindow.cpp" line="963"/>
|
||||
<source>About MinetestMapper GUI</source>
|
||||
<translation>Über MinetestMapperGUI</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="207"/>
|
||||
<location filename="../mainwindow.cpp" line="216"/>
|
||||
<location filename="../mainwindow.cpp" line="240"/>
|
||||
<location filename="../mainwindow.cpp" line="249"/>
|
||||
<source>Minetestmapper not found</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="226"/>
|
||||
<location filename="../mainwindow.cpp" line="259"/>
|
||||
<source>Minetestmapper not executable</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="241"/>
|
||||
<location filename="../mainwindow.cpp" line="274"/>
|
||||
<source>no input world selected</source>
|
||||
<translation>Keine Minetestwelt ausgewählt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="242"/>
|
||||
<location filename="../mainwindow.cpp" line="275"/>
|
||||
<source>ERROR: No MinetestWorld selected<br><br>please select a world</source>
|
||||
<translation>FEHLER: Keine Minetestwelt ausgewählt<br><br>Bitte wähle eine Welt aus</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="248"/>
|
||||
<location filename="../mainwindow.cpp" line="281"/>
|
||||
<source>no output image selected</source>
|
||||
<translation>Kein Ausgabebild ausgewählt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="249"/>
|
||||
<location filename="../mainwindow.cpp" line="282"/>
|
||||
<source>ERROR: No output image selected<br><br>please select a output image</source>
|
||||
<translation>FEHLER: Kein Ausgabebild Ausgewählt. <br><br>Bitte ein Bild Auswählen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="254"/>
|
||||
<location filename="../mainwindow.cpp" line="287"/>
|
||||
<source>the Image File does already exist</source>
|
||||
<translation>Das Bild existiert bereits</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="255"/>
|
||||
<location filename="../mainwindow.cpp" line="288"/>
|
||||
<source>The File <i>%1</i> does already exist. <br><br>Do you want to overwrite?</source>
|
||||
<translation>Die Datei <i>%1</i> existiert bereits. <br><br>Soll die Datei Überschrieben werden?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="263"/>
|
||||
<location filename="../mainwindow.cpp" line="296"/>
|
||||
<source>the directory does not exist</source>
|
||||
<translation>Der Ordner existiert nicht</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="264"/>
|
||||
<location filename="../mainwindow.cpp" line="297"/>
|
||||
<source>The directory <i>%1</i> does not exist. <br><br>Should it be created?</source>
|
||||
<translation>Der Ordner <i>%1</i> existiert nicht. <br><br>Möchten sie den Ordner erstellen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="402"/>
|
||||
<location filename="../mainwindow.cpp" line="435"/>
|
||||
<source>MinetestMapper will be executed using this arguments.
|
||||
The arguments can be removed, modified, or new arguments can be added.</source>
|
||||
<translation>MinetestMapper wird mit den folgenden Parametern ausgeführt.
|
||||
Die einzelnen Parameter können entfernt, verändert, oder neue hinzugefügt werden.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="500"/>
|
||||
<location filename="../mainwindow.cpp" line="533"/>
|
||||
<source>Finisched :)</source>
|
||||
<translation>Fertig :-)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="508"/>
|
||||
<location filename="../mainwindow.cpp" line="541"/>
|
||||
<source>minetestmapper terminated</source>
|
||||
<translation>minetestmapper abgebrochen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="511"/>
|
||||
<location filename="../mainwindow.cpp" line="528"/>
|
||||
<location filename="../mainwindow.cpp" line="544"/>
|
||||
<location filename="../mainwindow.cpp" line="561"/>
|
||||
<source>Minetest Mapper failed</source>
|
||||
<translation>Minetestmapper hat ein Fehler festgestellt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="512"/>
|
||||
<location filename="../mainwindow.cpp" line="545"/>
|
||||
<source><h1>ERROR</h1> <h2>minetestmapper failed</h2>Exit code: <i>%1</i> <br>Status of MinetestMapper: <pre>%2</pre><br><br>Please fix the error and try again </source>
|
||||
<translation><h1>Fehler</h1> <h2>kartenerstellung fehlgeschlagen</h2>Exit code: <i>%1</i> <br>Ausgabe des Minetstmapper: <pre>%2</pre><br><br>Bitte den Fehler beheben und erneut versuchen </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="529"/>
|
||||
<location filename="../mainwindow.cpp" line="562"/>
|
||||
<source><h1>ERROR</h1> <h2>minetestmapper failed</h2>Error code: <i>%1</i> <br>Error Message: <pre>%2</pre><br></source>
|
||||
<translation><h1>FEHLER</h1> <h2>minetestmapper ist abgestürzt</h2>Fehlercode: <i>%1</i> <br>Fehlernachricht: <pre>%2</pre><br></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="568"/>
|
||||
<location filename="../mainwindow.cpp" line="601"/>
|
||||
<source>Migrating settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="569"/>
|
||||
<location filename="../mainwindow.cpp" line="602"/>
|
||||
<source><h1>WARNING</h1> <h2>Migrating settings: both old and new settings found</h2>old settings directory: <i>%1</i><br>new settings directory: <i>%2</i><br><h2>Migrate old settings anyway ?</h2>This overwrites the new settings, and some or all new profiles<br><br>Delete the old settings files (<i>%1/Minetestmapper*</i>) to avoid this message.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="583"/>
|
||||
<location filename="../mainwindow.cpp" line="603"/>
|
||||
<location filename="../mainwindow.cpp" line="612"/>
|
||||
<location filename="../mainwindow.cpp" line="616"/>
|
||||
<location filename="../mainwindow.cpp" line="636"/>
|
||||
<location filename="../mainwindow.cpp" line="645"/>
|
||||
<source>Failed to migrate settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="584"/>
|
||||
<location filename="../mainwindow.cpp" line="617"/>
|
||||
<source><h1>ERROR</h1> <h2>Failed to migrate settings</h2>Reason: failed to create new settings directory <i>%1</i></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="604"/>
|
||||
<location filename="../mainwindow.cpp" line="637"/>
|
||||
<source><h1>ERROR</h1> <h2>Failed to migrate settings</h2>Reason: failed to remove existing file <i>%1</i></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="613"/>
|
||||
<location filename="../mainwindow.cpp" line="646"/>
|
||||
<source><h1>ERROR</h1> <h2>Failed to migrate settings</h2>Reason: failed to move file <i>%1</i> to <i>%2</i></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="622"/>
|
||||
<location filename="../mainwindow.cpp" line="655"/>
|
||||
<source>Failed to remove old settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="623"/>
|
||||
<location filename="../mainwindow.cpp" line="656"/>
|
||||
<source><h1>WARNING</h1> <h2>Failed to remove old settings</h2>Reason: failed to remove file <i>%1</i></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="633"/>
|
||||
<location filename="../mainwindow.cpp" line="666"/>
|
||||
<source>Failed to remove old settings directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="634"/>
|
||||
<location filename="../mainwindow.cpp" line="667"/>
|
||||
<source><h1>WARNING</h1> <h2>Failed to remove old settings directory</h2>Reason: failed to remove directory <i>%1</i></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="883"/>
|
||||
<location filename="../mainwindow.cpp" line="722"/>
|
||||
<source>Can not save settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="723"/>
|
||||
<source>Minetest Mapper GUI could not save the settings to %1.
|
||||
Please make shure Minetest Mapper Gui can access to the file/directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="750"/>
|
||||
<source>Can not save profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="751"/>
|
||||
<source>Minetest Mapper GUI could not save the current Profile '%1' to %2.
|
||||
Please make shure Minetest Mapper Gui can access to the file/directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="921"/>
|
||||
<source>Open Minetest World</source>
|
||||
<translation>Minetest Welt-Ordner öffnen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="893"/>
|
||||
<location filename="../mainwindow.cpp" line="931"/>
|
||||
<source>Save generated map to...</source>
|
||||
<translation>Karte speichern nach...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="893"/>
|
||||
<location filename="../mainwindow.cpp" line="931"/>
|
||||
<source>png image (*.png)</source>
|
||||
<translation>png Grafik (*.png)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="900"/>
|
||||
<location filename="../mainwindow.cpp" line="938"/>
|
||||
<source>Open HeightmapNodes File</source>
|
||||
<translation>Öffne HeightmapNodes Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="902"/>
|
||||
<location filename="../mainwindow.cpp" line="910"/>
|
||||
<location filename="../mainwindow.cpp" line="918"/>
|
||||
<location filename="../mainwindow.cpp" line="940"/>
|
||||
<location filename="../mainwindow.cpp" line="948"/>
|
||||
<location filename="../mainwindow.cpp" line="956"/>
|
||||
<source>TXT File (*.txt)</source>
|
||||
<translation>TXT Datei (*.txt)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="908"/>
|
||||
<location filename="../mainwindow.cpp" line="946"/>
|
||||
<source>Open HeightmapColors File</source>
|
||||
<translation>Öffne Höhenkarte Farbdefinitionsdatei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="916"/>
|
||||
<location filename="../mainwindow.cpp" line="954"/>
|
||||
<source>Open colors.txt File</source>
|
||||
<translation>Öffne colors.txt Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="926"/>
|
||||
<location filename="../mainwindow.cpp" line="964"/>
|
||||
<source><h1>About MinetestMapperGUI</h1>The <b>MinetestMapper Gui</b> is written by addi.<br />It is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.<br>The current version is %1. <br>The sourcecode is aviable on <a href='https://bitbucket.org/adrido/minetestmappergui/'>Bitbucket</a>.<br>You may also want to read the <a href='https://forum.minetest.net/viewtopic.php?f=14&t=12139'>Minetest forum thread</a>.<br><br><b>Thanks to:</b><br>McKrustenkaese for his great icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="1031"/>
|
||||
<location filename="../mainwindow.cpp" line="1069"/>
|
||||
<source>map center</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="1036"/>
|
||||
<location filename="../mainwindow.cpp" line="1074"/>
|
||||
<source>map origin (top left)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="940"/>
|
||||
<location filename="../mainwindow.cpp" line="978"/>
|
||||
<source><h1>About MinetestMapper</h1>The <b>MinetestMapper</b> is written by:<br>Miroslav Bendík <miroslav.bendik@gmail.com><br>ShadowNinja <shadowninja@minetest.net><br>sfan5 <sfan5@live.de><br>Rogier <rogier777@gmail.com><br><br><u>License:</u>LGPLv2.1+ and BSD 2-clause.<br><u>Source Code:</u> <a href='https://github.com/Rogier-5/minetest-mapper-cpp'>Github</a><br></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="208"/>
|
||||
<location filename="../mainwindow.cpp" line="241"/>
|
||||
<source>ERROR: No minetestmapper executable could not be found.
|
||||
Please configure one. (Edit->Preferences)
|
||||
|
||||
|
@ -1181,7 +1203,7 @@ Bitte Konfigurieren Sie eine. (Bearbeiten->Einstellungen)
|
|||
Möchten Sie die Einstellungen jetzt öffnen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="217"/>
|
||||
<location filename="../mainwindow.cpp" line="250"/>
|
||||
<source>ERROR: Configured minetestmapper executable (%1) could not be found
|
||||
Please configure one. (Edit->Preferences)
|
||||
|
||||
|
@ -1192,7 +1214,7 @@ Bitte erneut Konfigurieren. (Bearbeiten->Einstellungen)
|
|||
Möchten Sie die Einstellungen jetzt öffnen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="227"/>
|
||||
<location filename="../mainwindow.cpp" line="260"/>
|
||||
<source>ERROR: The configured minetestmapper (%1) is not executable.
|
||||
Please configure a valid minetestmapper executable. (Edit->Preferences)
|
||||
|
||||
|
@ -1203,12 +1225,12 @@ Bitte erneut eine gültige minetestmapper Anwendung auswählen. (Bearbeiten->
|
|||
Möchten Sie die Einstellungen jetzt öffnen? </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="952"/>
|
||||
<location filename="../mainwindow.cpp" line="990"/>
|
||||
<source>preview: %1</source>
|
||||
<translation>Vorschau: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="972"/>
|
||||
<location filename="../mainwindow.cpp" line="1010"/>
|
||||
<source>Name of the new Profile:</source>
|
||||
<translation>Name des Neuen Profils:</translation>
|
||||
</message>
|
||||
|
|
|
@ -432,7 +432,7 @@
|
|||
<location filename="../mainwindow.ui" line="1266"/>
|
||||
<location filename="../mainwindow.ui" line="1277"/>
|
||||
<location filename="../mainwindow.ui" line="1288"/>
|
||||
<location filename="../mainwindow.cpp" line="958"/>
|
||||
<location filename="../mainwindow.cpp" line="996"/>
|
||||
<source>select color</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -851,7 +851,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.ui" line="2397"/>
|
||||
<location filename="../mainwindow.cpp" line="939"/>
|
||||
<location filename="../mainwindow.cpp" line="977"/>
|
||||
<source>About MinetestMapper</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -897,7 +897,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.ui" line="2496"/>
|
||||
<location filename="../mainwindow.cpp" line="925"/>
|
||||
<location filename="../mainwindow.cpp" line="963"/>
|
||||
<source>About MinetestMapper GUI</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -921,13 +921,13 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.ui" line="2537"/>
|
||||
<location filename="../mainwindow.cpp" line="971"/>
|
||||
<location filename="../mainwindow.cpp" line="1009"/>
|
||||
<source>New Profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.ui" line="2545"/>
|
||||
<location filename="../mainwindow.cpp" line="401"/>
|
||||
<location filename="../mainwindow.cpp" line="434"/>
|
||||
<source>Expert Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -942,204 +942,226 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="157"/>
|
||||
<location filename="../mainwindow.cpp" line="190"/>
|
||||
<source>Current Language changed to %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="207"/>
|
||||
<location filename="../mainwindow.cpp" line="216"/>
|
||||
<location filename="../mainwindow.cpp" line="240"/>
|
||||
<location filename="../mainwindow.cpp" line="249"/>
|
||||
<source>Minetestmapper not found</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="226"/>
|
||||
<location filename="../mainwindow.cpp" line="259"/>
|
||||
<source>Minetestmapper not executable</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="241"/>
|
||||
<location filename="../mainwindow.cpp" line="274"/>
|
||||
<source>no input world selected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="242"/>
|
||||
<location filename="../mainwindow.cpp" line="275"/>
|
||||
<source>ERROR: No MinetestWorld selected<br><br>please select a world</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="248"/>
|
||||
<location filename="../mainwindow.cpp" line="281"/>
|
||||
<source>no output image selected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="249"/>
|
||||
<location filename="../mainwindow.cpp" line="282"/>
|
||||
<source>ERROR: No output image selected<br><br>please select a output image</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="254"/>
|
||||
<location filename="../mainwindow.cpp" line="287"/>
|
||||
<source>the Image File does already exist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="255"/>
|
||||
<location filename="../mainwindow.cpp" line="288"/>
|
||||
<source>The File <i>%1</i> does already exist. <br><br>Do you want to overwrite?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="263"/>
|
||||
<location filename="../mainwindow.cpp" line="296"/>
|
||||
<source>the directory does not exist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="264"/>
|
||||
<location filename="../mainwindow.cpp" line="297"/>
|
||||
<source>The directory <i>%1</i> does not exist. <br><br>Should it be created?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="402"/>
|
||||
<location filename="../mainwindow.cpp" line="435"/>
|
||||
<source>MinetestMapper will be executed using this arguments.
|
||||
The arguments can be removed, modified, or new arguments can be added.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="500"/>
|
||||
<location filename="../mainwindow.cpp" line="533"/>
|
||||
<source>Finisched :)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="508"/>
|
||||
<location filename="../mainwindow.cpp" line="541"/>
|
||||
<source>minetestmapper terminated</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="511"/>
|
||||
<location filename="../mainwindow.cpp" line="528"/>
|
||||
<location filename="../mainwindow.cpp" line="544"/>
|
||||
<location filename="../mainwindow.cpp" line="561"/>
|
||||
<source>Minetest Mapper failed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="512"/>
|
||||
<location filename="../mainwindow.cpp" line="545"/>
|
||||
<source><h1>ERROR</h1> <h2>minetestmapper failed</h2>Exit code: <i>%1</i> <br>Status of MinetestMapper: <pre>%2</pre><br><br>Please fix the error and try again </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="529"/>
|
||||
<location filename="../mainwindow.cpp" line="562"/>
|
||||
<source><h1>ERROR</h1> <h2>minetestmapper failed</h2>Error code: <i>%1</i> <br>Error Message: <pre>%2</pre><br></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="568"/>
|
||||
<location filename="../mainwindow.cpp" line="601"/>
|
||||
<source>Migrating settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="569"/>
|
||||
<location filename="../mainwindow.cpp" line="602"/>
|
||||
<source><h1>WARNING</h1> <h2>Migrating settings: both old and new settings found</h2>old settings directory: <i>%1</i><br>new settings directory: <i>%2</i><br><h2>Migrate old settings anyway ?</h2>This overwrites the new settings, and some or all new profiles<br><br>Delete the old settings files (<i>%1/Minetestmapper*</i>) to avoid this message.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="583"/>
|
||||
<location filename="../mainwindow.cpp" line="603"/>
|
||||
<location filename="../mainwindow.cpp" line="612"/>
|
||||
<location filename="../mainwindow.cpp" line="616"/>
|
||||
<location filename="../mainwindow.cpp" line="636"/>
|
||||
<location filename="../mainwindow.cpp" line="645"/>
|
||||
<source>Failed to migrate settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="584"/>
|
||||
<location filename="../mainwindow.cpp" line="617"/>
|
||||
<source><h1>ERROR</h1> <h2>Failed to migrate settings</h2>Reason: failed to create new settings directory <i>%1</i></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="604"/>
|
||||
<location filename="../mainwindow.cpp" line="637"/>
|
||||
<source><h1>ERROR</h1> <h2>Failed to migrate settings</h2>Reason: failed to remove existing file <i>%1</i></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="613"/>
|
||||
<location filename="../mainwindow.cpp" line="646"/>
|
||||
<source><h1>ERROR</h1> <h2>Failed to migrate settings</h2>Reason: failed to move file <i>%1</i> to <i>%2</i></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="622"/>
|
||||
<location filename="../mainwindow.cpp" line="655"/>
|
||||
<source>Failed to remove old settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="623"/>
|
||||
<location filename="../mainwindow.cpp" line="656"/>
|
||||
<source><h1>WARNING</h1> <h2>Failed to remove old settings</h2>Reason: failed to remove file <i>%1</i></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="633"/>
|
||||
<location filename="../mainwindow.cpp" line="666"/>
|
||||
<source>Failed to remove old settings directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="634"/>
|
||||
<location filename="../mainwindow.cpp" line="667"/>
|
||||
<source><h1>WARNING</h1> <h2>Failed to remove old settings directory</h2>Reason: failed to remove directory <i>%1</i></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="883"/>
|
||||
<location filename="../mainwindow.cpp" line="722"/>
|
||||
<source>Can not save settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="723"/>
|
||||
<source>Minetest Mapper GUI could not save the settings to %1.
|
||||
Please make shure Minetest Mapper Gui can access to the file/directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="750"/>
|
||||
<source>Can not save profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="751"/>
|
||||
<source>Minetest Mapper GUI could not save the current Profile '%1' to %2.
|
||||
Please make shure Minetest Mapper Gui can access to the file/directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="921"/>
|
||||
<source>Open Minetest World</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="893"/>
|
||||
<location filename="../mainwindow.cpp" line="931"/>
|
||||
<source>Save generated map to...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="893"/>
|
||||
<location filename="../mainwindow.cpp" line="931"/>
|
||||
<source>png image (*.png)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="900"/>
|
||||
<location filename="../mainwindow.cpp" line="938"/>
|
||||
<source>Open HeightmapNodes File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="902"/>
|
||||
<location filename="../mainwindow.cpp" line="910"/>
|
||||
<location filename="../mainwindow.cpp" line="918"/>
|
||||
<location filename="../mainwindow.cpp" line="940"/>
|
||||
<location filename="../mainwindow.cpp" line="948"/>
|
||||
<location filename="../mainwindow.cpp" line="956"/>
|
||||
<source>TXT File (*.txt)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="908"/>
|
||||
<location filename="../mainwindow.cpp" line="946"/>
|
||||
<source>Open HeightmapColors File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="916"/>
|
||||
<location filename="../mainwindow.cpp" line="954"/>
|
||||
<source>Open colors.txt File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="926"/>
|
||||
<location filename="../mainwindow.cpp" line="964"/>
|
||||
<source><h1>About MinetestMapperGUI</h1>The <b>MinetestMapper Gui</b> is written by addi.<br />It is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.<br>The current version is %1. <br>The sourcecode is aviable on <a href='https://bitbucket.org/adrido/minetestmappergui/'>Bitbucket</a>.<br>You may also want to read the <a href='https://forum.minetest.net/viewtopic.php?f=14&t=12139'>Minetest forum thread</a>.<br><br><b>Thanks to:</b><br>McKrustenkaese for his great icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="1031"/>
|
||||
<location filename="../mainwindow.cpp" line="1069"/>
|
||||
<source>map center</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="1036"/>
|
||||
<location filename="../mainwindow.cpp" line="1074"/>
|
||||
<source>map origin (top left)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="940"/>
|
||||
<location filename="../mainwindow.cpp" line="978"/>
|
||||
<source><h1>About MinetestMapper</h1>The <b>MinetestMapper</b> is written by:<br>Miroslav Bendík <miroslav.bendik@gmail.com><br>ShadowNinja <shadowninja@minetest.net><br>sfan5 <sfan5@live.de><br>Rogier <rogier777@gmail.com><br><br><u>License:</u>LGPLv2.1+ and BSD 2-clause.<br><u>Source Code:</u> <a href='https://github.com/Rogier-5/minetest-mapper-cpp'>Github</a><br></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="208"/>
|
||||
<location filename="../mainwindow.cpp" line="241"/>
|
||||
<source>ERROR: No minetestmapper executable could not be found.
|
||||
Please configure one. (Edit->Preferences)
|
||||
|
||||
|
@ -1147,7 +1169,7 @@ Do you want to open Preferences now?</source>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="217"/>
|
||||
<location filename="../mainwindow.cpp" line="250"/>
|
||||
<source>ERROR: Configured minetestmapper executable (%1) could not be found
|
||||
Please configure one. (Edit->Preferences)
|
||||
|
||||
|
@ -1155,7 +1177,7 @@ Do you want to open Preferences now?</source>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="227"/>
|
||||
<location filename="../mainwindow.cpp" line="260"/>
|
||||
<source>ERROR: The configured minetestmapper (%1) is not executable.
|
||||
Please configure a valid minetestmapper executable. (Edit->Preferences)
|
||||
|
||||
|
@ -1163,12 +1185,12 @@ Do you want to open Preferences now?</source>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="952"/>
|
||||
<location filename="../mainwindow.cpp" line="990"/>
|
||||
<source>preview: %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="972"/>
|
||||
<location filename="../mainwindow.cpp" line="1010"/>
|
||||
<source>Name of the new Profile:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
10
main.cpp
10
main.cpp
|
@ -1,12 +1,16 @@
|
|||
#include "mainwindow.h"
|
||||
#include <QCoreApplication>
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
//set organization to MinetestMapperGui which is read by settings
|
||||
QCoreApplication::setOrganizationName("MinetestMapperGui");
|
||||
QCoreApplication::setApplicationName("MinetestMapperGui");
|
||||
a.setApplicationName("MinetestMapperGui");
|
||||
a.setApplicationDisplayName("Minetest Mapper GUI");
|
||||
a.setApplicationVersion(GIT_VERSION);
|
||||
a.setOrganizationName("MinetestMapperGui");
|
||||
|
||||
MainWindow w;
|
||||
w.show();
|
||||
|
||||
|
|
103
mainwindow.cpp
103
mainwindow.cpp
|
@ -45,6 +45,36 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
exit(EXIT_FAILURE);
|
||||
#endif
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription("This program provides a graphical user interface for minetestmapper. \n"
|
||||
"If you are looking for the command line interface of minetesmapper please execute minetestmapper directly.");
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
QCommandLineOption startPortableOption(QStringList() << "p" << "portable",
|
||||
"Starts in portable mode which reads and writes settings and profiles relative to current directory");
|
||||
parser.addOption(startPortableOption);
|
||||
|
||||
parser.process(qApp->arguments());
|
||||
|
||||
portable = parser.isSet(startPortableOption);
|
||||
|
||||
if(portable){
|
||||
//Attention: This paths could be non writable locations!
|
||||
pathAppData = qApp->applicationDirPath(); //use the Applications directory
|
||||
pathProfiles = pathAppData + "/profiles/";
|
||||
|
||||
//manipulate settingsfile on portable mode
|
||||
settings = new QSettings(pathAppData+"/MinetestMapperGui.ini",QSettings::IniFormat);
|
||||
}
|
||||
else{
|
||||
QSettings dummySettings(QSettings::IniFormat, QSettings::UserScope,qApp->organizationName(),"dummy");
|
||||
pathAppData = QFileInfo(dummySettings.fileName()).path();
|
||||
pathProfiles = pathAppData + "/profiles/";
|
||||
dummySettings.deleteLater();
|
||||
|
||||
//non portable use OS defaults
|
||||
settings = new QSettings();
|
||||
}
|
||||
ui->setupUi(this);
|
||||
finishUiInitialisation();
|
||||
readSettings();
|
||||
|
@ -645,12 +675,8 @@ void MainWindow::createProfilesMenu(){
|
|||
|
||||
connect(profileGroup, SIGNAL (triggered(QAction *)), this, SLOT (slotProfileChanged(QAction *)));
|
||||
|
||||
|
||||
//Qt 5.4 or less
|
||||
QSettings dummySettings(QSettings::IniFormat, QSettings::UserScope,QCoreApplication::organizationName(),"/profiles/default");
|
||||
|
||||
QDir dir = QFileInfo(dummySettings.fileName()).absoluteDir();
|
||||
|
||||
QDir dir(pathProfiles);
|
||||
qDebug()<<pathProfiles;
|
||||
QStringList fileNames = dir.entryList(QStringList("*.ini"));
|
||||
|
||||
qDebug()<<"found the Profiles"<< fileNames<< "in"<<dir.absolutePath();
|
||||
|
@ -689,30 +715,40 @@ void MainWindow::slotProfileChanged(QAction* action)
|
|||
|
||||
void MainWindow::writeSettings()
|
||||
{
|
||||
settings.beginGroup("MainWindow");
|
||||
if(portable && !settings->isWritable()){
|
||||
QMessageBox::warning(this, tr("Can not save settings"),
|
||||
tr("Minetest Mapper GUI could not save the settings to %1.\n"
|
||||
"Please make shure Minetest Mapper Gui can access to the file/directory").arg(settings->fileName()));
|
||||
|
||||
}
|
||||
settings->beginGroup("MainWindow");
|
||||
if(isMaximized()){
|
||||
settings.setValue("maximized", true);
|
||||
settings->setValue("maximized", true);
|
||||
}
|
||||
else{
|
||||
settings.setValue("maximized", false);
|
||||
settings.setValue("size", size());
|
||||
settings.setValue("pos", pos());
|
||||
settings->setValue("maximized", false);
|
||||
settings->setValue("size", size());
|
||||
settings->setValue("pos", pos());
|
||||
}
|
||||
settings.setValue("help", ui->actionHelp->isChecked());
|
||||
settings.setValue("profile", currentProfile);
|
||||
settings.setValue("expertMode",ui->actionExpert_Mode->isChecked());
|
||||
settings.setValue("openMap",ui->actionOpen_map_after_creation->isChecked());
|
||||
settings.endGroup();
|
||||
settings->setValue("help", ui->actionHelp->isChecked());
|
||||
settings->setValue("profile", currentProfile);
|
||||
settings->setValue("expertMode",ui->actionExpert_Mode->isChecked());
|
||||
settings->setValue("openMap",ui->actionOpen_map_after_creation->isChecked());
|
||||
settings->endGroup();
|
||||
}
|
||||
|
||||
void MainWindow::writeProfile(QString strProfile)
|
||||
{
|
||||
//QSettings::setDefaultFormat(QSettings::IniFormat);
|
||||
//QSettings profile;
|
||||
|
||||
//looks odd, but it constructs the correct settingsfile
|
||||
QSettings profile(QSettings::IniFormat, QSettings::UserScope,QCoreApplication::organizationName(),"/profiles/"+strProfile);
|
||||
qDebug()<<"Write profile"<< strProfile<<"to:"<<profile.fileName();
|
||||
QSettings profile(QString("%1/%2.ini").arg(pathProfiles).arg(strProfile), QSettings::IniFormat);
|
||||
if(portable && !profile.isWritable()){
|
||||
QMessageBox::warning(this, tr("Can not save profile"),
|
||||
tr("Minetest Mapper GUI could not save the current Profile '%1' to %2.\n"
|
||||
"Please make shure Minetest Mapper Gui can access to the file/directory").arg(strProfile).arg(profile.fileName()));
|
||||
}
|
||||
qDebug()<<"Write profile" << strProfile << "to" << profile.fileName();
|
||||
|
||||
profile.beginGroup("Mapper");
|
||||
//'currentSettings'
|
||||
|
@ -775,34 +811,33 @@ void MainWindow::writeProfile(QString strProfile)
|
|||
|
||||
void MainWindow::readSettings()
|
||||
{
|
||||
qDebug()<<"Read settings from"<<settings.fileName();
|
||||
qDebug()<<"Read settings from"<<settings->fileName();
|
||||
|
||||
settings.beginGroup("MainWindow");
|
||||
if (settings.value("maximized",false).toBool()) {
|
||||
settings->beginGroup("MainWindow");
|
||||
if (settings->value("maximized",false).toBool()) {
|
||||
setWindowState(Qt::WindowMaximized);
|
||||
|
||||
}
|
||||
else {
|
||||
resize(settings.value("size", QSize(400, 400)).toSize());
|
||||
move(settings.value("pos", QPoint(200, 200)).toPoint());
|
||||
resize(settings->value("size", QSize(400, 400)).toSize());
|
||||
move(settings->value("pos", QPoint(200, 200)).toPoint());
|
||||
|
||||
}
|
||||
if(settings.value("help",false).toBool()==false){
|
||||
if(settings->value("help",false).toBool()==false){
|
||||
ui->dockHelp->close();
|
||||
}
|
||||
currentProfile = settings.value("profile","default").toString();
|
||||
ui->actionExpert_Mode->setChecked(settings.value("expertMode",false).toBool());
|
||||
ui->actionOpen_map_after_creation->setChecked(settings.value("openMap",true).toBool());
|
||||
settings.endGroup();
|
||||
currentProfile = settings->value("profile","default").toString();
|
||||
ui->actionExpert_Mode->setChecked(settings->value("expertMode",false).toBool());
|
||||
ui->actionOpen_map_after_creation->setChecked(settings->value("openMap",true).toBool());
|
||||
settings->endGroup();
|
||||
}
|
||||
|
||||
void MainWindow::readProfile(QString strProfile)
|
||||
{
|
||||
QSettings profile(QSettings::IniFormat,
|
||||
QSettings::UserScope,
|
||||
QCoreApplication::organizationName(),
|
||||
"/profiles/"+strProfile);
|
||||
qDebug()<< "Reading profile"<< profile.fileName();
|
||||
|
||||
QSettings profile(QString("%1/%2.ini").arg(pathProfiles).arg(strProfile),QSettings::IniFormat);
|
||||
|
||||
qDebug()<< "Reading profile" << strProfile << "from" << profile.fileName();
|
||||
|
||||
profile.beginGroup("Mapper");
|
||||
//'currentSettings'
|
||||
|
|
|
@ -102,6 +102,7 @@ private slots:
|
|||
void on_actionPreferences_triggered();
|
||||
|
||||
private:
|
||||
bool portable;
|
||||
Ui::MainWindow *ui;
|
||||
QProgressBar *progressBar;
|
||||
QProcess *myProcess;
|
||||
|
@ -126,7 +127,10 @@ private:
|
|||
QString m_currLang; // contains the currently loaded language
|
||||
QString m_langPath; // Path of language files. This is always fixed to /languages.
|
||||
QString currentProfile; //contains the name of current loaded profile
|
||||
QSettings settings;
|
||||
QString pathAppData; // Path where the settings should be stored.
|
||||
QString pathProfiles; // path where the profiles should be stored.
|
||||
//QSettings profile;
|
||||
QSettings *settings;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
|
Loading…
Reference in New Issue