Use nuitka for compiling, reorganize py files

This commit is contained in:
adrienmalin 2018-08-19 23:28:22 +02:00
parent 8139bf8154
commit 54bce41d50
13 changed files with 2140 additions and 2176 deletions

File diff suppressed because it is too large Load Diff

BIN
dist/Tetris2000.exe vendored

Binary file not shown.

View File

@ -1,43 +0,0 @@
# -*- mode: python -*-
block_cipher = None
a = Analysis(['Tetris2000.py'],
pathex=[],
binaries=[],
datas=[
("backgrounds/*", "backgrounds"),
("fonts/*.ttf", "fonts"),
("fonts/*.otf", "fonts"),
("icons/*.ico", "icons"),
("icons/splash_screen.png", "icons"),
("locale/*.qm", "locale"),
("musics/*.mp3", "musics"),
("sfx/*.wav", "sfx")
],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=["PyQt4", "PySide", "PySide2"],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='Tetris2000',
debug=False,
strip=False,
upx=False,
console=False,
icon='icons\icon.ico')
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
name='Tetris2000')

View File

@ -3,11 +3,12 @@
import os
from qt5 import QtGui
from .qt5 import QtGui
# Paths
PATH = os.path.dirname(os.path.abspath(__file__))
PATH = os.path.dirname(PATH)
ICON_PATH = os.path.join(PATH, "icons", "icon.ico")
BG_IMAGE_DIR = os.path.join(PATH, "backgrounds")
START_BG_IMAGE_NAME = "01-spacefield_a-000.png"

1520
source/game_gui.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
from consts import CLOCKWISE
from qt5 import QtCore
from propertize import propertize, rename_attributes, snake_case
from .consts import CLOCKWISE
from .qt5 import QtCore
from .propertize import propertize, rename_attributes, snake_case
@propertize("", "set_")

View File

@ -4,10 +4,10 @@
import random
import consts
from consts import L, R, U, D, CLOCKWISE, COUNTERCLOCKWISE
from point import Point
from qt5 import QtCore, QtGui
from . import consts
from .consts import L, R, U, D, CLOCKWISE, COUNTERCLOCKWISE
from .point import Point
from .qt5 import QtCore, QtGui
class Block: