Move bins to simplify pyinstaller paths

This commit is contained in:
Philippe Teuwen
2023-10-23 22:54:37 +02:00
parent bb47bd5159
commit 55cd19f0db
3 changed files with 3 additions and 8 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ a = Analysis(
['script/chameleon_cli_main.py'],
pathex=[],
binaries=[
("bin/*", "bin/"),
("script/bin/*", "bin/"),
],
datas=[],
hiddenimports=[],
+1 -6
View File
@@ -36,12 +36,7 @@ type_id_SAK_dict = {0x00: "MIFARE Ultralight Classic/C/EV1/Nano | NTAG 2xx",
0x38: "SmartMX with MIFARE Classic 4K",
}
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
# in pyinstaller
default_cwd = Path.cwd() / Path(sys._MEIPASS) / "bin"
else:
# from source
default_cwd = Path.cwd() / Path(__file__).parent.parent / "bin"
default_cwd = Path.cwd() / Path(__file__).with_name("bin")
def check_tools():
+1 -1
View File
@@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.1)
project (mifare C)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../bin)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../script/bin)
set(SRC_DIR ./)
set(COMMON_FILES