Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 34 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,40 @@ else()
message(FATAL_ERROR "Platform not supported")
endif()

################################ shimgen ################################

set(SHIMGEN_BUILD_DIR ${CMAKE_BINARY_DIR}/tools/shimgen-build)

execute_process(
COMMAND ${CMAKE_COMMAND} -S ${CMAKE_SOURCE_DIR}/launcher/tools/shimgen -B ${SHIMGEN_BUILD_DIR}
RESULT_VARIABLE SHIMGEN_CFG_RC
)
if(NOT SHIMGEN_CFG_RC EQUAL 0)
message(FATAL_ERROR "shimgen configure başarısız")
endif()

execute_process(
COMMAND ${CMAKE_COMMAND} --build ${SHIMGEN_BUILD_DIR} --config Release
RESULT_VARIABLE SHIMGEN_BUILD_RC
)
if(NOT SHIMGEN_BUILD_RC EQUAL 0)
message(FATAL_ERROR "shimgen compile failed")
endif()

find_program(SHIMGEN_EXE shimgen
PATHS ${SHIMGEN_BUILD_DIR} ${SHIMGEN_BUILD_DIR}/Release
NO_DEFAULT_PATH
)

execute_process(
COMMAND ${SHIMGEN_EXE} ${CMAKE_SOURCE_DIR}/launcher ${CMAKE_SOURCE_DIR}/launcher/headers
RESULT_VARIABLE SHIMGEN_RUN_RC
)

if(NOT SHIMGEN_RUN_RC EQUAL 0)
message(FATAL_ERROR "shim generation has been failed")
endif()

################################ Included Libs ################################

include(ExternalProject)
Expand Down Expand Up @@ -692,8 +726,6 @@ install(FILES "${NEWLAUNCH_JAR}" DESTINATION "${JARS_DEST_DIR}" RENAME "NewLaunc

############################### Built Artifacts ###############################

add_subdirectory(buildconfig)

add_subdirectory(launcher/crashreporter)

# NOTE: this must always be last to appease the CMake deity of quirky install command evaluation order.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ In general, in order of importance:
## License

Copyright © 2012-2022 MultiMC Contributors
Copyright © 2026 Project Tick
<br>Copyright &copy; 2026 Project Tick

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this program except in compliance with the License. You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).

Expand Down
11 changes: 0 additions & 11 deletions buildconfig/CMakeLists.txt

This file was deleted.

18 changes: 9 additions & 9 deletions launcher/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
* limitations under the License.
*/

#include "Application.h"
#include "BuildConfig.h"
#include "plugin/PluginManager.h"
#include <MeshMC/Core/Application>
#include <MeshMC/Core/BuildConfig>
#include <MeshMC/Plugin/Manager>

#include "ui/MainWindow.h"
#include "ui/InstanceWindow.h"
Expand Down Expand Up @@ -52,7 +52,7 @@

#include "ui/pagedialog/PageDialog.h"

#include "ApplicationMessage.h"
#include <MeshMC/Core/ApplicationMessage>

#include <iostream>

Expand All @@ -72,7 +72,7 @@
#include <QDebug>
#include <QStyleFactory>

#include "InstanceList.h"
#include <MeshMC/Core/InstanceList>

#include <minecraft/auth/AccountList.h>
#include "icons/IconList.h"
Expand Down Expand Up @@ -102,9 +102,9 @@
#include "translations/TranslationsModel.h"
#include "meta/Index.h"

#include <Commandline.h>
#include <FileSystem.h>
#include <DesktopServices.h>
#include <MeshMC/Core/Commandline>
#include <MeshMC/Core/FS>
#include <MeshMC/Core/DesktopServices>
#include <LocalPeer.h>
#include "MMCZip.h"

Expand All @@ -113,7 +113,7 @@
#include "minecraft/Component.h"

#include "Sys.h"
#include "Logging.h"
#include <MeshMC/Core/Logging>
#include "MMCStrings.h"

#if defined Q_OS_WIN32
Expand Down
6 changes: 4 additions & 2 deletions launcher/Application.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/Application.h
// @meshmc-public: MeshMC/Core/Application
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -29,9 +31,9 @@
#include <QUrl>
#include <QHash>

#include <BaseInstance.h>
#include <MeshMC/Core/BaseInstance>

#include "Logging.h"
#include <MeshMC/Core/Logging>

#include "minecraft/launch/MinecraftServerTarget.h"

Expand Down
2 changes: 1 addition & 1 deletion launcher/ApplicationMessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/

#include "ApplicationMessage.h"
#include <MeshMC/Core/ApplicationMessage>

#include <QJsonDocument>
#include <QJsonObject>
Expand Down
2 changes: 2 additions & 0 deletions launcher/ApplicationMessage.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/ApplicationMessage.h
// @meshmc-public: MeshMC/Core/ApplicationMessage
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 2 additions & 0 deletions launcher/ArchiveOpen.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/ArchiveOpen.h
// @meshmc-public: MeshMC/Core/ArchiveOpen
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion launcher/BaseInstaller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <QFile>

#include "BaseInstaller.h"
#include <MeshMC/Core/BaseInstaller>
#include "minecraft/MinecraftInstance.h"

BaseInstaller::BaseInstaller() {}
Expand Down
2 changes: 2 additions & 0 deletions launcher/BaseInstaller.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/BaseInstaller.h
// @meshmc-public: MeshMC/Core/BaseInstaller
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand Down
8 changes: 4 additions & 4 deletions launcher/BaseInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* limitations under the License.
*/

#include "BaseInstance.h"
#include <MeshMC/Core/BaseInstance>

#include <QFileInfo>
#include <QDir>
Expand All @@ -34,9 +34,9 @@
#include "settings/Setting.h"
#include "settings/OverrideSetting.h"

#include "FileSystem.h"
#include "Commandline.h"
#include "BuildConfig.h"
#include <MeshMC/Core/FS>
#include <MeshMC/Core/Commandline>
#include <MeshMC/Core/BuildConfig>

BaseInstance::BaseInstance(SettingsObjectPtr globalSettings,
SettingsObjectPtr settings, const QString& rootDir)
Expand Down
4 changes: 3 additions & 1 deletion launcher/BaseInstance.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/BaseInstance.h
// @meshmc-public: MeshMC/Core/BaseInstance
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -30,7 +32,7 @@
#include "settings/SettingsObject.h"

#include "settings/INIFile.h"
#include "BaseVersionList.h"
#include <MeshMC/Core/BaseVersionList>
#include "minecraft/auth/MinecraftAccount.h"
#include "MessageLevel.h"
#include "pathmatcher/IPathMatcher.h"
Expand Down
2 changes: 2 additions & 0 deletions launcher/BaseVersion.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/BaseVersion.h
// @meshmc-public: MeshMC/Core/BaseVersion
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand Down
4 changes: 2 additions & 2 deletions launcher/BaseVersionList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License.
*/

#include "BaseVersionList.h"
#include "BaseVersion.h"
#include <MeshMC/Core/BaseVersionList>
#include <MeshMC/Core/BaseVersion>

BaseVersionList::BaseVersionList(QObject* parent) : QAbstractListModel(parent)
{
Expand Down
4 changes: 3 additions & 1 deletion launcher/BaseVersionList.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/BaseVersionList.h
// @meshmc-public: MeshMC/Core/BaseVersionList
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand All @@ -24,7 +26,7 @@
#include <QVariant>
#include <QAbstractListModel>

#include "BaseVersion.h"
#include <MeshMC/Core/BaseVersion>
#include "tasks/Task.h"
#include "QObjectPtr.h"

Expand Down
2 changes: 2 additions & 0 deletions buildconfig/BuildConfig.h → launcher/BuildConfig.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/buildconfig/BuildConfig.h
// @meshmc-public: MeshMC/Core/BuildConfig
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/

#include "BuildConfig.h"
#include <MeshMC/Core/BuildConfig>
#include <QObject>

const Config BuildConfig;
Expand Down
11 changes: 7 additions & 4 deletions launcher/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ project(application)

include (UnitTest)

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/BuildConfig.in.cpp" "${CMAKE_CURRENT_BINARY_DIR}/BuildConfig.cpp")

set(CORE_SOURCES
# LOGIC - Base classes and infrastructure
BuildConfig.h
${CMAKE_CURRENT_BINARY_DIR}/BuildConfig.cpp
BaseInstaller.h
BaseInstaller.cpp
BaseVersionList.h
Expand Down Expand Up @@ -1209,6 +1213,7 @@ endif()

# Add executable
add_library(MeshMC_logic STATIC ${LOGIC_SOURCES} ${MESHMC_SOURCES} ${MESHMC_UI} ${MESHMC_SHARED_UI} ${MESHMC_RESOURCES})
target_include_directories(MeshMC_logic PUBLIC ${CMAKE_SOURCE_DIR}/launcher/headers)

# Declared after MeshMC_logic because it links against it.
add_unit_test(CustomTheme
Expand All @@ -1233,7 +1238,6 @@ target_link_libraries(MeshMC_logic
nbt++
ZLIB::ZLIB
tomlplusplus::tomlplusplus
BuildConfig
Katabasis
)

Expand Down Expand Up @@ -1444,7 +1448,7 @@ if(NOT APPLE)
DesktopServices.h
DesktopServices.cpp
QObjectPtr.h

${CMAKE_CURRENT_BINARY_DIR}/BuildConfig.cpp
tasks/Task.h
tasks/Task.cpp

Expand All @@ -1457,7 +1461,7 @@ if(NOT APPLE)
)

add_library(meshmc_updater_logic STATIC ${MESHUPDATER_SOURCES} ${MESHUPDATER_UI} ${MESHMC_SHARED_UI})
target_include_directories(meshmc_updater_logic PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(meshmc_updater_logic PUBLIC ${CMAKE_SOURCE_DIR}/launcher/headers)
target_compile_definitions(meshmc_updater_logic PUBLIC QT_MESSAGELOGCONTEXT)
target_link_libraries(meshmc_updater_logic
Qt${QT_VERSION_MAJOR}::Core
Expand All @@ -1466,7 +1470,6 @@ if(NOT APPLE)
Qt${QT_VERSION_MAJOR}::Network
LibArchive::LibArchive
cmark::cmark
BuildConfig
)

# WIN32: no console window while updating. Diagnostics go to the log file,
Expand Down
2 changes: 1 addition & 1 deletion launcher/Commandline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* limitations under the License.
*/

#include "Commandline.h"
#include <MeshMC/Core/Commandline>

/**
* @file libutil/src/cmdutils.cpp
Expand Down
2 changes: 2 additions & 0 deletions launcher/Commandline.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/Commandline.h
// @meshmc-public: MeshMC/Core/Commandline
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 2 additions & 0 deletions launcher/DefaultVariable.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/DefaultVariable.h
// @meshmc-public: MeshMC/Core/DefaultVariable
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion launcher/DesktopServices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/

#include "DesktopServices.h"
#include <MeshMC/Core/DesktopServices>
#include <QDir>
#include <QDesktopServices>
#include <QFile>
Expand Down
2 changes: 2 additions & 0 deletions launcher/DesktopServices.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/DesktopServices.h
// @meshmc-public: MeshMC/Core/DesktopServices
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 2 additions & 0 deletions launcher/Exception.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/Exception.h
// @meshmc-public: MeshMC/Core/Exception
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 2 additions & 0 deletions launcher/ExponentialSeries.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/ExponentialSeries.h
// @meshmc-public: MeshMC/Core/ExponentialSeries
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion launcher/FastFileIconProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/

#include "FastFileIconProvider.h"
#include <MeshMC/Core/FastFileIconProvider>

#include <QApplication>
#include <QStyle>
Expand Down
2 changes: 2 additions & 0 deletions launcher/FastFileIconProvider.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// launcher/FastFileIconProvider.h
// @meshmc-public: MeshMC/Core/FastFileIconProvider
/* SPDX-FileCopyrightText: 2026 Project Tick
* SPDX-FileContributor: Project Tick
* SPDX-License-Identifier: Apache-2.0
Expand Down
6 changes: 3 additions & 3 deletions launcher/FileIgnoreProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
* limitations under the License.
*/

#include "FileIgnoreProxy.h"
#include <MeshMC/Core/FileIgnoreProxy>

#include <QDebug>
#include <QDir>
#include <QFileSystemModel>
#include <QStack>

#include "Exception.h"
#include "FileSystem.h"
#include <MeshMC/Core/Exception>
#include <MeshMC/Core/FS>
#include "MMCStrings.h"

FileIgnoreProxy::FileIgnoreProxy(QString root, QObject* parent)
Expand Down
Loading
Loading