diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..e0bc297
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/idea.txt b/.idea/idea.txt
index 761509a..6b84350 100644
--- a/.idea/idea.txt
+++ b/.idea/idea.txt
@@ -3,4 +3,5 @@
- Add Debain Support
- Improve Efficiency
- Add flags to uninstall, reinstall, repair
-- Add flags to list a distrubution, and list help
\ No newline at end of file
+- Add flags to list a distrubution, and list help
+-GUI version (Released 5.0)
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000..712ab9d
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/material_theme_project_new.xml b/.idea/material_theme_project_new.xml
new file mode 100644
index 0000000..ff4fe5c
--- /dev/null
+++ b/.idea/material_theme_project_new.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 07115cd..32de678 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,14 @@
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 8f31b79..d73b0af 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,16 @@
# get-wine-latest.sh
-If you get a `permission denied` on any script present in this repository, even with `sudo`, run `sudo. chmod +x *.sh`
+
+If you get a `permission denied` on any script present in this repository, even with `sudo`, run `sudo. chmod +x *.sh`
(The READEME.md is not a file to be executed)
-a simple set of shell scripts to Install\Remove the latest version of wine from winehq's official repositories without any error.
+a simple set of shell scripts to Install\Remove the latest version of wine from winehq's official repositories without
+any error.
To install wine, Simply copy this:
Ubuntu:
+
```
sudo apt install git
git clone https://github.com/RishonDev/winehq-installer.git
diff --git a/core/wine-installer-debian.sh b/core/wine-installer-debian.sh
new file mode 100644
index 0000000..2124d36
--- /dev/null
+++ b/core/wine-installer-debian.sh
@@ -0,0 +1,108 @@
+while getopts ":v:" opt; do
+ case $opt in
+ v)
+ echo "3.0.0"
+ ;;
+ \?)
+ echo "Invalid option: -$OPTARG" >&2
+ echo "-v Displays the version"
+ exit 1
+ ;;
+ esac
+done
+
+RELEASE=$(lsb_release -sr)
+spin()
+{
+ spinner="/|\\-/|\\-"
+ while :
+ do
+ for i in `seq 0 7`
+ do
+ echo -n "${spinner:$i:1}"
+ echo -en "\010"
+ sleep 0.1
+ done
+ done
+}
+
+#Creates Logs
+mkdir ./logs
+touch ./logs/repoLog.txt
+touch ./logs/repoLog2.txt
+touch ./logs/installLog.txt
+touch ./logs/configLog.txt
+echo "Enabling 32-bit support... "
+spin &
+SPIN_PID=$!
+trap "kill -9 $SPIN_PID" `seq 0 15`
+sudo dpkg --add-architecture i386
+kill -9 $SPIN_PID
+
+
+echo "Adding the repositories... "
+spin &
+SPIN_PID=$!
+trap "kill -9 $SPIN_PID" `seq 0 15`
+#Insert interactive shell here
+sudo add-apt-repository universe -y &>> ./logs/repoLog2.txt
+{
+if [ "$RELEASE" = "20.04" ]; then
+ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources
+ sudo apt update
+fi
+
+if [ "$RELEASE" = "22.04" ]; then
+ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
+ sudo apt update
+fi
+
+
+if [ "$RELEASE" = "23.04" ]; then
+ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/lunar/winehq-lunar.sources
+ sudo apt update
+fi
+if [ "$RELEASE" = "23.10" ]; then
+ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/mantic/winehq-mantic.sources
+ sudo apt update
+fi
+if [ "$RELEASE" = "24.04" ]; then
+ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/mantic/winehq-mantic.sources
+ sudo apt update
+
+else
+ echo "Unsupported release"
+fi
+ sudo mkdir -pm755 /etc/apt/keyrings
+ sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
+ sudo apt update
+} &> ./logs/repoLog.txt
+kill -9 $SPIN_PID
+clear
+echo "1)Stable build (Recommended)"
+echo "2)Development build (Recommended for testing use only)"
+echo "3)Staging build (Recommended for testing use only)"
+read -p "Select build channel:" build -n 1 -r
+if ["$build" = "1"]
+ build = "stable"
+fi
+if ["$build" = "2"]
+ build = "devel"
+fi
+if ["$build" = "3"]
+ build = "staging"
+fi
+read -p "Ready? [Y/n]: " -n 1 -r
+if [[ $REPLY =~ ^[Yy]$ ]]
+ then
+ echo
+ spin &
+ SPIN_PID=$!
+ trap "kill -9 $SPIN_PID" `seq 0 15`
+ sudo apt install winehq-"$build" winetricks &> ./logs/installLog.txt
+ winecfg &> ./logs/configLog.txt
+else
+ echo
+ echo "Abort."
+fi
+echo "The logs can be found at" $(pwd)"/"
diff --git a/core/wine-installer-fedora.sh b/core/wine-installer-fedora.sh
new file mode 100644
index 0000000..c202cb2
--- /dev/null
+++ b/core/wine-installer-fedora.sh
@@ -0,0 +1,103 @@
+while getopts ":v:" opt; do
+ case $opt in
+ v)
+ echo "4.0.0"
+ ;;
+ \?)
+ echo "Invalid option: -$OPTARG" >&2
+ echo "-v Displays the version"
+ exit 1
+ ;;
+ esac
+done
+
+RELEASE=$(lsb_release -sr)
+spin()
+{
+ spinner="/|\\-/|\\-"
+ while :
+ do
+ for i in `seq 0 7`
+ do
+ echo -n "${spinner:$i:1}"
+ echo -en "\010"
+ sleep 0.1
+ done
+ done
+}
+
+#Creates Logs
+mkdir ./logs
+touch ./logs/repoLog.txt
+touch ./logs/repoLog2.txt
+touch ./logs/installLog.txt
+touch ./logs/configLog.txt
+echo "Enabling 32-bit support... "
+spin &
+SPIN_PID=$!
+trap "kill -9 $SPIN_PID" `seq 0 15`
+sudo dpkg --add-architecture i386
+kill -9 $SPIN_PID
+
+
+echo "Adding the repositories... "
+spin &
+SPIN_PID=$!
+trap "kill -9 $SPIN_PID" `seq 0 15`
+#Insert interactive shell here
+sudo add-apt-repository universe -y &>> ./logs/repoLog2.txt
+{
+if [ "$RELEASE" = "20.04" ]; then
+ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources
+ sudo apt update
+fi
+
+if [ "$RELEASE" = "22.04" ]; then
+ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
+ sudo apt update
+fi
+
+if [ "$RELEASE" = "23.10" ]; then
+ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/mantic/winehq-mantic.sources
+ sudo apt update
+fi
+
+if [ "$RELEASE" = "23.04" ]; then
+ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/lunar/winehq-lunar.sources
+ sudo apt update
+else
+ echo "Unsupported release"
+fi
+ sudo mkdir -pm755 /etc/apt/keyrings
+ sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
+ sudo apt update
+} &> ./logs/repoLog.txt
+kill -9 $SPIN_PID
+clear
+echo "1)Stable build (Recommended)"
+echo "2)Development build (Recommended for testing use only)"
+echo "3)Staging build (Recommended for testing use only)"
+read -p "Select build channel:" build -n 1 -r
+if ["$build" = "1"]
+ build = "stable"
+fi
+if ["$build" = "2"]
+ build = "devel"
+fi
+if ["$build" = "3"]
+ build = "staging"
+fi
+read -p "Ready? [Y/n]: " -n 1 -r
+if [[ $REPLY =~ ^[Yy]$ ]]
+ then
+ echo
+ spin &
+ SPIN_PID=$!
+ trap "kill -9 $SPIN_PID" `seq 0 15`
+ sudo apt install winehq-"$build" winetricks &> ./logs/installLog.txt
+ winecfg &> ./logs/configLog.txt
+else
+ echo
+ echo "Abort."
+fi
+echo "The logs can be found at" $(pwd)"/"
diff --git a/wine-installer-ubuntu.sh b/core/wine-installer-ubuntu.sh
similarity index 97%
rename from wine-installer-ubuntu.sh
rename to core/wine-installer-ubuntu.sh
index 31eac5f..0bb658f 100644
--- a/wine-installer-ubuntu.sh
+++ b/core/wine-installer-ubuntu.sh
@@ -2,7 +2,7 @@
while getopts ":v:" opt; do
case $opt in
v)
- echo "3.0.0"
+ echo "5.0.0"
;;
\?)
echo "Invalid option: -$OPTARG" >&2
@@ -45,6 +45,7 @@ echo "Adding the repositories... "
spin &
SPIN_PID=$!
trap "kill -9 $SPIN_PID" `seq 0 15`
+#Insert interactive shell here
sudo add-apt-repository universe -y &>> ./logs/repoLog2.txt
{
if [ "$RELEASE" = "20.04" ]; then
diff --git a/core/wine-script-updater.sh b/core/wine-script-updater.sh
new file mode 100644
index 0000000..6a736ae
--- /dev/null
+++ b/core/wine-script-updater.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+spin()
+{
+ spinner="/|\\-/|\\-"
+ while :
+ do
+ for i in `seq 0 7`
+ do
+ echo -n "${spinner:$i:1}"
+ echo -en "\010"
+ sleep 0.1
+ done
+ done
+}
+
+echo "Updating script..."
+spin &
+SPIN_PID=$!
+trap "kill -9 $SPIN_PID" `seq 0 15`
+wget -r https://raw.githubusercontent.com/RishonDev/winehq-installer/main/core/
+wget -r https://raw.githubusercontent.com/RishonDev/winehq-installer/main/winehq-installer/
+
+kill -9 $SPIN_PID
+echo "Done."
diff --git a/wine-uninstaller.sh b/core/wine-uninstaller.sh
similarity index 100%
rename from wine-uninstaller.sh
rename to core/wine-uninstaller.sh
diff --git a/wine-updater.sh b/core/wine-updater.sh
similarity index 99%
rename from wine-updater.sh
rename to core/wine-updater.sh
index 7749a36..f4e32a5 100644
--- a/wine-updater.sh
+++ b/core/wine-updater.sh
@@ -12,6 +12,7 @@ spin()
done
done
}
+#Insert interactive shell here
echo "Updating Wine..."
spin &
SPIN_PID=$!
diff --git a/wine-installer-debian.sh b/wine-installer-debian.sh
deleted file mode 100644
index 33de491..0000000
--- a/wine-installer-debian.sh
+++ /dev/null
@@ -1 +0,0 @@
-echo "In development, will be released soon."
diff --git a/wine-installer-fedora.sh b/wine-installer-fedora.sh
deleted file mode 100644
index 33de491..0000000
--- a/wine-installer-fedora.sh
+++ /dev/null
@@ -1 +0,0 @@
-echo "In development, will be released soon."
diff --git a/wine-script-updater.sh b/wine-script-updater.sh
deleted file mode 100644
index 16f86ea..0000000
--- a/wine-script-updater.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-spin()
-{
- spinner="/|\\-/|\\-"
- while :
- do
- for i in `seq 0 7`
- do
- echo -n "${spinner:$i:1}"
- echo -en "\010"
- sleep 0.1
- done
- done
-}
-
-echo "Updating script..."
-spin &
-SPIN_PID=$!
-trap "kill -9 $SPIN_PID" `seq 0 15`
-wget https://raw.githubusercontent.com/RishonDev/get-wine-latest.sh/main/wine-installer-ubuntu.sh
-wget https://raw.githubusercontent.com/RishonDev/get-wine-latest.sh/main/wine-installer-debian.sh
-wget https://raw.githubusercontent.com/RishonDev/get-wine-latest.sh/main/wine-installer-fedora.sh
-kill -9 $SPIN_PID
-echo "Done."
diff --git a/winehq-installer-gui/pom.xml b/winehq-installer-gui/pom.xml
new file mode 100644
index 0000000..6295c2e
--- /dev/null
+++ b/winehq-installer-gui/pom.xml
@@ -0,0 +1,12 @@
+
+
+ 4.0.0
+
+ org.example
+ winehq-installer-gui
+ 1.0-SNAPSHOT
+
+
+
\ No newline at end of file
diff --git a/winehq-installer.sh b/winehq-installer.sh
new file mode 100644
index 0000000..bd96e84
--- /dev/null
+++ b/winehq-installer.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+version="4.0"
+flags=""
+printversion(){
+ echo "WineHQ installer version $version"
+ echo "Wine "
+}
+ubuntu(){
+ ./core/winhq-installer-ubuntu.sh
+}
+debian(){
+ ./core/winhq-installer-debain.sh
+}
+fedora(){
+ ./core/winhq-installer-fedora.sh
+}
+print_usage() {
+ echo "Options:"
+ echo "-ubuntu Enters the Ubuntu installer of wine"
+ echo "-fedora Installs ubuntu version of wine"
+ echo "-debian Installs debian version of wine"
+ echo "-version Prints app information"
+
+ echo "-verbose"
+ echo "-silent"
+ echo "-log"
+
+}
+while getopts 'abf:v' flag; do
+ case "${flag}" in
+ ubuntu) ubuntu ;;
+ fedora) fedora ;;
+ debian) debian ;;
+ version) printversion ;;
+ verbose) flags="$flags -v" ;;
+ *) print_usage
+ exit 1 ;;
+ esac
+done
\ No newline at end of file