Code quality improvements for the installer (#492)
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
# Wicked Engine Installer
|
||||
|
||||
This directory holds all the source code for the Wicked Engine Editor installer.
|
||||
The source code is from [this repository](https://github.com/MolassesLover/WickedEngine-Installer.git).
|
||||
It is designed for package maintainers and distributors. It is fully functional, but very early
|
||||
and prone to a lot of changes, it is a fairly big project.
|
||||
|
||||
## Dependencies
|
||||
All the dependencies are Python modules, you can install them with this command in your terminal:
|
||||
|
||||
```bash
|
||||
pip install pillow ttkbootstrap distro
|
||||
```
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
python Setup.py build_ext --inplace
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
|
||||
#region Modules
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import tkinter as Tk
|
||||
from tkinter import filedialog
|
||||
|
||||
import ttkbootstrap as TkBootstrap
|
||||
from PIL import Image, ImageTk
|
||||
from ttkbootstrap.constants import *
|
||||
@@ -16,7 +15,7 @@ from ttkbootstrap.dialogs import *
|
||||
#region Variables
|
||||
|
||||
class WickedDirectories:
|
||||
wickedRootDirectory = "$WICKED"
|
||||
wickedRootDirectory = 'WICKED'
|
||||
wickedRootDirectorySelected = bool()
|
||||
|
||||
#endregion
|
||||
@@ -24,28 +23,13 @@ class WickedDirectories:
|
||||
#region Functions
|
||||
|
||||
def Install():
|
||||
if(WickedDirectories.wickedRootDirectorySelected):
|
||||
os.system('sudo cp ' + WickedDirectories.wickedRootDirectory + '/Editor/Linux/Installer/Distribution/wicked-engine.desktop /usr/share/applications/wicked-engine.desktop')
|
||||
os.system('sudo cp ' + WickedDirectories.wickedRootDirectory + '/Editor/Linux/Installer/Distribution/wicked-engine.sh /usr/bin/wicked-engine')
|
||||
os.system('sudo chmod +x ' + WickedDirectories.wickedRootDirectory + '/Editor/Linux/Installer/Distribution/wicked-engine.sh')
|
||||
os.system('sudo chmod +x /usr/bin/wicked-engine')
|
||||
if WickedDirectories.wickedRootDirectorySelected:
|
||||
os.system(f'sudo cp {WickedDirectories.wickedRootDirectory}/Editor/Linux/Installer/Distribution/wicked-engine.desktop /usr/share/applications/wicked-engine.desktop')
|
||||
os.system(f'sudo cp {WickedDirectories.wickedRootDirectory}/Editor/Linux/Installer/Distribution/wicked-engine.sh /usr/bin/wicked-engine')
|
||||
os.system(f'sudo chmod +x {WickedDirectories.wickedRootDirectory}/Editor/Linux/Installer/Distribution/wicked-engine.sh')
|
||||
os.system(f'sudo chmod +x /usr/bin/wicked-engine')
|
||||
|
||||
# Feel free to move this if in your fork it isn't the case.
|
||||
print("Finished installing!")
|
||||
|
||||
# The two following `if` statements are for package maintainers or distributors to edit and use!
|
||||
# Please @MolassesLover on the Discord or create a GitHub issue if these statements break.
|
||||
|
||||
#if(checkButton_denoiser.offvalue):
|
||||
# pass
|
||||
#else:
|
||||
# pass
|
||||
|
||||
#if(checkButton_settings.offvalue):
|
||||
# pass
|
||||
#else:
|
||||
# pass
|
||||
|
||||
else:
|
||||
directoryWarning = Messagebox.ok("No Wicked Engine directory selected!", title = "Install Error")
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Installer GUI
|
||||
|
||||
## Dependencies
|
||||
- Python
|
||||
- [Tk Interface](https://pkgs.org/search/?q=python3-tk)
|
||||
|
||||
### Fedora
|
||||
```bash
|
||||
sudo dnf install python3-pillow-tk python3-tkinter
|
||||
```
|
||||
|
||||
### Ubuntu
|
||||
```bash
|
||||
sudo apt-get install python3-tk
|
||||
```
|
||||
|
||||
## Running
|
||||
First things first, make sure you are in [`Editor/Linux/Installer`](Editor/Linux/Installer)
|
||||
|
||||
Next, give the `Installer.py` script permission to run with `chmod +x`
|
||||
```bash
|
||||
chmod +x Installer.py
|
||||
```
|
||||
|
||||
Now, you can run the sript with Python
|
||||
```bash
|
||||
python3 Installer.py
|
||||
```
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from setuptools import setup
|
||||
from Cython.Build import cythonize
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize("Install.py")
|
||||
)
|
||||
Reference in New Issue
Block a user