Merge pull request #249 from AnBui2004/master

Gugelhupf
This commit is contained in:
An Bui 2025-03-08 13:22:34 +07:00 committed by GitHub
commit 05b405dee0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 475 additions and 8 deletions

6
.idea/AndroidProjectSystem.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AndroidProjectSystem">
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
</component>
</project>

View file

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

View file

@ -762,4 +762,16 @@ public class MainSettingsManager extends AppCompatActivity
return prefs.getBoolean("setUpWithManualSetupBefore", false);
}
public static void setSelectedMirror(Context context, int _int) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor edit = prefs.edit();
edit.putInt("SelectedMirror", _int);
edit.commit();
}
public static int getSelectedMirror(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
return prefs.getInt("SelectedMirror", 0);
}
}

View file

@ -14,10 +14,16 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.provider.DocumentsContract;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.BaseAdapter;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AlertDialog;
@ -27,10 +33,18 @@ import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import com.vectras.qemu.MainSettingsManager;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
public class Minitools extends AppCompatActivity {
private ArrayList<HashMap<String, String>> listmapForSelectMirrors = new ArrayList<>();
private Spinner spinnerselectmirror;
private String selectedMirrorCommand = "";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -54,6 +68,7 @@ public class Minitools extends AppCompatActivity {
LinearLayout deleteallvm = findViewById(R.id.deleteallvm);
LinearLayout reinstallsystem = findViewById(R.id.reinstallsystem);
LinearLayout deleteall = findViewById(R.id.deleteall);
spinnerselectmirror = findViewById(R.id.spinnerselectmirror);
setupsoundfortermux.setOnClickListener(v -> {
if (VectrasApp.isAppInstalled("com.termux", getApplicationContext())) {
@ -219,6 +234,22 @@ public class Minitools extends AppCompatActivity {
});
alertDialog.show();
});
spinnerselectmirror.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
selectedMirrorCommand = listmapForSelectMirrors.get(position).get("mirror");
MainSettingsManager.setSelectedMirror(Minitools.this, position);
VectrasApp.runACommand(selectedMirrorCommand + "&& exit", Minitools.this);
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
setupSpiner();
}
@Override
@ -233,4 +264,50 @@ public class Minitools extends AppCompatActivity {
}
return super.onOptionsItemSelected(item);
}
private void setupSpiner() {
VectrasApp.setupMirrorListForListmap(listmapForSelectMirrors);
spinnerselectmirror.setAdapter(new SpinnerSelectMirrorAdapter(listmapForSelectMirrors));
spinnerselectmirror.setSelection(MainSettingsManager.getSelectedMirror(Minitools.this));
}
public class SpinnerSelectMirrorAdapter extends BaseAdapter {
ArrayList<HashMap<String, String>> _data;
public SpinnerSelectMirrorAdapter(ArrayList<HashMap<String, String>> _arr) {
_data = _arr;
}
@Override
public int getCount() {
return _data.size();
}
@Override
public HashMap<String, String> getItem(int _index) {
return _data.get(_index);
}
@Override
public long getItemId(int _index) {
return _index;
}
@Override
public View getView(final int _position, View _v, ViewGroup _container) {
LayoutInflater _inflater = getLayoutInflater();
View _view = _v;
if (_view == null) {
_view = _inflater.inflate(R.layout.simple_layout_for_spiner, null);
}
final TextView textViewLocation = _view.findViewById(R.id.textViewLocation);
textViewLocation.setText(_data.get((int) _position).get("location"));
return _view;
}
}
}

View file

@ -21,14 +21,20 @@ import android.os.Bundle;
import android.os.Environment;
import android.provider.DocumentsContract;
import android.provider.Settings;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.ScrollView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import android.Manifest;
import android.widget.BaseAdapter;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
@ -56,7 +62,9 @@ import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Objects;
public class SetupQemuActivity extends AppCompatActivity implements View.OnClickListener {
Activity activity;
@ -80,6 +88,7 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
MaterialButton buttonsetupshowlog;
TextView textviewshowadvancedsetup;
TextView textviewhideadvancedsetup;
Spinner spinnerselectmirror;
AlertDialog alertDialog;
private boolean settingup = false;
@ -90,6 +99,9 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
private String contentJSON = "";
private HashMap<String, Object> mmap = new HashMap<>();
private String bootstrapfilelink = "";
private ArrayList<HashMap<String, String>> listmapForSelectMirrors = new ArrayList<>();
private String selectedMirrorCommand = "";
private String selectedMirrorLocation = "";
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -111,6 +123,7 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
buttonsetupshowlog = findViewById(R.id.buttonsetupshowlog);
textviewshowadvancedsetup = findViewById(R.id.textviewshowadvancedsetup);
textviewhideadvancedsetup = findViewById(R.id.textviewhideadvancedsetup);
spinnerselectmirror = findViewById(R.id.spinnerselectmirror);
buttontryconnectagain.setOnClickListener(this);
buttonautosetup.setOnClickListener(this);
@ -127,10 +140,25 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
inBtn = findViewById(R.id.btnInstall);
title = findViewById(R.id.title);
inBtn.setOnClickListener(this);
setupSpiner();
tarPath = getExternalFilesDir("data") + "/data.tar.gz";
VectrasApp.prepareDataForAppConfig(activity);
spinnerselectmirror.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
selectedMirrorCommand = Objects.requireNonNull(listmapForSelectMirrors.get(position).get("mirror"));
selectedMirrorLocation = Objects.requireNonNull(listmapForSelectMirrors.get(position).get("location"));
MainSettingsManager.setSelectedMirror(activity, position);
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
net = new RequestNetwork(this);
_net_request_listener = new RequestNetwork.RequestListener() {
@Override
@ -354,6 +382,9 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
if (textToAdd.contains("Starting setup...")) {
title.setText("Getting ready for you...");
textviewsettingup.setText(R.string.getting_ready_for_you_please_don_t_disconnect_the_network);
} else if (textToAdd.contains("fetch http")) {
title.setText(getString(R.string.connecting_to_mirror_in) + "\n" + selectedMirrorLocation + "...");
textviewsettingup.setText(getString(R.string.connecting_to_mirror_in) + "\n" + selectedMirrorLocation + "...");
} else if (textToAdd.contains("Installing packages...")) {
title.setText(R.string.it_won_t_take_long);
textviewsettingup.setText(R.string.completed_10_it_won_t_take_long);
@ -623,7 +654,7 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
progressBar.setVisibility(View.VISIBLE);
String filesDir = activity.getFilesDir().getAbsolutePath();
String cmd = "";
cmd += "echo \"https://dl-cdn.alpinelinux.org/alpine/edge/testing\" | tee -a /etc/apk/repositories;";
cmd += selectedMirrorCommand + ";";
executeShellCommand(cmd);
executeShellCommand("set -e;" +
" echo \"Starting setup...\";" +
@ -645,7 +676,7 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
progressBar.setVisibility(View.VISIBLE);
String filesDir = activity.getFilesDir().getAbsolutePath();
String cmd = "";
cmd += "echo \"https://dl-cdn.alpinelinux.org/alpine/edge/testing\" | tee -a /etc/apk/repositories;";
cmd += selectedMirrorCommand + ";";
executeShellCommand(cmd);
executeShellCommand("set -e;" +
" echo \"Starting setup...\";" +
@ -667,7 +698,7 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
progressBar.setVisibility(View.VISIBLE);
String filesDir = activity.getFilesDir().getAbsolutePath();
String cmd = "";
cmd += "echo \"https://dl-cdn.alpinelinux.org/alpine/edge/testing\" | tee -a /etc/apk/repositories;";
cmd += selectedMirrorCommand + ";";
executeShellCommand(cmd);
executeShellCommand("set -e;" +
" echo \"Starting setup...\";" +
@ -832,4 +863,50 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
alertDialog.show();
}
}
private void setupSpiner() {
VectrasApp.setupMirrorListForListmap(listmapForSelectMirrors);
spinnerselectmirror.setAdapter(new SpinnerSelectMirrorAdapter(listmapForSelectMirrors));
spinnerselectmirror.setSelection(MainSettingsManager.getSelectedMirror(activity));
}
public class SpinnerSelectMirrorAdapter extends BaseAdapter {
ArrayList<HashMap<String, String>> _data;
public SpinnerSelectMirrorAdapter(ArrayList<HashMap<String, String>> _arr) {
_data = _arr;
}
@Override
public int getCount() {
return _data.size();
}
@Override
public HashMap<String, String> getItem(int _index) {
return _data.get(_index);
}
@Override
public long getItemId(int _index) {
return _index;
}
@Override
public View getView(final int _position, View _v, ViewGroup _container) {
LayoutInflater _inflater = getLayoutInflater();
View _view = _v;
if (_view == null) {
_view = _inflater.inflate(R.layout.simple_layout_for_spiner, null);
}
final TextView textViewLocation = _view.findViewById(R.id.textViewLocation);
textViewLocation.setText(Objects.requireNonNull(_data.get((int) _position).get("location")));
return _view;
}
}
}

View file

@ -614,6 +614,11 @@ public class VectrasApp extends Application {
}
}
public static void runACommand(String _command, Activity _activity) {
Terminal vterm = new Terminal(_activity);
vterm.executeShellCommand2(_command, false, _activity);
}
public static void killallqemuprocesses(Context context) {
Terminal vterm = new Terminal(context);
vterm.executeShellCommand2("killall -9 qemu-system-i386", false, MainActivity.activity);
@ -762,4 +767,200 @@ public class VectrasApp extends Application {
throw new RuntimeException(e);
}
}
public static void setupMirrorListForListmap(ArrayList<HashMap<String, String>> listmapForSelectMirrors) {
HashMap<String, String> mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "United States (Default)");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true, "dl-cdn.alpinelinux.org", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Australia");
mapForAddItems.put("mirror", createCommandForSelectedMirror(false,"mirror.aarnet.edu.au", "/pub/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Austria");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.alwyzon.net", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Bulgaria");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirrors.neterra.net", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Brazil");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.uepg.br", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Cambodia");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.sabay.com.kh", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Canada");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true, "mirror.csclub.uwaterloo.ca", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Chile");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"elmirror.cl", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "China");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true, "mirrors.tuna.tsinghua.edu.cn", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Czech Republic");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true, "mirror.fel.cvut.cz", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Denmark");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true, "mirrors.dotsrc.org", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Finland");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true, "mirror.5i.fi", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "France");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirrors.ircam.fr", "/pub/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Germany");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"ftp.halifax.rwth-aachen.de", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Hong Kong");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true, "mirror.xtom.com.hk", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Indonesia");
mapForAddItems.put("mirror", createCommandForSelectedMirror(false,"foobar.turbo.net.id", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Iran");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.bardia.tech", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Italy");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"alpinelinux.mirror.garr.it", ""));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Japan");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true, "repo.jing.rocks", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Kazakhstan");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.ps.kz", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Moldova");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.ihost.md", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Morocco");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true, "mirror.marwan.ma", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "New Caledonia");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.lagoon.nc", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "New Zealand");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.2degrees.nz", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Poland");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"ftp.icm.edu.pl", "/pub/Linux/distributions/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Portugal");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.leitecastro.com", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Romania");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirrors.hosterion.ro", "/alpinelinux"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Russia");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.hyperdedic.ru", "/alpinelinux"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Singapore");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.jingk.ai", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Slovenia");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.tux.si", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Spain");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.raiolanetworks.com", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Sweden");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true, "ftp.lysator.liu.se/pub", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Switzerland");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true, "pkg.adfinis.com", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Taiwan");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true, "mirror.twds.com.tw", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "Thailand");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"mirror.kku.ac.th", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "The Netherlands");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"alpine.mirror.wearetriple.com", ""));
listmapForSelectMirrors.add(mapForAddItems);
mapForAddItems = new HashMap<>();
mapForAddItems.put("location", "United Kingdom");
mapForAddItems.put("mirror", createCommandForSelectedMirror(true,"uk.alpinelinux.org", "/alpine"));
listmapForSelectMirrors.add(mapForAddItems);
}
public static String createCommandForSelectedMirror(boolean _https, String _url, String _beforemain) {
String command = "echo \"\" > /etc/apk/repositories && sed -i -e \"1ihttps://xssFjnj58Id/yttGkok69Je/edge/testing\" /etc/apk/repositories && sed -i -e \"1ihttps://xssFjnj58Id/alpine/v3.19/community\" /etc/apk/repositories && sed -i -e \"1ihttps://xssFjnj58Id/alpine/v3.19/main\" /etc/apk/repositories";
command = command.replaceAll("/yttGkok69Je", _beforemain);
if (!_https)
command = command.replaceAll("https://", "http://");
return command.replaceAll("xssFjnj58Id", _url);
}
}

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="1dp" android:color="#20757575" />
<solid android:color="@android:color/transparent" />
<corners android:topLeftRadius="360dp" android:bottomLeftRadius="360dp" android:topRightRadius="360dp" android:bottomRightRadius="360dp" />
</shape>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M160,840Q127,840 103.5,816.5Q80,793 80,760L80,200Q80,167 103.5,143.5Q127,120 160,120L360,120Q393,120 416.5,143.5Q440,167 440,200L440,760Q440,793 416.5,816.5Q393,840 360,840L160,840ZM600,840Q567,840 543.5,816.5Q520,793 520,760L520,200Q520,167 543.5,143.5Q567,120 600,120L800,120Q833,120 856.5,143.5Q880,167 880,200L880,760Q880,793 856.5,816.5Q833,840 800,840L600,840ZM160,760L360,760Q360,760 360,760Q360,760 360,760L360,200Q360,200 360,200Q360,200 360,200L160,200Q160,200 160,200Q160,200 160,200L160,760Q160,760 160,760Q160,760 160,760ZM600,760L800,760Q800,760 800,760Q800,760 800,760L800,200Q800,200 800,200Q800,200 800,200L600,200Q600,200 600,200Q600,200 600,200L600,760Q600,760 600,760Q600,760 600,760ZM200,600L320,600L320,520L200,520L200,600ZM640,600L760,600L760,520L640,520L640,600ZM200,480L320,480L320,400L200,400L200,480ZM640,480L760,480L760,400L640,400L640,480ZM200,360L320,360L320,280L200,280L200,360ZM640,360L760,360L760,280L640,280L640,360ZM160,760Q160,760 160,760Q160,760 160,760L160,760Q160,760 160,760Q160,760 160,760L360,760Q360,760 360,760Q360,760 360,760L360,760Q360,760 360,760Q360,760 360,760L160,760ZM600,760Q600,760 600,760Q600,760 600,760L600,760Q600,760 600,760Q600,760 600,760L800,760Q800,760 800,760Q800,760 800,760L800,760Q800,760 800,760Q800,760 800,760L600,760Z"/>
</vector>

View file

@ -40,6 +40,41 @@
android:orientation="vertical"
android:animateLayoutChanges="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:id="@+id/mirror"
android:background="?android:attr/selectableItemBackground" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/host_24px"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/mirror"
android:layout_marginLeft="8dp"
android:layout_weight="1"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/backgroud_stroke_for_spinner">
<Spinner
android:id="@+id/spinnerselectmirror"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:spinnerMode="dialog"
tools:listitem="@layout/simple_layout_for_spiner"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -114,6 +114,32 @@
android:gravity="center_horizontal|center_vertical"
android:text="@string/manual" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="20dp"
android:paddingBottom="8dp"
android:text="@string/do_you_want_to_change_the_mirror_before_setting_up_the_current_mirror_is" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/backgroud_stroke_for_spinner">
<Spinner
android:id="@+id/spinnerselectmirror"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:spinnerMode="dialog"
tools:listitem="@layout/simple_layout_for_spiner"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/linearsettingup"

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textViewLocation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView"
android:padding="16dp"
android:background="?android:attr/selectableItemBackground" />
</androidx.constraintlayout.widget.ConstraintLayout>

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 - Flan)</string>
<string name="app_version" translatable="false">v2.9.5 (3dfx - Gugelhupf)</string>
<string name="qemu_version" translatable="false">Stable</string>
<string name="str_home">Home</string>
<string name="str_logger">Logger</string>
@ -401,6 +401,9 @@
<string name="change">Change</string>
<string name="change_hard_drive">Change hard drive</string>
<string name="do_you_want_to_change_create_or_remove">Do you want to change, create or remove?</string>
<string name="do_you_want_to_change_the_mirror_before_setting_up_the_current_mirror_is">Do you want to change the mirror before setting up?\nThe current mirror is:</string>
<string name="connecting_to_mirror_in">Connecting to mirror in</string>
<string name="mirror">Mirror</string>

View file

@ -6,7 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:8.8.2' // Android Gradle plugin
classpath 'com.android.tools.build:gradle:8.9.0' // Android Gradle plugin
// Add other classpaths like Google Services and Firebase Crashlytics if needed here.
classpath 'com.google.gms:google-services:4.4.0' // assuming you need it for your project
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'

View file

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View file

@ -1,6 +1,6 @@
{
"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",
"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",
"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!",