mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 00:05:59 +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,15 @@
|
||||
#include "selfdrive/ui/qt/onroad/buttons.h"
|
||||
|
||||
class ScreenRecorder : public QPushButton {
|
||||
#ifdef NO_SR
|
||||
public:
|
||||
explicit ScreenRecorder(QWidget *parent = nullptr){}
|
||||
~ScreenRecorder() override{}
|
||||
|
||||
void startRecording(){}
|
||||
void stopRecording(){}
|
||||
|
||||
#else
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@@ -45,4 +54,5 @@ private:
|
||||
QImage synthesizeFrame(const QImage &frame1, const QImage &frame2, double alpha);
|
||||
|
||||
QWidget *rootWidget;
|
||||
#endif //NO_SR
|
||||
};
|
||||
|
||||
@@ -61,6 +61,14 @@ frogpilot_src = ["../../frogpilot/ui/frogpilot_ui.cc", "../../frogpilot/ui/qt/of
|
||||
|
||||
qt_src += frogpilot_src
|
||||
|
||||
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