summaryrefslogtreecommitdiffstats
path: root/logic/JavaUtils.h
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-10-06 19:54:52 +0100
committerSky <git@bunnies.cc>2013-10-06 19:54:52 +0100
commit17c98655f86f8ea41c4528e3fc25d12388a36861 (patch)
tree38591551b6bfe792ffd287ec68831b9801e0260e /logic/JavaUtils.h
parentd5e4802adef575d1d2d20a3e6e5addd4b5f4d2ca (diff)
downloadMultiMC-17c98655f86f8ea41c4528e3fc25d12388a36861.tar
MultiMC-17c98655f86f8ea41c4528e3fc25d12388a36861.tar.gz
MultiMC-17c98655f86f8ea41c4528e3fc25d12388a36861.tar.lz
MultiMC-17c98655f86f8ea41c4528e3fc25d12388a36861.tar.xz
MultiMC-17c98655f86f8ea41c4528e3fc25d12388a36861.zip
First draft of multiple Java installation detection on Windows
Diffstat (limited to 'logic/JavaUtils.h')
-rw-r--r--logic/JavaUtils.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/logic/JavaUtils.h b/logic/JavaUtils.h
index fef2a1bf..63daac12 100644
--- a/logic/JavaUtils.h
+++ b/logic/JavaUtils.h
@@ -17,10 +17,28 @@
#include <QStringList>
+#include "osutils.h"
+
+#if WINDOWS
+ #include <windows.h>
+#endif
+
+#define JI_ID 0
+#define JI_ARCH 1
+#define JI_PATH 2
+#define JI_REC 3
+typedef std::tuple<QString, QString, QString, bool> java_install;
+
class JavaUtils
{
public:
JavaUtils();
- QStringList FindJavaPath();
+ std::vector<java_install> FindJavaPaths();
+
+private:
+ std::vector<java_install> GetDefaultJava();
+#if WINDOWS
+ std::vector<java_install> FindJavaFromRegistryKey(DWORD keyType, QString keyName);
+#endif
};