Skip to content

Commit

Permalink
Add version specific patches
Browse files Browse the repository at this point in the history
  • Loading branch information
cjavad committed Oct 24, 2023
1 parent fc8d73a commit a4d9598
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 15 deletions.
13 changes: 0 additions & 13 deletions patches/disable_new_firmware_popup.patch

This file was deleted.

4 changes: 2 additions & 2 deletions patches/generic_ports.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ index b7314ef9..2a084e16 100644
--- a/src/connect/planner.cpp
+++ b/src/connect/planner.cpp
@@ -142,10 +142,12 @@ namespace {

tuple<const char *, uint16_t> host_and_port(const Printer::Config &config, optional<uint16_t> port_override) {
uint16_t port = config.port;
- if (port == 443 && config.tls) {
+
+
+ if (config.tls) {
// Go from encrypted to the unencrypted port automatically.
- port = 80;
Expand Down
17 changes: 17 additions & 0 deletions patches/v5.0.0/ignore_invalid_firmware.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/src/common/gcode/gcode_info.cpp b/src/common/gcode/gcode_info.cpp
index 456626b80..bea06739c 100644
--- a/src/common/gcode/gcode_info.cpp
+++ b/src/common/gcode/gcode_info.cpp
@@ -412,10 +412,10 @@ void GCodeInfo::parse_gcode(GCodeInfo::Buffer::String cmd, uint32_t &gcode_count
*cmd.end = '\0';
}

- if (!is_up_to_date(cmd.c_str())) {
+ /*if (!is_up_to_date(cmd.c_str())) {
valid_printer_settings.outdated_firmware.fail();
strncpy(valid_printer_settings.latest_fw_version, cmd.c_str(), min(sizeof(valid_printer_settings.latest_fw_version), cmd.len()));
- }
+ }*/
}
}
}
Empty file added patches/v5.1.0-alpha1/.gitkeep
Empty file.
17 changes: 17 additions & 0 deletions patches/v5.1.0-alpha1/ignore_invalid_firmware.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/src/common/gcode/gcode_info.cpp b/src/common/gcode/gcode_info.cpp
index f82921ded..40e8d17d8 100644
--- a/src/common/gcode/gcode_info.cpp
+++ b/src/common/gcode/gcode_info.cpp
@@ -406,10 +406,10 @@ void GCodeInfo::parse_gcode(GcodeBuffer::String cmd, uint32_t &gcode_counter) {
*cmd.end = '\0';
}

- if (!is_up_to_date(cmd.c_str())) {
+ /*if (!is_up_to_date(cmd.c_str())) {
valid_printer_settings.outdated_firmware.fail();
strncpy(valid_printer_settings.latest_fw_version, cmd.c_str(), min(sizeof(valid_printer_settings.latest_fw_version), cmd.len()));
- }
+ }*/
}
}

6 changes: 6 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ for patch in "${ROOTDIR}/patches/"*.patch; do
git apply -p1 < "${patch}"
done

# Apply version specific patches
for patch in "${ROOTDIR}/patches/$version/"*.patch; do
echo "Applying patch: ${patch}"
git apply -p1 < "${patch}"
done

# Create new pipenv environment with pip 22.0
pipenv --python 3.11 install pip==22.0
export BUDDY_NO_VIRTUALENV=1
Expand Down

0 comments on commit a4d9598

Please sign in to comment.