1
0
mirror of https://github.com/Melon-Bread/RetroUFO synced 2024-11-25 00:38:33 -05:00

Compare commits

..

No commits in common. "510e219161ea8c2a3b5807e5f1e431638e2b08cf" and "c60c6be12f5143f6f71e00130ddb227210668fcd" have entirely different histories.

8 changed files with 38 additions and 84 deletions

3
.gitignore vendored
View File

@ -108,6 +108,3 @@ venv.bak/
# folders from script
cores/
# VSCode
.vscode/

View File

@ -1,47 +1,35 @@
# RetroUFO
[![Platform](https://img.shields.io/badge/platform-linux%20%7C%20macos%20%7C%20windows-yellow.svg)](https://www.youtube.com/watch?v=NLGoKxh8Aq4)
[![Python Version](https://img.shields.io/pypi/pyversions/Django.svg)](https://www.python.org/downloads/) [![PyPI license](https://img.shields.io/pypi/l/ansicolortags.svg)](https://opensource.org/licenses/MIT) [![PyPI version](https://badge.fury.io/py/RetroUFO.svg)](https://pypi.org/project/RetroUFO/)
[![Python Version](https://img.shields.io/pypi/pyversions/Django.svg)](https://www.python.org/downloads/) [![License.](https://img.shields.io/github/license/mashape/apistatus.svg)](https://opensource.org/licenses/MIT)
A ~~messy~~ Python script that grabs the latest version of every libretro core from the [build bot](https://buildbot.libretro.com/).
***
### Installation
The package can be installed via pip:
```bash
python -m pip install --user RetroUFO
```
### Usage-CLI
Just run the script from the terminal:
Just run the script with _Python 3_:
```bash
RetroUFO
python3 ./RetroUFO.py
```
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, macOS, & Windows for right now)_
_(Which is only Linux & 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:
```bash
RetroUFO --help
python3 ./RetroUFO.py --help
```
### 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 if you plan to run the script manually:
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:
```bash
python -m pip install --user PySide2
pip3 install --user PySide2
```
After that you can just run the script like so:
```bash
RetroUFO-GUI
python3 ./RetroUFO_GUI.py
```
You can then just click the `Grab Cores` button at the bottom and then you should be all set.
@ -69,4 +57,3 @@ If you have your core directory set somewhere special you can override where the
- ~~Make GUI~~
- Real error handling
- Support for ARM detection
- ~~Make a PyPi package~~

View File

@ -25,29 +25,13 @@ CORE_LOCATION = {
}
def main():
def main(_args):
""" Where the magic happens """
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 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]
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)
@ -133,4 +117,20 @@ def clean_up():
if __name__ == "__main__":
main()
""" This is executed when run from the command line """
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)

View File

View File

@ -260,7 +260,8 @@ class Form(QDialog):
if os.path.isdir('cores'):
rmtree('cores/')
def main():
if __name__ == '__main__':
# Create the Qt Application
app = QApplication(sys.argv)
# Create and show the form
@ -270,6 +271,3 @@ def main():
form.show()
# Run the main Qt loop
sys.exit(app.exec_())
if __name__ == '__main__':
main()

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,2 +1,7 @@
PySide2>=5.12.3
altgraph==0.16.1
future==0.17.1
macholib==1.11
pefile==2019.4.18
PyInstaller==3.4
PySide2==5.12.3
shiboken2==5.12.3

View File

@ -1,33 +0,0 @@
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"
]
},
)