Skip to content

Commit

Permalink
Merge pull request #3 from Mix-Anik/version-11
Browse files Browse the repository at this point in the history
Version 1.1
  • Loading branch information
Mix-Anik authored Apr 7, 2022
2 parents 011fe21 + e32a5bc commit a7969a0
Show file tree
Hide file tree
Showing 28 changed files with 769 additions and 516 deletions.
120 changes: 120 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,18 @@ Converting VTF images wasn't as easy before
2. Click **Update** button, so folder path would appear in white box
3. Choose all folder paths you want to be processed
4. Choose version you want them to be converted to
5. Click **Convert**
5. Click **Convert**

### Building
Install dependencies `pip install -r requirements.txt` and run `python buildexe.py`
You will then find **VTFChanger.exe** inside _dist_ folder

### Testing
For pytest to work properly, link current project as module package `pip install -e .`
Tests rely on VTFCmd.exe for validation, so you will have to install it if you haven't already (it comes with VTFEdit),
can be downloaded here https://github.com/NeilJed/VTFLib/releases
Replace VTFCMD_path value with absolute path to the VTFCmd.exe in **.../tests/test_main.py:23**
```python
self.VTFCMD_path = '<vtfcmd.exe absolute path here>'
```
Then you can run `pytest` or `py.test` for executing tests
31 changes: 31 additions & 0 deletions buildexe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import os
import shutil

import PyInstaller.__main__

from pathlib import Path


exe_name = 'VTFChanger'
root_folder = Path(__file__).parent

PyInstaller.__main__.run([
'--onefile',
'--noconsole',
'--clean',
'-n',
exe_name,
'src/gui.py'
])


# cleanup
try:
os.remove(f'{root_folder}\\{exe_name}.spec')
except OSError as e:
print(f'Error: {e}')

try:
shutil.rmtree(f'{root_folder}\\build')
except OSError as e:
print(f'Error: {e}')
50 changes: 0 additions & 50 deletions c_structs.py

This file was deleted.

54 changes: 0 additions & 54 deletions explorers.py

This file was deleted.

Loading

0 comments on commit a7969a0

Please sign in to comment.