Skip to content

Commit c412716

Browse files
Merge pull request #30 from xcoder-tool/compression-updated
chore: dependencies updated, pillow fixed
2 parents 1a8b1b7 + 32dfefd commit c412716

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1402
-599
lines changed

.github/workflows/lint.yml

+23-12
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
1-
name: Lint
1+
name: Lint and test
22

3-
on: [push, pull_request]
3+
on: [push]
44

55
jobs:
66
build:
7-
runs-on: ubuntu-latest
7+
runs-on: ${{matrix.os}}
8+
strategy:
9+
matrix:
10+
python: ["3.11", "3.12"]
11+
os: ["ubuntu-latest", "windows-latest"]
812

913
steps:
10-
- uses: actions/checkout@v3
11-
- name: Set up Python 3.11
14+
- uses: actions/checkout@v4
15+
- name: Set up Python ${{matrix.python}}
1216
uses: actions/setup-python@v4
1317
with:
14-
python-version: "3.11"
18+
python-version: ${{matrix.python}}
1519

16-
- name: Install requirements
20+
- name: Install poetry
1721
run: |
18-
pip install flake8 pyright
19-
pip install -r requirements.txt
22+
pip install pipx
23+
pipx install poetry
2024
21-
- name: Linting code by flake8
25+
- name: Install dependencies
2226
run: |
23-
flake8 --show-source --statistics
27+
poetry install
28+
29+
- name: Linting code by ruff
30+
run: |
31+
poetry run ruff check .
2432
2533
- name: Check types by pyright
2634
run: |
27-
pyright
35+
poetry run pyright .
36+
37+
- name: Run unit-tests
38+
run: poetry run python -m unittest

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/SC/
1111

1212
# Configuration files
13-
system/config.json
13+
xcoder/config.json
1414

1515
# Python compiled files
1616
*.pyc

README.md

+54-27
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,78 @@
11
# XCoder - easy to use modding tool
2+
23
Multiplatform modding tool for ANY Supercell\`s game.
34

45
## About
5-
Work with Supercell\`s files on **any** os! SC and CSV are supported for all Supercell\`s games.
6+
7+
Work with Supercell\`s files on **any** os! SC and CSV are supported for all
8+
Supercell\`s games.
69

710
### Features:
8-
- SC compile / decompile;
9-
- Compression and decompression.
11+
12+
- SC compile / decompile
13+
- Compression and decompression
1014

1115
### How to install and use
16+
1217
- On Windows:
13-
- Download Python 3.7 or newer version from [official page](https://www.python.org/downloads/);
14-
- Install Python. While Installing, enable such parameters as "Add Python to PATH", "Install pip", "Install py launcher", "Associate files with Python" and "Add Python to environment variables";
15-
- Download XCoder from the [releases page](https://github.com/Vorono4ka/XCoder/releases) and extract it;
16-
- Locate the extracted directory and install required modules:
17-
```pip install -r requirements.txt```;
18-
- Execute "main.py" file.
18+
- Download Python 3.10 or newer version
19+
from [official page](https://www.python.org/downloads/)
20+
- Install Python. While Installing, enable such parameters as "Add Python to
21+
PATH", "Install pip", "Install py launcher", "Associate files with Python" and "Add Python to environment variables"
22+
- Download XCoder from the [releases page](https://github.com/xcoder-tool/XCoder/releases) and extract it
23+
- Locate the extracted directory and install required modules:
24+
```cmd
25+
poetry install
26+
```
27+
- Run program with
28+
```cmd
29+
poetry run python -m xcoder
30+
```
1931
2032
- On Linux:
21-
- Open Terminal and install Python by executing following command:
22-
```sudo apt-get update && sudo apt-get install python3 python3-pip```;
23-
- Download XCoder from the [releases page](https://github.com/Vorono4ka/XCoder/releases) and extract it;
24-
- Locate the extracted directory and install required modules by executing following command:
25-
```sudo pip3 install -r requirements.txt```;
26-
- Execute "main.py" file.
27-
28-
- On Android:
29-
- Download and install PyDroid app from [Google Play](https://play.google.com/store/apps/details?id=ru.iiec.pydroid3);
30-
- Open PyDroid and wait until Python installs;
31-
- Download XCoder from the [releases page](https://github.com/Vorono4ka/XCoder/releases) and extract it;
32-
- Install loguru using pip;
33-
- In PyDroid open and execute "main.py" file.
33+
- Open Terminal and install Python by executing following command:
34+
```sh
35+
sudo apt-get update && sudo apt-get install python3 python3-poetry
36+
```
37+
- Download XCoder from the [releases page](https://github.com/xcoder-tool/XCoder/releases) and extract it
38+
- Locate the extracted directory and install required modules by executing following
39+
command:
40+
```sh
41+
poetry install
42+
```
43+
- Run program with
44+
```cmd
45+
poetry run python -m xcoder
46+
```
47+
48+
### Testing
49+
50+
The project supports unit-testing using the unittest module. To run tests by yourself,
51+
use the command:
52+
53+
```sh
54+
poetry run python -m unittest
55+
```
3456

3557
### How to enable KTX section
3658

37-
![KTX section demo](docs/KTX section.png)
59+
![KTX section demo](docs/KTX%20section.png)
3860

39-
**Supercell also uses KTX textures in new versions of the games, so it is advisable to perform this step.**
61+
**Supercell also uses KTX textures in new versions of the games, so it is advisable to
62+
perform this step.**
4063

41-
To enable the KTX module, you need to get the "PVRTexToolCLI" binary from the official site: https://developer.imaginationtech.com/pvrtextool/.
64+
To enable the KTX module, you need to get the "PVRTexToolCLI" binary from the official
65+
site: https://developer.imaginationtech.com/pvrtextool/.
4266

43-
Then it is necessary to put CLI in "system/bin/" folder in the main script folder.
67+
Then it is necessary to put CLI in "bin/" folder in the main script folder.
4468

4569
### In the plans:
70+
4671
- CSV updating.
4772

4873
## Credits
49-
This tool is based on Original [XCoder](https://github.com/MasterDevX/xcoder), Developer: [MasterDevX](https://github.com/MasterDevX)</br>
74+
75+
This tool is based on Original [XCoder](https://github.com/MasterDevX/xcoder),
76+
Developer: [MasterDevX](https://github.com/MasterDevX)</br>
5077

5178
Many thanks to [spiky_Spike](https://github.com/spiky-s) for the provided developments

0 commit comments

Comments
 (0)