diff --git a/SConstruct b/SConstruct index 944d650d7..8c442e70f 100644 --- a/SConstruct +++ b/SConstruct @@ -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 diff --git a/selfdrive/frogpilot/screenrecorder/screenrecorder.h b/selfdrive/frogpilot/screenrecorder/screenrecorder.h index 1a12329fb..a09b32d90 100644 --- a/selfdrive/frogpilot/screenrecorder/screenrecorder.h +++ b/selfdrive/frogpilot/screenrecorder/screenrecorder.h @@ -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 }; diff --git a/selfdrive/ui/SConscript b/selfdrive/ui/SConscript index 556c12311..06c3c9af6 100644 --- a/selfdrive/ui/SConscript +++ b/selfdrive/ui/SConscript @@ -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()) diff --git a/tools/README.md b/tools/README.md index 361a27ded..6e8a6c433 100644 --- a/tools/README.md +++ b/tools/README.md @@ -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 diff --git a/tools/install_python_dependencies.sh b/tools/install_python_dependencies.sh old mode 100644 new mode 100755 diff --git a/tools/install_ubuntu_dependencies.sh b/tools/install_ubuntu_dependencies.sh old mode 100644 new mode 100755 diff --git a/tools/mac_setup.sh b/tools/mac_setup.sh old mode 100644 new mode 100755 diff --git a/tools/plotjuggler/juggle.py b/tools/plotjuggler/juggle.py old mode 100644 new mode 100755 diff --git a/tools/ubuntu_setup.sh b/tools/ubuntu_setup.sh old mode 100644 new mode 100755 index 1bdeb50e0..6114e3387 --- a/tools/ubuntu_setup.sh +++ b/tools/ubuntu_setup.sh @@ -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:"