-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
954 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.idea | ||
.gradle | ||
build | ||
out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,69 @@ | ||
# Mirai Console Loader | ||
|
||
## 技术路线 | ||
|
||
* 主要程序架构采用`Kotlin`编写,实现功能,比如连接更新服务器下载 | ||
* 具体逻辑实现采用`JavaScript`编写,实现逻辑,比如自定义启动参数,切换下载源,加载前置包等等 | ||
|
||
## 具体功能 | ||
|
||
* 下载和更新服务,支持channel | ||
* 加载JAR进根ClassLoader | ||
* 还有更多 | ||
|
||
## 下载服务架构 | ||
|
||
* 总体沿用现在的`mirai-repo`结构 | ||
``` | ||
mirai-console | ||
|---mirai-console-1.0.0.jar | ||
|---mirai-console-1.0.0.md5 | ||
mirai-console-pure | ||
mirai-core-android | ||
packages.json | ||
``` | ||
`packages.json`内容 | ||
```JSON | ||
{ | ||
"mirai-console": { | ||
"name": "Mirai Console", | ||
"description": "Mirai Console后端" | ||
}, | ||
"mirai-console-pure": { | ||
"name": "Mirai Console Pure", | ||
"description": "Mirai Console Pure前端实现" | ||
} | ||
} | ||
``` | ||
|
||
* 添加`package.json` | ||
|
||
```JSON | ||
{ | ||
"name": "mirai-console", | ||
"channels": { | ||
"stable": ["1.0.0"], | ||
"beta": ["1.0-M4"], | ||
"nightly": ["1.0-M4-dev3"] | ||
} | ||
} | ||
``` | ||
|
||
* 添加`md5`校验码 | ||
# Mirai Console Loader | ||
|
||
## 技术路线 | ||
|
||
* 主要程序架构采用`Java`编写,实现功能,比如连接更新服务器下载 | ||
* 具体逻辑实现采用`JavaScript`编写,实现逻辑,比如自定义启动参数,切换下载源,加载前置包等等 | ||
|
||
## 具体功能 | ||
|
||
* 下载和更新服务,支持channel | ||
* 加载JAR进根ClassLoader | ||
* 还有更多 | ||
|
||
## 下载服务架构 | ||
|
||
* 总体沿用现在的`mirai-repo`结构 | ||
``` | ||
mirai-console | ||
|---mirai-console-1.0.0.jar | ||
|---mirai-console-1.0.0.md5 | ||
mirai-console-pure | ||
mirai-core-android | ||
packages.json | ||
``` | ||
`packages.json`内容 | ||
```JSON | ||
{ | ||
"mirai-console": { | ||
"name": "Mirai Console", | ||
"description": "Mirai Console后端" | ||
}, | ||
"mirai-console-pure": { | ||
"name": "Mirai Console Pure", | ||
"description": "Mirai Console Pure前端实现" | ||
} | ||
} | ||
``` | ||
|
||
* 添加`package.json` | ||
|
||
```JSON | ||
{ | ||
"name": "mirai-console", | ||
"channels": { | ||
"stable": ["1.0.0"], | ||
"beta": ["1.0-M4"], | ||
"nightly": ["1.0-M4-dev3"] | ||
} | ||
} | ||
``` | ||
|
||
* 添加`md5`校验码 | ||
|
||
## 开源许可证 | ||
|
||
Copyright (C) 2020 iTX Technologies | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as | ||
published by the Free Software Foundation, either version 3 of the | ||
License, or (at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
|
||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
group 'org.itxtech' | ||
version '1.0.0-alpha.1' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("org.mozilla:rhino:1.7.13") | ||
implementation("commons-cli:commons-cli:1.4") | ||
implementation("com.google.code.gson:gson:2.8.6") | ||
} | ||
|
||
jar { | ||
manifest { | ||
attributes "Main-Class": "org.itxtech.mcl.Loader" | ||
} | ||
|
||
from { | ||
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
rootProject.name = 'mirai-console-loader' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.itxtech.mcl; | ||
|
||
/* | ||
* | ||
* Mirai Console Loader | ||
* | ||
* Copyright (C) 2020 iTX Technologies | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @author PeratX | ||
* @website https://github.com/iTXTech/mirai-console-loader | ||
* | ||
*/ | ||
public class Loader { | ||
public static void main(String[] args) { | ||
|
||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/org/itxtech/mcl/component/DefaultDownloader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.itxtech.mcl.component; | ||
|
||
/* | ||
* | ||
* Mirai Console Loader | ||
* | ||
* Copyright (C) 2020 iTX Technologies | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @author PeratX | ||
* @website https://github.com/iTXTech/mirai-console-loader | ||
* | ||
*/ | ||
public class DefaultDownloader implements Downloader { | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/org/itxtech/mcl/component/DefaultLogger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.itxtech.mcl.component; | ||
|
||
/* | ||
* | ||
* Mirai Console Loader | ||
* | ||
* Copyright (C) 2020 iTX Technologies | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @author PeratX | ||
* @website https://github.com/iTXTech/mirai-console-loader | ||
* | ||
*/ | ||
public class DefaultLogger implements Logger { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.itxtech.mcl.component; | ||
|
||
/* | ||
* | ||
* Mirai Console Loader | ||
* | ||
* Copyright (C) 2020 iTX Technologies | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @author PeratX | ||
* @website https://github.com/iTXTech/mirai-console-loader | ||
* | ||
*/ | ||
public interface Downloader { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.itxtech.mcl.component; | ||
|
||
/* | ||
* | ||
* Mirai Console Loader | ||
* | ||
* Copyright (C) 2020 iTX Technologies | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @author PeratX | ||
* @website https://github.com/iTXTech/mirai-console-loader | ||
* | ||
*/ | ||
public interface Logger { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.itxtech.mcl.script; | ||
|
||
/* | ||
* | ||
* Mirai Console Loader | ||
* | ||
* Copyright (C) 2020 iTX Technologies | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @author PeratX | ||
* @website https://github.com/iTXTech/mirai-console-loader | ||
* | ||
*/ | ||
public class Script { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.itxtech.mcl.script; | ||
|
||
/* | ||
* | ||
* Mirai Console Loader | ||
* | ||
* Copyright (C) 2020 iTX Technologies | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* @author PeratX | ||
* @website https://github.com/iTXTech/mirai-console-loader | ||
* | ||
*/ | ||
public class ScriptManager { | ||
} |