mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-07-07 00:09:46 +03:00
Compare commits
8 commits
34d567df17
...
dd32e4edbc
Author | SHA1 | Date | |
---|---|---|---|
|
dd32e4edbc | ||
|
b1929f7927 | ||
|
c46503fa95 | ||
|
8421da7772 | ||
|
26c21a3ec7 | ||
|
bd0423460f | ||
|
846ab77795 | ||
|
0e1691ee4c |
7 changed files with 16 additions and 12 deletions
|
@ -129,7 +129,7 @@
|
|||
|
||||
tasks.register('dumpProguard', Copy) {
|
||||
duplicatesStrategy = 'EXCLUDE'
|
||||
into "$buildDir/libs/proguard"
|
||||
into "$buildDir/libs/proguard-libraries"
|
||||
from configurations.proguardPack
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,9 @@ public CompletedProfile pushUpdate(UncompletedProfile profile, String tag, Clien
|
|||
if(!Files.exists(assetDirPath)) {
|
||||
Files.createDirectories(assetDirPath);
|
||||
}
|
||||
updatesDirMap.put("assets", new HashedDir(assetDirPath, null, true, true));
|
||||
var assetsHDir = new HashedDir(assetDirPath, null, true, true);
|
||||
updatesDirMap.put("assets", assetsHDir);
|
||||
localProfile.assetDir = assetsHDir;
|
||||
}
|
||||
}
|
||||
if(assetActions != null && !assetActions.isEmpty()) {
|
||||
|
@ -182,7 +184,7 @@ private void writeCache(Path file) throws IOException {
|
|||
}
|
||||
|
||||
private void readCache(Path file) throws IOException {
|
||||
Map<String, HashedDir> updatesDirMap = new HashMap<>(16);
|
||||
Map<String, HashedDir> updatesDirMap = new ConcurrentHashMap<>(16);
|
||||
try (HInput input = new HInput(IOHelper.newInput(file))) {
|
||||
int size = input.readLength(0);
|
||||
for (int i = 0; i < size; ++i) {
|
||||
|
@ -192,7 +194,7 @@ private void readCache(Path file) throws IOException {
|
|||
}
|
||||
}
|
||||
logger.debug("Found {} updates from cache", updatesDirMap.size());
|
||||
this.updatesDirMap = Collections.unmodifiableMap(updatesDirMap);
|
||||
this.updatesDirMap = updatesDirMap;
|
||||
}
|
||||
|
||||
public void readProfilesDir() throws IOException {
|
||||
|
@ -248,7 +250,7 @@ public void sync(Collection<String> dirs) throws IOException {
|
|||
newUpdatesDirMap.put(name, updateHDir);
|
||||
}
|
||||
}
|
||||
updatesDirMap = Collections.unmodifiableMap(newUpdatesDirMap);
|
||||
updatesDirMap = newUpdatesDirMap;
|
||||
if (cacheUpdates) {
|
||||
try {
|
||||
writeCache(Path.of(cacheFile));
|
||||
|
|
|
@ -129,7 +129,6 @@ protected void initProps(BuildContext context) {
|
|||
String unlockSecret = SecurityHelper.randomStringToken();
|
||||
context.pipelineContext.putProperty("unlockSecret", unlockSecret);
|
||||
context.properties.put("runtimeconfig.unlockSecret", unlockSecret);
|
||||
context.properties.put("runtimeconfig.buildNumber", 1);
|
||||
}
|
||||
|
||||
public byte[] transformClass(byte[] bytes, String classname, BuildContext context) {
|
||||
|
|
|
@ -44,7 +44,7 @@ protected boolean showApplyDialog(String text) throws IOException {
|
|||
return response.equals("y");
|
||||
}
|
||||
|
||||
protected static Downloader downloadWithProgressBar(String taskName, List<Downloader.SizedFile> list, String baseUrl, Path targetDir) throws Exception {
|
||||
public static Downloader downloadWithProgressBar(String taskName, List<Downloader.SizedFile> list, String baseUrl, Path targetDir) throws Exception {
|
||||
long total = 0;
|
||||
for (Downloader.SizedFile file : list) {
|
||||
if(file.size < 0) {
|
||||
|
|
|
@ -297,6 +297,9 @@ public UUID getUUID() {
|
|||
|
||||
@Override
|
||||
public String getMinecraftVersion() {
|
||||
if(version == null) {
|
||||
return null;
|
||||
}
|
||||
return version.toString();
|
||||
}
|
||||
|
||||
|
@ -316,8 +319,6 @@ public boolean hasFlag(CompatibilityFlags flag) {
|
|||
|
||||
public void verify() {
|
||||
// Version
|
||||
getMinecraftVersion();
|
||||
IOHelper.verifyFileName(getAssetIndex());
|
||||
|
||||
// Client
|
||||
VerifyHelper.verify(getTitle(), VerifyHelper.NOT_EMPTY, "Profile title can't be empty");
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
# Modification of the launcher sashok724's v3 from Gravit [](https://travis-ci.com/GravitLauncher/Launcher)
|
||||
# Modification of the launcher sashok724's v3 from Gravit
|
||||
[](https://travis-ci.com/GravitLauncher/Launcher)
|
||||
[](https://discord.gg/b9QG4ygY75)
|
||||
|
||||
* [Discord channel](https://discord.gg/b9QG4ygY75)
|
||||
|
||||
|
@ -9,4 +11,4 @@
|
|||
|
||||
```sh
|
||||
curl -s https://raw.githubusercontent.com/GravitLauncher/Launcher/master/get_it.sh | sh
|
||||
```
|
||||
```
|
||||
|
|
2
modules
2
modules
|
@ -1 +1 @@
|
|||
Subproject commit 3ce7d4feb1b95152917c9ed85a5186c145a9376c
|
||||
Subproject commit e6b8af9b107ea8c7dab4fc5968cfd0cff05b7d61
|
Loading…
Reference in a new issue