Coder Social home page Coder Social logo

colormc's Introduction

ColorMC 一个全平台Minecraft PC启动器

交流QQ群:571239090

多语言
https://crowdin.com/project/colormc

English

使用dotnet8作为运行环境,XAML作为前端语言,C#作为后端语言

用户手册

演示动画

支持平台

  • Linux(提供deb pkg rpm)
  • Windows
  • macOs

注意:ARM64平台不能保证其兼容性
Windows ARM64 可以运行,渲染有问题
Linux ARM64 在xx派上可以运行,运行缓慢
Mac ARM64 不能运行,可以运行x64版本

Linux由于发行版过于复杂,每个人的电脑兼容性都不一样,如果打不开可以需要自行解决

安装

在Releases或者Actions里面下载构建好的压缩包/安装包
解压(zip)\安装(msi,deb,pkg)\或直接运行(appimage)即可

Windows下,可以使用winget安装

winget install colormc

默认安装在C:\Program Files\ColorMC

启动

  • 安装完成后启动
    在windows/macos下解压后双击启动
    linux下可以双击启动,也可以
ColorMC.Launcher
  • 从源码启动(需要安装.net8 sdk)
git clone https://github.com/Coloryr/ColorMC.git
cd ColorMC/src/ColorMC.Launcher
dotnet run

从源码构建

  • 构建windows的二进制文件
    需要在Windows系统中构建,并安装git与dotnet-8-sdk
git clone https://github.com/Coloryr/ColorMC.git
cd ColorMC

@REM 更新源码
.\build\update.cmd

@REM 构建
.\build\build-windows.cmd
  • 构建linux的二进制文件
    需要在Linux系统中构建,并安装git与dotnet-8-sdk
git clone https://github.com/Coloryr/ColorMC.git
cd ColorMC
chmod a+x ./build/update.sh
chmod a+x ./build/build-linux.sh

# 更新源码
./build/update.sh

# 构建
./build/build-linux.sh

打包ubuntu镜像
需要在Ubuntu系统中操作

chmod a+x ./build/build-ubuntu.sh

./build/build-ubuntu.sh

打包rpm镜像
需要在Ubuntu系统中操作

chmod a+x ./build/build-rpm.sh

./build/build-rpm.sh

打包Arch镜像
需要在Arch系统中操作

chmod a+x ./build/build-arch.sh

./build/build-arch.sh
  • 构建macos的二进制文件
    需要在Ubuntu系统或macos系统中构建,并安装git与dotnet-8-sdk
git clone https://github.com/Coloryr/ColorMC.git
cd ColorMC
chmod a+x ./build/update.sh
chmod a+x ./build/build-macos.sh

# 更新源码
./build/update.sh

# 构建
./build/build-macos.sh

此时可以在built_out文件夹获取所有二进制文件

二次开发

首先克隆代码

git clone https://github.com/Coloryr/ColorMC.git

git submodule update --init --recursive

./src/ColorMC.sln为根工程

使用ColorMC启动器核心

使用ColorMC启动器核心来开发自己的启动器

项目说明

  • ColorMC.Core 启动器核心
  • ColorMC.CustomGui 自定义启动器界面,教程
  • ColorMC.Cmd Cli模式 (已废弃)
  • ColorMC.Gui Gui模式
  • ColorMC.Launcher 启动器本体
  • ColorMC.Test 用于启动器测试
  • ColorMC.Setup 用于构建windows的msi安装包

依赖/引用的项目

AvaloniaUI 跨平台UI框架
DialogHost.Avalonia 弹窗库 CommunityToolkit.Mvvm MVVM工具
Svg.Skia Svg图像显示
SkiaSharp Skia图像库
Silk.NET 高性能底层库接口 Heijden.Dns DNS解析
HtmlAgilityPack HTML解析器
Jint JS解析执行器
DotNetty 异步通信框架 Newtonsoft.Json JSON解析器
SharpZipLib 压缩包处理
Tomlyn TOML解析器
ForgeWrapper Forge启动器
Live2DCSharpSDK Live2d渲染框架
OptifineWrapper Optifine启动器
ColorMCASM 用于ColorMC与游戏内通信

开源协议

Apache 2.0

Copyright 2024 coloryr

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.

附属的开源协议
MIT
BSD

使用的IDE开发工具

Visual Studio Code
Visual Studio 2022
dotMemory logo

colormc's People

Contributors

coloryr avatar huige233 avatar staccato-kashi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

colormc's Issues

添加游戏实例卡主

bc5afbe8700b8d1852d2dc21fbe2229e
506d1130ae05fd5becf189ed88cc8788
图片
recording

添加游戏实例会被资源包里个别图片卡主orz,而且只会在这几个图片卡主,没找到什么共同点

实例名字可以输入非法路径字符,或粘贴多行内容以致启动器报错

添加游戏实例时实例名字可以输入非法路径字符,或粘贴多行内容以致启动器报错
比如

[2023/9/27 19:20:20][Error]Gui Crash
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (文件名、目录名或卷标语法不正确。 : 'C:\minecraft\Launcher\ColorMC\minecraft\instances\CCDD
AABB')
 ---> System.IO.IOException: 文件名、目录名或卷标语法不正确。 : 'C:\minecraft\Launcher\ColorMC\minecraft\instances\CCDD
AABB'
   at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)
   at System.IO.Directory.CreateDirectory(String path)
   at ColorMC.Core.LaunchPath.InstancesPath.CreateGame(GameSettingObj game)
   at ColorMC.Gui.UIBinding.GameBinding.AddGame(String name, String version, Loaders loaders, String loaderversion, String group)
   at ColorMC.Gui.UI.Model.Add.AddGame.AddGameModel.AddGame()
   --- End of inner exception stack trace ---

或者

[2023/9/27 19:23:45][Error]Gui Crash
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (文件名、目录名或卷标语法不正确。 : 'C:\minecraft\Launcher\ColorMC\minecraft\instances\***:::<<<>>>|||\')
 ---> System.IO.IOException: 文件名、目录名或卷标语法不正确。 : 'C:\minecraft\Launcher\ColorMC\minecraft\instances\***:::<<<>>>|||\'
   at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)
   at System.IO.Directory.CreateDirectory(String path)
   at ColorMC.Core.LaunchPath.InstancesPath.CreateGame(GameSettingObj game)
   at ColorMC.Gui.UIBinding.GameBinding.AddGame(String name, String version, Loaders loaders, String loaderversion, String group)
   at ColorMC.Gui.UI.Model.Add.AddGame.AddGameModel.AddGame()
   --- End of inner exception stack trace ---

整合包导出

能否添加mcbbs格式整合包导出,modrinth和curseforge格式整合包导出感觉并不完善
image
是否能完善modrinth和curseforge格式整合包导出,实现自定义选择配置文件和其他文件,就像mulitmc导出modrinth整合包和curseforge导出整合包格式一样
这些只是我的一些看法

反复修改下载线程数会造成较高的 CPU 负担

问题

反复修改下载线程数会大量销毁和创建线程,造成较高的 CPU 负担;如果不小心填入了特别大的值(比如 10000 ),会使程序卡顿或假死,且由于保存进了配置文件,重新启动程序仍会卡顿或假死

建议

  • 等修改完成后再调整线程数;
  • 加入上限;
  • 当用户尝试设置一个特别大的值时,发出警告让用户二次确认;
  • 仅销毁/创建与原先线程数量之差

截图

界面
性能监视

从文件夹导入实例会报错

添加游戏实例 -> 从文件夹导入 -> 导入
会生成一个崩溃报告

[2023/9/27 19:10:26][Error]Gui Crash
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Object reference not set to an instance of an object.)
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at ColorMC.Gui.UI.Model.Add.AddGame.AddGameModel.AddFiles()
   --- End of inner exception stack trace ---

nb

希望继续维护下去

How about creating a Fedora version (RPM)?

I'm a Fedora user and I don't want to install it using user install.
我是一个Fedora用户,但我不想用Alien进行转换,也不想把启动器拷到~/.local/bin,还对直接用APT安装不太放心,创建Debian/Arch子系统也不是我喜欢的方法,我还不喜欢用Toolbx/Distrobox,虚拟机会有性能损耗,我我也不想安装Ubuntu,因为它容易掉驱动,影响游戏体验,Arch的pacman又极度辣鸡,换成Manjaro又要忍受我无法忍受的半个月更新延迟,Debian连网卡驱动都没有,Windows下又有PCL,macOS我不用,我还不喜欢自己打代码编译,我还......
就算不搞rpm至少也得搞个snap/flatpak版吧,我还用solusopensusemageiapclinuxosvoidendlessgnomeoscentosrhelrisiosalpinefreebsdnixosguix
搞不懂?

Solus
openSUSE
Mageia
PCLinuxOS
Void
Endless
GNOME OS
CentOS
RHEL
risiOS
Alpine
FreeBSD
NixOS
Guix
……











----------

额……其实Fedora用户大都Linux技术较高(比如我)
(废话)
对不起,中二病犯了(其实我就初中二年级)

简化微软登录步骤

如果 API 返回来的 URL 是 https://microsoft.com/link,那么就在这个 URL 后面加上 ?otc=代码 就可以不用在浏览器里输入代码

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.