summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-11-03 10:18:41 +0000
committerSky <git@bunnies.cc>2013-11-03 10:18:41 +0000
commit406d8511bdc7b857a200b29e7d6e2fd81eda0f8e (patch)
tree736616880b8a634e954a474ef75028998962b299
parentb018aab1e936dc368090987a72a929987574b1b8 (diff)
parent09dc35688398b2dde41817828c4c657143506d3b (diff)
downloadMultiMC-406d8511bdc7b857a200b29e7d6e2fd81eda0f8e.tar
MultiMC-406d8511bdc7b857a200b29e7d6e2fd81eda0f8e.tar.gz
MultiMC-406d8511bdc7b857a200b29e7d6e2fd81eda0f8e.tar.lz
MultiMC-406d8511bdc7b857a200b29e7d6e2fd81eda0f8e.tar.xz
MultiMC-406d8511bdc7b857a200b29e7d6e2fd81eda0f8e.zip
Merge branch 'develop'
-rw-r--r--BUILD.md76
-rw-r--r--MultiMC.cpp6
-rw-r--r--gui/mainwindow.cpp7
3 files changed, 44 insertions, 45 deletions
diff --git a/BUILD.md b/BUILD.md
index e2c17e64..6454bfb7 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -8,55 +8,47 @@ Build Instructions
# Linux
-## Dependencies
+Getting the project to build and run on Linux is easy if you use Ubuntu 13.10 (or 13.04) and Qt's IDE, Qt Creator.
-* Qt 5.1.1+ Development tools (http://qt-project.org/downloads)
-* cmake
-* ccmake
-* make
-* g++
+## Dependencies
+* Qt 5.1.1+ Development tools (http://qt-project.org/downloads) ("Qt Online Installer for Linux (64 bit)")
* A copy of the MultiMC source (clone it with git)
+* cmake
+* build-essentials
+* zlib (for example, zlib1g-dev)
+* java (for example, openjdk-7-jdk)
+* GL headers (for example, libgl1-mesa-dev)
## Getting set up
-```bash
-git clone git@github.com:MultiMC/MultiMC5.git # get the code
-cd MultiMC5
-git checkout develop
-```
-
-once that is done, do these commands:
-
-```bash
-mkdir build
-cd build
-ccmake ..
-```
-
-A GUI will pop up. press the c key. now set the build prefix. if you are in /home/username/code/MultiMC5/build then put /home/username/code/MultiMC5/build/run as build prefix. if you want you can choose whatever dir you want, but then you need to adjust the path when running it. to edit the value use the up/down keys to select it and hit return to edit it. after you are done hit return again.
-Also adjust the paths to your qt install.
+### Installing dependencies
+Just run `sudo apt-get install <dependency>` for each dependency (other than Qt and the MultiMC source) from above.
-Then hit c and g. If the window stays open (and g has no effect) retry c followed by g. sometimes you need to use c twice.
-If you get an error make sure you have all dependencies installed and configured the paths properly
-
-continue with the following commands:
-
-```bash
-cmake ..
-make
-make translations_target # compiles localization files. you may leave this out if your language is english
-make install
-```
-now you compiled it (hupefully) successfully.
-
-to launch it:
+### Installing Qt
+1. Run the Qt installer
+2. Choose a place to install Qt,
+3. Choose the components you want to install
+ - You need Qt 5.1.1/gcc 64-bit ticked,
+ - You need Tools/Qt Creator ticked,
+ - Other components are selected by default, you can untick them if you don't need them.
+4. Accept the license agreements,
+5. Double check the install details and then click "Install"
+ - Installation can take a very long time, go grab a cup of tea or something and let it work.
-```bash
-cd run # or whereever its stored
-./MultiMC5
-```
+### Loading the project
+1. Open Qt Creator,
+2. Choose File->Open File or Project,
+3. Navigate to the MultiMC5 source folder you cloned and choose CMakeLists.txt,
+4. Read the instructions that just popped up about a build location and choose one,
+5. You should see "Run CMake" in the window,
+ - Make sure that Generator is set to "Unix Generator (Desktop Qt 5.1.1 GCC 64bit)",
+ - Hit the "Run CMake" button,
+ - You'll see warnings and it might not be clear that it succeeded until you scroll to the bottom of the window.
+ - Hit "Finish" if CMake ran successfully.
+6. Cross your fingers and press the Run button (bottom left of Qt Creator)!
+ - If the project builds successfully it will run and the MultiMC5 window will pop up.
-Congrats. Your MMC5 should run
+*These build instructions worked for me (Drayshak) on a fresh Ubuntu 13.10 x64 install. If they don't work for you, let us know on IRC (Esper/#MultiMC)!*
# Windows
@@ -112,4 +104,4 @@ Getting the project to build and run on Windows is easy if you use Qt's IDE, Qt
# OS X
-*There are no build instructions for OS X yet. If you can help with this section please contact us on IRC (Esper/#MultiMC)!* \ No newline at end of file
+*There are no build instructions for OS X yet. If you can help with this section please contact us on IRC (Esper/#MultiMC)!*
diff --git a/MultiMC.cpp b/MultiMC.cpp
index d13d1443..bb65050f 100644
--- a/MultiMC.cpp
+++ b/MultiMC.cpp
@@ -336,6 +336,10 @@ void MultiMC::initGlobalSettings()
QUuid uuid = QUuid::createUuid();
m_settings->set("YggdrasilClientToken", uuid.toString());
}
+
+ // Window state and geometry
+ m_settings->registerSetting(new Setting("MainWindowState", ""));
+ m_settings->registerSetting(new Setting("MainWindowGeometry", ""));
}
void MultiMC::initHttpMetaCache()
@@ -398,6 +402,8 @@ int main_gui(MultiMC &app)
{
// show main window
MainWindow mainWin;
+ mainWin.restoreState(QByteArray::fromBase64(MMC->settings()->get("MainWindowState").toByteArray()));
+ mainWin.restoreGeometry(QByteArray::fromBase64(MMC->settings()->get("MainWindowGeometry").toByteArray()));
mainWin.show();
mainWin.checkSetDefaultJava();
return app.exec();
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index b2fdbe16..00cfacf7 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -449,9 +449,10 @@ void MainWindow::on_actionEditInstMods_triggered()
void MainWindow::closeEvent(QCloseEvent *event)
{
// Save the window state and geometry.
- // TODO: Make this work with the new settings system.
- // settings->getConfig().setValue("MainWindowGeometry", saveGeometry());
- // settings->getConfig().setValue("MainWindowState", saveState());
+
+ MMC->settings()->set("MainWindowState", saveState().toBase64());
+ MMC->settings()->set("MainWindowGeometry", saveGeometry().toBase64());
+
QMainWindow::closeEvent(event);
QApplication::exit();
}