File tree Expand file tree Collapse file tree
src/main/kotlin/app/morphe Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 11org.gradle.parallel = true
22org.gradle.caching = true
33kotlin.code.style = official
4- version = 1.6.2
4+ version = 1.6.3-dev.4
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ kotlin = "2.3.0"
77# CLI
88picocli = " 4.7.7"
99arsclib = " 9696ffecda"
10- morphe-patcher = " 1.3.2 "
10+ morphe-patcher = " 1.3.3 "
1111morphe-library = " 1.3.0"
1212
1313# Compose Desktop
Original file line number Diff line number Diff line change 66package app.morphe
77
88import app.morphe.library.logging.Logger
9+ import java.awt.GraphicsEnvironment
910
1011fun 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)
Original file line number Diff line number Diff 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} " )
You can’t perform that action at this time.
0 commit comments