Design SSDTest Platform by using Pyside6

走到main.py所在的文件夹下
运行pyinstaller ./main.py --noconsole --workpath ./pybuild_linux --distpath ./pybuild_linux/dist --icon=“logo.ico”

Logo一定要是ico格式,如果是png等其他格式,可以到下面两个网站去转格式:
https://www.zamzar.com/convert/png-to-ico/
https://www.easyicon.net/covert/

  1. 将ui folder 复制到 pybuild\dist\main folder下面。(因为pyinstaller 会根据 main.py里的import 库自动加载这些库,但是 程序中用的哪些ui 界面,它不知道,不会去go through代码的,所以要手动复制过来。)
  2. 打包dist下面的main folder 发给用户就可以。

Pyside6 install location: /usr/local/lib/python3.10/dist-packages (6.7.2)

  1. Need to add “/usr/local/lib/python3.10/dist-packages” into the /etc/environment file to make the Pyinstaller can find Pyside6.

We can directly double click “main” in the /dist/main folder to run the exe.

pip install Pyside2 -i https://pypi.tuna.tsinghua.edu.cn/simple

// -----------------------------------------------------------------------
root@david-NUC7i5DNHE:/home/david/Desktop/Try_1/pybuild_linux/dist/main# ./main
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb, wayland, linuxfb, minimalegl, vkkhrdisplay, eglfs, vnc, wayland-egl, minimal, offscreen.

Aborted (core dumped)
— Solution: sudo apt-get install libxcb-cursor0

-------------------------------End --------------------------------------------
[5846] Failed to load Python shared library ‘/home/david/Desktop/Try_1/pybuild_linux/dist/main/_internal/libpython3.10.so’: dlopen: /home/david/Desktop/Try_1/pybuild_linux/dist/main/_internal/libpython3.10.so: cannot open shared object file: No such file or directory
— Solution: delete all folders under ./pybuild_linux, then build again.

-------------------------------8/3/2024:---------------------------------------------
Telnet can connect successfully, but can’t read out the ‘lsscsi’ feedback.
— Reason: tn.read_all() doesn’t work, need to use tn. read_very_eager() function.

-------------------------------8/4/2024:---------------------------------------------

  1. Mount from Ubuntu and Windows.
  2. Multiple threads to display logs.
  3. Use QTDesigner to create flexible command send/feedback UI for HW/FW developers’ use.
    3.1. Slave PC’s IP is drop-down selectable.
    3.2. ‘Connect’ button can show ‘Connect’ or ‘Connected’ for user-friendly.
    3.2.1. Set 60s time-out after clicking ‘connect’ button, Log area displays count-down.
    3.3. Common cmds, like lspci, lsscsi, etc., are drop-down selectable.
    3.4 ‘Send’ button, set 10s time-out after clicking.

(Doesn’t work:)sudo mount -t cifs //192.168.1.12/home/GTC /mnt/192.168.1.12/GTC -o username=“test”,password=“test”,file_mode=777,dir_mode=777
(Doesn’t work:)sudo mount -o nfsvers=3 192.168.1.12:home/GTC /mnt/192.168.1.12/GTC -o username=“test”,password=“test”,file_mode=777,dir_mode=777

How to find the ‘mnt’ folder in the explorer?
— Solution: click ‘+Other Locations’ -> Computer -> mnt.
--------------------------------8/5/2024-------------------------------------------------
(Doesn’t work)sudo mount -o nfsvers=3 192.168.1.12:home/GTC /mnt/192.168.1.12/GTC

->bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program.
— Solution: apt-get install nfs-common
apt-get install cifs-utils
->mount.nfs: access denied by server while mounting
— Solution: remove ‘nfsvers=3’, use ‘nfsstat --version’ to check both of Host PC and FTU, FTU is 1.3.3, while Host PC is 2.6.1, they don’t match, so remove the nfs version requirement in the command.
mount -o 192.168.1.12:home/GTC /mnt/192.168.1.12/GTC
--------------------------------8/7/2024-------------------------------------------------
How to mount the Ubuntu share folder in the Windows system?
— Solution: https://www.yisu.com/ask/64656457.html
— 1. make the FTU(192.168.1.12) to be able to access the external network via NUC (Ubuntu, 192.168.1.33)
— 1.1. read this web doc (it works): https://blog.csdn.net/qq1187239259/article/details/80022272?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ECtr-1-80022272-blog-121452036.235%5Ev43%5Epc_blog_bottom_relevance_base9&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ECtr-1-80022272-blog-121452036.235%5Ev43%5Epc_blog_bottom_relevance_base9&utm_relevant_index=1
— 2. install samba in the FTU.
— 2.1 remove the installed before but not complete samba components:
sudo systemctl stop smbd nmbd
sudo apt-get remove --purge samba samba-common
— 2.2 Type in this cmd “sudo apt install samba” (sudo is MUST) in the FTU.

-----End -----

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值