Compare commits
19 Commits
master
...
7adcd780b0
| Author | SHA1 | Date | |
|---|---|---|---|
| 7adcd780b0 | |||
| 2cb4249869 | |||
| 2528b6d587 | |||
| 215ba4d253 | |||
| 4b56720e64 | |||
| 324896a0ea | |||
| cf83a78b1d | |||
| 06bd1b4026 | |||
| 866900c606 | |||
| 2c16647f65 | |||
| 3001813d02 | |||
| 4fa796ea27 | |||
| 1250af21a1 | |||
| a171e63efb | |||
| 26ab5acb15 | |||
| 8dcc3de486 | |||
| e9e1885d17 | |||
| 11fea3785b | |||
| eb4695d75f |
63
.gitattributes
vendored
Normal file
63
.gitattributes
vendored
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
###############################################################################
|
||||||
|
# Set default behavior to automatically normalize line endings.
|
||||||
|
###############################################################################
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Set default behavior for command prompt diff.
|
||||||
|
#
|
||||||
|
# This is need for earlier builds of msysgit that does not have it on by
|
||||||
|
# default for csharp files.
|
||||||
|
# Note: This is only used by command line
|
||||||
|
###############################################################################
|
||||||
|
#*.cs diff=csharp
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Set the merge driver for project and solution files
|
||||||
|
#
|
||||||
|
# Merging from the command prompt will add diff markers to the files if there
|
||||||
|
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||||
|
# the diff markers are never inserted). Diff markers may cause the following
|
||||||
|
# file extensions to fail to load in VS. An alternative would be to treat
|
||||||
|
# these files as binary and thus will always conflict and require user
|
||||||
|
# intervention with every merge. To do so, just uncomment the entries below
|
||||||
|
###############################################################################
|
||||||
|
#*.sln merge=binary
|
||||||
|
#*.csproj merge=binary
|
||||||
|
#*.vbproj merge=binary
|
||||||
|
#*.vcxproj merge=binary
|
||||||
|
#*.vcproj merge=binary
|
||||||
|
#*.dbproj merge=binary
|
||||||
|
#*.fsproj merge=binary
|
||||||
|
#*.lsproj merge=binary
|
||||||
|
#*.wixproj merge=binary
|
||||||
|
#*.modelproj merge=binary
|
||||||
|
#*.sqlproj merge=binary
|
||||||
|
#*.wwaproj merge=binary
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# behavior for image files
|
||||||
|
#
|
||||||
|
# image files are treated as binary by default.
|
||||||
|
###############################################################################
|
||||||
|
#*.jpg binary
|
||||||
|
#*.png binary
|
||||||
|
#*.gif binary
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# diff behavior for common document formats
|
||||||
|
#
|
||||||
|
# Convert binary document formats to text before diffing them. This feature
|
||||||
|
# is only available from the command line. Turn it on by uncommenting the
|
||||||
|
# entries below.
|
||||||
|
###############################################################################
|
||||||
|
#*.doc diff=astextplain
|
||||||
|
#*.DOC diff=astextplain
|
||||||
|
#*.docx diff=astextplain
|
||||||
|
#*.DOCX diff=astextplain
|
||||||
|
#*.dot diff=astextplain
|
||||||
|
#*.DOT diff=astextplain
|
||||||
|
#*.pdf diff=astextplain
|
||||||
|
#*.PDF diff=astextplain
|
||||||
|
#*.rtf diff=astextplain
|
||||||
|
#*.RTF diff=astextplain
|
||||||
405
.gitignore
vendored
405
.gitignore
vendored
@@ -1,60 +1,363 @@
|
|||||||
# ---> C++
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
# Prerequisites
|
## files generated by popular Visual Studio add-ons.
|
||||||
*.d
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||||
|
|
||||||
# Compiled Object files
|
# User-specific files
|
||||||
*.slo
|
*.rsuser
|
||||||
*.lo
|
*.suo
|
||||||
*.o
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
[Ww][Ii][Nn]32/
|
||||||
|
[Aa][Rr][Mm]/
|
||||||
|
[Aa][Rr][Mm]64/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
[Oo]ut/
|
||||||
|
[Ll]og/
|
||||||
|
[Ll]ogs/
|
||||||
|
|
||||||
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
Generated\ Files/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
# NUnit
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
nunit-*.xml
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
BenchmarkDotNet.Artifacts/
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
# ASP.NET Scaffolding
|
||||||
|
ScaffoldingReadMe.txt
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
StyleCopReport.xml
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_h.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
*.obj
|
*.obj
|
||||||
|
*.iobj
|
||||||
# Precompiled Headers
|
|
||||||
*.gch
|
|
||||||
*.pch
|
*.pch
|
||||||
|
*.pdb
|
||||||
# Compiled Dynamic libraries
|
*.ipdb
|
||||||
*.so
|
*.pgc
|
||||||
*.dylib
|
*.pgd
|
||||||
*.dll
|
*.rsp
|
||||||
|
*.sbr
|
||||||
# Fortran module files
|
*.tlb
|
||||||
*.mod
|
*.tli
|
||||||
*.smod
|
*.tlh
|
||||||
|
*.tmp
|
||||||
# Compiled Static libraries
|
*.tmp_proj
|
||||||
*.lai
|
*_wpftmp.csproj
|
||||||
*.la
|
|
||||||
*.a
|
|
||||||
*.lib
|
|
||||||
|
|
||||||
# Executables
|
|
||||||
*.exe
|
|
||||||
*.out
|
|
||||||
*.app
|
|
||||||
|
|
||||||
# ---> Java
|
|
||||||
# Compiled class file
|
|
||||||
*.class
|
|
||||||
|
|
||||||
# Log file
|
|
||||||
*.log
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
# BlueJ files
|
# Chutzpah Test files
|
||||||
*.ctxt
|
_Chutzpah*
|
||||||
|
|
||||||
# Mobile Tools for Java (J2ME)
|
# Visual C++ cache files
|
||||||
.mtj.tmp/
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opendb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
# Package Files #
|
# Visual Studio profiler
|
||||||
*.jar
|
*.psess
|
||||||
*.war
|
*.vsp
|
||||||
*.nar
|
*.vspx
|
||||||
*.ear
|
*.sap
|
||||||
*.zip
|
|
||||||
*.tar.gz
|
|
||||||
*.rar
|
|
||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# Visual Studio Trace Files
|
||||||
hs_err_pid*
|
*.e2e
|
||||||
replay_pid*
|
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
.axoCover/*
|
||||||
|
!.axoCover/settings.json
|
||||||
|
|
||||||
|
# Coverlet is a free, cross platform Code Coverage Tool
|
||||||
|
coverage*.json
|
||||||
|
coverage*.xml
|
||||||
|
coverage*.info
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# NuGet Symbol Packages
|
||||||
|
*.snupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/[Pp]ackages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/[Pp]ackages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
*.appx
|
||||||
|
*.appxbundle
|
||||||
|
*.appxupload
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!?*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Including strong name files can present a security risk
|
||||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
#*.snk
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
ServiceFabricBackup/
|
||||||
|
*.rptproj.bak
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
*.ndf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
*.rptproj.rsuser
|
||||||
|
*- [Bb]ackup.rdl
|
||||||
|
*- [Bb]ackup ([0-9]).rdl
|
||||||
|
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
*.GhostDoc.xml
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
*.vbw
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
.fake/
|
||||||
|
|
||||||
|
# CodeRush personal settings
|
||||||
|
.cr/personal
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
# tools/**
|
||||||
|
# !tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
*.tss
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
*.jmconfig
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
*.btp.cs
|
||||||
|
*.btm.cs
|
||||||
|
*.odx.cs
|
||||||
|
*.xsd.cs
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
OpenCover/
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
ASALocalRun/
|
||||||
|
|
||||||
|
# MSBuild Binary and Structured Log
|
||||||
|
*.binlog
|
||||||
|
|
||||||
|
# NVidia Nsight GPU debugger configuration file
|
||||||
|
*.nvuser
|
||||||
|
|
||||||
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
|
.mfractor/
|
||||||
|
|
||||||
|
# Local History for Visual Studio
|
||||||
|
.localhistory/
|
||||||
|
|
||||||
|
# BeatPulse healthcheck temp database
|
||||||
|
healthchecksdb
|
||||||
|
|
||||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||||
|
MigrationBackup/
|
||||||
|
|
||||||
|
# Ionide (cross platform F# VS Code tools) working folder
|
||||||
|
.ionide/
|
||||||
|
|
||||||
|
# Fody - auto-generated XML schema
|
||||||
|
FodyWeavers.xsd
|
||||||
21
CMakeLists.txt
Normal file
21
CMakeLists.txt
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# CMakeList.txt: проект CMake для minecraft-launcher; включите исходный код и определения,
|
||||||
|
# укажите здесь логику для конкретного проекта.
|
||||||
|
#
|
||||||
|
cmake_minimum_required (VERSION 3.8)
|
||||||
|
|
||||||
|
# Включение горячей перезагрузки для компиляторов MSVC, если поддерживается.
|
||||||
|
if (POLICY CMP0141)
|
||||||
|
cmake_policy(SET CMP0141 NEW)
|
||||||
|
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
project ("minecraft-launcher")
|
||||||
|
|
||||||
|
# Добавьте источник в исполняемый файл этого проекта.
|
||||||
|
add_executable (minecraft-launcher "minecraft-launcher.cpp" "minecraft-launcher.h")
|
||||||
|
|
||||||
|
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
||||||
|
set_property(TARGET minecraft-launcher PROPERTY CXX_STANDARD 20)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# TODO: Добавьте тесты и целевые объекты, если это необходимо.
|
||||||
101
CMakePresets.json
Normal file
101
CMakePresets.json
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "windows-base",
|
||||||
|
"hidden": true,
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/out/build/${presetName}",
|
||||||
|
"installDir": "${sourceDir}/out/install/${presetName}",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_C_COMPILER": "cl.exe",
|
||||||
|
"CMAKE_CXX_COMPILER": "cl.exe"
|
||||||
|
},
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Windows"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "x64-debug",
|
||||||
|
"displayName": "x64 Debug",
|
||||||
|
"inherits": "windows-base",
|
||||||
|
"architecture": {
|
||||||
|
"value": "x64",
|
||||||
|
"strategy": "external"
|
||||||
|
},
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "x64-release",
|
||||||
|
"displayName": "x64 Release",
|
||||||
|
"inherits": "x64-debug",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "x86-debug",
|
||||||
|
"displayName": "x86 Debug",
|
||||||
|
"inherits": "windows-base",
|
||||||
|
"architecture": {
|
||||||
|
"value": "x86",
|
||||||
|
"strategy": "external"
|
||||||
|
},
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "x86-release",
|
||||||
|
"displayName": "x86 Release",
|
||||||
|
"inherits": "x86-debug",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-debug",
|
||||||
|
"displayName": "Linux Debug",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/out/build/${presetName}",
|
||||||
|
"installDir": "${sourceDir}/out/install/${presetName}",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
|
},
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Linux"
|
||||||
|
},
|
||||||
|
"vendor": {
|
||||||
|
"microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
|
||||||
|
"sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-debug",
|
||||||
|
"displayName": "macOS Debug",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/out/build/${presetName}",
|
||||||
|
"installDir": "${sourceDir}/out/install/${presetName}",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
|
},
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Darwin"
|
||||||
|
},
|
||||||
|
"vendor": {
|
||||||
|
"microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
|
||||||
|
"sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"inheritEnvironments": [
|
|
||||||
"msvc_x86"
|
|
||||||
],
|
|
||||||
"name": "x86-Debug",
|
|
||||||
"includePath": [
|
|
||||||
"${env.INCLUDE}",
|
|
||||||
"${workspaceRoot}\\**"
|
|
||||||
],
|
|
||||||
"defines": [
|
|
||||||
"WIN32",
|
|
||||||
"_DEBUG",
|
|
||||||
"UNICODE",
|
|
||||||
"_UNICODE"
|
|
||||||
],
|
|
||||||
"intelliSenseMode": "windows-msvc-x86"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
21
LICENSE.txt
Normal file
21
LICENSE.txt
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) [year] [fullname]
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -1,114 +0,0 @@
|
|||||||
#include "LauncherWindow.h"
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QDir>
|
|
||||||
#include <QStandardPaths>
|
|
||||||
#include <QDesktopServices>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QFile>
|
|
||||||
|
|
||||||
LauncherWindow::LauncherWindow(QWidget *parent)
|
|
||||||
: QMainWindow(parent)
|
|
||||||
{
|
|
||||||
setupUI();
|
|
||||||
networkManager = new QNetworkAccessManager(this);
|
|
||||||
connect(networkManager, &QNetworkAccessManager::finished, this, &LauncherWindow::onDownloadFinished);
|
|
||||||
}
|
|
||||||
|
|
||||||
LauncherWindow::~LauncherWindow()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void LauncherWindow::setupUI()
|
|
||||||
{
|
|
||||||
QWidget *centralWidget = new QWidget(this);
|
|
||||||
setCentralWidget(centralWidget);
|
|
||||||
|
|
||||||
QVBoxLayout *layout = new QVBoxLayout(centralWidget);
|
|
||||||
|
|
||||||
usernameLineEdit = new QLineEdit(this);
|
|
||||||
usernameLineEdit->setPlaceholderText("Введите ваш никнейм");
|
|
||||||
layout->addWidget(usernameLineEdit);
|
|
||||||
|
|
||||||
launchButton = new QPushButton("Запустить Minecraft", this);
|
|
||||||
connect(launchButton, &QPushButton::clicked, this, &LauncherWindow::launchMinecraft);
|
|
||||||
layout->addWidget(launchButton);
|
|
||||||
|
|
||||||
modsFolderButton = new QPushButton("Открыть папку с модами", this);
|
|
||||||
connect(modsFolderButton, &QPushButton::clicked, this, &LauncherWindow::openModsFolder);
|
|
||||||
layout->addWidget(modsFolderButton);
|
|
||||||
|
|
||||||
downloadModsButton = new QPushButton("Загрузить моды с GitHub", this);
|
|
||||||
connect(downloadModsButton, &QPushButton::clicked, this, &LauncherWindow::downloadMods);
|
|
||||||
layout->addWidget(downloadModsButton);
|
|
||||||
|
|
||||||
setWindowTitle("Minecraft Launcher");
|
|
||||||
resize(300, 200);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString LauncherWindow::getMinecraftPath()
|
|
||||||
{
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/.minecraft";
|
|
||||||
#elif defined(Q_OS_MAC)
|
|
||||||
return QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/Library/Application Support/minecraft";
|
|
||||||
#else
|
|
||||||
return QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.minecraft";
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void LauncherWindow::launchMinecraft()
|
|
||||||
{
|
|
||||||
QString username = usernameLineEdit->text();
|
|
||||||
if (username.isEmpty()) {
|
|
||||||
QMessageBox::warning(this, "Ошибка", "Пожалуйста, введите никнейм.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Это упрощенная команда запуска. Для современных версий Minecraft
|
|
||||||
// может потребоваться более сложная команда с указанием версии,
|
|
||||||
// аутентификацией и путями к библиотекам.
|
|
||||||
// Здесь мы используем гипотетическую команду для демонстрации.
|
|
||||||
QString command = "java -jar \"" + getMinecraftPath() + "/versions/1.19.2/1.19.2.jar\" --username " + username;
|
|
||||||
|
|
||||||
QProcess *process = new QProcess(this);
|
|
||||||
process->startDetached(command);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LauncherWindow::openModsFolder()
|
|
||||||
{
|
|
||||||
QString modsPath = getMinecraftPath() + "/mods";
|
|
||||||
QDir modsDir(modsPath);
|
|
||||||
if (!modsDir.exists()) {
|
|
||||||
modsDir.mkpath(".");
|
|
||||||
}
|
|
||||||
QDesktopServices::openUrl(QUrl::fromLocalFile(modsPath));
|
|
||||||
}
|
|
||||||
|
|
||||||
void LauncherWindow::downloadMods()
|
|
||||||
{
|
|
||||||
// URL для загрузки ZIP-архива с модами из репозитория GitHub
|
|
||||||
// Замените на URL вашего репозитория
|
|
||||||
QUrl url("https://github.com/user/repo/archive/refs/heads/main.zip");
|
|
||||||
QNetworkRequest request(url);
|
|
||||||
networkManager->get(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LauncherWindow::onDownloadFinished(QNetworkReply *reply)
|
|
||||||
{
|
|
||||||
if (reply->error()) {
|
|
||||||
QMessageBox::critical(this, "Ошибка загрузки", "Не удалось загрузить моды: " + reply->errorString());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QFile *file = new QFile(getMinecraftPath() + "/mods/mods.zip");
|
|
||||||
if (file->open(QIODevice::WriteOnly)) {
|
|
||||||
file->write(reply->readAll());
|
|
||||||
file->close();
|
|
||||||
QMessageBox::information(this, "Загрузка завершена", "Моды успешно загружены в папку mods. Распакуйте архив.");
|
|
||||||
} else {
|
|
||||||
QMessageBox::critical(this, "Ошибка", "Не удалось сохранить архив с модами.");
|
|
||||||
}
|
|
||||||
delete file;
|
|
||||||
reply->deleteLater();
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
#ifndef LAUNCHERWINDOW_H
|
|
||||||
#define LAUNCHERWINDOW_H
|
|
||||||
|
|
||||||
#include <QMainWindow>
|
|
||||||
#include <QPushButton>
|
|
||||||
#include <QLineEdit>
|
|
||||||
#include <QProcess>
|
|
||||||
#include <QNetworkAccessManager>
|
|
||||||
#include <QNetworkReply>
|
|
||||||
|
|
||||||
class LauncherWindow : public QMainWindow
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
LauncherWindow(QWidget *parent = nullptr);
|
|
||||||
~LauncherWindow();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void launchMinecraft();
|
|
||||||
void openModsFolder();
|
|
||||||
void downloadMods();
|
|
||||||
void onDownloadFinished(QNetworkReply *reply);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void setupUI();
|
|
||||||
QString getMinecraftPath();
|
|
||||||
|
|
||||||
QPushButton *launchButton;
|
|
||||||
QPushButton *modsFolderButton;
|
|
||||||
QPushButton *downloadModsButton;
|
|
||||||
QLineEdit *usernameLineEdit;
|
|
||||||
|
|
||||||
QNetworkAccessManager *networkManager;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // LAUNCHERWINDOW_H
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# minecraft-launcher
|
|
||||||
|
|
||||||
Первая итерация самописного лаунчера для запуска сборок Minecraft
|
|
||||||
10
main.cpp
10
main.cpp
@@ -1,10 +0,0 @@
|
|||||||
#include "LauncherWindow.h"
|
|
||||||
#include <QApplication>
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
QApplication a(argc, argv);
|
|
||||||
LauncherWindow w;
|
|
||||||
w.show();
|
|
||||||
return a.exec();
|
|
||||||
}
|
|
||||||
12
minecraft-launcher.cpp
Normal file
12
minecraft-launcher.cpp
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// minecraft-launcher.cpp: определяет точку входа для приложения.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "minecraft-launcher.h"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
cout << "Hello CMake." << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
8
minecraft-launcher.h
Normal file
8
minecraft-launcher.h
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// minecraft-launcher.h : включаемый файл для стандартных системных включаемых файлов
|
||||||
|
// или включаемые файлы для конкретного проекта.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
// TODO: установите здесь ссылки на дополнительные заголовки, требующиеся для программы.
|
||||||
Reference in New Issue
Block a user