Skip to content

Commit

Permalink
Add Manifest; Disabling SwingSolver with vm property `mirai.no-deskto…
Browse files Browse the repository at this point in the history
…p` (mamoe#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 <[email protected]>
  • Loading branch information
Karlatemp and Him188 authored Jun 15, 2020
1 parent f74ee54 commit f5165f7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

我们欢迎一切形式的贡献。
Expand Down
8 changes: 8 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f5165f7

Please sign in to comment.