Skip to content

Commit

Permalink
Merge pull request #1201 from Oganesson897/packwiz
Browse files Browse the repository at this point in the history
Packwiz
  • Loading branch information
bruberu authored Jan 12, 2025
2 parents 7a86577 + f1a8b36 commit adb9d51
Show file tree
Hide file tree
Showing 191 changed files with 16,762 additions and 1,217 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
name: "Pre Release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Declare some variables
Expand All @@ -23,17 +23,15 @@ jobs:
echo "::set-output name=sha_short::$(git rev-parse --short $GITHUB_SHA)"
- name: Install requests
run: |
pip install requests
- uses: actions/setup-java@v2
pip install requests
- uses: actions/setup-java@v4
with:
distribution: 'adopt' # See 'Supported distributions' for available options
java-version: '8'
- run: java -version
- name: Run Build
run: |
python build/main.py
env:
CFAPIKEY: ${{ secrets.CFAPIKEY }}
- name: Automatic Releases
uses: marvinpinto/action-automatic-releases@latest
with:
Expand Down
93 changes: 49 additions & 44 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,56 +8,61 @@ jobs:
name: "Release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Declare some variables
id: vars
shell: bash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short $GITHUB_SHA)"
- name: Install requests
run: |
pip install requests
- name: Run Build
run: |
python build/main.py
env:
CFAPIKEY: ${{ secrets.CFAPIKEY }}
- id: get-version
uses: actions/github-script@v6
with:
result-encoding: string
script: |
try {
const fs = require('fs')
const jsonString = fs.readFileSync('./manifest.json')
var apps = JSON.parse(jsonString)
return apps.version
} catch(err) {
core.error("Error while reading or parsing the JSON")
core.setFailed(err)
}
- run: echo "${{steps.get-version.outputs.result}}"
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Declare some variables
id: vars
shell: bash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short $GITHUB_SHA)"
- name: Bootstrap
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '8'
- name: Install requests
run: |
pip install requests
- run: python build/main.py
- uses: actions/setup-node@v4
with:
node-version: 'latest'
- run: npm install @iarna/toml
- id: get-version
uses: actions/github-script@v7
with:
result-encoding: string
script: |
try {
const fs = require('fs')
const toml = require('@iarna/toml')
const tomlString = fs.readFileSync('./pack.toml')
var apps = toml.parse(tomlString)
return apps.version
} catch(err) {
core.error("Error while reading or parsing the TOML")
core.setFailed(err)
}
- run: echo "${{steps.get-version.outputs.result}}"

- name: Rename file
run: |
mv buildOut/client.zip buildOut/supersymmetry-${{steps.get-version.outputs.result}}.zip
mv buildOut/server.zip buildOut/server-${{steps.get-version.outputs.result}}.zip
rm -f buildOut/client.zip
rm -f buildOut/server.zip
- name: Rename file
run: |
mv buildOut/client.zip buildOut/supersymmetry-${{steps.get-version.outputs.result}}.zip
mv buildOut/server.zip buildOut/server-${{steps.get-version.outputs.result}}.zip
rm -f buildOut/client.zip
rm -f buildOut/server.zip
- name: Automatic Releases
uses: marvinpinto/action-automatic-releases@latest
with:
- name: Automatic Releases
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ steps.get-version.outputs.result }}
prerelease: false
title: ${{ steps.get-version.outputs.result }}
files: |
buildOut/supersymmetry-${{steps.get-version.outputs.result}}.zip
buildOut/server-${{steps.get-version.outputs.result}}.zip
buildOut/modlist.html
buildOut/modlist.html
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mods/
buildOut/
build/server
*client.zip
.mixin.out/
armourers_workshop/
Expand All @@ -8,7 +8,6 @@ fonts/
journeymap/
logs/
saves/
build/buildOut/

.curseclient
usercache.json
Expand All @@ -19,6 +18,7 @@ instance.json
*.log
*.txt
*.dll
*.exe

build/modlist.*
config/InvTweaks.cfg
Expand Down Expand Up @@ -81,7 +81,7 @@ screenshots/

backups/

resourcepacks/
# resourcepacks/

local/

Expand Down
12 changes: 12 additions & 0 deletions .packwizignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*.py
*.dat
*.md
*.iml
*.pickle
LICENSE
.gitignore

.github/
build/
buildOut/
.idea/
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,24 @@ Special thanks to our volunteers:
- Whatsapp • Structures, textures and feedback
- Science Demon • Questbook work, German translation and bug fixes

## Development Tips
> Please download [Packwiz](https://packwiz.infra.link/installation/) to the current directory manually.
> [Full Usage - Packwiz Tutorial](https://packwiz.infra.link/tutorials/creating/getting-started/)
- Add mod: `packwiz cf add <project name>` ([Full Usage](https://packwiz.infra.link/tutorials/creating/adding-mods/))
- Refresh Hash: `packwiz refresh`
- Print modlist: `packwiz list`
- Update pack version: rewrite version number in [pack.toml](pack.toml)
- Update mod version: `packwiz update <mod>/--all`
- Client only mod: [rewrite <mod>.pw.toml#side manually](https://packwiz.infra.link/reference/pack-format/mod-toml/#properties)

## Building the pack
You'll need python3 and python requests installed to build run the main.py script.
### Client Pack
1. Download [Packwiz](https://packwiz.infra.link/installation/) to the current directory.
2. Run `packwiz cf export` to export the client pack.
3. The export pack will generate in the root directory.
### Server Pack
> Server pack is not recommended for manually install. Recommended to go to the release page to download.
1. Download [packwiz-installer-bootstrap](./build/server/packwiz-installer-bootstrap.jar) to a new directory.
2. Run `java -jar packwiz-installer-bootstrap.jar <local refreshed pack.toml>` to install server.
3. Download [forge installer](https://files.minecraftforge.net/net/minecraftforge/forge/index_1.12.2.html) and run it manually to download libraries and server jar.
4. Copy [launch.sh](./build/server/launch.sh) to the server directory.
16 changes: 16 additions & 0 deletions README_PT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
<blockquote>
<details>
<summary>
<code>あ ←→ A</code>
</summary>
<!--Head-->
&emsp;&ensp;<sub><b>Supersymmetry</b> supports the following languages. </sub>
<br />
<!--Body-->
<br />
&emsp;&ensp;Português
<br />
&emsp;&ensp;<a href="/README.md">English</a>
</details>
</blockquote>

# Supersymmetry
Supersymmetry é um modpack centrado em tecnologia baseado no GregTech, que inclui processos químicos e físicos da realidade à sua progressão. Isto significa que contém muitas redes de contrução que imitam processos de manofaturação usados na vida real.
Grande parte do _pack_ está em desenvolvimento, com elementos PvE (Jogador contra ambiente) tais como fatores ambientais e invasões de facções enimigas planeadas. Nós temos intenções de adicionar o nosso próprio _mod_ de exploração do espaço também.
Expand Down
47 changes: 47 additions & 0 deletions build/download.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env python3

import requests
import subprocess
import os

basePath = os.path.normpath(os.path.realpath(__file__).replace("download.py", "") + "/server")

def download():
with open(basePath + "/forge-installer.jar", "w+b") as jar:
forgeVer = "14.23.5.2860"
mcVer = "1.12.2"
url = (
"https://maven.minecraftforge.net/net/minecraftforge/forge/"
+ mcVer
+ "-"
+ forgeVer
+ "/forge-"
+ mcVer
+ "-"
+ forgeVer
+ "-installer.jar"
)
r = requests.get(url)
jar.write(r.content)
print("Forge installer Downloaded")

vanilla = basePath + "/minecraft_server.1.12.2.jar"
if not os.path.isfile(vanilla):
with open(basePath + "/minecraft_server.1.12.2.jar", "w+b") as jar:
url = "https://launcher.mojang.com/v1/objects/886945bfb2b978778c3a0288fd7fab09d315b25f/server.jar"
r = requests.get(url)
jar.write(r.content)
print("Vanilla Downloaded")

subprocess.run(["java", "-jar", "forge-installer.jar",
"--installServer"], cwd=basePath)
print("Forge Installed")

try:
os.remove(basePath + "/forge-installer.jar")
except Exception as e:
print("Couldn't delete forge-installer.jar: %s" % (e))
try:
os.remove(basePath + "/forge-installer.jar.log")
except Exception as e:
print("Couldn't delete forge-installer.jar.log: %s" % (e))
Loading

0 comments on commit adb9d51

Please sign in to comment.