Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
79e803a
feat: implement DefaultGameRepositoryLayout for improved directory st…
Glavo Aug 2, 2026
c0f6fba
Move pure path resolution from DefaultGameRepository to GameRepositor…
Glavo Aug 2, 2026
a7c542f
refactor: update repository path resolution to use GameRepositoryLayout
Glavo Aug 2, 2026
365708d
feat: add DefaultGameInstance and GameInstance interface for game ins…
Glavo Aug 3, 2026
652af31
update
Glavo Aug 3, 2026
4cf2391
update
Glavo Aug 3, 2026
79ad339
feat: add version management to DefaultGameInstance and GameInstance …
Glavo Aug 3, 2026
ec65193
refactor: simplify DefaultGameInstance and DefaultGameRepository stru…
Glavo Aug 3, 2026
d3ad91c
refactor: enhance DefaultGameInstance and DefaultGameRepository by ut…
Glavo Aug 3, 2026
c1c141f
refactor: simplify HMCLGameInstance constructor and update instance c…
Glavo Aug 3, 2026
6f896bd
refactor: streamline game instance and repository structure with enha…
Glavo Aug 3, 2026
b1c0056
refactor: convert DefaultGameInstance, DefaultGameRepository, and Def…
Glavo Aug 3, 2026
4a91254
refactor: enhance game instance and repository management with improv…
Glavo Aug 3, 2026
942600a
Lift layout-agnostic repository path concepts to GameRepository
Glavo Aug 3, 2026
6619681
Track provisional and modpack install state on HMCLGameInstance via S…
Glavo Aug 3, 2026
52f37da
Cache game version on DefaultGameInstance instead of repository map
Glavo Aug 3, 2026
766a696
Seal published Status snapshots and update repository via copy-on-write
Glavo Aug 3, 2026
d8592e7
Expose sealed repository index as public GameRepositorySnapshot
Glavo Aug 3, 2026
767adea
Refactor DefaultGameRepository.Status to DefaultGameRepositoryStatus …
Glavo Aug 3, 2026
f7c7479
Rename DefaultGameRepositoryStatus to DefaultGameRepositorySnapshot f…
Glavo Aug 3, 2026
7bd6067
Add snapshot property for JavaFX bindings and update repository snaps…
Glavo Aug 3, 2026
5f8289b
Refactor snapshot handling in DefaultGameRepository for clarity and t…
Glavo Aug 3, 2026
039931a
Enhance DefaultGameInstance to support shared mod and resource-pack m…
Glavo Aug 3, 2026
a021d82
Refactor Download and Game instance handling to use HMCLGameInstance.…
Glavo Aug 3, 2026
e3bc3b1
Refactor game instance handling to use HMCLGameInstance directly for …
Glavo Aug 3, 2026
2893eb8
Refactor modpack completion tasks to use DefaultGameInstance for impr…
Glavo Aug 4, 2026
5368601
Refactor artifact file retrieval to use GameRepositoryLayout for impr…
Glavo Aug 4, 2026
5d22966
Refactor getSnapshot method to return DefaultGameRepositorySnapshot f…
Glavo Aug 4, 2026
4448768
Simplify Default/HMCL game repository snapshot access with direct casts
Glavo Aug 4, 2026
e674040
Refactor createInstance method to simplify HMCLGameInstance creation …
Glavo Aug 4, 2026
5864129
Refactor warning message to clarify ignored instance directory due to…
Glavo Aug 4, 2026
bda2569
Derive game version from ObjectProperty-held HMCLGameInstance in Game…
Glavo Aug 4, 2026
3aa6aba
Record non-conventional instance JSON and jar paths instead of renami…
Glavo Aug 4, 2026
e841988
Handle exceptions when loading game instances to improve error logging
Glavo Aug 4, 2026
b3d45db
Derive instance jar path from recorded manifest file instead of stori…
Glavo Aug 4, 2026
81714b3
Clarify logging messages for malformed instance JSON handling
Glavo Aug 4, 2026
ed3aa30
Remove unused GameJsonParseFailedEvent and simplify malformed instanc…
Glavo Aug 4, 2026
0aecccf
Make DefaultGameRepositorySnapshot mutators package-private
Glavo Aug 4, 2026
9270cb6
Remove unused rename/remove instance EventBus veto hooks
Glavo Aug 4, 2026
137e34d
Refactor instance handling: update logging message and streamline ins…
Glavo Aug 4, 2026
0b0bb27
Clarify logging messages for instance renaming and removal operations
Glavo Aug 4, 2026
305a475
Rename method for clarity and enhance error handling during file oper…
Glavo Aug 4, 2026
ba8cc09
Refactor game instance handling: remove GameInstanceLoadable interfac…
Glavo Aug 4, 2026
1ed6ff0
Refactor game instance resolution: replace method call to use getReso…
Glavo Aug 4, 2026
060f937
Drop redundant repository and id fields from ModpackUpdateTask
Glavo Aug 4, 2026
72497de
Clarify documentation for DefaultGameInstance and its snapshot behavi…
Glavo Aug 4, 2026
7c993c5
Bind LocalAddonManager to DefaultGameInstance instead of repository a…
Glavo Aug 4, 2026
925e7ea
Remove redundant constructors from Launcher classes
Glavo Aug 4, 2026
bd59499
Bind Launcher to GameInstance while keeping the launch manifest separate
Glavo Aug 4, 2026
024fed2
Bind repository-aware tasks to fixed game instances
Glavo Aug 4, 2026
042ada5
Remove redundant constructors from GameListItem, GameItem, LauncherHe…
Glavo Aug 4, 2026
32128cb
Refactor game instance handling in repository classes to streamline i…
Glavo Aug 4, 2026
bce3441
Remove unused generateLaunchScript method from Instances.java
Glavo Aug 4, 2026
86a7f64
Refactor game instance handling to use HMCLGameInstance and improve n…
Glavo Aug 4, 2026
e4d7842
Remove unused methods for instance game settings management in HMCLGa…
Glavo Aug 4, 2026
89f6258
refactor(modpack): Remove obsolete MCBBS remote install task
Glavo Aug 4, 2026
b60b538
refactor(HMCLGameRepository): Update instance ID conflict check to us…
Glavo Aug 4, 2026
7fd77df
refactor(DefaultGameRepository, HMCLGameRepository): streamline refre…
Glavo Aug 4, 2026
032e7d8
refactor(DefaultGameRepository, GameInstancePage, RootPage, GameDirec…
Glavo Aug 4, 2026
2b126cf
refactor(MainPage, GameListPopupMenu, RootPage, TerracottaPage): upda…
Glavo Aug 4, 2026
845706a
refactor(MainPage, DefaultGameRepository, HMCLGameRepository): update…
Glavo Aug 4, 2026
2f3ad34
refactor(HMCLGameRepository): enhance instance sorting by adding vers…
Glavo Aug 4, 2026
5d78396
refactor(HMCLGameRepository): remove obsolete PROFILE constant to cle…
Glavo Aug 4, 2026
42f8bf3
refactor(DefaultGameRepository): remove unused resource-pack manager …
Glavo Aug 4, 2026
8464648
refactor(DefaultGameRepository, NativePatcher): remove mod manager me…
Glavo Aug 4, 2026
e7af3f7
refactor(GameInstance, GameRepository): streamline instance methods b…
Glavo Aug 4, 2026
4bbc41a
refactor(GameLibrariesTask, LaunchManifestPreparation): enhance libra…
Glavo Aug 4, 2026
900448f
refactor(GameLibrariesTask, LaunchManifestPreparation): enhance libra…
Glavo Aug 5, 2026
4530d56
refactor(CurseInstallTask, GameRepository, ModpackInstallTasks): upda…
Glavo Aug 5, 2026
6935c2c
refactor(HMCLGameInstance, HMCLGameRepository, LauncherHelper): conso…
Glavo Aug 5, 2026
e8c6ce5
refactor(HMCLGameInstance): simplify running directory retrieval by r…
Glavo Aug 5, 2026
cd8fd50
refactor(HMCLGameInstance, HMCLGameRepository): move proxy option ret…
Glavo Aug 5, 2026
8ecd2ce
refactor(HMCLGameInstance): remove redundant initSettings method and …
Glavo Aug 5, 2026
bda387e
Remove provisional instances and install-time markAsModpack flags
Glavo Aug 5, 2026
40c2617
refactor(HMCLGameInstance, GameAdvancedListItem): improve icon image …
Glavo Aug 5, 2026
b52a450
refactor(HMCLGameInstance): enhance icon image caching and retrieval …
Glavo Aug 5, 2026
047b9d8
refactor(GameRepository): remove unused getResourcePackDirectory method
Glavo Aug 5, 2026
e0122ba
refactor(DefaultDependencyManager): rename variable for clarity in in…
Glavo Aug 5, 2026
ce3c166
Remove getRunDirectory from GameRepository in favor of instance and r…
Glavo Aug 5, 2026
c554604
refactor(GameRepository, InstallTasks): replace resolveRunDirectory w…
Glavo Aug 5, 2026
d5b5eaa
Pass explicit mods directory into Fabric and Quilt API install tasks
Glavo Aug 6, 2026
b01a00b
feat(BundledModpackBootstrap): add automatic modpack installation for…
Glavo Aug 6, 2026
47cebf0
feat(Launcher): implement automatic installation of bundled modpack o…
Glavo Aug 6, 2026
d8101bd
feat(BundledModpack): enhance automatic installation process and stre…
Glavo Aug 6, 2026
d17631a
feat(Controllers): streamline bundled modpack installation process an…
Glavo Aug 6, 2026
2d111e2
feat(Controllers): improve asynchronous task handling for bundled mod…
Glavo Aug 6, 2026
feaa9a5
feat(Repository): refactor refresh handling to utilize snapshots and …
Glavo Aug 6, 2026
96b449a
feat(GameVerification): refactor game version handling to use GameVer…
Glavo Aug 6, 2026
932b4b6
feat(GameCrashWindow): refactor to use HMCLGameInstance and streamlin…
Glavo Aug 6, 2026
f35b7ef
feat(Installers): refactor to use GameVersionNumber for improved vers…
Glavo Aug 6, 2026
0b6a129
feat(GameComponentType): add enum for game component types and librar…
Glavo Aug 6, 2026
1e1ecdb
feat(GameComponentType): rename patchVersion method to getComponentVe…
Glavo Aug 7, 2026
96919ca
feat(GameComponentType): rename patchVersion method to getComponentVe…
Glavo Aug 7, 2026
38840d6
feat(GameComponentAnalyzer): add GameComponentAnalyzer for enhanced g…
Glavo Aug 7, 2026
12799b9
feat(GameComponentAnalyzer): update component status handling and sim…
Glavo Aug 7, 2026
d1d32e9
feat(GameComponentType): add MOD_LOADERS list for filtering mod loade…
Glavo Aug 7, 2026
1f1eaec
feat(GameComponentAnalyzer): enhance mod loader support and refactor …
Glavo Aug 7, 2026
af48731
feat(GameComponentAnalyzer): replace LibraryAnalyzer references with …
Glavo Aug 7, 2026
10685ed
feat(GameVerificationFixTask): replace LibraryAnalyzer with GameCompo…
Glavo Aug 7, 2026
3c17b69
feat(DefaultDependencyManager): replace LibraryAnalyzer with GameComp…
Glavo Aug 7, 2026
2f594e5
feat(InstallerItem): replace LibraryAnalyzer with GameComponentType f…
Glavo Aug 7, 2026
9ce42e3
feat(CleanroomInstallTask): replace LibraryAnalyzer with GameComponen…
Glavo Aug 7, 2026
04f6b75
feat(RemoteVersion): replace LibraryAnalyzer with GameComponentType f…
Glavo Aug 7, 2026
b48a764
feat(InstallerItem, InstallersPage): replace LibraryAnalyzer with Gam…
Glavo Aug 7, 2026
9a1478e
feat(LiteLoaderInstallTask, MultiMCComponents, MultiMCInstancePatch, …
Glavo Aug 7, 2026
754a5b5
feat(DefaultLauncher, DownloadPage, MultiMCInstancePatch): replace Li…
Glavo Aug 7, 2026
598c544
feat(ServerModpackExportTask): replace LibraryAnalyzer with GameCompo…
Glavo Aug 7, 2026
05e5db0
feat(GameItem, InstallerListPage, LaunchManifestNormalizer, McbbsModp…
Glavo Aug 7, 2026
fb74bfd
feat(FabricInstallTask, ForgeNewInstallTask, ForgeOldInstallTask, Lau…
Glavo Aug 7, 2026
18bf4af
feat(LaunchClasspathResolver, LaunchManifestNormalizer, McbbsModpackE…
Glavo Aug 7, 2026
fdb875e
feat(DefaultDependencyManager, DownloadPage, GameComponentAnalyzer, I…
Glavo Aug 7, 2026
1efffbc
feat(FabricRemoteVersion, ForgeRemoteVersion, GameLibrariesTask, Game…
Glavo Aug 7, 2026
c7e5378
feat(AdditionalInstallersPage, GameInstallTask, InstallerItem, Instal…
Glavo Aug 7, 2026
a85284f
refactor(GameComponentAnalyzer, GameInstanceManifestTest, GameInstanc…
Glavo Aug 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions HMCL/src/main/java/org/jackhuang/hmcl/Metadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.jackhuang.hmcl.util.platform.OperatingSystem;
import org.jetbrains.annotations.Nullable;

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.EnumSet;

Expand Down Expand Up @@ -133,4 +134,32 @@ else if (OperatingSystem.CURRENT_OS == OperatingSystem.MACOS)
return null;
}
}

/// Directory under [HMCL_LOCAL_HOME] that holds a launcher-bundled modpack for automatic install.
public static final String BUNDLED_MODPACK_DIRECTORY_NAME = "modpack";

/// Returns the directory for a launcher-bundled modpack (`[HMCL_LOCAL_HOME]/modpack`).
public static Path getBundledModpackDirectory() {
return HMCL_LOCAL_HOME.resolve(BUNDLED_MODPACK_DIRECTORY_NAME);
}

/// Returns the bundled modpack package under [getBundledModpackDirectory], if present.
///
/// Prefers `modpack.zip` over `modpack.mrpack` when both exist. Presence of the package is the
/// signal to offer automatic install; the file is removed after a successful install.
///
/// @return the modpack path, or `null` when no package is present
public static @Nullable Path findBundledModpackFile() {
Path directory = getBundledModpackDirectory();
Path zipModpack = directory.resolve("modpack.zip");
if (Files.isRegularFile(zipModpack)) {
return zipModpack;
}
Path mrpackModpack = directory.resolve("modpack.mrpack");
if (Files.isRegularFile(mrpackModpack)) {
return mrpackModpack;
}
return null;
}

}
Loading