Skip to content

Commit

Permalink
[SCL 3.23] Update from upstream
Browse files Browse the repository at this point in the history
haven't done this in a while, technically upgrades SCL to foxglove since I don't think I did that yet
  • Loading branch information
SolDev69 committed Jan 5, 2025
2 parents 11bbbc3 + 2e596cd commit 67752d7
Show file tree
Hide file tree
Showing 169 changed files with 5,034 additions and 2,792 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
open_collective: pojavlauncher
patreon: pojavlauncher
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ jobs:
branch: buildjre17-21
name: jre21-pojav

- uses: gradle/gradle-build-action@v2
- uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 7.6.1
gradle-version: "8.11"

- name: Build JRE JAR files
run: |
Expand Down
2 changes: 1 addition & 1 deletion GPLAY_PRIVACY_POLICY
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1. This app (while idle) does NOT collect any sensitive information, and does NOT use network (exception is the "News" page, it uses network to load the launcher news)
1. This app (while idle) does NOT collect any sensitive information, and uses network for downloading Minecraft resources.
2. While running Minecraft, app also does NOT collect any sensitive information about your device. Snooper by Mojang does.
3. Some sensitive data is stored in crash reports after the game crashes, but it's not being shared to anyone except the current user.
827 changes: 159 additions & 668 deletions LICENSE

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SolCraftLauncher is a fork of PojavLauncher with more technical added features,
[![Android CI](https://github.com/PojavLauncherTeam/PojavLauncher/workflows/Android%20CI/badge.svg)](https://github.com/PojavLauncherTeam/PojavLauncher/actions)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/PojavLauncherTeam/PojavLauncher)](https://github.com/PojavLauncherTeam/PojavLauncher/actions)
[![Crowdin](https://badges.crowdin.net/pojavlauncher/localized.svg)](https://crowdin.com/project/pojavlauncher)
[![Discord](https://img.shields.io/discord/724163890803638273.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.com/invite/pojavlauncher-724163890803638273)
[![Discord](https://img.shields.io/discord/724163890803638273.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.com/invite/aenk3EUvER)
[![Twitter Follow](https://img.shields.io/twitter/follow/plaunchteam?color=blue&style=flat-square)](https://twitter.com/PLaunchTeam)

* From [Boardwalk](https://github.com/zhuowei/Boardwalk)'s ashes here comes PojavLauncher!
Expand All @@ -26,10 +26,10 @@ SolCraftLauncher is a fork of PojavLauncher with more technical added features,

* It can run almost every version of Minecraft, allowing you to use .jar only installers to install modloaders such as [Forge](https://files.minecraftforge.net/) and [Fabric](http://fabricmc.net/), mods like [OptiFine](https://optifine.net) and [LabyMod](https://www.labymod.net/en), as well as hack clients like [Wurst](https://www.wurstclient.net/), and much more!

* For more details [check out our wiki](https://github.com/PojavLauncherTeam/PojavLauncher/wiki)
* For more details [check out our wiki](https://pojavlauncherteam.github.io/)
## Some notes to start with
- We do not have an official TikTok account. No one from the dev team makes TikTok videos.
- The official Twitter for PojavLauncher is [@PLaunchTeam](https://twitter.com/PLaunchTeam). Any others (most notably @PojavLauncher) are fake, please report them to Twitter's moderation team.
- The official Twitter for PojavLauncher is [@PLaunchTeam](https://twitter.com/PLaunchTeam). Any others (most notably @PojavLauncher) are fake.

## Navigation
- [Introduction](#introduction)
Expand Down Expand Up @@ -124,7 +124,7 @@ Then, run these commands ~~or build using Android Studio~~.
- Probably more, that's why we have a bug tracker ;)

## License
- PojavLauncher is licensed under [GNU GPLv3](https://github.com/khanhduytran0/PojavLauncher/blob/master/LICENSE).
- PojavLauncher is licensed under [GNU LGPLv3](https://github.com/PojavLauncherTeam/PojavLauncher/blob/v3_openjdk/LICENSE).

## Contributing
Contributions are welcome! We welcome any type of contribution, not only code. For example, you can help the wiki shape up. You can help the [translation](https://crowdin.com/project/pojavlauncher) too!
Expand Down
22 changes: 16 additions & 6 deletions app_pojavlauncher/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.android.application' version '7.4.2'
id 'com.android.application' version '8.7.2'
}

static def getDate() { return new Date().format('yyyyMMdd') }
Expand Down Expand Up @@ -90,7 +90,7 @@ configurations {
android {
namespace 'net.kdt.pojavlaunch'

compileSdk = 33
compileSdk = 34

lintOptions {
abortOnError false
Expand All @@ -114,7 +114,7 @@ android {
defaultConfig {
applicationId "net.kdt.pojavlaunch"
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode getDateSeconds()
versionName getVersionName()
multiDexEnabled true //important
Expand All @@ -137,6 +137,10 @@ android {
minifyEnabled true
shrinkResources true
}
proguardNoDebug {
initWith proguard
debuggable false
}

release {
// Don't set to true or java.awt will be a.a or something similar.
Expand Down Expand Up @@ -182,9 +186,15 @@ android {

buildFeatures {
prefab true
buildConfig true
}

buildToolsVersion = '33.0.2'
buildToolsVersion = '34.0.0'
}

afterEvaluate {
// Explicit dependencies for which the apk relies on
tasks.mergeDebugAssets.dependsOn(":forge_installer:jar", ":arc_dns_injector:jar", ":jre_lwjgl3glfw:jar")
}

dependencies {
Expand All @@ -203,8 +213,8 @@ dependencies {
implementation 'com.github.PojavLauncherTeam:portrait-sdp:ed33e89cbc'
implementation 'com.github.PojavLauncherTeam:portrait-ssp:6c02fd739b'
implementation 'com.github.Mathias-Boulay:ExtendedView:1.0.0'
implementation 'com.github.Mathias-Boulay:android_gamepad_remapper:06184ddbce'
implementation 'com.github.Mathias-Boulay:virtual-joystick-android:2e7aa25e50'
implementation 'com.github.Mathias-Boulay:android_gamepad_remapper:2.0.3'
implementation 'com.github.Mathias-Boulay:virtual-joystick-android:1.14'

// implementation 'com.intuit.sdp:sdp-android:1.0.5'
// implementation 'com.intuit.ssp:ssp-android:1.0.5'
Expand Down
15 changes: 10 additions & 5 deletions app_pojavlauncher/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"/>

<application
android:name=".PojavApplication"
Expand Down Expand Up @@ -104,7 +106,7 @@
<activity
android:name=".MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|keyboard|navigation|uiMode"
android:launchMode="standard"
android:launchMode="singleTop"
android:process=":game"
android:screenOrientation="sensorLandscape" />

Expand All @@ -119,10 +121,13 @@
</intent-filter>
</provider>

<service android:name=".services.ProgressService" />
<service
android:name=".services.GameService"
android:process=":game" />
<service android:name=".services.ProgressService"
android:foregroundServiceType="dataSync"/>
<service android:name=".services.GameService" android:process=":game"
android:foregroundServiceType="specialUse">
<property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="This application is intended to run a 3rd-party piece of software which cannot be managed using the activity's saved instance state. This service is used for background persistence of this piece of software."/>
</service>
</application>
<queries>
<package android:name="net.kdt.pojavlaunch.ffmpeg"/>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1731000005291
1732218529630
164 changes: 164 additions & 0 deletions app_pojavlauncher/src/main/java/com/kdt/CustomSeekbar.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
package com.kdt;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Build;
import android.util.AttributeSet;
import android.widget.SeekBar;

import androidx.annotation.Nullable;

import net.kdt.pojavlaunch.R;

/**
* Seekbar with ability to handle ranges and increments
*/
@SuppressLint("AppCompatCustomView")
public class CustomSeekbar extends SeekBar {
private int mMin = 0;
private int mIncrement = 1;
private SeekBar.OnSeekBarChangeListener mListener;

private final OnSeekBarChangeListener mInternalListener = new OnSeekBarChangeListener() {
/** When using increments, this flag is used to prevent double calls to the listener */
private boolean internalChanges = false;
/** Store the previous progress to prevent double calls with increments */
private int previousProgress = 0;
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if (internalChanges) return;
internalChanges = true;

progress += mMin;
progress = applyIncrement(progress);

if (progress != previousProgress) {
if (mListener != null) {
previousProgress = progress;
mListener.onProgressChanged(seekBar, progress, fromUser);
}
}

// Forces the thumb to snap to the increment
setProgress(progress);
internalChanges = false;
}

@Override
public void onStartTrackingTouch(SeekBar seekBar) {
if (internalChanges) return;

if (mListener != null) {
mListener.onStartTrackingTouch(seekBar);
}
}

@Override
public void onStopTrackingTouch(SeekBar seekBar) {
if (internalChanges) return;
internalChanges = true;

setProgress(seekBar.getProgress());

if (mListener != null) {
mListener.onStopTrackingTouch(seekBar);
}
internalChanges = false;
}
};

public CustomSeekbar(Context context) {
super(context);
setup(null);
}

public CustomSeekbar(Context context, AttributeSet attrs) {
super(context, attrs);
setup(attrs);
}

public CustomSeekbar(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
setup(attrs);
}

public void setIncrement(int increment) {
mIncrement = increment;
}

public void setRange(int min, int max) {
mMin = min;
setMax(max - min);
}

@Override
public synchronized void setProgress(int progress) {
super.setProgress(applyIncrement(progress - mMin));
}

@Override
public void setProgress(int progress, boolean animate) {
super.setProgress(applyIncrement(progress - mMin), animate);
}

@Override
public synchronized int getProgress() {
return applyIncrement(super.getProgress() + mMin);
}

@Override
public synchronized void setMin(int min) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
super.setMin(0);
}
mMin = min;
//todo perform something to update the progress ?
}



/**
* Wrapper to allow for a listener to be set around the internal listener
*/
@Override
public void setOnSeekBarChangeListener(OnSeekBarChangeListener l) {
mListener = l;
}

public void setup(@Nullable AttributeSet attrs) {
try (TypedArray attributes = getContext().obtainStyledAttributes(attrs, R.styleable.CustomSeekbar)) {
setIncrement(attributes.getInt(R.styleable.CustomSeekbar_seekBarIncrement, 1));
int min = attributes.getInt(R.styleable.CustomSeekbar_android_min, 0);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
super.setMin(0);
}
setRange(min, super.getMax());
}

// Due to issues with negative progress when setting up the seekbar
// We need to set a random progress to force the refresh of the thumb
if(super.getProgress() == 0) {
super.setProgress(super.getProgress() + 1);
post(() -> {
super.setProgress(super.getProgress() - 1);
post(() -> super.setOnSeekBarChangeListener(mInternalListener));
});
} else {
super.setOnSeekBarChangeListener(mInternalListener);
}
}

/**
* Apply increment to the progress
* @param progress Progress to apply increment to
* @return Progress with increment applied
*/
private int applyIncrement(int progress) {
if (mIncrement < 1) return progress;

progress = progress / mIncrement;
progress = progress * mIncrement;
return progress;
}
}
Loading

0 comments on commit 67752d7

Please sign in to comment.