Add Manifest; Disabling SwingSolver with vm property mirai.no-desktop (#362)

* Disabling SwingSolver with vm property 'mirai.no-desktop'

// for ssh
// java -Dmirai.no-desktop ....

* Add Manifest

* Removed Per-Entry Attributes

Co-authored-by: Him188 <Him188@mamoe.net>
This commit is contained in:
Karlatemp 2020-06-15 11:13:15 +08:00 committed by GitHub
parent f74ee547f2
commit f5165f7d77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -134,6 +134,7 @@ Demos: [mirai-demos](https://github.com/mamoe/mirai-demos)
- 酷Q的插件可以在 mirai 中加载, 详见 [Mirai-Native](https://github.com/iTXTech/mirai-native)
- 使用 `酷Q HTTP API` 的插件将可以在 mirai 中加载,`Mirai-CQ-Adapter` 正在进行中
## [贡献](CONTRIBUTING.md)
我们欢迎一切形式的贡献。

View File

@ -93,6 +93,14 @@ subprojects {
file.name.endsWith(".sf", ignoreCase = true)
.also { if (it) println("excluded ${file.name}") }
}
this.manifest {
this.attributes(
"Manifest-Version" to 1,
"Implementation-Vendor" to "Mamoe Technologies",
"Implementation-Title" to this@afterEvaluate.name.toString(),
"Implementation-Version" to this@afterEvaluate.version.toString()
)
}
}
val githubUpload by tasks.creating {

View File

@ -28,7 +28,7 @@ import javax.swing.SwingUtilities
internal object WindowHelperJvm {
internal val isDesktopSupported: Boolean =
kotlin.runCatching {
Desktop.isDesktopSupported()
System.getProperty("mirai.no-desktop") === null && Desktop.isDesktopSupported()
}.getOrElse {
false
}