Merge pull request #284 from AnBui2004/master

Orange cake
This commit is contained in:
An Bui 2025-04-06 21:20:33 +07:00 committed by GitHub
commit 6764a534a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 36 additions and 18 deletions

View file

@ -11,7 +11,7 @@ android {
minSdk minApi
targetSdk targetApi
versionCode 21
versionName "v2.9.5-3dfx-neapolitanicecream"
versionName "v2.9.5-3dfx-orangecake"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}

View file

@ -575,6 +575,7 @@ public class CustomRomActivity extends AppCompatActivity {
previousName = current.itemName;
} else {
checkVMID();
if (getIntent().hasExtra("addromnow")) {
title.setText(getIntent().getStringExtra("romname"));
if (Objects.requireNonNull(getIntent().getStringExtra("romextra")).isEmpty()) {
@ -685,7 +686,6 @@ public class CustomRomActivity extends AppCompatActivity {
protected void onActivityResult(int requestCode, int resultCode, Intent ReturnedIntent) {
super.onActivityResult(requestCode, resultCode, ReturnedIntent);
checkVMID();
File romDir = new File(AppConfig.vmFolder + vmID);
romDir.mkdirs();
@ -1089,7 +1089,6 @@ public class CustomRomActivity extends AppCompatActivity {
}
private void importCVBI(String _filepath, String _filename) {
checkVMID();
LinearLayout custom = findViewById(R.id.custom);
ImageView ivIcon = findViewById(R.id.ivIcon);
if (_filepath.endsWith(".cvbi") || _filepath.endsWith(".cvbi.zip")) {

View file

@ -141,6 +141,7 @@ public class MainActivity extends AppCompatActivity {
private boolean doneonstart = false;
public static boolean isActivate = false;
public boolean skipIDEwithARM64DialogInStartVM = false;
BottomAppBar bottomAppBar;
@Override
protected void onCreate(Bundle bundle) {
@ -155,9 +156,6 @@ public class MainActivity extends AppCompatActivity {
NotificationManager notificationManager = (NotificationManager) activity.getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancelAll();
if (MainSettingsManager.getPromptUpdateVersion(activity))
updateApp(false);
new LibraryChecker(activity).checkMissingLibraries(activity);
romsLayout = findViewById(R.id.romsLayout);
@ -705,6 +703,9 @@ public class MainActivity extends AppCompatActivity {
setupBottomAppBar();
if (MainSettingsManager.getPromptUpdateVersion(activity))
updateApp(false);
String command = "qemu-system-x86_64 --version";
new Terminal(activity).extractQemuVersion(command, false, activity, (output, errors) -> {
if (errors.isEmpty()) {
@ -775,6 +776,7 @@ public class MainActivity extends AppCompatActivity {
versionNameonUpdate = obj.getString("versionNameBeta");
if (versionCode < obj.getInt("versionCode") || !versionNameonUpdate.equals(versionName)) {
if (showDialog) {
AlertDialog.Builder alert = new AlertDialog.Builder(activity, R.style.MainDialogTheme);
alert.setTitle("Install the latest version")
.setMessage(Html.fromHtml(obj.getString("MessageBeta") + "<br><br>Update size:<br>" + obj.getString("sizeBeta")))
@ -788,12 +790,16 @@ public class MainActivity extends AppCompatActivity {
}
}
}).show();
} else {
View _update = findViewById(R.id.update);
_update.setVisibility(View.VISIBLE);
}
}
} else {
versionNameonUpdate = obj.getString("versionName");
if (versionCode < obj.getInt("versionCode") || !versionNameonUpdate.contains(versionName)) {
if (showDialog) {
AlertDialog.Builder alert = new AlertDialog.Builder(activity, R.style.MainDialogTheme);
alert.setTitle("Install the latest version")
.setMessage(Html.fromHtml(obj.getString("Message") + "<br><br>Update size:<br>" + obj.getString("size")))
@ -807,7 +813,10 @@ public class MainActivity extends AppCompatActivity {
}
}
}).show();
} else {
View _update = findViewById(R.id.update);
_update.setVisibility(View.VISIBLE);
}
}
}
} else if (result.contains("Error on getting data") && showDialog) {
@ -1496,11 +1505,13 @@ public class MainActivity extends AppCompatActivity {
}
private void setupBottomAppBar() {
BottomAppBar bottomAppBar = findViewById(R.id.bottomAppBar);
bottomAppBar = findViewById(R.id.bottomAppBar);
bottomAppBar.setOnMenuItemClickListener(new BottomAppBar.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
if (item.getItemId() == R.id.shutdown) {
if (item.getItemId() == R.id.update) {
updateApp(true);
} else if (item.getItemId() == R.id.shutdown) {
alertDialog = new AlertDialog.Builder(activity, R.style.MainDialogTheme).create();
alertDialog.setTitle(getResources().getString(R.string.do_you_want_to_kill_all_qemu_processes));
alertDialog.setMessage(getResources().getString(R.string.all_running_vms_will_be_forcibly_shut_down));
@ -1528,6 +1539,8 @@ public class MainActivity extends AppCompatActivity {
return false;
}
});
View _update = findViewById(R.id.update);
_update.setVisibility(View.GONE);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -1,22 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/update"
android:icon="@drawable/update48"
android:title="@string/update"
android:contentDescription="@string/update"
app:showAsAction="always"/>
<item
android:id="@+id/shutdown"
android:icon="@drawable/power_settings_new_24px"
android:title="@string/killqemu"
android:contentDescription="@string/killqemu"
app:showAsAction="ifRoom"/>
app:showAsAction="always"/>
<item
android:id="@+id/backtothedisplay"
android:icon="@drawable/desktop_windows_24px"
android:title="@string/display"
android:contentDescription="@string/display"
app:showAsAction="ifRoom"/>
app:showAsAction="always"/>
<item
android:id="@+id/importrom"
android:icon="@drawable/publish_24px"
android:title="@string/importRom"
android:contentDescription="@string/importRom"
app:showAsAction="ifRoom"/>
app:showAsAction="always"/>
</menu>

View file

@ -3,7 +3,7 @@
<string name="app_name">Vectras VM</string>
<!--======================VECTRAS STRINGS====================-->
<string name="app_version" translatable="false">v2.9.5 (3dfx - Neapolitan ice cream)</string>
<string name="app_version" translatable="false">v2.9.5 (3dfx - Orange cake)</string>
<string name="qemu_version" translatable="false">Stable</string>
<string name="str_home">Home</string>
<string name="str_logger">Logger</string>

View file

@ -1,15 +1,15 @@
{
"versionCode":"21",
"versionName":"v2.9.5-3dfx,v2.9.5-3dfx-almondcake,v2.9.5-3dfx-bread,v2.9.5-3dfx-churro,v2.9.5-3dfx-doughnut,v2.9.5-3dfx-empanada,v2.9.5-3dfx-flan,v2.9.5-3dfx-gugelhupf,v2.9.5-3dfx-hamentaschen,v2.9.5-3dfx-italianice,v2.9.5-3dfx-ladyfingers,v2.9.5-3dfx-madeleine",
"versionName":"v2.9.5-3dfx,v2.9.5-3dfx-almondcake,v2.9.5-3dfx-bread,v2.9.5-3dfx-churro,v2.9.5-3dfx-doughnut,v2.9.5-3dfx-empanada,v2.9.5-3dfx-flan,v2.9.5-3dfx-gugelhupf,v2.9.5-3dfx-hamentaschen,v2.9.5-3dfx-italianice,v2.9.5-3dfx-ladyfingers,v2.9.5-3dfx-madeleine,v2.9.5-3dfx-neapolitanicecream,v2.9.5-3dfx-orangecake",
"size": "46 MB",
"url": "https://github.com/xoureldeen/Vectras-VM-Android/releases/v2.9.5",
"Message": "<h2>v2.9.5-3dfx</h2><ul><li>Bring back 3dfx support.</li><li>Enhance app execution.</li><li>Added some linux programs in x11 display.</li><li>Added alpine linux (x11).</li><li>Russian language by <a href=\"https://github.com/OFGING\" target=\"_blank\">@OFGING</a></li></ul><br><br>New updates are live!",
"cancellable": true,
"versionCodeBeta":"21",
"versionNameBeta":"v2.9.5-3dfx-neapolitanicecream",
"versionNameBetas":"v2.9.5-3dfx-madeleine,v2.9.5-3dfx-neapolitanicecream",
"versionNameBeta":"v2.9.5-3dfx-orangecake",
"versionNameBetas":"v2.9.5-3dfx-madeleine,v2.9.5-3dfx-neapolitanicecream,v2.9.5-3dfx-orangecake",
"sizeBeta": "48 MB",
"urlBeta": "https://github.com/AnBui2004/Vectras-VM-Emu-Android/releases",
"MessageBeta": "<h2>Neapolitan ice cream</h2>Bugs fixed.",
"MessageBeta": "<h2>Orange cake</h2>Bugs fixed.",
"cancellableBeta": true
}