mirror of
https://github.com/Melon-Bread/RetroUFO
synced 2025-07-04 12:54:37 -04:00
Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
75904ce32c | |||
bb40512a2d | |||
510e219161 | |||
f020623389 | |||
1cd5199c69 | |||
d75cca5382 | |||
bdd5986bb0 | |||
5f3ad0ccc4 | |||
9314750c49 | |||
03784e2dba | |||
d21e4b93dc | |||
d1bd33b80a | |||
14a06dcac6 | |||
df131bb6f3 | |||
90fc6b69ff | |||
c60c6be12f | |||
7c5dfc4c11 | |||
bd7df18495 | |||
9b76d6b264 | |||
0cb18c56ce | |||
13435a0aa4 | |||
4ab73eb6b8 | |||
ddb4af9772 | |||
3bd1159381 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -108,3 +108,6 @@ venv.bak/
|
|||||||
|
|
||||||
# folders from script
|
# folders from script
|
||||||
cores/
|
cores/
|
||||||
|
|
||||||
|
# VSCode
|
||||||
|
.vscode/
|
38
README.md
38
README.md
@ -1,35 +1,47 @@
|
|||||||
# RetroUFO
|
# RetroUFO
|
||||||
[](https://www.youtube.com/watch?v=NLGoKxh8Aq4)
|
[](https://www.youtube.com/watch?v=NLGoKxh8Aq4)
|
||||||
[](https://www.python.org/downloads/) [](https://opensource.org/licenses/MIT)
|
[](https://www.python.org/downloads/) [](https://opensource.org/licenses/MIT) [](https://pypi.org/project/RetroUFO/)
|
||||||
|
|
||||||
A ~~messy~~ Python script that grabs the latest version of every libretro core from the [build bot](https://buildbot.libretro.com/).
|
A ~~messy~~ Python script that grabs the latest version of every libretro core from the [build bot](https://buildbot.libretro.com/).
|
||||||
|
|
||||||
***
|
***
|
||||||
### Usage-CLI
|
|
||||||
|
|
||||||
Just run the script with _Python 3_:
|
### Installation
|
||||||
|
|
||||||
|
The package can be installed via pip:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 ./RetroUFO.py
|
python -m pip install --user RetroUFO
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Usage-CLI
|
||||||
|
|
||||||
|
Just run the script from the terminal:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
RetroUFO
|
||||||
```
|
```
|
||||||
|
|
||||||
It will then download and extract all the latest versions of each core to their default location based on `retroarch.default.cfg` for each platform
|
It will then download and extract all the latest versions of each core to their default location based on `retroarch.default.cfg` for each platform
|
||||||
_(Which is only Linux & Windows for right now)_
|
_(Which is only Linux, macOS, & Windows for right now)_
|
||||||
|
|
||||||
If you are more of a advance user, and want to do things a bit more manually, you can view all the scripts arguments by:
|
If you are more of a advance user, and want to do things a bit more manually, you can view all the scripts arguments by:
|
||||||
```bash
|
```bash
|
||||||
python3 ./RetroUFO.py --help
|
RetroUFO --help
|
||||||
```
|
```
|
||||||
|
|
||||||
### Usage-GUI
|
### Usage-GUI
|
||||||
|
|
||||||
The GUI script uses [Qt for Python](https://wiki.qt.io/Qt_for_Python) ([PySide2](https://pypi.org/project/PySide2/)). So you can make sure you have that package installed by running:
|
The GUI script uses [Qt for Python](https://wiki.qt.io/Qt_for_Python) ([PySide2](https://pypi.org/project/PySide2/)). So you can make sure you have that package installed if you plan to run the script manually:
|
||||||
```bash
|
```bash
|
||||||
pip3 install --user PySide2
|
python -m pip install --user PySide2
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
After that you can just run the script like so:
|
After that you can just run the script like so:
|
||||||
```bash
|
```bash
|
||||||
python3 ./RetroUFO_GUI.py
|
RetroUFO-GUI
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then just click the `Grab Cores` button at the bottom and then you should be all set.
|
You can then just click the `Grab Cores` button at the bottom and then you should be all set.
|
||||||
@ -48,12 +60,14 @@ If you have your core directory set somewhere special you can override where the
|
|||||||
### TO-DO
|
### TO-DO
|
||||||
|
|
||||||
- Set where cores are downloaded
|
- Set where cores are downloaded
|
||||||
|
- Real error handling
|
||||||
|
- Support for ARM detection
|
||||||
|
- Download progress bar
|
||||||
|
- Join the code base between the CLI & GUI
|
||||||
- ~~Set where cores are extracted for RA Usage~~
|
- ~~Set where cores are extracted for RA Usage~~
|
||||||
- ~~Choose which architecture you are downloading format~~
|
- ~~Choose which architecture you are downloading format~~
|
||||||
- ~~Choose what platform you are downloading format~~
|
- ~~Choose what platform you are downloading format~~
|
||||||
- ~~Auto detect platform & architecture~~
|
- ~~Auto detect platform & architecture~~
|
||||||
- Download progress bar
|
|
||||||
- ~~Keep downloaded archives~~
|
- ~~Keep downloaded archives~~
|
||||||
- ~~Make GUI~~
|
- ~~Make GUI~~
|
||||||
- Real error handling
|
- ~~Make a PyPi package~~
|
||||||
- Support for ARM detection
|
|
||||||
|
@ -4,7 +4,7 @@ Grabs the latest version of every libretro core from the build bot.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__author__ = "Melon Bread"
|
__author__ = "Melon Bread"
|
||||||
__version__ = "0.9.0"
|
__version__ = "0.9.5"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
@ -25,15 +25,31 @@ CORE_LOCATION = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def main(_args):
|
def main():
|
||||||
""" Where the magic happens """
|
""" Where the magic happens """
|
||||||
|
|
||||||
# If a platform and/or architecture is not supplied it is grabbed automatically
|
parser = argparse.ArgumentParser()
|
||||||
target_platform = _args.platform if _args.platform else get_platform()
|
|
||||||
architecture = _args.architecture if _args.architecture else get_architecture()
|
|
||||||
location = _args.location if _args.location else CORE_LOCATION[platform]
|
|
||||||
|
|
||||||
download_cores(platform, architecture)
|
parser.add_argument('-p', '--platform', metavar='STRING', required=False,
|
||||||
|
help='Platform you desire to download for')
|
||||||
|
|
||||||
|
parser.add_argument('-a', '--architecture', metavar='STRING', required=False,
|
||||||
|
help='Architecture for the platform you desire to download for')
|
||||||
|
|
||||||
|
parser.add_argument('-l', '--location', metavar='STRING', required=False,
|
||||||
|
help='Location you wish the cores to extract to')
|
||||||
|
|
||||||
|
parser.add_argument('-k', '--keep', action='store_true',
|
||||||
|
help='Keeps downloaded core archives')
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
# If a platform and/or architecture is not supplied it is grabbed automatically
|
||||||
|
target_platform = args.platform if args.platform else get_platform()
|
||||||
|
architecture = args.architecture if args.architecture else get_architecture()
|
||||||
|
location = args.location if args.location else CORE_LOCATION[target_platform]
|
||||||
|
|
||||||
|
download_cores(target_platform, architecture)
|
||||||
extract_cores(location)
|
extract_cores(location)
|
||||||
|
|
||||||
if not args.keep:
|
if not args.keep:
|
||||||
@ -112,25 +128,9 @@ def extract_cores(_location):
|
|||||||
|
|
||||||
def clean_up():
|
def clean_up():
|
||||||
""" Removes all the downloaded files """
|
""" Removes all the downloaded files """
|
||||||
if os.listdir('cores'):
|
if os.path.isdir('cores'):
|
||||||
rmtree('cores/')
|
rmtree('cores/')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
""" This is executed when run from the command line """
|
main()
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
|
|
||||||
parser.add_argument('-p', '--platform', metavar='STRING', required=False,
|
|
||||||
help='Platform you desire to download for')
|
|
||||||
|
|
||||||
parser.add_argument('-a', '--architecture', metavar='STRING', required=False,
|
|
||||||
help='Architecture for tha platform you desire to download for')
|
|
||||||
|
|
||||||
parser.add_argument('-l', '--location', metavar='STRING', required=False,
|
|
||||||
help='Location you wish the cores to extract to')
|
|
||||||
|
|
||||||
parser.add_argument('-k', '--keep', action='store_true',
|
|
||||||
help='Keeps downloaded core archives')
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
|
||||||
main(args)
|
|
@ -4,7 +4,7 @@ Grabs the latest version of every libretro core from the build bot.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__author__ = "Melon Bread"
|
__author__ = "Melon Bread"
|
||||||
__version__ = "0.9.0"
|
__version__ = "0.9.5"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
@ -15,7 +15,7 @@ from shutil import rmtree
|
|||||||
from urllib.request import urlretrieve
|
from urllib.request import urlretrieve
|
||||||
|
|
||||||
from PySide2.QtCore import QThread, Signal
|
from PySide2.QtCore import QThread, Signal
|
||||||
from PySide2.QtGui import QTextCursor
|
from PySide2.QtGui import QTextCursor, QIcon
|
||||||
from PySide2.QtWidgets import (QApplication, QCheckBox, QComboBox, QDialog,
|
from PySide2.QtWidgets import (QApplication, QCheckBox, QComboBox, QDialog,
|
||||||
QFileDialog, QLineEdit, QPushButton, QTextEdit,
|
QFileDialog, QLineEdit, QPushButton, QTextEdit,
|
||||||
QVBoxLayout, QMessageBox)
|
QVBoxLayout, QMessageBox)
|
||||||
@ -257,16 +257,19 @@ class Form(QDialog):
|
|||||||
|
|
||||||
def clean_up(self):
|
def clean_up(self):
|
||||||
""" Removes all the downloaded files """
|
""" Removes all the downloaded files """
|
||||||
if os.listdir('cores'):
|
if os.path.isdir('cores'):
|
||||||
rmtree('cores/')
|
rmtree('cores/')
|
||||||
|
|
||||||
|
def main():
|
||||||
if __name__ == '__main__':
|
|
||||||
# Create the Qt Application
|
# Create the Qt Application
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
# Create and show the form
|
# Create and show the form
|
||||||
form = Form()
|
form = Form()
|
||||||
form.setFixedWidth(438) # So all text on the log UI stays on one line
|
form.setFixedWidth(438) # So all text on the log UI stays on one line
|
||||||
|
form.setWindowIcon(QIcon('icon.png'))
|
||||||
form.show()
|
form.show()
|
||||||
# Run the main Qt loop
|
# Run the main Qt loop
|
||||||
sys.exit(app.exec_())
|
sys.exit(app.exec_())
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
0
RetroUFO/__init__.py
Normal file
0
RetroUFO/__init__.py
Normal file
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
PySide2>=5.14.0
|
||||||
|
|
33
setup.py
Normal file
33
setup.py
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import setuptools
|
||||||
|
|
||||||
|
with open("README.md", "r") as fh:
|
||||||
|
long_description = fh.read()
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
name="RetroUFO",
|
||||||
|
version="0.9.5-1",
|
||||||
|
author="Melon Bread",
|
||||||
|
author_email="rain@melonbread.dev",
|
||||||
|
description="Easily upgrade all libreto cores from the build bot",
|
||||||
|
long_description=long_description,
|
||||||
|
long_description_content_type="text/markdown",
|
||||||
|
license="MIT",
|
||||||
|
keywords=["libretro", "retroarch", "core"],
|
||||||
|
url="https://github.com/Melon-Bread/RetroUFO",
|
||||||
|
packages=["RetroUFO"],
|
||||||
|
install_requires=[
|
||||||
|
'PySide2',
|
||||||
|
],
|
||||||
|
classifiers=[
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: OSI Approved :: MIT License",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
],
|
||||||
|
python_requires='>=3.6',
|
||||||
|
entry_points={
|
||||||
|
'console_scripts': [
|
||||||
|
"RetroUFO=RetroUFO.RetroUFO:main",
|
||||||
|
"RetroUFO-GUI=RetroUFO.RetroUFO_GUI:main"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
)
|
Reference in New Issue
Block a user