pyinstaller is a separate exe #34
-
lswifi works well, I now walswifi works well, I now want to package it as an exe for use in non-environment Settings, but I don't know how to package it.nt to package it as an exe for use in non-environment Settings, but I don't know how to package it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @robertshuai. Once I made the change in #35 from relative to absolute imports, these steps worked for me on a Windows host. pip install -U pyinstaller
git clone https://github.com/joshschmelzle/lswifi.git
cd lswifi
python -m PyInstaller --name "lswifi" ".\lswifi\__main__.py" These steps resulted in the creation of Inside Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 11/17/2022 8:21 AM 63864 _asyncio.pyd
-a--- 11/17/2022 8:08 AM 83328 _bz2.pyd
-a--- 11/17/2022 8:21 AM 123768 _ctypes.pyd
-a--- 11/17/2022 8:08 AM 251768 _decimal.pyd
-a--- 11/17/2022 8:08 AM 63872 _hashlib.pyd
-a--- 11/17/2022 8:08 AM 158080 _lzma.pyd
-a--- 11/17/2022 8:21 AM 33144 _multiprocessing.pyd
-a--- 11/17/2022 8:21 AM 49536 _overlapped.pyd
-a--- 11/17/2022 8:21 AM 31104 _queue.pyd
-a--- 11/17/2022 8:08 AM 78200 _socket.pyd
-a--- 11/17/2022 8:08 AM 159616 _ssl.pyd
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-console-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20952 api-ms-win-core-datetime-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-debug-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-errorhandling-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-fibers-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 25048 api-ms-win-core-file-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20960 api-ms-win-core-file-l1-2-0.dll
-a--- 11/17/2022 8:08 AM 20960 api-ms-win-core-file-l2-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-handle-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20960 api-ms-win-core-heap-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-interlocked-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-libraryloader-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20960 api-ms-win-core-localization-l1-2-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-memory-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20960 api-ms-win-core-namedpipe-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-processenvironment-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-processthreads-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-processthreads-l1-1-1.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-profile-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20960 api-ms-win-core-rtlsupport-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20960 api-ms-win-core-string-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-synch-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-synch-l1-2-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-sysinfo-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-timezone-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-core-util-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-crt-conio-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 25056 api-ms-win-crt-convert-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-crt-environment-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-crt-filesystem-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-crt-heap-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-crt-locale-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 29144 api-ms-win-crt-math-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-crt-process-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 25040 api-ms-win-crt-runtime-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 25040 api-ms-win-crt-stdio-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 25040 api-ms-win-crt-string-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-crt-time-l1-1-0.dll
-a--- 11/17/2022 8:08 AM 20944 api-ms-win-crt-utility-l1-1-0.dll
-a--- 11/17/2022 8:43 AM 1753678 base_library.zip
-a--- 11/17/2022 8:08 AM 3441504 libcrypto-1_1.dll
-a--- 11/17/2022 8:21 AM 35064 libffi-8.dll
-a--- 11/17/2022 8:08 AM 702816 libssl-1_1.dll
-a--- 11/17/2022 8:44 AM 2572803 lswifi.exe
-a--- 11/17/2022 8:21 AM 198008 pyexpat.pyd
-a--- 11/17/2022 8:08 AM 5758328 python311.dll
-a--- 11/17/2022 8:08 AM 29056 select.pyd
-a--- 11/17/2022 8:08 AM 1122768 ucrtbase.dll
-a--- 11/17/2022 8:08 AM 1138040 unicodedata.pyd
-a--- 11/17/2022 8:08 AM 98736 VCRUNTIME140.dll Running pyinstaller with python -m PyInstaller --onefile --name "lswifi" ".\lswifi\__main__.py" Produces one file in the Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 11/17/2022 9:34 AM 8864250 lswifi.exe |
Beta Was this translation helpful? Give feedback.
Hi @robertshuai. Once I made the change in #35 from relative to absolute imports, these steps worked for me on a Windows host.
These steps resulted in the creation of
build
anddist
folders.Inside
.\lswifi\dist\lswifi
I foundlswifi.exe
and some.dll
files: