Skip to content

Commit

Permalink
add pyinstaller config (#10)
Browse files Browse the repository at this point in the history
* Squashed commit of the following:

commit 8ba2dbd
Merge: c4614c1 0c5b123
Author: Jayly <65847850+JaylyDev@users.noreply.github.com>
Date:   Sat Mar 25 19:40:53 2023 +0000

    Merge pull request #3 from SmokeyStack/main

    Block Data

commit c4614c1
Merge: 1246e14 de06f71
Author: Jayly <65847850+JaylyDev@users.noreply.github.com>
Date:   Sat Mar 25 19:39:05 2023 +0000

    Merge pull request #7 from JaylyDev/beta

    Use actions to build exe when a release is published

commit 0c5b123
Merge: a086294 db167f8
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Fri Mar 24 13:32:12 2023 -0400

    Merge branch 'main' of https://github.com/SmokeyStack/nbt-to-mcstructure

commit a086294
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Fri Mar 24 13:31:41 2023 -0400

    Added some support for pre-1.13 nbt

commit db167f8
Author: bot174 <65847850+JaylyDev@users.noreply.github.com>
Date:   Thu Mar 23 21:31:59 2023 +0000

    fix path case sensitive issue

commit f5e5855
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Wed Mar 22 13:08:53 2023 -0400

    Updated types

commit 74c8c20
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Wed Mar 22 10:41:35 2023 -0400

    Added support for structureblock

commit 3c4117f
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Wed Mar 22 10:28:06 2023 -0400

    Updated file names

commit ac40a35
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Wed Mar 22 10:24:06 2023 -0400

    Added support for skull

commit 567c8e9
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Wed Mar 22 08:20:36 2023 -0400

    Added support for spawners

commit 9b354e5
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Wed Mar 22 07:58:48 2023 -0400

    Fixed default block entity

commit 027e2b9
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Wed Mar 22 07:57:25 2023 -0400

    Added support for Jigsaw

commit 8a900e3
Merge: 341e8d4 1246e14
Author: SmokeyStack <84206875+SmokeyStack@users.noreply.github.com>
Date:   Wed Mar 22 07:16:58 2023 -0400

    Merge branch 'main' into main

commit 341e8d4
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Wed Mar 22 07:06:18 2023 -0400

    Updated block entity support

commit d262c18
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Tue Mar 21 14:54:38 2023 -0400

    Added support to convert old ids to new ids

commit fc5e1ea
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Mon Mar 20 07:25:13 2023 -0400

    Added support for flower pots and furnaces

commit 91f4ae8
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Sun Mar 19 11:57:47 2023 -0400

    Added support for comparator

commit 1246e14
Merge: 9b5298b a29982d
Author: Jayly <65847850+JaylyDev@users.noreply.github.com>
Date:   Sat Mar 18 17:12:51 2023 +0000

    Merge pull request #4 from JaylyDev/beta

    Put vanilla structures into zip file

commit d40efde
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Sat Mar 18 07:29:00 2023 -0400

    Added support for trapped chest and barrel

commit b48205c
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Sat Mar 18 07:06:15 2023 -0400

    Updated id names

commit aee0e38
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Sat Mar 18 06:41:33 2023 -0400

    Formatted using Black and added support for more block entities

commit ac1860d
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Sat Mar 18 06:40:37 2023 -0400

    Formatted using Black

commit aae068a
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Fri Mar 17 10:19:59 2023 -0400

    Added support for bed data

commit f8d54dd
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Fri Mar 17 06:49:02 2023 -0400

    Added support for furnace

commit 2a1837f
Author: SmokeyStack <seansyahril04@gmail.com>
Date:   Thu Mar 16 09:38:56 2023 -0400

    Chest block data

* fix #9

* Add structures folder if not exist
  • Loading branch information
JaylyDev authored Mar 29, 2023
1 parent 8ba2dbd commit 72178a5
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ MANIFEST
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
!nbt-to-mcstrucutre.spec
!nbt-to-mcstructure.spec

# Installer logs
pip-log.txt
Expand Down
6 changes: 4 additions & 2 deletions __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
import pynbt
from time import time
from java_structures import javaToBedrock
from os import listdir
from os import listdir, makedirs, mkdir
from os.path import isfile, join, isdir
import threading

structurePath = 'structures' ## path of structures

def convert(file):
mcstructureFile = file.replace(pathlib.Path(file).suffix, '') + '.mcstructure'
print(f"Converting '{file}' to '{mcstructureFile}'")
Expand Down Expand Up @@ -71,7 +73,7 @@ def get_nbtFiles (dirpath: str) -> list[str]:
return files

if __name__ == "__main__": # pragma: no coverage
structurePath = 'structures' ## path of structures
makedirs(structurePath, exist_ok=True)
nbtFiles = get_nbtFiles(structurePath)

if len(nbtFiles) == 0:
Expand Down
45 changes: 45 additions & 0 deletions nbt-to-mcstructure.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# -*- mode: python ; coding: utf-8 -*-


block_cipher = None


a = Analysis(
['__main__.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='nbt-to-mcstrucutre',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=['assets/icon.png'],
)

0 comments on commit 72178a5

Please sign in to comment.