🔨 Port libsdl2_net required for macOS simulator

This commit is contained in:
Scott Lahteine
2021-10-05 21:35:31 -05:00
parent 149cbe795d
commit 9922410a73
2 changed files with 12 additions and 4 deletions

View File

@@ -1100,6 +1100,9 @@ void GcodeSuite::process_next_command() {
* G-code "macros" to be called from within other G-code handlers. * G-code "macros" to be called from within other G-code handlers.
*/ */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-truncation"
void GcodeSuite::process_subcommands_now(FSTR_P fgcode) { void GcodeSuite::process_subcommands_now(FSTR_P fgcode) {
PGM_P pgcode = FTOP(fgcode); PGM_P pgcode = FTOP(fgcode);
char * const saved_cmd = parser.command_ptr; // Save the parser state char * const saved_cmd = parser.command_ptr; // Save the parser state
@@ -1117,6 +1120,8 @@ void GcodeSuite::process_subcommands_now(FSTR_P fgcode) {
parser.parse(saved_cmd); // Restore the parser state parser.parse(saved_cmd); // Restore the parser state
} }
#pragma GCC diagnostic pop
void GcodeSuite::process_subcommands_now(char * gcode) { void GcodeSuite::process_subcommands_now(char * gcode) {
char * const saved_cmd = parser.command_ptr; // Save the parser state char * const saved_cmd = parser.command_ptr; // Save the parser state
for (;;) { for (;;) {

View File

@@ -70,13 +70,16 @@ build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags}
# #
# Simulator for macOS (MacPorts) # Simulator for macOS (MacPorts)
# #
# sudo port install gcc10 gdb glm libsdl2 freetype # sudo port install gcc10 gdb glm libsdl2 libsdl2_net freetype
# sudo port install ld64 @3_3 +ld64_xcode # sudo port install ld64 @3_3 +ld64_xcode
# sudo port uninstall ld64 ld64-latest #
# cd /opt/local/bin # cd /opt/local/bin
# sudo rm -f gcc g++ cc # sudo rm -f gcc g++ cc
# sudo ln gcc-mp-10 gcc ; sudo ln g++-mp-10 g++ ; sudo ln g++ cc # sudo ln -s gcc-mp-10 gcc ; sudo ln -s g++-mp-10 g++ ; sudo ln -s g++ cc
# cd - # This step may be obsolete:
# sudo port uninstall ld64 ld64-latest
#
# cd -
# #
# Use 'sudo port install mesa' to get a <GL/gl.h> if no Xcode is installed. # Use 'sudo port install mesa' to get a <GL/gl.h> if no Xcode is installed.
# If Xcode is installed be sure to run `xcode-select --install` first. # If Xcode is installed be sure to run `xcode-select --install` first.