当前位置:网站首页>[wxGlade learning] wxGlade environment configuration

[wxGlade learning] wxGlade environment configuration

2022-08-11 08:43:00 Frank learning on the way

Learn wxGlade because Autoware.ai's interface is made with it.

wxGlade is a cross-platform GUI development tool based on wxPython. The following is the environment configuration under Ubuntu system.

1. Install Gnome/GTK

wxGlade needs a GTK pre-environment, otherwise the next step of pip install wxpython will make an error.The installation command is as follows:

sudo apt-get install gnome-devel

Here I installed Gnome, which should include gtk, and some gadgets will be installed automatically. If you want a simple installation, you can try other methods of installing gtk separately.
eg: sudo apt-get install libgtk2.0-dev (untested)

2.pip install wxpython

This step is relatively simple, but time-consuming.The installation command is as follows: (this step is wrong)

pip install wxpython

2022.8.8 record
If the wxpython installation version is wrong, it will cause autoware to fail to open. The error is as follows:
Please add a picture description
pip install wxpython The installed version is wxpython 4.1.1, not 4.0.7, so you can check your own version and re-download it on the official websiteDownload the corresponding version of the wxpython package:
wxpython 4.0.7 download

Download wxPython-4.0.7-cp27-cp27mu-linux_x86_64.whl, then open a terminal in the download directory:

python2.7 -m pip install wxPython-4.0.7-cp27-cp27mu-linux_x86_64.whl

Then modify the runtime_manager_dialog.py script file:
Find the runtime_manager_dialog.py file in autoware.ai/src/autoware/utilities/runtime_manager/scripts

  • Add import wx.adv to the file
  • Replace all wx.HyperlinkCtrl in the file with wx.adv.HyperlinkCtrl
  • Replace all wx.EVT_HYPERLINK in the file with wx.adv.EVT_HYPERLINK

You can recompile after making changes.

3. Download wxglade source code

github:https://github.com/wxGlade/wxGlade
gitee:https://gitee.com/mirrors/wxGlade/

4. Open the wxGlade GUI development environment

After the above source code download number, enter the wxglade directory, find the following two scripts, and open them with python xxx (both can be used).

python wxglade

Please add image description

After opening, the software interface is as follows:

Please add image description

5. Help Documentation

In this directory wxGlade/docs/html/index.html, there is a tutorial, just open it with a browser.

Above.

原网站

版权声明
本文为[Frank learning on the way]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/223/202208110838468980.html