mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-09-27 01:44:01 +08:00
Build on PC
This commit is contained in:
@@ -69,6 +69,13 @@ AddOption('--minimal',
|
||||
dest='extras',
|
||||
default=os.path.exists(File('#.lfsconfig').abspath), # minimal by default on release branch (where there's no LFS)
|
||||
help='the minimum build to run openpilot. no tests, tools, etc.')
|
||||
AddOption('--extras',
|
||||
action='store_true',
|
||||
help="build extras")
|
||||
|
||||
AddOption('--nosr',
|
||||
action='store_true',
|
||||
help="don't build the screen recorder")
|
||||
|
||||
## Architecture name breakdown (arch)
|
||||
## - larch64: linux tici aarch64
|
||||
|
||||
@@ -6,6 +6,14 @@
|
||||
#include "selfdrive/ui/qt/onroad/buttons.h"
|
||||
|
||||
class ScreenRecorder : public QPushButton {
|
||||
#ifdef NO_SR
|
||||
public:
|
||||
explicit ScreenRecorder(QWidget *parent = nullptr){}
|
||||
~ScreenRecorder() override{}
|
||||
|
||||
void updateScreen(){}
|
||||
void toggle(){}
|
||||
#else
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@@ -42,4 +50,5 @@ private:
|
||||
|
||||
QPixmap recorderIcon;
|
||||
QPixmap recordingIcon;
|
||||
#endif //NO_SR
|
||||
};
|
||||
|
||||
@@ -47,6 +47,14 @@ qt_src = ["main.cc", "qt/sidebar.cc", "qt/body.cc",
|
||||
"qt/onroad/buttons.cc", "qt/onroad/alerts.cc",
|
||||
"../frogpilot/screenrecorder/omx_encoder.cc", "../frogpilot/screenrecorder/screenrecorder.cc"]
|
||||
|
||||
if GetOption("nosr"):
|
||||
qt_env.Append(CXXFLAGS=['-DNO_SR'])
|
||||
base_libs.remove('OmxCore')
|
||||
qt_libs.remove('OmxCore')
|
||||
qt_src.remove("../frogpilot/screenrecorder/screenrecorder.cc")
|
||||
qt_src.remove("../frogpilot/screenrecorder/omx_encoder.cc")
|
||||
print("Removing Screen Recorder")
|
||||
|
||||
# build translation files
|
||||
with open(File("translations/languages.json").abspath) as f:
|
||||
languages = json.loads(f.read())
|
||||
|
||||
+3
-9
@@ -14,19 +14,13 @@ NOTE: This repository uses Git LFS for large files. Ensure you have [Git LFS](ht
|
||||
|
||||
Either do a partial clone for faster download:
|
||||
``` bash
|
||||
git clone --filter=blob:none --recurse-submodules --also-filter-submodules https://github.com/commaai/openpilot.git
|
||||
```
|
||||
|
||||
or do a full clone:
|
||||
``` bash
|
||||
git clone --recurse-submodules https://github.com/commaai/openpilot.git
|
||||
git clone https://github.com/FrogAi/FrogPilot.git --branch MAKE-PRS-HERE
|
||||
```
|
||||
|
||||
**2. Run the setup script**
|
||||
|
||||
``` bash
|
||||
cd openpilot
|
||||
git lfs pull
|
||||
cd FrogPilot
|
||||
tools/ubuntu_setup.sh
|
||||
```
|
||||
|
||||
@@ -38,7 +32,7 @@ poetry shell
|
||||
**3. Build openpilot**
|
||||
|
||||
``` bash
|
||||
scons -u -j$(nproc)
|
||||
scons -u -j$(nproc) --nosr --extras
|
||||
```
|
||||
|
||||
## Dev Container on any Linux or macOS
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+4
@@ -9,6 +9,10 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
$DIR/install_ubuntu_dependencies.sh
|
||||
$DIR/install_python_dependencies.sh
|
||||
|
||||
sudo mkdir -p /.comma/params/d
|
||||
sudo mkdir -p /persist/params/d
|
||||
sudo mkdir -p /persist/tracking/d
|
||||
|
||||
echo
|
||||
echo "---- OPENPILOT SETUP DONE ----"
|
||||
echo "Open a new shell or configure your active shell env by running:"
|
||||
|
||||
Reference in New Issue
Block a user