Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions config/versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"choices": [
["master", "nightly"],
["1.4.3", "1.4.3"],
["1.4.2", "1.4.2"],
["1.4.1", "1.4.1"],
["1.4.0", "1.4.0"],
["1.3.9", "1.3.9"],
["1.3.8", "1.3.8"],
["1.3.7", "1.3.7"],
["1.3.6", "1.3.6"],
["1.3.5", "1.3.5"],
["1.3.4", "1.3.4"],
["1.3.3", "1.3.3"]
],
"initial": "1.4.3"
}
10 changes: 10 additions & 0 deletions config_loader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# config_loader.py
import json
import os

def load_version_config():
config_path = os.path.join(os.path.dirname(__file__), './config/versions.json')
with open(config_path, 'r', encoding='utf-8') as f:
data = json.load(f)
data['choices'] = [tuple(choice) for choice in data['choices']]
return data
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ services:
GENURL: "accessible_url_of_server"
PROTOCOL: "https"
REPONAME: "rdgen"
volumes:
- ./config:/opt/rdgen/config
ports:
- "8000:8000"
dns:
Expand Down
9 changes: 8 additions & 1 deletion rdgenerator/forms.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
from django import forms
from PIL import Image
from config_loader import load_version_config

version = load_version_config()

class GenerateForm(forms.Form):
#Platform
platform = forms.ChoiceField(choices=[('windows','Windows 64Bit'),('windows-x86','Windows 32Bit'),('linux','Linux'),('android','Android'),('macos','macOS')], initial='windows')
version = forms.ChoiceField(choices=[('master','nightly'),('1.4.3','1.4.3'),('1.4.2','1.4.2'),('1.4.1','1.4.1'),('1.4.0','1.4.0'),('1.3.9','1.3.9'),('1.3.8','1.3.8'),('1.3.7','1.3.7'),('1.3.6','1.3.6'),('1.3.5','1.3.5'),('1.3.4','1.3.4'),('1.3.3','1.3.3')], initial='1.4.3')
#version = forms.ChoiceField(choices=[('master','nightly'),('1.4.3','1.4.3'),('1.4.2','1.4.2'),('1.4.1','1.4.1'),('1.4.0','1.4.0'),('1.3.9','1.3.9'),('1.3.8','1.3.8'),('1.3.7','1.3.7'),('1.3.6','1.3.6'),('1.3.5','1.3.5'),('1.3.4','1.3.4'),('1.3.3','1.3.3')], initial='1.4.3')
version = forms.ChoiceField(
choices=version['choices'],
initial=version['initial']
)
help_text="'master' is the development version (nightly build) with the latest features but may be less stable"
delayFix = forms.BooleanField(initial=True, required=False)

Expand Down
6 changes: 5 additions & 1 deletion setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
* GHBEARER="your fine-grained access token"
* PROTOCOL="https" *optional - defaults to "https", change to "http" if you need to
* REPONAME="rdgen" *optional - defaults to "rdgen", change this if you renamed the repo when you forked it
5. Now just run ```docker compose up -d```
5. Copy the config/versions.json file from this project to the config directory, located in the same directory as docker-compose.yml(edit the versions list if you want). The directory structure is as follows:
* docker-compose.yml
* config/
* |----versions.json
6. Now just run ```docker compose up -d```


## Host manually:
Expand Down