diff --git a/.drone.yml b/.drone.yml index aa76689..891a8b5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,8 +6,10 @@ steps: - name: build image: python:3.9 commands: - - pip install --no-cache-dir pyinstaller - - pyinstaller --clean LaunchSimLinux.spec + - python -m venv venv + - ven/Scripts/activate + - pip install -r requirements.txt + - python -m nuitka --standalone --onefile --enable-plugin=tk-inter src/LaunchSim.py - name: push-artifacts image: alpine/git @@ -20,7 +22,7 @@ steps: - git config --global user.name "Drone CI" - git config --global user.email "drone@spark-ops.com" - git clone https://$GIT_USERNAME:$GIT_PASSWORD@git.spark-ops.com/LaunchSim/application.git - - cp README_APP.md dist/LaunchSim.exe application/ + - cp README_APP.md LaunchSim.dist/LaunchSim.exe application/ - VERSION=$(cat VERSION) - cd application - git add . diff --git a/.gitignore b/.gitignore index c064d17..faaa933 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ SECRETS venv/ __pycache__/ -build/ +*.build/ +*.dist/ *.log \ No newline at end of file diff --git a/LaunchSim.spec b/LaunchSim.spec deleted file mode 100644 index 209c793..0000000 --- a/LaunchSim.spec +++ /dev/null @@ -1,40 +0,0 @@ -# -*- mode: python ; coding: utf-8 -*- - -block_cipher = None - -a = Analysis( - ['src\\main.py'], - pathex=['.'], - binaries=[], - datas=[], - hiddenimports=[], - hookspath=[], - runtime_hooks=[], - excludes=[], - noarchive=False, - optimize=0, -) - -pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) - -exe = EXE( - pyz, - a.scripts, - a.binaries, - a.datas, - [], - name='LaunchSim', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=False, - disable_windowed_traceback=False, - argv_emulation=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None, - icon=['src\\static\\icon.ico'], -) diff --git a/LaunchSimLinux.spec b/LaunchSimLinux.spec deleted file mode 100644 index 411d534..0000000 --- a/LaunchSimLinux.spec +++ /dev/null @@ -1,40 +0,0 @@ -# -*- mode: python ; coding: utf-8 -*- - -block_cipher = None - -a = Analysis( - ['src/main.py'], - pathex=['.'], - binaries=[], - datas=[], - hiddenimports=[], - hookspath=[], - runtime_hooks=[], - excludes=[], - noarchive=False, - optimize=0, -) - -pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) - -exe = EXE( - pyz, - a.scripts, - a.binaries, - a.datas, - [], - name='LaunchSim', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=False, - disable_windowed_traceback=False, - argv_emulation=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None, - icon='src/static/icon.ico', -) diff --git a/README.md b/README.md index 6f312f0..28383b2 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,14 @@ LaunchSim es una aplicación diseñada para calcular trayectorias de proyectiles 5. **Compilar como ejecutable (opcional):** Si deseas distribuir la aplicación como un ejecutable independiente: - ```bash - pyinstaller --clean LaunchSim.spec - ``` + - En Windows: + ```bash + python -m nuitka --standalone --windows-disable-console=disable --enable-plugin=tk-inter --windows-icon-from-ico=src/static/icon.ico src/LaunchSim.py + ``` + - En Linux/Mac: + ```bash + python -m nuitka --standalone --onefile --enable-plugin=tk-inter src/LaunchSim.py + ``` El archivo resultante estará en la carpeta `dist/`. --- diff --git a/dist/LaunchSim.exe b/dist/LaunchSim.exe deleted file mode 100644 index f0a2817..0000000 Binary files a/dist/LaunchSim.exe and /dev/null differ diff --git a/requirements.txt b/requirements.txt index 4cdc1a7..bc99d4d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,17 @@ +altgraph +cycler +fonttools +kiwisolver matplotlib numpy +packaging +pefile +pillow pyinstaller -scipy \ No newline at end of file +pyinstaller-hooks-contrib +pyparsing +python-dateutil +pywin32-ctypes +scipy +six +nuitka \ No newline at end of file diff --git a/src/main.py b/src/LaunchSim.py similarity index 100% rename from src/main.py rename to src/LaunchSim.py diff --git a/src/tabs/tab_dynamic.py b/src/tabs/tab_dynamic.py new file mode 100644 index 0000000..e69de29