mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-20 11:32:31 +01:00
Fix MacOS Build
This commit is contained in:
15
.github/workflows/Build.yml
vendored
15
.github/workflows/Build.yml
vendored
@@ -30,13 +30,7 @@ jobs:
|
|||||||
arch: x64
|
arch: x64
|
||||||
os: macOS-latest
|
os: macOS-latest
|
||||||
shell: bash
|
shell: bash
|
||||||
build: |
|
build: packageUberJarForCurrentOS packageDmg notarizeDmg
|
||||||
packageUberJarForCurrentOS \
|
|
||||||
packageDmg notarizeDmg \
|
|
||||||
-Pcompose.desktop.mac.sign=true \
|
|
||||||
-Pcompose.desktop.mac.signing.identity=${{ secrets.APPLE_IDENTITY }} \
|
|
||||||
-Pcompose.desktop.mac.notarization.appleID=${{ secrets.APPLE_ID }} \
|
|
||||||
-Pcompose.desktop.mac.notarization.password=${{ secrets.APPLE_PASSWORD }}
|
|
||||||
setupCl: ./scripts/SetupClUnix.sh
|
setupCl: ./scripts/SetupClUnix.sh
|
||||||
|
|
||||||
- runtime: win-x64
|
- runtime: win-x64
|
||||||
@@ -83,7 +77,12 @@ jobs:
|
|||||||
if: ${{ matrix.runtime != 'linux-centos-x64' }}
|
if: ${{ matrix.runtime != 'linux-centos-x64' }}
|
||||||
uses: eskatos/gradle-command-action@v1
|
uses: eskatos/gradle-command-action@v1
|
||||||
with:
|
with:
|
||||||
arguments: ${{ matrix.build }}
|
arguments: >
|
||||||
|
${{ matrix.build }}
|
||||||
|
-Pcompose.desktop.mac.sign=true
|
||||||
|
-Pcompose.desktop.mac.signing.identity="${{ secrets.APPLE_IDENTITY }}"
|
||||||
|
-Pcompose.desktop.mac.notarization.appleID="${{ secrets.APPLE_ID }}"
|
||||||
|
-Pcompose.desktop.mac.notarization.password="${{ secrets.APPLE_PASSWORD }}"
|
||||||
wrapper-cache-enabled: true
|
wrapper-cache-enabled: true
|
||||||
dependencies-cache-enabled: true
|
dependencies-cache-enabled: true
|
||||||
configuration-cache-enabled: true
|
configuration-cache-enabled: true
|
||||||
|
|||||||
@@ -38,9 +38,10 @@ private fun Task.onlyIfSigning(project: Project) {
|
|||||||
&& !File(rootDir, "src/main/resources/Tachidesk.jar").exists()
|
&& !File(rootDir, "src/main/resources/Tachidesk.jar").exists()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun Project.getSigningIdentity() = "${properties["compose.desktop.mac.signing.identity"]}".trim('"')
|
||||||
|
|
||||||
private fun isSigning(properties: Map<String, Any?>) = properties["compose.desktop.mac.sign"].toString() == "true"
|
private fun isSigning(properties: Map<String, Any?>) = properties["compose.desktop.mac.sign"].toString() == "true"
|
||||||
|
|
||||||
private fun Project.tmpDir() = File(rootDir, "tmp")
|
private fun Project.tmpDir() = File(rootDir, "tmp")
|
||||||
@@ -159,11 +160,13 @@ fun TaskContainerScope.registerTachideskTasks(project: Project) {
|
|||||||
exec {
|
exec {
|
||||||
commandLine(
|
commandLine(
|
||||||
"codesign",
|
"codesign",
|
||||||
|
"-vvvv",
|
||||||
"--deep",
|
"--deep",
|
||||||
"-vvv",
|
"--timestamp",
|
||||||
"-f",
|
"--options", "runtime",
|
||||||
"--sign",
|
"--force",
|
||||||
properties["compose.desktop.mac.signing.identity"],
|
"--prefix", "ca.gosyer.",
|
||||||
|
"--sign", "Developer ID Application: ${getSigningIdentity()}",
|
||||||
it.absolutePath
|
it.absolutePath
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,12 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
package ca.gosyer.data.server
|
package ca.gosyer.data.server
|
||||||
|
|
||||||
import ca.gosyer.common.prefs.Preference
|
import ca.gosyer.common.prefs.Preference
|
||||||
@@ -11,8 +17,7 @@ import kotlinx.coroutines.CoroutineScope
|
|||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.SharingStarted
|
import kotlinx.coroutines.flow.SharingStarted
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
import kotlinx.coroutines.flow.map
|
import kotlinx.coroutines.flow.combine
|
||||||
import kotlinx.coroutines.flow.merge
|
|
||||||
import kotlinx.coroutines.flow.stateIn
|
import kotlinx.coroutines.flow.stateIn
|
||||||
|
|
||||||
class ServerUrlPreference(
|
class ServerUrlPreference(
|
||||||
@@ -48,8 +53,9 @@ class ServerUrlPreference(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun changes(): Flow<String> {
|
override fun changes(): Flow<String> {
|
||||||
return merge(server.changes(), port.changes())
|
return combine(server.changes(), port.changes()) { server, port ->
|
||||||
.map { get() }
|
"$server:$port"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun stateIn(scope: CoroutineScope): StateFlow<String> {
|
override fun stateIn(scope: CoroutineScope): StateFlow<String> {
|
||||||
|
|||||||
@@ -4,6 +4,12 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
package ca.gosyer.ui.reader
|
package ca.gosyer.ui.reader
|
||||||
|
|
||||||
import androidx.compose.desktop.AppWindow
|
import androidx.compose.desktop.AppWindow
|
||||||
@@ -268,14 +274,14 @@ fun ChapterSeperator(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun NavigationMode.toNavigation() = when (this) {
|
private fun NavigationMode.toNavigation() = when (this) {
|
||||||
NavigationMode.RightAndLeftNavigation -> RightAndLeftNavigation()
|
NavigationMode.RightAndLeftNavigation -> RightAndLeftNavigation()
|
||||||
NavigationMode.KindlishNavigation -> KindlishNavigation()
|
NavigationMode.KindlishNavigation -> KindlishNavigation()
|
||||||
NavigationMode.LNavigation -> LNavigation()
|
NavigationMode.LNavigation -> LNavigation()
|
||||||
NavigationMode.EdgeNavigation -> EdgeNavigation()
|
NavigationMode.EdgeNavigation -> EdgeNavigation()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun ImageScale.toContentScale() = when (this) {
|
private fun ImageScale.toContentScale() = when (this) {
|
||||||
ImageScale.FitScreen -> ContentScale.Inside
|
ImageScale.FitScreen -> ContentScale.Inside
|
||||||
ImageScale.FitHeight -> ContentScale.FillHeight
|
ImageScale.FitHeight -> ContentScale.FillHeight
|
||||||
ImageScale.FitWidth -> ContentScale.FillWidth
|
ImageScale.FitWidth -> ContentScale.FillWidth
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ fun ContinuousReader(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun LazyListScope.items(
|
private fun LazyListScope.items(
|
||||||
pages: List<ReaderPage>,
|
pages: List<ReaderPage>,
|
||||||
paddingValues: PaddingValues,
|
paddingValues: PaddingValues,
|
||||||
previousChapter: ReaderChapter?,
|
previousChapter: ReaderChapter?,
|
||||||
|
|||||||
Reference in New Issue
Block a user