Prepare for rework of instance launch/update
Added missing licenses Added a Java functionality checker (detects 32/64bit java) Refactor of *Update - no longer based on BaseUpdate, but Task directly Fixed runner script to not derp up on 32bit linux. Could add more detection and error reporting there. Resources are now split into graphics and generated. Generated resources are placed in the build tree and included from there. Used the Java checker in the main settings dialog (TODO: instance settings). Partial support for ${arch}-using libraries - both 32 and 64 variants of ${arch} are downloaded.
This commit is contained in:
parent
4124faf474
commit
ca297fca79
@ -12,6 +12,11 @@ SET(CMAKE_AUTOMOC ON)
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
SET(FILES_TO_TRANSLATE )
|
||||
|
||||
######## Set module path ########
|
||||
SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")
|
||||
SET(MMC_SRC "${PROJECT_SOURCE_DIR}")
|
||||
SET(MMC_BIN "${PROJECT_BINARY_DIR}")
|
||||
|
||||
# Output all executables and shared libs in the main build folder, not in subfolders.
|
||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
||||
|
||||
@ -49,8 +54,9 @@ include_directories(${Qt5Widgets_INCLUDE_DIRS})
|
||||
add_subdirectory(depends/quazip)
|
||||
include_directories(depends/quazip)
|
||||
|
||||
# Add the java launcher
|
||||
# Add the java launcher and checker
|
||||
add_subdirectory(depends/launcher)
|
||||
add_subdirectory(depends/javacheck)
|
||||
|
||||
# Add xz decompression
|
||||
add_subdirectory(depends/xz-embedded)
|
||||
@ -84,10 +90,6 @@ IF(${BIGENDIAN})
|
||||
ENDIF(${BIGENDIAN})
|
||||
|
||||
|
||||
######## Set module path ########
|
||||
SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
|
||||
|
||||
|
||||
######## Set version numbers ########
|
||||
SET(MultiMC_VERSION_MAJOR 5)
|
||||
SET(MultiMC_VERSION_MINOR 0)
|
||||
@ -231,8 +233,6 @@ logic/BaseVersion.h
|
||||
logic/MinecraftVersion.h
|
||||
logic/InstanceFactory.h
|
||||
logic/InstanceFactory.cpp
|
||||
logic/BaseUpdate.h
|
||||
logic/BaseUpdate.cpp
|
||||
logic/BaseInstance.h
|
||||
logic/BaseInstance.cpp
|
||||
logic/BaseInstance_p.h
|
||||
@ -328,6 +328,8 @@ logic/tasks/Task.h
|
||||
logic/tasks/Task.cpp
|
||||
|
||||
# Utilities
|
||||
logic/JavaChecker.h
|
||||
logic/JavaChecker.cpp
|
||||
logic/JavaUtils.h
|
||||
logic/JavaUtils.cpp
|
||||
logic/NagUtils.h
|
||||
@ -397,20 +399,24 @@ IF(WIN32)
|
||||
ENDIF(WIN32)
|
||||
|
||||
# Tell CMake that MultiMCLauncher.jar is generated.
|
||||
SET_SOURCE_FILES_PROPERTIES(resources/MultiMCLauncher.jar GENERATED)
|
||||
SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/depends/launcher/MultiMCLauncher.jar GENERATED)
|
||||
SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/depends/javacheck/JavaCheck.jar GENERATED)
|
||||
|
||||
# Qt 5 stuff
|
||||
QT5_WRAP_UI(MULTIMC_UI ${MULTIMC_UIS})
|
||||
QT5_ADD_RESOURCES(MULTIMC_QRC multimc.qrc)
|
||||
CONFIGURE_FILE(generated.qrc.in generated.qrc)
|
||||
QT5_ADD_RESOURCES(GENERATED_QRC ${CMAKE_CURRENT_BINARY_DIR}/generated.qrc)
|
||||
QT5_ADD_RESOURCES(GRAPHICS_QRC graphics.qrc)
|
||||
|
||||
|
||||
# Add executable
|
||||
ADD_EXECUTABLE(MultiMC MACOSX_BUNDLE WIN32
|
||||
${MULTIMC_SOURCES} ${MULTIMC_UI} ${MULTIMC_QRC} ${MULTIMC_RCS})
|
||||
${MULTIMC_SOURCES} ${MULTIMC_UI} ${GRAPHICS_QRC} ${GENERATED_QRC} ${MULTIMC_RCS})
|
||||
|
||||
# Link
|
||||
TARGET_LINK_LIBRARIES(MultiMC xz-embedded unpack200 quazip libUtil libSettings libGroupView ${MultiMC_LINK_ADDITIONAL_LIBS})
|
||||
QT5_USE_MODULES(MultiMC Core Widgets Network Xml ${MultiMC_QT_ADDITIONAL_MODULES})
|
||||
ADD_DEPENDENCIES(MultiMC MultiMCLauncher)
|
||||
ADD_DEPENDENCIES(MultiMC MultiMCLauncher JavaCheck)
|
||||
|
||||
option(BUILD_KEYRING_TEST "Build the simple keyring test binary" OFF)
|
||||
IF(BUILD_KEYRING_TEST)
|
||||
@ -568,3 +574,5 @@ endif (UPDATE_TRANSLATIONS)
|
||||
add_custom_target (translations DEPENDS ${QM_FILES})
|
||||
|
||||
install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/translations)
|
||||
|
||||
|
||||
|
14
depends/javacheck/CMakeLists.txt
Normal file
14
depends/javacheck/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
||||
cmake_minimum_required(VERSION 2.8.6)
|
||||
project(launcher Java)
|
||||
find_package(Java 1.6 REQUIRED COMPONENTS Development)
|
||||
|
||||
include(UseJava)
|
||||
set(CMAKE_JAVA_JAR_ENTRY_POINT JavaCheck)
|
||||
set(CMAKE_JAVA_COMPILE_FLAGS -target 1.6 -source 1.6 -Xlint:deprecation -Xlint:unchecked)
|
||||
#set(CMAKE_JAVA_TARGET_OUTPUT_DIR "${PROJECT_SOURCE_DIR}/../../resources")
|
||||
|
||||
set(SRC
|
||||
JavaCheck.java
|
||||
)
|
||||
|
||||
add_jar(JavaCheck ${SRC})
|
14
depends/javacheck/JavaCheck.java
Normal file
14
depends/javacheck/JavaCheck.java
Normal file
@ -0,0 +1,14 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
public class JavaCheck
|
||||
{
|
||||
private static final String key = "os.arch";
|
||||
public static void main (String [] args)
|
||||
{
|
||||
String property = System.getProperty(key);
|
||||
System.out.println(key + "=" + property);
|
||||
if (property != null)
|
||||
System.exit(0);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
@ -1,13 +1,11 @@
|
||||
cmake_minimum_required(VERSION 2.8.6)
|
||||
project(launcher Java)
|
||||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
|
||||
find_package(Java 1.6 REQUIRED COMPONENTS Development)
|
||||
|
||||
|
||||
include(UseJava)
|
||||
set(CMAKE_JAVA_JAR_ENTRY_POINT MultiMCLauncher)
|
||||
set(CMAKE_JAVA_COMPILE_FLAGS -target 1.6 -source 1.6 -Xlint:deprecation -Xlint:unchecked)
|
||||
set(CMAKE_JAVA_TARGET_OUTPUT_DIR "${PROJECT_SOURCE_DIR}/../../resources")
|
||||
#set(CMAKE_JAVA_TARGET_OUTPUT_DIR "${PROJECT_SOURCE_DIR}/../../resources")
|
||||
|
||||
set(SRC
|
||||
MultiMCLauncher.java
|
||||
|
6
generated.qrc.in
Normal file
6
generated.qrc.in
Normal file
@ -0,0 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/java">
|
||||
<file alias="launcher.jar">@MMC_BIN@/depends/launcher/MultiMCLauncher.jar</file>
|
||||
<file alias="checker.jar">@MMC_BIN@/depends/javacheck/JavaCheck.jar</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -40,9 +40,6 @@
|
||||
<file alias="stone">resources/icons/instances/stone.png</file>
|
||||
<file alias="tnt">resources/icons/instances/tnt.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/launcher">
|
||||
<file alias="launcher.jar">resources/MultiMCLauncher.jar</file>
|
||||
</qresource>
|
||||
<qresource prefix="/icons/multimc">
|
||||
<file alias="scalable/apps/multimc.svg">resources/icons/multimc.svg</file>
|
||||
<file alias="index.theme">resources/XdgIcon.theme</file>
|
@ -635,7 +635,7 @@ void MainWindow::onLoginComplete()
|
||||
LoginTask *task = (LoginTask *)QObject::sender();
|
||||
m_activeLogin = task->getResult();
|
||||
|
||||
BaseUpdate *updateTask = m_activeInst->doUpdate();
|
||||
Task *updateTask = m_activeInst->doUpdate();
|
||||
if (!updateTask)
|
||||
{
|
||||
launchInstance(m_activeInst, m_activeLogin);
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>450</width>
|
||||
<height>429</height>
|
||||
<width>637</width>
|
||||
<height>579</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
@ -59,7 +59,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../multimc.qrc">:/icons/multimc/scalable/apps/multimc.svg</pixmap>
|
||||
<pixmap resource="../../graphics.qrc">:/icons/multimc/scalable/apps/multimc.svg</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -100,8 +100,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>432</width>
|
||||
<height>179</height>
|
||||
<width>619</width>
|
||||
<height>329</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@ -159,8 +159,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>98</width>
|
||||
<height>120</height>
|
||||
<width>619</width>
|
||||
<height>329</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@ -203,8 +203,8 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>98</width>
|
||||
<height>88</height>
|
||||
<width>619</width>
|
||||
<height>329</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@ -227,6 +227,7 @@ p, li { white-space: pre-wrap; }
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Bitstream Vera Sans'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt; font-weight:600;">MultiMC</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Copyright 2012 MultiMC Contributors</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">you may not use this file except in compliance with the License.</span></p>
|
||||
@ -240,31 +241,124 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">See the License for the specific language governing permissions and</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">limitations under the License.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">MultiMC uses QSLog, </span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Copyright (c) 2010, Razvan Petru</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">All rights reserved.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Redistribution and use in source and binary forms, with or without modification,</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">are permitted provided that the following conditions are met:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">* Redistributions of source code must retain the above copyright notice, this</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> list of conditions and the following disclaimer.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">* Redistributions in binary form must reproduce the above copyright notice, this</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> list of conditions and the following disclaimer in the documentation and/or other</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> materials provided with the distribution.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">* The name of the contributors may not be used to endorse or promote products</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> derived from this software without specific prior written permission.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">OF THE POSSIBILITY OF SUCH DAMAGE.</span></p></body></html></string>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt; font-weight:600;">QSLog</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright (c) 2010, Razvan Petru</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">All rights reserved.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Redistribution and use in source and binary forms, with or without modification,</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">are permitted provided that the following conditions are met:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">* Redistributions of source code must retain the above copyright notice, this</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> list of conditions and the following disclaimer.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">* Redistributions in binary form must reproduce the above copyright notice, this</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> list of conditions and the following disclaimer in the documentation and/or other</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> materials provided with the distribution.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">* The name of the contributors may not be used to endorse or promote products</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> derived from this software without specific prior written permission.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">OF THE POSSIBILITY OF SUCH DAMAGE.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt; font-weight:600;">Group View (instance view)</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">/**</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * Copyright (C) 2007 Rafael Fernández López &lt;ereslibre@kde.org&gt;</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * Copyright (C) 2007 John Tapsell &lt;tapsell@kde.org&gt;</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> *</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * This library is free software; you can redistribute it and/or</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * modify it under the terms of the GNU Library General Public</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * License as published by the Free Software Foundation; either</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * version 2 of the License, or (at your option) any later version.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> *</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * This library is distributed in the hope that it will be useful,</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * Library General Public License for more details.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> *</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * You should have received a copy of the GNU Library General Public License</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * along with this library; see the file COPYING.LIB. If not, write to</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * Boston, MA 02110-1301, USA.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> */</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt; font-weight:600;">Pack200</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">The GNU General Public License (GPL)</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Version 2, June 1991</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">+ &quot;CLASSPATH&quot; EXCEPTION TO THE GPL</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Certain source files distributed by Oracle America and/or its affiliates are</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">subject to the following clarification and special exception to the GPL, but</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">only where Oracle has expressly included in the particular source file's header</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">the words &quot;Oracle designates this particular file as subject to the &quot;Classpath&quot;</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">exception as provided by Oracle in the LICENSE file that accompanied this code.&quot;</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Linking this library statically or dynamically with other modules is making</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> a combined work based on this library. Thus, the terms and conditions of</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> the GNU General Public License cover the whole combination.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> As a special exception, the copyright holders of this library give you</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> permission to link this library with independent modules to produce an</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> executable, regardless of the license terms of these independent modules,</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> and to copy and distribute the resulting executable under terms of your</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> choice, provided that you also meet, for each linked independent module,</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> the terms and conditions of the license of that module. An independent</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> module is a module which is not derived from or based on this library. If</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> you modify this library, you may extend this exception to your version of</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> the library, but you are not obligated to do so. If you do not wish to do</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> so, delete this exception statement from your version.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt; font-weight:600;">Quazip</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright (C) 2005-2011 Sergey A. Tachenov</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">This program is free software; you can redistribute it and/or modify it</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">under the terms of the GNU Lesser General Public License as published by</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">the Free Software Foundation; either version 2 of the License, or (at</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">your option) any later version.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">This program is distributed in the hope that it will be useful, but</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">WITHOUT ANY WARRANTY; without even the implied warranty of</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">General Public License for more details.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">You should have received a copy of the GNU Lesser General Public License</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">along with this program; if not, write to the Free Software Foundation,</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">See COPYING file for the full LGPL text.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Original ZIP package is copyrighted by Gilles Vollant, see</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">quazip/(un)zip.h files for details, basically it's zlib license.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt; font-weight:600;">xz-minidec</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">/*</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * XZ decompressor</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> *</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * Authors: Lasse Collin &lt;lasse.collin@tukaani.org&gt;</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * Igor Pavlov &lt;http://7-zip.org/&gt;</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> *</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * This file has been put into the public domain.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> * You can do whatever you want with this file.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> */</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -309,8 +403,8 @@ p, li { white-space: pre-wrap; }
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../multimc.qrc"/>
|
||||
<include location="../../multimc.qrc"/>
|
||||
<include location="../../graphics.qrc"/>
|
||||
<include location="../../graphics.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<string>Copy Instance</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../../multimc.qrc">
|
||||
<iconset resource="../../graphics.qrc">
|
||||
<normaloff>:/icons/toolbar/copy</normaloff>:/icons/toolbar/copy</iconset>
|
||||
</property>
|
||||
<property name="modal">
|
||||
@ -42,7 +42,7 @@
|
||||
<item>
|
||||
<widget class="QToolButton" name="iconButton">
|
||||
<property name="icon">
|
||||
<iconset resource="../../multimc.qrc">
|
||||
<iconset resource="../../graphics.qrc">
|
||||
<normaloff>:/icons/instances/infinity</normaloff>:/icons/instances/infinity</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@ -95,7 +95,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../multimc.qrc"/>
|
||||
<include location="../../graphics.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
|
@ -50,7 +50,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../multimc.qrc">:/icons/instances/steve</pixmap>
|
||||
<pixmap resource="../../graphics.qrc">:/icons/instances/steve</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
@ -146,7 +146,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../multimc.qrc"/>
|
||||
<include location="../../graphics.qrc"/>
|
||||
<include location="../multimc.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<string>New Instance</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../../multimc.qrc">
|
||||
<iconset resource="../../graphics.qrc">
|
||||
<normaloff>:/icons/toolbar/new</normaloff>:/icons/toolbar/new</iconset>
|
||||
</property>
|
||||
<property name="modal">
|
||||
@ -42,7 +42,7 @@
|
||||
<item>
|
||||
<widget class="QToolButton" name="iconButton">
|
||||
<property name="icon">
|
||||
<iconset resource="../../multimc.qrc">
|
||||
<iconset resource="../../graphics.qrc">
|
||||
<normaloff>:/icons/instances/infinity</normaloff>:/icons/instances/infinity</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@ -140,7 +140,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../multimc.qrc"/>
|
||||
<include location="../../graphics.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "logic/JavaUtils.h"
|
||||
#include "logic/NagUtils.h"
|
||||
#include "logic/lists/JavaVersionList.h"
|
||||
#include <logic/JavaChecker.h>
|
||||
|
||||
#include <settingsobject.h>
|
||||
#include <pathutils.h>
|
||||
@ -98,12 +99,6 @@ void SettingsDialog::on_lwjglDirBrowseBtn_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsDialog::on_compatModeCheckBox_clicked(bool checked)
|
||||
{
|
||||
Q_UNUSED(checked);
|
||||
updateCheckboxStuff();
|
||||
}
|
||||
|
||||
void SettingsDialog::on_maximizedCheckBox_clicked(bool checked)
|
||||
{
|
||||
Q_UNUSED(checked);
|
||||
@ -235,7 +230,7 @@ void SettingsDialog::loadSettings(SettingsObject *s)
|
||||
ui->postExitCmdTextBox->setText(s->get("PostExitCommand").toString());
|
||||
}
|
||||
|
||||
void SettingsDialog::on_pushButton_clicked()
|
||||
void SettingsDialog::on_javaDetectBtn_clicked()
|
||||
{
|
||||
JavaVersionPtr java;
|
||||
|
||||
@ -250,7 +245,7 @@ void SettingsDialog::on_pushButton_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsDialog::on_btnBrowse_clicked()
|
||||
void SettingsDialog::on_javaBrowseBtn_clicked()
|
||||
{
|
||||
QString dir = QFileDialog::getOpenFileName(this, tr("Find Java executable"));
|
||||
if (!dir.isNull())
|
||||
@ -258,3 +253,32 @@ void SettingsDialog::on_btnBrowse_clicked()
|
||||
ui->javaPathTextBox->setText(dir);
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsDialog::on_javaTestBtn_clicked()
|
||||
{
|
||||
checker.reset(new JavaChecker());
|
||||
connect(checker.get(), SIGNAL(checkFinished(JavaCheckResult)), this,
|
||||
SLOT(checkFinished(JavaCheckResult)));
|
||||
checker->performCheck(ui->javaPathTextBox->text());
|
||||
}
|
||||
|
||||
void SettingsDialog::checkFinished(JavaCheckResult result)
|
||||
{
|
||||
if (result.valid)
|
||||
{
|
||||
QString text;
|
||||
text += "Java test succeeded!\n";
|
||||
if (result.is_64bit)
|
||||
text += "Using 64bit java.\n";
|
||||
text += "\n";
|
||||
text += "Platform reported: " + result.realPlatform;
|
||||
QMessageBox::information(this, tr("Java test success"), text);
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(
|
||||
this, tr("Java test failure"),
|
||||
tr("The specified java binary didn't work. You should use the auto-detect feature, "
|
||||
"or set the path to the java executable."));
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <QDialog>
|
||||
|
||||
#include "logic/JavaChecker.h"
|
||||
|
||||
class SettingsObject;
|
||||
|
||||
namespace Ui
|
||||
@ -48,16 +51,18 @@ slots:
|
||||
|
||||
void on_lwjglDirBrowseBtn_clicked();
|
||||
|
||||
void on_compatModeCheckBox_clicked(bool checked);
|
||||
|
||||
void on_maximizedCheckBox_clicked(bool checked);
|
||||
|
||||
void on_buttonBox_accepted();
|
||||
|
||||
void on_pushButton_clicked();
|
||||
void on_javaDetectBtn_clicked();
|
||||
|
||||
void on_btnBrowse_clicked();
|
||||
void on_javaTestBtn_clicked();
|
||||
|
||||
void on_javaBrowseBtn_clicked();
|
||||
|
||||
void checkFinished(JavaCheckResult result);
|
||||
private:
|
||||
Ui::SettingsDialog *ui;
|
||||
std::shared_ptr<JavaChecker> checker;
|
||||
};
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>502</width>
|
||||
<width>526</width>
|
||||
<height>599</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -20,7 +20,7 @@
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../../multimc.qrc">
|
||||
<iconset resource="../../graphics.qrc">
|
||||
<normaloff>:/icons/toolbar/settings</normaloff>:/icons/toolbar/settings</iconset>
|
||||
</property>
|
||||
<property name="modal">
|
||||
@ -407,8 +407,27 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="btnBrowse">
|
||||
<item row="0" column="1" colspan="5">
|
||||
<widget class="QLineEdit" name="javaPathTextBox"/>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="5">
|
||||
<widget class="QLineEdit" name="jvmArgsTextBox"/>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QPushButton" name="javaTestBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Test</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QPushButton" name="javaBrowseBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
@ -420,11 +439,8 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="3">
|
||||
<widget class="QLineEdit" name="javaPathTextBox"/>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="javaDetectBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
@ -436,9 +452,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="3">
|
||||
<widget class="QLineEdit" name="jvmArgsTextBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -528,14 +541,12 @@
|
||||
<tabstop>maxMemSpinBox</tabstop>
|
||||
<tabstop>permGenSpinBox</tabstop>
|
||||
<tabstop>javaPathTextBox</tabstop>
|
||||
<tabstop>pushButton</tabstop>
|
||||
<tabstop>btnBrowse</tabstop>
|
||||
<tabstop>jvmArgsTextBox</tabstop>
|
||||
<tabstop>preLaunchCmdTextBox</tabstop>
|
||||
<tabstop>postExitCmdTextBox</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../../multimc.qrc"/>
|
||||
<include location="../../graphics.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "net/LoginTask.h"
|
||||
|
||||
class QDialog;
|
||||
class BaseUpdate;
|
||||
class Task;
|
||||
class MinecraftProcess;
|
||||
class OneSixUpdate;
|
||||
class InstanceList;
|
||||
@ -151,7 +151,7 @@ public:
|
||||
virtual SettingsObject &settings() const;
|
||||
|
||||
/// returns a valid update task if update is needed, NULL otherwise
|
||||
virtual BaseUpdate *doUpdate() = 0;
|
||||
virtual Task *doUpdate() = 0;
|
||||
|
||||
/// returns a valid minecraft process, ready for launch
|
||||
virtual MinecraftProcess *prepareForLaunch(LoginResponse response) = 0;
|
||||
|
@ -1,26 +0,0 @@
|
||||
/* Copyright 2013 MultiMC Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "BaseUpdate.h"
|
||||
|
||||
BaseUpdate::BaseUpdate(BaseInstance *inst, QObject *parent) : Task(parent)
|
||||
{
|
||||
m_inst = inst;
|
||||
}
|
||||
|
||||
void BaseUpdate::updateDownloadProgress(qint64 current, qint64 total)
|
||||
{
|
||||
emit progress(current, total);
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
/* Copyright 2013 MultiMC Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
#include <QUrl>
|
||||
|
||||
#include "net/NetJob.h"
|
||||
|
||||
#include "tasks/Task.h"
|
||||
|
||||
class MinecraftVersion;
|
||||
class BaseInstance;
|
||||
|
||||
/*!
|
||||
* The game update task is the task that handles downloading instances' files.
|
||||
*/
|
||||
class BaseUpdate : public Task
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BaseUpdate(BaseInstance *inst, QObject *parent = 0);
|
||||
|
||||
virtual void executeTask() = 0;
|
||||
|
||||
protected
|
||||
slots:
|
||||
// virtual void error(const QString &msg);
|
||||
void updateDownloadProgress(qint64 current, qint64 total);
|
||||
|
||||
protected:
|
||||
BaseInstance *m_inst;
|
||||
};
|
89
logic/JavaChecker.cpp
Normal file
89
logic/JavaChecker.cpp
Normal file
@ -0,0 +1,89 @@
|
||||
#include "JavaChecker.h"
|
||||
#include <QFile>
|
||||
#include <QProcess>
|
||||
|
||||
#define CHECKER_FILE "JavaChecker.jar"
|
||||
|
||||
JavaChecker::JavaChecker(QObject *parent) : QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
int JavaChecker::performCheck(QString path)
|
||||
{
|
||||
if(QFile::exists(CHECKER_FILE))
|
||||
{
|
||||
QFile::remove(CHECKER_FILE);
|
||||
}
|
||||
// extract the checker
|
||||
QFile(":/java/checker.jar").copy(CHECKER_FILE);
|
||||
|
||||
QStringList args = {"-jar", CHECKER_FILE};
|
||||
|
||||
process.reset(new QProcess());
|
||||
process->setArguments(args);
|
||||
process->setProgram(path);
|
||||
process->setProcessChannelMode(QProcess::SeparateChannels);
|
||||
|
||||
connect(process.get(), SIGNAL(finished(int, QProcess::ExitStatus)), this,
|
||||
SLOT(finished(int, QProcess::ExitStatus)));
|
||||
connect(process.get(), SIGNAL(error(QProcess::ProcessError)), this,
|
||||
SLOT(error(QProcess::ProcessError)));
|
||||
connect(&killTimer, SIGNAL(timeout()), SLOT(timeout()));
|
||||
killTimer.setSingleShot(true);
|
||||
killTimer.start(5000);
|
||||
process->start();
|
||||
}
|
||||
|
||||
void JavaChecker::finished(int exitcode, QProcess::ExitStatus status)
|
||||
{
|
||||
killTimer.stop();
|
||||
QProcessPtr _process;
|
||||
_process.swap(process);
|
||||
|
||||
if (status == QProcess::CrashExit || exitcode == 1)
|
||||
{
|
||||
emit checkFinished({});
|
||||
return;
|
||||
}
|
||||
|
||||
QString p_stdout = _process->readAllStandardOutput();
|
||||
auto parts = p_stdout.split('=', QString::SkipEmptyParts);
|
||||
if (parts.size() != 2 || parts[0] != "os.arch")
|
||||
{
|
||||
emit checkFinished({});
|
||||
return;
|
||||
}
|
||||
|
||||
auto os_arch = parts[1].remove('\n').remove('\r');
|
||||
bool is_64 = os_arch == "x86_64" || os_arch == "amd64";
|
||||
|
||||
JavaCheckResult result;
|
||||
{
|
||||
result.valid = true;
|
||||
result.is_64bit = is_64;
|
||||
result.mojangPlatform = is_64 ? "64" : "32";
|
||||
result.realPlatform = os_arch;
|
||||
}
|
||||
emit checkFinished(result);
|
||||
}
|
||||
|
||||
void JavaChecker::error(QProcess::ProcessError err)
|
||||
{
|
||||
if(err == QProcess::FailedToStart)
|
||||
{
|
||||
killTimer.stop();
|
||||
emit checkFinished({});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void JavaChecker::timeout()
|
||||
{
|
||||
// NO MERCY. NO ABUSE.
|
||||
if(process)
|
||||
{
|
||||
process->kill();
|
||||
process.reset();
|
||||
emit checkFinished({});
|
||||
}
|
||||
}
|
32
logic/JavaChecker.h
Normal file
32
logic/JavaChecker.h
Normal file
@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include <QProcess>
|
||||
#include <QTimer>
|
||||
#include <memory>
|
||||
|
||||
struct JavaCheckResult
|
||||
{
|
||||
QString mojangPlatform;
|
||||
QString realPlatform;
|
||||
bool valid = false;
|
||||
bool is_64bit = false;
|
||||
};
|
||||
typedef std::shared_ptr<QProcess> QProcessPtr;
|
||||
|
||||
class JavaChecker : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit JavaChecker(QObject *parent = 0);
|
||||
int performCheck(QString path);
|
||||
|
||||
signals:
|
||||
void checkFinished(JavaCheckResult result);
|
||||
private:
|
||||
QProcessPtr process;
|
||||
QTimer killTimer;
|
||||
public
|
||||
slots:
|
||||
void timeout();
|
||||
void finished(int exitcode, QProcess::ExitStatus);
|
||||
void error(QProcess::ProcessError);
|
||||
};
|
@ -33,7 +33,6 @@ public:
|
||||
|
||||
QList<JavaVersionPtr> FindJavaPaths();
|
||||
JavaVersionPtr GetDefaultJava();
|
||||
|
||||
private:
|
||||
|
||||
#if WINDOWS
|
||||
|
@ -44,7 +44,7 @@ LegacyInstance::LegacyInstance(const QString &rootDir, SettingsObject *settings,
|
||||
settings->registerSetting(new Setting("IntendedJarVersion", ""));
|
||||
}
|
||||
|
||||
BaseUpdate *LegacyInstance::doUpdate()
|
||||
Task *LegacyInstance::doUpdate()
|
||||
{
|
||||
auto list = jarModList();
|
||||
return new LegacyUpdate(this, this);
|
||||
@ -59,7 +59,7 @@ MinecraftProcess *LegacyInstance::prepareForLaunch(LoginResponse response)
|
||||
pixmap.save(PathCombine(minecraftRoot(), "icon.png"), "PNG");
|
||||
|
||||
// extract the legacy launcher
|
||||
QFile(":/launcher/launcher.jar").copy(PathCombine(minecraftRoot(), LAUNCHER_FILE));
|
||||
QFile(":/java/launcher.jar").copy(PathCombine(minecraftRoot(), LAUNCHER_FILE));
|
||||
|
||||
// set the process arguments
|
||||
{
|
||||
@ -108,11 +108,11 @@ MinecraftProcess *LegacyInstance::prepareForLaunch(LoginResponse response)
|
||||
args << windowTitle;
|
||||
args << windowSize;
|
||||
args << lwjgl;
|
||||
proc->setMinecraftArguments(args);
|
||||
proc->setArguments(args);
|
||||
}
|
||||
|
||||
// set the process work path
|
||||
proc->setMinecraftWorkdir(minecraftRoot());
|
||||
proc->setWorkdir(minecraftRoot());
|
||||
|
||||
return proc;
|
||||
}
|
||||
@ -227,56 +227,18 @@ QString LegacyInstance::instanceConfigFolder() const
|
||||
return PathCombine(minecraftRoot(), "config");
|
||||
}
|
||||
|
||||
/*
|
||||
bool LegacyInstance::shouldUpdateCurrentVersion() const
|
||||
{
|
||||
QFileInfo jar(runnableJar());
|
||||
return jar.lastModified().toUTC().toMSecsSinceEpoch() != lastCurrentVersionUpdate();
|
||||
}
|
||||
|
||||
void LegacyInstance::updateCurrentVersion(bool keepCurrent)
|
||||
{
|
||||
QFileInfo jar(runnableJar());
|
||||
|
||||
if(!jar.exists())
|
||||
{
|
||||
setLastCurrentVersionUpdate(0);
|
||||
setCurrentVersionId("Unknown");
|
||||
return;
|
||||
}
|
||||
|
||||
qint64 time = jar.lastModified().toUTC().toMSecsSinceEpoch();
|
||||
|
||||
setLastCurrentVersionUpdate(time);
|
||||
if (!keepCurrent)
|
||||
{
|
||||
// TODO: Implement GetMinecraftJarVersion function.
|
||||
QString newVersion =
|
||||
"Unknown";//javautils::GetMinecraftJarVersion(jar.absoluteFilePath());
|
||||
setCurrentVersionId(newVersion);
|
||||
}
|
||||
}
|
||||
qint64 LegacyInstance::lastCurrentVersionUpdate() const
|
||||
{
|
||||
I_D(LegacyInstance);
|
||||
return d->m_settings->get ( "lastVersionUpdate" ).value<qint64>();
|
||||
}
|
||||
void LegacyInstance::setLastCurrentVersionUpdate ( qint64 val )
|
||||
{
|
||||
I_D(LegacyInstance);
|
||||
d->m_settings->set ( "lastVersionUpdate", val );
|
||||
}
|
||||
*/
|
||||
bool LegacyInstance::shouldRebuild() const
|
||||
{
|
||||
I_D(LegacyInstance);
|
||||
return d->m_settings->get("NeedsRebuild").toBool();
|
||||
}
|
||||
|
||||
void LegacyInstance::setShouldRebuild(bool val)
|
||||
{
|
||||
I_D(LegacyInstance);
|
||||
d->m_settings->set("NeedsRebuild", val);
|
||||
}
|
||||
|
||||
QString LegacyInstance::currentVersionId() const
|
||||
{
|
||||
I_D(LegacyInstance);
|
||||
@ -294,22 +256,26 @@ QString LegacyInstance::lwjglVersion() const
|
||||
I_D(LegacyInstance);
|
||||
return d->m_settings->get("LwjglVersion").toString();
|
||||
}
|
||||
|
||||
void LegacyInstance::setLWJGLVersion(QString val)
|
||||
{
|
||||
I_D(LegacyInstance);
|
||||
d->m_settings->set("LwjglVersion", val);
|
||||
}
|
||||
|
||||
QString LegacyInstance::intendedVersionId() const
|
||||
{
|
||||
I_D(LegacyInstance);
|
||||
return d->m_settings->get("IntendedJarVersion").toString();
|
||||
}
|
||||
|
||||
bool LegacyInstance::setIntendedVersionId(QString version)
|
||||
{
|
||||
settings().set("IntendedJarVersion", version);
|
||||
setShouldUpdate(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LegacyInstance::shouldUpdate() const
|
||||
{
|
||||
I_D(LegacyInstance);
|
||||
@ -320,6 +286,7 @@ bool LegacyInstance::shouldUpdate() const
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void LegacyInstance::setShouldUpdate(bool val)
|
||||
{
|
||||
settings().set("ShouldUpdate", val);
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "BaseInstance.h"
|
||||
|
||||
class ModList;
|
||||
class BaseUpdate;
|
||||
class Task;
|
||||
|
||||
class LegacyInstance : public BaseInstance
|
||||
{
|
||||
@ -78,7 +78,7 @@ public:
|
||||
|
||||
virtual bool shouldUpdate() const;
|
||||
virtual void setShouldUpdate(bool val);
|
||||
virtual BaseUpdate *doUpdate();
|
||||
virtual Task *doUpdate();
|
||||
|
||||
virtual MinecraftProcess *prepareForLaunch(LoginResponse response);
|
||||
virtual void cleanupAfterRun();
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <JlCompress.h>
|
||||
#include "logger/QsLog.h"
|
||||
|
||||
LegacyUpdate::LegacyUpdate(BaseInstance *inst, QObject *parent) : BaseUpdate(inst, parent)
|
||||
LegacyUpdate::LegacyUpdate(BaseInstance *inst, QObject *parent) : Task(parent), m_inst(inst)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -21,14 +21,13 @@
|
||||
|
||||
#include "logic/net/NetJob.h"
|
||||
#include "logic/tasks/Task.h"
|
||||
#include "logic/BaseUpdate.h"
|
||||
|
||||
class MinecraftVersion;
|
||||
class BaseInstance;
|
||||
class QuaZip;
|
||||
class Mod;
|
||||
|
||||
class LegacyUpdate : public BaseUpdate
|
||||
class LegacyUpdate : public Task
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -72,4 +71,5 @@ private:
|
||||
|
||||
private:
|
||||
NetJobPtr legacyDownloadJob;
|
||||
BaseInstance *m_inst;
|
||||
};
|
||||
|
@ -59,12 +59,12 @@ MinecraftProcess::MinecraftProcess(BaseInstance *inst) : m_instance(inst)
|
||||
connect(this, SIGNAL(readyReadStandardOutput()), SLOT(on_stdOut()));
|
||||
}
|
||||
|
||||
void MinecraftProcess::setMinecraftArguments(QStringList args)
|
||||
void MinecraftProcess::setArguments(QStringList args)
|
||||
{
|
||||
m_args = args;
|
||||
}
|
||||
|
||||
void MinecraftProcess::setMinecraftWorkdir(QString path)
|
||||
void MinecraftProcess::setWorkdir(QString path)
|
||||
{
|
||||
QDir mcDir(path);
|
||||
this->setWorkingDirectory(mcDir.absolutePath());
|
||||
|
@ -63,9 +63,9 @@ public:
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
void setMinecraftWorkdir(QString path);
|
||||
void setWorkdir(QString path);
|
||||
|
||||
void setMinecraftArguments(QStringList args);
|
||||
void setArguments(QStringList args);
|
||||
|
||||
void killMinecraft();
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "OneSixUpdate.h"
|
||||
#include "MinecraftProcess.h"
|
||||
#include "OneSixVersion.h"
|
||||
#include "JavaChecker.h"
|
||||
|
||||
#include <setting.h>
|
||||
#include <pathutils.h>
|
||||
@ -36,7 +37,7 @@ OneSixInstance::OneSixInstance(const QString &rootDir, SettingsObject *setting_o
|
||||
reloadFullVersion();
|
||||
}
|
||||
|
||||
BaseUpdate *OneSixInstance::doUpdate()
|
||||
Task *OneSixInstance::doUpdate()
|
||||
{
|
||||
return new OneSixUpdate(this);
|
||||
}
|
||||
@ -122,6 +123,11 @@ MinecraftProcess *OneSixInstance::prepareForLaunch(LoginResponse response)
|
||||
|
||||
for (auto lib : libs_to_extract)
|
||||
{
|
||||
QString storage = lib->storagePath();
|
||||
if(storage.contains("${arch}"))
|
||||
{
|
||||
storage.replace("${arch}", "64");
|
||||
}
|
||||
QString path = "libraries/" + lib->storagePath();
|
||||
QLOG_INFO() << "Will extract " << path.toLocal8Bit();
|
||||
if (JlCompress::extractWithExceptions(path, natives_dir_raw, lib->extract_excludes)
|
||||
@ -188,8 +194,8 @@ MinecraftProcess *OneSixInstance::prepareForLaunch(LoginResponse response)
|
||||
|
||||
// create the process and set its parameters
|
||||
MinecraftProcess *proc = new MinecraftProcess(this);
|
||||
proc->setMinecraftArguments(args);
|
||||
proc->setMinecraftWorkdir(minecraftRoot());
|
||||
proc->setArguments(args);
|
||||
proc->setWorkdir(minecraftRoot());
|
||||
return proc;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "BaseInstance.h"
|
||||
|
||||
class OneSixVersion;
|
||||
class BaseUpdate;
|
||||
class Task;
|
||||
class ModList;
|
||||
|
||||
class OneSixInstance : public BaseInstance
|
||||
@ -39,7 +39,7 @@ public:
|
||||
QString loaderModsDir() const;
|
||||
virtual QString instanceConfigFolder() const;
|
||||
|
||||
virtual BaseUpdate *doUpdate();
|
||||
virtual Task *doUpdate();
|
||||
virtual MinecraftProcess *prepareForLaunch(LoginResponse response);
|
||||
virtual void cleanupAfterRun();
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
#include "pathutils.h"
|
||||
|
||||
OneSixUpdate::OneSixUpdate(BaseInstance *inst, QObject *parent) : BaseUpdate(inst, parent)
|
||||
OneSixUpdate::OneSixUpdate(BaseInstance *inst, QObject *parent) : Task(parent), m_inst(inst)
|
||||
{
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ void OneSixUpdate::jarlibStart()
|
||||
bool successful = inst->reloadFullVersion();
|
||||
if (!successful)
|
||||
{
|
||||
emitFailed("Failed to load the version description file (version.json). It might be "
|
||||
emitFailed("Failed to load the version description file. It might be "
|
||||
"corrupted, missing or simply too new.");
|
||||
return;
|
||||
}
|
||||
@ -170,16 +170,36 @@ void OneSixUpdate::jarlibStart()
|
||||
{
|
||||
if (lib->hint() == "local")
|
||||
continue;
|
||||
auto entry = metacache->resolveEntry("libraries", lib->storagePath());
|
||||
QString storage = lib->storagePath();
|
||||
QString dl = lib->downloadUrl();
|
||||
if (lib->isNative() && storage.contains("${arch}"))
|
||||
{
|
||||
auto storage64 = storage, storage32 = storage;
|
||||
auto dl64 = dl, dl32 = dl;
|
||||
storage64.replace("${arch}", "64");
|
||||
storage32.replace("${arch}", "32");
|
||||
dl32.replace("${arch}", "32");
|
||||
dl64.replace("${arch}", "64");
|
||||
|
||||
auto entry64 = metacache->resolveEntry("libraries", storage64);
|
||||
if (entry64->stale)
|
||||
jarlibDownloadJob->addNetAction(CacheDownload::make(dl64, entry64));
|
||||
|
||||
auto entry32 = metacache->resolveEntry("libraries", storage32);
|
||||
if (entry32->stale)
|
||||
jarlibDownloadJob->addNetAction(CacheDownload::make(dl32, entry32));
|
||||
continue;
|
||||
}
|
||||
auto entry = metacache->resolveEntry("libraries", storage);
|
||||
if (entry->stale)
|
||||
{
|
||||
if (lib->hint() == "forge-pack-xz")
|
||||
{
|
||||
ForgeLibs.append(ForgeXzDownload::make(lib->storagePath(), entry));
|
||||
ForgeLibs.append(ForgeXzDownload::make(storage, entry));
|
||||
}
|
||||
else
|
||||
{
|
||||
jarlibDownloadJob->addNetAction(CacheDownload::make(lib->downloadUrl(), entry));
|
||||
jarlibDownloadJob->addNetAction(CacheDownload::make(dl, entry));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,12 +21,11 @@
|
||||
|
||||
#include "logic/net/NetJob.h"
|
||||
#include "logic/tasks/Task.h"
|
||||
#include "logic/BaseUpdate.h"
|
||||
|
||||
class MinecraftVersion;
|
||||
class BaseInstance;
|
||||
|
||||
class OneSixUpdate : public BaseUpdate
|
||||
class OneSixUpdate : public Task
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -49,4 +48,5 @@ private:
|
||||
|
||||
// target version, determined during this task
|
||||
std::shared_ptr<MinecraftVersion> targetVersion;
|
||||
BaseInstance *m_inst;
|
||||
};
|
||||
|
@ -1,12 +1,18 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Basic start script for running MultiMC with the libs packaged with it.
|
||||
|
||||
MMC_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||
MMC_DIR=`dirname "$0"`
|
||||
cd "${MMC_DIR}"
|
||||
echo "MultiMC Dir: ${MMC_DIR}"
|
||||
|
||||
# Set up env
|
||||
export LD_LIBRARY_PATH="${MMC_DIR}/bin":$LD_LIBRARY_PATH
|
||||
export QT_PLUGIN_PATH="${MMC_DIR}/plugins"
|
||||
export QT_FONTPATH="${MMC_DIR}/fonts"
|
||||
exec ${MMC_DIR}/bin/MultiMC -d ${MMC_DIR} $@
|
||||
|
||||
# Just to be sure...
|
||||
chmod +x "${MMC_DIR}/bin/MultiMC"
|
||||
|
||||
# run MultiMC
|
||||
"${MMC_DIR}/bin/MultiMC" -d "${MMC_DIR}" $@
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user