Skip to content

Commit 847b686

Browse files
committed
Use non-standard entry point for native to prevent interference.
1 parent dd1f677 commit 847b686

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

build.gradle.kts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ kotlin {
128128

129129
mingwX64("win") {
130130
binaries {
131-
executable(
132-
buildTypes = setOf(NativeBuildType.RELEASE)
133-
)
131+
executable(setOf(NativeBuildType.RELEASE)) {
132+
entryPoint = "com.ashampoo.xmp.main"
133+
}
134134
}
135135
}
136136

@@ -191,15 +191,12 @@ kotlin {
191191
macosArm64()
192192
).forEach {
193193

194-
it.binaries.executable(
195-
buildTypes = setOf(NativeBuildType.RELEASE)
196-
) {
194+
it.binaries.executable(setOf(NativeBuildType.RELEASE)) {
197195
baseName = "xmpcore"
196+
entryPoint = "com.ashampoo.xmp.main"
198197
}
199198

200-
it.binaries.framework(
201-
buildTypes = setOf(NativeBuildType.RELEASE)
202-
) {
199+
it.binaries.framework(setOf(NativeBuildType.RELEASE)) {
203200
baseName = "xmpcore"
204201
/* Part of the XCFramework */
205202
xcf.add(this)

src/commonMain/kotlin/com/ashampoo/xmp/impl/XMPIteratorImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class XMPIteratorImpl(
7171
this.options = options ?: IteratorOptions()
7272

7373
// the start node of the iteration depending on the schema and property filter
74-
var startNode: XMPNode? = null
74+
var startNode: XMPNode?
7575
var initialPath: String? = null
7676
val baseSchema = !schemaNS.isNullOrEmpty()
7777
val baseProperty = !propPath.isNullOrEmpty()

src/posixMain/kotlin/PosixByteArrayReader.kt renamed to src/posixMain/kotlin/com/ashampoo/xmp/PosixByteArrayReader.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package com.ashampoo.xmp
2+
13
import kotlinx.cinterop.CPointer
24
import kotlinx.cinterop.UnsafeNumber
35
import kotlinx.cinterop.memScoped

src/posixMain/kotlin/main.kt renamed to src/posixMain/kotlin/com/ashampoo/xmp/main.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import com.ashampoo.xmp.XMPMetaFactory
1+
package com.ashampoo.xmp
2+
23
import com.ashampoo.xmp.options.SerializeOptions
34
import platform.posix.perror
45

0 commit comments

Comments
 (0)