Building the Digilent Agent From Source
This page describes the process of building the Digilent Agent from source.
注意:这个过程是推荐先进的使用rs only and most users should install one of the existing buildsavailable here.
Windows
-
InstallQT Creator 5.7or newer.
-
InstallQT Installer Framework 2.03or newer.
-
Ensure the QT and QT installer framework binaries are on the system path:
-
C:\Qt\5.11.1\mingw53_32\bin
-
C:\Qt\QtIFW-3.0.4\bin
-
-
Clone theDigilent Agentrepository.
-
Initialize and update git submodules
-
git submodule init
-
git submodule update
-
-
Launch the QT project 'digilent-agent.pro'.
-
PressCtrl+Rto build orF5to build in debug mode.
Installer
-
Hard link the debug and release build outputs into the projectroot directory. Ex:
-
New-Item -ItemType Junction -Name debug -Value ..\build-digilent-agent-Desktop_Qt_5_11_1_MinGW_32bit-Debug\debug\
-
New-Item -ItemType Junction -Name release -Value ..\build-digilent-agent-Desktop_Qt_5_11_1_MinGW_32bit-Release\release\
-
-
Set the version number inagent.cpp.
-
Use QT to build a release build in thereleasefolder at the project root.
-
Set the version number ininstaller/config/winConfig.xml.
-
TODO - REMOVE - Set the version number ininstaller/packages/com.digilent.agent/meta/winConfig.xml.
-
Use CygWin to enter theinstallerdirectory at the project root.
-
Run the build script with the following command
-
./build.sh win<VERSION_NUMBER><RELEASE_TYPE>
ex../build win 1.0.0 release
-
安装程序将被创建theinstallerdirectory at the project root.
Linux
-
(Optional - providesGUIIDE and debugging) InstallQT Creator 5.7or newer.
-
Update the package feeds.
sudo apt-get update
-
Install QT5
sudo apt-get install qt5-default
-
Install QT5 serial port support
sudo apt-get install libqt5serialport5-dev
-
Clone the Digilent Agent repository
git clone https://github.com/Digilent/digilent-agent.git
-
Enter the repo directory
cd digilent-agent
-
Initialize and update the submodules (Digilent qtSerial and pgm)
git submodule init git submodule update
-
Run qmake
qmake
-
Build the Digilent Agent
make
-
Run the Digilent Agent (Read/Write permission for UART devices is required)
./digilent-agent
.deb
-
Build release using qmake and make as described above.
-
This step is to confirm everything is setup correctly and can technically be omitted as the deb build script will rebuild everything form source.
-
-
Open a terminal in theinstallerdirectory at the project root.
-
Run the build script with the following command
-
./build deb<VERSION_NUMBER>
ex../build deb 1.0.0
-
Follow the instructions in the terminal.
-
The .deb will be created in theinstallerdirectory at the project root.
Mac
InstallQT Creator 5.7or newer.
-
Clone theDigilent Agentrepository.
-
Initialize and update git submodules
-
git submodule init
-
git submodule update
-
Build from command line
-
Run:
qmake
-
make
-
-
或build from QT Creator:
-
PressCtrl+Rto build orF5to build in debug mode.
-
-
Build Signed .dgm
-
Enter theinstallersub directory.
cd installer
-
Run the build script to package dependencies, sign the .app and build the .dmg
./build.sh osx
release -
Where
is the release version (ex. 1.0.1).
-
-
或
Generate an Xcode Project:
qmake -spec macx-xcode digilent-agent.pro
-
Add images/icon.iconset to digilent-agent/Resources in Xcode
Note: If thedigilent-agent.entitlementsis red in Xcode you may have to delete the file and use Xcode to manually create anPoperty Listfile named digilent-agent.entitlements in the project root.
Build a new .dmg
-
Build a release version of the Digilent Agent using QT.
-
Usemacdeployqtto build a distributable .app.
macdeployqt Digilent\ Agent.app/ -codesign=
-always-overwrite -
UseDisk Utilityto create a new disk image.
-
Name the image digilent-agent-
.dmg where is of the form #.#.# (ex. 1.0.3) -
Set the image size to be just large enough to hold the Agent and WaveForms Live offline support (~20MB). The size cannot be changed later.
-
Set the Image Format to read/write disk image.
-
-
Mount and open the disk image.
-
ClickView»as Iconsto ensure the disk image contents is viewed as icons.
-
Copy and paste the.appfile from the QT release build folder into the mounted disk image.
-
Create a shortcut to theAppsdirectory in the mounted disk image.
-
Copy and paste theWaveForms-Liveoffline support into the mounted disk image.
-
Create a shortcut to thesharedirectory in the mounted disk image.
-
(Optional) add a background image.
-
Copy and paste an image file into the mounted disk image.
-
With the mounted disk image active selectView»Show View Options.
-
Under theBackground:section clickPicture
-
Drag the image from the mounted disk image to the picture box.
-
Use the terminal to hide the image file (change the name to start with a '.').
cd /Volumes/
mv
.
-
-
Unmount the disk image.
-
Use Disk Utility to convert the disk image into a read-only copy.
-
Images»Convert
-
Select the disk image and clickOpen.
-
Set theImage Formattoread-only.
-
ClickSave.
-
-
Distribute the read-only copy of the disk image.
-
Keep the read-write copy of the disk image to simplify future updates.