diff --git a/.gitignore b/.gitignore index 6a5f9c8..0489545 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ expected_values.md /bin.py python/dontlook.py +expected_values.md +releases/* # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/Cargo.lock b/Cargo.lock index 9d5c6dc..b502614 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -553,7 +553,7 @@ checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "xiv_craft_solver" -version = "0.1.2" +version = "0.1.3" dependencies = [ "clap", "lazy_static", diff --git a/Cargo.toml b/Cargo.toml index a1ced99..eb8cb98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xiv_craft_solver" -version = "0.1.2" +version = "0.1.3" edition = "2021" authors = ["谭俊健","Dandaedre","Vkyfox"] description = "Small XIV solver library in rust, with python and rust bindings" @@ -35,12 +35,12 @@ no_python = [] # Removes the python bindings fast = [] # Remove some under optimisations that try to find other routes [lib] -name = "xiv_craft_solver" +name = "xiv_craft_solver" # Pending rename ffcraft_solver_lib path = "src/lib.rs" crate-type = ["cdylib","rlib"] [[bin]] -name = "ffcraft" +name = "ffcraft_solver_cli" path = "src/bin/ffcraft.rs" [tool.maturin] diff --git a/craft.toml b/craft.toml index 5829bc9..99b2be9 100644 --- a/craft.toml +++ b/craft.toml @@ -48,6 +48,21 @@ craftsmanship = 4041 control = 3959 max_cp = 602 +[frenetic] +craftsmanship = 4041 +control = 3971 +max_cp = 595 + +[frenefood] +craftsmanship = 4041 +control = 4061 +max_cp = 681 + +[frenechad] +craftsmanship = 4041 +control = 4055 +max_cp = 619 + [cero] craftsmanship = 1818 control = 1983 diff --git a/makefile b/makefile new file mode 100755 index 0000000..9906582 --- /dev/null +++ b/makefile @@ -0,0 +1,27 @@ +clean: + @echo "[MAKE] Cleaning last release" + cargo clean + rm -rf releases + rm -rf python/build + rm -rf python/dist + +rust: + @echo "[MAKE] Building the libraries" + maturin develop --release -q + cargo build --release -q # --features="no_python" + +python: + @echo "[MAKE] Building the python project" + cd python && rm -rf build dist + cd python && pip install -q -r requirements_dev.txt + cd python && pip install -q -e . + cd python && pyinstaller src/ffcraft_solver/__main__.py -i "src/ffcraft_solver/ressources/ffcraft_solver.ico" --add-data "src/ffcraft_solver/configs/:ffcraft_solver/configs" --add-data "src/ffcraft_solver/ressources/:ffcraft_solver/ressources" --name ffcraft_solver_gui -y > /dev/null 2>pyinstaller_log.txt + + + +.PHONY: clean rust python +release: clean rust python + mkdir -p releases # Add version as an arg and things + @echo "[MAKE] Copying releases in the releases/ directory" + zip releases/ffcraft_solver_cli.zip -q -j target/release/ffcraft_solver_cli craft.toml -j target/release/libxiv_craft_solver.so + cd python/dist/ && zip -q ../../releases/ffcraft_solver_gui.zip -r ffcraft_solver_gui/ \ No newline at end of file diff --git a/python/pyinstaller_log.txt b/python/pyinstaller_log.txt new file mode 100644 index 0000000..0d5d164 --- /dev/null +++ b/python/pyinstaller_log.txt @@ -0,0 +1,58 @@ +71 INFO: PyInstaller: 5.8.0 +71 INFO: Python: 3.10.6 +72 INFO: Platform: Linux-6.1.11-76060111-generic-x86_64-with-glibc2.35 +72 INFO: wrote /home/dandaedre/Documents/Git/ffcraft_solver/python/ffcraft_solver_gui.spec +74 INFO: UPX is available. +74 INFO: Extending PYTHONPATH with paths +['/home/dandaedre/Documents/Git/ffcraft_solver/python/src'] +166 INFO: checking Analysis +166 INFO: Building Analysis because Analysis-00.toc is non existent +166 INFO: Initializing module dependency graph... +167 INFO: Caching module graph hooks... +176 INFO: Analyzing base_library.zip ... +581 INFO: Loading module hook 'hook-heapq.py' from '/home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/PyInstaller/hooks'... +625 INFO: Loading module hook 'hook-encodings.py' from '/home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/PyInstaller/hooks'... +1292 INFO: Loading module hook 'hook-pickle.py' from '/home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/PyInstaller/hooks'... +2161 INFO: Caching module dependency graph... +2221 INFO: running Analysis Analysis-00.toc +2236 INFO: Analyzing /home/dandaedre/Documents/Git/ffcraft_solver/python/src/ffcraft_solver/__main__.py +2508 INFO: Loading module hook 'hook-platform.py' from '/home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/PyInstaller/hooks'... +2672 INFO: Loading module hook 'hook-pygments.py' from '/home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/PyInstaller/hooks'... +3097 INFO: Loading module hook 'hook-pkg_resources.py' from '/home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/PyInstaller/hooks'... +3438 INFO: Loading module hook 'hook-xml.py' from '/home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/PyInstaller/hooks'... +3457 INFO: Loading module hook 'hook-sysconfig.py' from '/home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/PyInstaller/hooks'... +4100 INFO: Processing module hooks... +5030 INFO: Processing pre-safe import module hook win32com from '/home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/pre_safe_import_module/hook-win32com.py'. +5209 INFO: Loading module hook 'hook-packaging.py' from '/home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/PyInstaller/hooks'... +5271 INFO: Looking for ctypes DLLs +5276 INFO: Analyzing run-time hooks ... +5278 INFO: Including run-time hook '/home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/PyInstaller/hooks/rthooks/pyi_rth_inspect.py' +5279 INFO: Including run-time hook '/home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/PyInstaller/hooks/rthooks/pyi_rth_pkgres.py' +5281 INFO: Including run-time hook '/home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/PyInstaller/hooks/rthooks/pyi_rth_pkgutil.py' +5288 INFO: Looking for dynamic libraries +5630 INFO: Looking for eggs +5630 INFO: Python library not among binary dependencies. Performing additional search... +5642 INFO: Using Python library /lib/x86_64-linux-gnu/libpython3.10.so.1.0 +5644 INFO: Warnings written to /home/dandaedre/Documents/Git/ffcraft_solver/python/build/ffcraft_solver_gui/warn-ffcraft_solver_gui.txt +5669 INFO: Graph cross-reference written to /home/dandaedre/Documents/Git/ffcraft_solver/python/build/ffcraft_solver_gui/xref-ffcraft_solver_gui.html +5679 INFO: Appending 'datas' from .spec +5684 INFO: checking PYZ +5684 INFO: Building PYZ because PYZ-00.toc is non existent +5684 INFO: Building PYZ (ZlibArchive) /home/dandaedre/Documents/Git/ffcraft_solver/python/build/ffcraft_solver_gui/PYZ-00.pyz +6064 INFO: Building PYZ (ZlibArchive) /home/dandaedre/Documents/Git/ffcraft_solver/python/build/ffcraft_solver_gui/PYZ-00.pyz completed successfully. +6073 WARNING: Ignoring icon; supported only on Windows and macOS! +6073 INFO: checking PKG +6073 INFO: Building PKG because PKG-00.toc is non existent +6073 INFO: Building PKG (CArchive) ffcraft_solver_gui.pkg +6087 INFO: Building PKG (CArchive) ffcraft_solver_gui.pkg completed successfully. +6087 INFO: Bootloader /home/dandaedre/Documents/Git/ffcraft_solver/.venv/lib/python3.10/site-packages/PyInstaller/bootloader/Linux-64bit-intel/run +6087 INFO: checking EXE +6087 INFO: Building EXE because EXE-00.toc is non existent +6087 INFO: Building EXE from EXE-00.toc +6087 INFO: Copying bootloader EXE to /home/dandaedre/Documents/Git/ffcraft_solver/python/build/ffcraft_solver_gui/ffcraft_solver_gui +6088 INFO: Appending PKG archive to custom ELF section in EXE +6096 INFO: Building EXE from EXE-00.toc completed successfully. +6096 INFO: checking COLLECT +6096 INFO: Building COLLECT because COLLECT-00.toc is non existent +6096 INFO: Building COLLECT COLLECT-00.toc +6236 INFO: Building COLLECT COLLECT-00.toc completed successfully. diff --git a/python/requirements_dev.txt b/python/requirements_dev.txt index a8b4c81..48f786b 100644 --- a/python/requirements_dev.txt +++ b/python/requirements_dev.txt @@ -5,4 +5,5 @@ pytest-cov==3.0.0 mypy==0.941 dearpygui==1.8.0 PyYAML==6.0 -rich==13.3.1 \ No newline at end of file +rich==13.3.1 +pyinstaller==5.8.0 \ No newline at end of file diff --git a/python/src/ffcraft_solver/resources/ffcraft_solver.ico b/python/src/ffcraft_solver/ressources/ffcraft_solver.ico similarity index 100% rename from python/src/ffcraft_solver/resources/ffcraft_solver.ico rename to python/src/ffcraft_solver/ressources/ffcraft_solver.ico diff --git a/python/src/ffcraft_solver/resources/ffcraft_solver.png b/python/src/ffcraft_solver/ressources/ffcraft_solver.png similarity index 100% rename from python/src/ffcraft_solver/resources/ffcraft_solver.png rename to python/src/ffcraft_solver/ressources/ffcraft_solver.png