Skip to content

Commit c53eac3

Browse files
chore: Merge branch dev to main (#92)
2 parents 87c60df + 0524a92 commit c53eac3

5 files changed

Lines changed: 44 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
## [1.6.3-dev.4](https://github.com/MorpheApp/morphe-cli/compare/v1.6.3-dev.3...v1.6.3-dev.4) (2026-03-28)
2+
3+
4+
### Bug Fixes
5+
6+
* Handle patching XAPK files ([#93](https://github.com/MorpheApp/morphe-cli/issues/93)) ([5d18490](https://github.com/MorpheApp/morphe-cli/commit/5d18490305f10949bf5407bc7167549e3a1cc8f4))
7+
8+
## [1.6.3-dev.3](https://github.com/MorpheApp/morphe-cli/compare/v1.6.3-dev.2...v1.6.3-dev.3) (2026-03-28)
9+
10+
11+
### Bug Fixes
12+
13+
* Handle running CLI in headless environment ([#95](https://github.com/MorpheApp/morphe-cli/issues/95)) ([70f2952](https://github.com/MorpheApp/morphe-cli/commit/70f2952b09de57ad7c06bd92365025d38164ed26))
14+
15+
## [1.6.3-dev.2](https://github.com/MorpheApp/morphe-cli/compare/v1.6.3-dev.1...v1.6.3-dev.2) (2026-03-24)
16+
17+
18+
### Bug Fixes
19+
20+
* Update to latest Patcher ([fbc6c9e](https://github.com/MorpheApp/morphe-cli/commit/fbc6c9e2dbab2db9b46f442feeec1a2df565114e))
21+
22+
## [1.6.3-dev.1](https://github.com/MorpheApp/morphe-cli/compare/v1.6.2...v1.6.3-dev.1) (2026-03-23)
23+
24+
25+
### Bug Fixes
26+
27+
* Update to Patcher 1.3.3 ([ca579fb](https://github.com/MorpheApp/morphe-cli/commit/ca579fbc8afa32b98a77475ae4db0792d1165a3d))
28+
129
## [1.6.2](https://github.com/MorpheApp/morphe-cli/compare/v1.6.1...v1.6.2) (2026-03-22)
230

331

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
org.gradle.parallel = true
22
org.gradle.caching = true
33
kotlin.code.style = official
4-
version = 1.6.2
4+
version = 1.6.3-dev.4

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ kotlin = "2.3.0"
77
# CLI
88
picocli = "4.7.7"
99
arsclib = "9696ffecda"
10-
morphe-patcher = "1.3.2"
10+
morphe-patcher = "1.3.3"
1111
morphe-library = "1.3.0"
1212

1313
# Compose Desktop

src/main/kotlin/app/morphe/MorpheLauncher.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@
66
package app.morphe
77

88
import app.morphe.library.logging.Logger
9+
import java.awt.GraphicsEnvironment
910

1011
fun main(args: Array<String>) {
11-
if (args.isEmpty()) {
12+
if (args.isEmpty() && !GraphicsEnvironment.isHeadless()) {
1213
app.morphe.gui.launchGui(args)
1314
} else {
1415
Logger.setDefault()
16+
17+
if (GraphicsEnvironment.isHeadless()){
18+
val logger = java.util.logging.Logger.getLogger("app.morphe.MorpheLauncher")
19+
logger.info("Running in Headless environment, falling back to CLI mode.")
20+
}
21+
1522
picocli.CommandLine(app.morphe.cli.command.MainCommand)
1623
.execute(*args)
1724
.let(System::exit)

src/main/kotlin/app/morphe/cli/command/PatchCommand.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,11 @@ internal object PatchCommand : Callable<Int> {
431431

432432
val patcherTemporaryFilesPath = temporaryFilesPath.resolve("patcher")
433433

434-
// Checking if the file is in apkm format (like reddit)
435-
val inputApk = if (apk.extension.equals("apkm", ignoreCase = true)) {
436-
logger.info("Merging APKM bundle")
434+
// We need to check for apkm (like reddit), xapk and apks formats here
435+
436+
val inputApk = if (apk.extension.lowercase() in setOf("apkm", "xapk", "apks")) {
437+
438+
logger.info("Merging split APK bundle")
437439

438440
// Save merged APK to output directory (will be cleaned up after patching)
439441
val outputApk = outputFilePath.parentFile.resolve("${apk.nameWithoutExtension}-merged.apk")
@@ -752,7 +754,7 @@ internal object PatchCommand : Callable<Int> {
752754
purge(temporaryFilesPath)
753755
}
754756

755-
// Clean up merged APK if we created one from APKM
757+
// Clean up merged apk if we created one from apkm, xapk or apks
756758
mergedApkToCleanup?.let {
757759
if (!it.delete()) {
758760
logger.warning("Could not clean up merged APK: ${it.path}")

0 commit comments

Comments
 (0)