Linux package files (#402)

* Wrote Linux package files

* Moved the package distribution content

* Started rewriting `Install.sh` in Python

* Added the `ttkbootstrap` module

* Applied a dark theme to the installer

* More dependency installation changes

* More installer changes

* Overhauled all distribution changes

* Fixed the `Setup.py` script
The `Setup.py` script tried to build `Dependencies.py`, which was
removed. It now builds `Install.py` instead.

* Moved from `subprocess.run()` to `os.system()`
The installer now uses the **deprecated** `os.system` function. In the
feature `Install.py` will use `subprocess.run()` again, however,
`os.system()` has better infrastructure to work.

* Fixed a grammatical error in `Install.py`
A comment referred to *the* Discord server as Discord, as a whole.

* Fixed two typos in `Install.py` caused by my editor

* Fixed major bugs in the `Install.py` script

* Fixed a possible issue that might occur in `Install.py`

* (Linux) File dialog glob pattern fix (#403)

* ocean: change to use indexed draw; fixed gradient tiling;

* raytracing now uses configurable sampler + refactors

* Underwater post process (#405)

* added underwater post process

* improvements

* update

* update

* border between underwater and air is better faded

* fixes: volumetric cloud blend mode in planar reflection; ocean receive shadow;

* underwater caustics

* Fixed a major `.gitignore` issue

* Debug changes

Co-authored-by: Megumumpkin <megumumpkin@protonmail.ch>
Co-authored-by: Turánszki János <turanszkij@users.noreply.github.com>
This commit is contained in:
Molasses
2022-03-21 18:57:20 +01:00
committed by GitHub
parent b24a3e13b8
commit 07297fce37
9 changed files with 193 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
# 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
```
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/bash
python Setup.py build_ext --inplace
@@ -0,0 +1,16 @@
[Desktop Entry]
Name=Wicked Engine
Name[ja]=ウィケッドエンジン
GenericName=Game engine
GenericName[ja]=ゲームエンジン
Comment=A 3D game engine focusing on modern rendering.
Comment[nl]=Een 3D game engine gefocust op moderne weergave.
Comment[ja]=現代のレンダリングに焦点を当てた3Dゲームエンジ・
Comment[pt]=Um engine de jogo 3D focado em renderização moderna.
Comment[pt_BR]=Um engine de jogo 3D focado em renderização moderna.
Keywords=3d;cg;modeling;animation;painting;texturing;rendering;render engine;game engine;lua;
Exec=wicked-engine
Icon=wicked
Terminal=true
Type=Application
Categories=Graphics;3DGraphics;
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/zsh
echo "Starting Wicked Engine"
cd $WICKED
./WickedEngineEditor
+95
View File
@@ -0,0 +1,95 @@
#!/usr/bin/python
#region Modules
import os
import tkinter as Tk
from tkinter import filedialog
import ttkbootstrap as TkBootstrap
from PIL import Image, ImageTk
from ttkbootstrap.constants import *
from ttkbootstrap.dialogs import *
#endregion
#region Variables
class WickedDirectories:
wickedRootDirectory = "$WICKED"
wickedRootDirectorySelected = bool()
#endregion
#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')
# 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")
def SelectDirectory():
WickedDirectories.wickedRootDirectory = filedialog.askdirectory(initialdir = "../../../", title = "Select Wicked Folder")
WickedDirectories.wickedRootDirectorySelected = True
#endregio
if __name__ == "__main__":
#region Tk Interface variables
window = TkBootstrap.Window()
window.title("Wicked Engine Installer")
window.resizable(False, False)
style = TkBootstrap.Style("darkly")
screenWidth = int(window.winfo_screenwidth()/3)
screenHeight = int(window.winfo_screenheight()/5)
#endregion
#region Tk Interface widgets
button_install = TkBootstrap.Button(text = "start install", bootstyle = 'success', command = Install)
button_path = TkBootstrap.Button(text = "select source folder", bootstyle = 'default', command = SelectDirectory)
checkButton_denoiser = TkBootstrap.Checkbutton(text = "add denoising", bootstyle = 'outline-toolbutton')
checkButton_settings = TkBootstrap.Checkbutton(text = "copy settings", bootstyle = 'outline-toolbutton')
entry_path = TkBootstrap.Entry(text = "root directory", bootstyle = 'default')
label_info = TkBootstrap.Label(text = "Wicked Engine folder:")
#endregion
#region Window changes, widget packing/placing, etc.
window.geometry(str(screenWidth) + 'x' + str(screenHeight)) # Needs to be strings for some reason?
button_install.place(relx = 0.5, rely = 0.75, anchor = CENTER)
button_path.place(relx = 0.5, rely = 0.5, anchor = CENTER)
# These two lines are up to the package maintainer to use or not!
#checkButton_denoiser.place(relx = 0.25, rely = 0.325, anchor = CENTER)
#checkButton_settings.place(relx = 0.25, rely = 0.650, anchor = CENTER)
window.mainloop() # No changes should be applied after this.
#endregion
+42
View File
@@ -0,0 +1,42 @@
# Settings
A brief explanation of Wicked Engine's settings.
## About
This folder contains settings files optionally copied over to your Wicked
Engine installation directory.
### Configuration
The `config.ini` file is responsible for a few options. All changes in the
`config.ini` file must be done with [integers](https://en.wikipedia.org/wiki/Integer),
I.E whole numbers. A value of **0** is equal to **false** and a value of **1**
is equal to **true**. This means the numbers are stand-ins for the
[boolean](https://en.wikipedia.org/wiki/Boolean_data_type) data type.
#### Variables
There's a lot of variables to change around to customise your `config.ini` file.
Here's their documentation:
- The `enabled` variable toggles whether to enable or ignore the `config.ini`.
- The `x` and `y`
variables, which influence where your window appears when you open Wicked
Engine.
- The `w` and `h` variables control the width and height of your Wicked Engine window.
- The `fullscreen`variable controls whether your window goes full-screen when opening Wicked Engine.
- The `borderless` variable determines if your window should have borders or not.
- The `allow_hdr` variable toggles whether HDR should be used by Wicked Engine.
### Start-up
Wicked Engine automatically loads the `startup.lua` script if found. This script
is just like any other Wicked Engine Lua script. Rather than having set variables
for you to control, the script simply allows you do whatever you want. Have fun!
#### Profiling
By default the `startup.lua` script contains `SetProfilerEnabled(false)`, which
sets the profiler to **false**. In order to enable the profiler on start-up,
simply change `SetProfilerEnabled(false)` to `SetProfilerEnabled(true)`!
@@ -0,0 +1,8 @@
enabled 1
x 0
y 0
w 3840
h 2160
fullscreen 1
borderless 0
allow_hdr 1
@@ -0,0 +1 @@
SetProfilerEnabled(false)
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/python
from setuptools import setup
from Cython.Build import cythonize
setup(
ext_modules = cythonize("Install.py")
)