From d97179068f03d75b95623133e6eb7cb03449d533 Mon Sep 17 00:00:00 2001 From: "jiahua.liu" Date: Sun, 29 Mar 2020 17:09:39 +0800 Subject: [PATCH] new download link --- gradle.properties | 4 ++-- .../net/mamoe/mirai/console/wrapper/ConsoleUpdater.kt | 2 +- .../kotlin/net/mamoe/mirai/console/wrapper/CoreUpdater.kt | 2 +- .../kotlin/net/mamoe/mirai/console/wrapper/WrapperMain.kt | 8 +++++++- mirai-console/build.gradle.kts | 6 ++++++ .../main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt | 8 -------- 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/gradle.properties b/gradle.properties index f98c58274..7b1c7df83 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ # style guide kotlin.code.style=official # config -miraiVersion=0.30.0 -miraiConsoleVersion=0.3.7 +miraiVersion=0.31.0 +miraiConsoleVersion=0.3.8 miraiConsoleWrapperVersion=0.1.4 miraiConsoleGraphicalVersion = 0.0.2 kotlin.incremental.multiplatform=true diff --git a/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/ConsoleUpdater.kt b/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/ConsoleUpdater.kt index c38bdde01..71ad74dac 100644 --- a/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/ConsoleUpdater.kt +++ b/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/ConsoleUpdater.kt @@ -62,7 +62,7 @@ internal object ConsoleUpdater { ) */ MiraiDownloader.addTask( - "https://pan.jasonczc.cn/?/mirai/${getProjectName()}/${getProjectName()}-$newest.pdf", getContent("${getProjectName()}-$newest.jar") + "https://pan.jasonczc.cn/?/mirai/${getProjectName()}/${getProjectName()}-$newest.mp4", getContent("${getProjectName()}-$newest.jar") ) } } diff --git a/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/CoreUpdater.kt b/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/CoreUpdater.kt index 136e11d93..b0089d106 100644 --- a/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/CoreUpdater.kt +++ b/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/CoreUpdater.kt @@ -38,7 +38,7 @@ internal object CoreUpdater { println("Updating shadowed-core from V$current -> V$newest, this is a force update") this.getProtocolLib()?.delete() MiraiDownloader - .addTask("https://pan.jasonczc.cn/?/mirai/mirai-core-qqandroid/mirai-core-qqandroid-$newest.pdf",getContent("mirai-core-qqandroid-jvm-$newest.jar")) + .addTask("https://pan.jasonczc.cn/?/mirai/mirai-core-qqandroid/mirai-core-qqandroid-$newest.mp4",getContent("mirai-core-qqandroid-jvm-$newest.jar")) //.addTask("https://raw.githubusercontent.com/mamoe/mirai-repo/master/shadow/mirai-core-qqandroid/mirai-core-qqandroid-$newest.jar", getContent("mirai-core-qqandroid-jvm-$newest.jar")) } diff --git a/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/WrapperMain.kt b/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/WrapperMain.kt index 7a1b9d195..d866635ac 100644 --- a/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/WrapperMain.kt +++ b/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/WrapperMain.kt @@ -100,7 +100,7 @@ object WrapperMain { println("Please select Console Type") println("请选择 Console 版本") println("=> Pure : pure console") - println("=> Graphical : [Not Supported Yet] graphical UI except unix") + println("=> Graphical : graphical UI except unix") println("=> Terminal : [Not Supported Yet] console in unix") val scanner = Scanner(System.`in`) while (type == null){ @@ -149,6 +149,12 @@ object WrapperMain { ).getMethod("load", String::class.java, String::class.java) .invoke(null, CoreUpdater.getCurrentVersion(), ConsoleUpdater.getCurrentVersion()) } + CONSOLE_GRAPHICAL -> { + loader.loadClass( + "net.mamoe.mirai.console.graphical.MiraiConsoleGraphicalLoader" + ).getMethod("load", String::class.java, String::class.java) + .invoke(null, CoreUpdater.getCurrentVersion(), ConsoleUpdater.getCurrentVersion()) + } } } } diff --git a/mirai-console/build.gradle.kts b/mirai-console/build.gradle.kts index 61f7331b5..8acb30ded 100644 --- a/mirai-console/build.gradle.kts +++ b/mirai-console/build.gradle.kts @@ -30,6 +30,12 @@ dependencies { implementation(group = "org.yaml", name = "snakeyaml", version = "1.25") implementation(group = "com.moandjiezana.toml", name = "toml4j", version = "0.7.2") implementation(kotlin("stdlib-jdk8")) + + + testApi(ktor("client-cio", Versions.Kotlin.ktor)) + testApi(ktor("client-core", Versions.Kotlin.ktor)) + testApi(ktor("network", Versions.Kotlin.ktor)) + testApi("org.jsoup:jsoup:1.12.1") } val miraiConsoleVersion: String by project.ext diff --git a/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt b/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt index c0f988fb9..d14b4c812 100644 --- a/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt +++ b/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt @@ -18,7 +18,6 @@ import net.mamoe.mirai.console.command.DefaultCommands import net.mamoe.mirai.console.plugins.PluginManager import net.mamoe.mirai.console.utils.MiraiConsoleUI import net.mamoe.mirai.utils.SimpleLogger.LogPriority -import net.mamoe.mirai.utils.cryptor.ECDH import net.mamoe.mirai.utils.io.encodeToString import java.io.ByteArrayOutputStream import java.io.PrintStream @@ -83,13 +82,6 @@ object MiraiConsole { logger("Mirai为开源项目,请自觉遵守开源项目协议") logger("Powered by Mamoe Technologies and contributors") - /* 加载ECDH */ - try { - ECDH() - } catch (ignored: Exception) { - } - //Security.removeProvider("BC") - /* 依次启用功能 */ DefaultCommands() PluginManager.loadPlugins()