diff --git a/README.md b/README.md index f913658..e261523 100644 --- a/README.md +++ b/README.md @@ -11,41 +11,20 @@ New Features the location of your Terraria.exe. It will use Steam by default to help locate it. If it cannot find it, it will list all items and blocks using their `tag` instead of a translated name. You can manually specify the location of Terraria.exe if you wish the names used in Terrafirma to match the ones used in Terraria. -How to do a static compile on Windows: +How to do a Windows release: ------------------------------------- -Note, qt5 contains a lot of nested files, so it would be best to checkout the -repository somewhere close to root, like C:\qt5 to prevent path-length errors. +Compile a release version using Qt Creator. Copy the executable into +`packages/com.seancode.terrafirma/data`. Also, open that folder in the +developer command prompt and run `c:\Qt\5.13.0\msvc2017_64\bin\qtenv2.bat` or +whichever environment applies to your setup. -You also must install, git, activeperl, and python before compiling. -(python may be optional since we're now excluding qtquick). +Next run `windeployqt terrafirma.exe` which will copy all of the necessary +dlls into that folder. -Open your 64-bit developer prompt: +Finally change back into the main TerraFirma directory and run: +`c:\Qt\QtIFW-4.0.1\bin\binarycreator.exe -c config\config.xml -p packages terrafirmaInstall.exe` -```bat -> git clone https://gitub.com/qt/qt5.git -> cd qt5 -> git checkout 5.12 -> perl init-repository --module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine,-qtquick3d,-qtquick -(wait forever) -> mkdir qt_static -``` - -Now edit `qtbase\mkspecs\common\msvc-desktop.conf`. Find the CONFIG line -and rmeove `embed_manifest_dll` and `embed_manifest_exe` from that line. -Next find `QMAKE_CFLAGS_*` and change `-MD` to `-MT` and `MDd` to `-MTd`. - -```bat -> configure -prefix %CD%\qt_static -opensource -confirm-license -platform win32-msvc -nomake tests -nomake examples -opengl desktop -release -static -> nmake -(wait forever) -> nmake install -``` - -This should make a static Qt5. Now in QtCreator go to Tools → Options and -select Qt Versions from Build & Run. Add a new Qt Version and locate the -`qmake.exe` inside `qt_static\bin`. Then create a new Kit that uses the Qt -Version you just created. Building for Linux: ------------------- diff --git a/config/config.xml b/config/config.xml index b55f8bf..0672441 100644 --- a/config/config.xml +++ b/config/config.xml @@ -1,7 +1,7 @@ Terrafirma - 3.1.3 + 3.1.4 Terrafirma Installer Sean Kasun Terrafirma diff --git a/debian/changelog b/debian/changelog index ad39a39..7a6d5c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +terrafirma (3.1.4) bionic; urgency=medium + + * Updated for 1.4.2 + + -- Sean Kasun Sun, 04 Apr 2021 16:40:22 -0700 + terrafirma (3.1.3) bionic; urgency=medium * Fixed steam config bug diff --git a/main.cpp b/main.cpp index 5e7b425..d5eaa7f 100644 --- a/main.cpp +++ b/main.cpp @@ -25,7 +25,7 @@ int main(int argc, char *argv[]) { QApplication::installTranslator(&translator); QApplication::setApplicationName("Terrafirma"); - QApplication::setApplicationVersion("3.1.3"); + QApplication::setApplicationVersion("3.1.4"); QApplication::setOrganizationName("seancode"); MainWindow w; diff --git a/packages/com.seancode.terrafirma/meta/installscript.qs b/packages/com.seancode.terrafirma/meta/installscript.qs index 4e29b80..f4dadf9 100644 --- a/packages/com.seancode.terrafirma/meta/installscript.qs +++ b/packages/com.seancode.terrafirma/meta/installscript.qs @@ -1,12 +1,64 @@ +var targetDirectoryPage = null; + function Component() { + installer.gainAdminRights(); + component.loaded.connect(this, this.installerLoaded); } Component.prototype.createOperations = function() { component.createOperations(); if (systemInfo.productType == "windows") { - component.addOperation("CreateShortcut", "@TargetDir@/terrafirma.exe", - "@StartMenuDir@/Terrafirma.lnk", "workingDirectory=@TargetDir@"); + component.addOperation("CreateShortcut", + "@TargetDir@/terrafirma.exe", + "@DesktopDir@/Terrafirma.lnk", + "workingDirectory=@TargetDir@"); + component.addOperation("CreateShortcut", + "@TargetDir@/terrafirma.exe", + "@StartMenuDir@/Terrafirma.lnk", + "workingDirectory=@TargetDir@"); + } +} + +Component.prototype.installerLoaded = function() +{ + installer.setDefaultPageVisible(QInstaller.TargetDirectory, false); + installer.addWizardPage(component, "TargetWidget", QInstaller.TargetDirectory); + + targetDirectoryPage = gui.pageWidgetByObjectName("DynamicTargetWidget"); + targetDirectoryPage.windowTitle = "Choose Installation Directory"; + targetDirectoryPage.description.setText("Please select where TerraFirma will be installed:"); + targetDirectoryPage.targetDirectory.textChanged.connect(this, this.targetDirectoryChanged); + targetDirectoryPage.targetDirectory.setText(installer.value("TargetDir")); + targetDirectoryPage.targetChooser.released.connect(this, this.targetChooserClicked); + + gui.pageById(QInstaller.ComponentSelection).entered.connect(this, this.componentSelectionPageEntered); +} + +Component.prototype.targetChooserClicked = function() +{ + var dir = QFileDialog.getExistingDirectory("", targetDirectoryPage.targetDirectory.text); + targetDirectoryPage.targetDirectory.setText(dir); +} + +Component.prototype.targetDirectoryChanged = function() +{ + var dir = targetDirectoryPage.targetDirectory.text; + if (installer.fileExists(dir) && installer.fileExists(dir + "/maintenancetool.exe")) { + targetDirectoryPage.warning.setText("

Existing installation detected and will be overwritten.

"); + } else if (installer.fileExists(dir)) { + targetDirectory.warning.setText("

Installing in existing directory. It will be wiped on uninstallation.

"); + } else { + targetDirectoryPage.warning.setText(""); + } + installer.setValue("TargetDir", dir); +} + +Component.prototype.componentSelectionPageEntered = function() +{ + var dir = installer.value("TargetDir"); + if (installer.fileExists(dir) && installer.fileExists(dir + "/maintenancetool.exe")) { + installer.execute(dir + "/maintenancetool.exe", ["purge"], "yes"); } } diff --git a/packages/com.seancode.terrafirma/meta/package.xml b/packages/com.seancode.terrafirma/meta/package.xml index 2b0c5c0..a011804 100644 --- a/packages/com.seancode.terrafirma/meta/package.xml +++ b/packages/com.seancode.terrafirma/meta/package.xml @@ -2,8 +2,12 @@ Terrafirma Terraria mapping software - 3.1.3 - 2021-03-22 + 3.1.4 + 2021-04-04 true + true + + targetwidget.ui + diff --git a/packages/com.seancode.terrafirma/meta/targetwidget.ui b/packages/com.seancode.terrafirma/meta/targetwidget.ui new file mode 100644 index 0000000..0d4dc25 --- /dev/null +++ b/packages/com.seancode.terrafirma/meta/targetwidget.ui @@ -0,0 +1,113 @@ + + + TargetWidget + + + + 0 + 0 + 491 + 190 + + + + + 0 + 0 + + + + + 491 + 190 + + + + Form + + + + + + + + + + + + + + + true + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + ... + + + + + + + + + 0 + + + + + true + + + TextLabel + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 122 + + + + + + + + + diff --git a/world.h b/world.h index 54b8283..051ff54 100644 --- a/world.h +++ b/world.h @@ -35,7 +35,7 @@ class Tile { class World : public QObject, public QRunnable { static const int MinimumVersion = 88; - static const int HighestVersion = 234; + static const int HighestVersion = 236; Q_OBJECT