Index: .github/workflows/nintendo-ds.yml ================================================================== --- .github/workflows/nintendo-ds.yml +++ .github/workflows/nintendo-ds.yml @@ -11,25 +11,33 @@ run: ./autogen.sh - name: configure run: | docker run \ -e DEVKITPRO=/opt/devkitpro \ - -e PATH="/opt/devkitpro/devkitARM/bin:$PATH" \ + -e PATH="/opt/devkitpro/devkitARM/bin:/opt/devkitpro/tools/bin:$PATH" \ -v "$PWD:/objfw" \ - devkitpro/devkitarm:20241104 \ + devkitpro/devkitarm \ sh -c 'cd /objfw && ./configure --host=arm-none-eabi --with-nds' - name: make run: | docker run \ -e DEVKITPRO=/opt/devkitpro \ - -e PATH="/opt/devkitpro/devkitARM/bin:$PATH" \ + -e PATH="/opt/devkitpro/devkitARM/bin:/opt/devkitpro/tools/bin:$PATH" \ -v "$PWD:/objfw" \ - devkitpro/devkitarm:20241104 \ + devkitpro/devkitarm \ sh -c "cd /objfw && make -j$(nproc)" + - name: make tests.nds + run: | + docker run \ + -e DEVKITPRO=/opt/devkitpro \ + -e PATH="/opt/devkitpro/devkitARM/bin:/opt/devkitpro/tools/bin:$PATH" \ + -v "$PWD:/objfw" \ + devkitpro/devkitarm \ + sh -c "cd /objfw/tests && make tests.nds" - name: make install run: | docker run \ -e DEVKITPRO=/opt/devkitpro \ - -e PATH="/opt/devkitpro/devkitARM/bin:$PATH" \ + -e PATH="/opt/devkitpro/devkitARM/bin:/opt/devkitpro/tools/bin:$PATH" \ -v "$PWD:/objfw" \ - devkitpro/devkitarm:20241104 \ + devkitpro/devkitarm \ sh -c "cd /objfw && make install" Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -235,18 +235,23 @@ ]) flags="-march=armv5te -mtune=arm946e-s -mthumb -mthumb-interwork" OBJCFLAGS="$OBJCFLAGS $flags" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS $flags" - CPPFLAGS="$CPPFLAGS -DARM9 -I$DEVKITPRO/libnds/include" - OBJFW_CPPFLAGS="$OBJFW_CPPFLAGS -DARM9 -I\$DEVKITPRO/libnds/include" + CPPFLAGS="$CPPFLAGS -DARM9 -D__NDS__ -I$DEVKITPRO/libnds/include" + CPPFLAGS="$CPPFLAGS -I$DEVKITPRO/calico/include" + OBJFW_CPPFLAGS="$OBJFW_CPPFLAGS -DARM9 -D__NDS__" + OBJFW_CPPFLAGS="$OBJFW_CPPFLAGS -I\$DEVKITPRO/libnds/include" + OBJFW_CPPFLAGS="$OBJFW_CPPFLAGS -I\$DEVKITPRO/calico/include" ASFLAGS="$ASFLAGS -march=armv5te" - LDFLAGS="$LDFLAGS -specs=ds_arm9.specs" - OBJFW_LDFLAGS="$OBJFW_LDFLAGS -specs=ds_arm9.specs" - tmp="-L$DEVKITPRO/libnds/lib -lfilesystem -lfat -lnds9" - LIBS="$LIBS $tmp" - OBJFW_LIBS="$OBJFW_LIBS $tmp" + LDFLAGS="$LDFLAGS -specs=$DEVKITPRO/calico/share/ds9.specs" + OBJFW_LDFLAGS="$OBJFW_LDFLAGS -specs=\$DEVKITPRO/calico/share/ds9.specs" + LIBS="$LIBS -L$DEVKITPRO/libnds/lib -L$DEVKITPRO/calico/lib" + LIBS="$LIBS -lfilesystem -lfat -lnds9 -lcalico_ds9" + OBJFW_LIBS="$OBJFW_LIBS -L\$DEVKITPRO/libnds/lib" + OBJFW_LIBS="$OBJFW_LIBS -L\$DEVKITPRO/calico/lib" + OBJFW_LIBS="$OBJFW_LIBS -lfilesystem -lfat -lnds9 -lcalico_ds9" enable_shared="no" enable_threads="no" # TODO enable_sockets="no" # TODO check_pedantic="no" Index: src/OFApplication.m ================================================================== --- src/OFApplication.m +++ src/OFApplication.m @@ -499,11 +499,12 @@ encoding = [OFLocale encoding]; #ifndef OF_NINTENDO_DS if (*argc > 0) { #else - if (__system_argv->argvMagic == ARGV_MAGIC && __system_argv->argc > 0) { + if (g_envNdsArgvHeader->magic == ENV_NDS_ARGV_MAGIC && + g_envNdsArgvHeader->argc > 0) { #endif _programName = [[OFString alloc] initWithCString: (*argv)[0] encoding: encoding]; arguments = [[OFMutableArray alloc] init]; _arguments = arguments; Index: tests/Makefile ================================================================== --- tests/Makefile +++ tests/Makefile @@ -246,11 +246,11 @@ ${PROG_NOINST}.nds: ${PROG_NOINST}.arm9 testfile.txt rm -fr nds-data mkdir -p nds-data cp testfile.txt nds-data - ndstool -c $@ -9 ${PROG_NOINST} -d nds-data + ndstool -c $@ -7 ${DEVKITPRO}/calico/bin/ds7_maine.elf -9 ${PROG_NOINST} -d nds-data rm -fr nds-data ${PROG_NOINST}.nro: ${PROG_NOINST} testfile.txt rm -fr romfs mkdir -p romfs