Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Fix antlib location in bundled pyinstaller executable #370

Merged
merged 3 commits into from
Jul 6, 2022

Conversation

bjorgan
Copy link
Contributor

@bjorgan bjorgan commented Feb 28, 2022

Using dfu ant from the standalone pyinstaller executable (e.g. https://github.com/NordicSemiconductor/pc-nrfutil/releases/download/v6.1.2/nrfutil.exe) yields the following error:

$ ./nrfutil.exe dfu ant --package dfu.zip
Traceback (most recent call last):
  File "PyInstaller\loader\pyimod04_ctypes.py", line 53, in __init__
  File "ctypes\__init__.py", line 374, in __init__
FileNotFoundError: Could not find module 'C:\Users\[user]\AppData\Local\Temp\_MEI125402\antlib\win32\ANT_WrappedLib.dll' (or one of its dependencies). Try using the full path with constructor syntax.

The antlib DLL is assumed to be located at antlib/win32/ANT_WrappedLib.dll within the unpacked bundle, but actual location in the bundle is win32/ANT_WrappedLib.dll. This fix should rectify the bundled location.

Copy link
Contributor

@jornbh jornbh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍. Well spotted. I can not say anything about the correctness of this, since I don't know enough about it :/

@jornbh jornbh merged commit 7007fe2 into master Jul 6, 2022
@jornbh
Copy link
Contributor

jornbh commented Jul 6, 2022

This solved the issue related to the DLL, but there still seem to be issues with the ant command in the executable.

@jornbh jornbh deleted the fix/pyinstaller-antlib branch July 6, 2022 07:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants