Skip to content

Commit

Permalink
Make build system match core format
Browse files Browse the repository at this point in the history
  • Loading branch information
meepingsnesroms committed May 19, 2018
1 parent 31c5cc9 commit 6c1e865
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 22 deletions.
8 changes: 2 additions & 6 deletions Makefile.ctr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DEBUG = 0
GRIFFIN_BUILD = 1
WHOLE_ARCHIVE_LINK = 0
BUILD_3DSX = 1
BUILD_3DS = 1
BUILD_3DS = 0
BUILD_CIA = 1
LIBCTRU_NO_DEPRECATION = 1

Expand Down Expand Up @@ -168,7 +168,7 @@ endif

all: $(TARGET)

$(TARGET): $(TARGET_3DSX) $(TARGET_3DS) $(TARGET_CIA) $(TARGET).core
$(TARGET): $(TARGET_3DSX) $(TARGET_3DS) $(TARGET_CIA)
$(TARGET).3dsx: $(TARGET).elf
$(TARGET).elf: $(OBJ) libretro_ctr.a

Expand Down Expand Up @@ -261,17 +261,13 @@ $(TARGET).3ds: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF)
$(TARGET).cia: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF)
$(MAKEROM) -f cia -o $@ $(MAKEROM_ARGS_COMMON) -DAPP_ENCRYPTED=false

$(TARGET).core: $(TARGET).elf
echo $(APP_UNIQUE_ID) > $(TARGET).core


clean:
rm -f $(OBJ)
rm -f $(TARGET).3dsx
rm -f $(TARGET).elf
rm -f $(TARGET).3ds
rm -f $(TARGET).cia
rm -f $(TARGET).core
rm -f $(TARGET).smdh
rm -f $(TARGET).bnr
rm -f $(TARGET).icn
Expand Down
2 changes: 1 addition & 1 deletion Makefile.ctr.salamander
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ TARGET := retroarch_3ds_salamander
LIBRETRO =

DEBUG = 0
BUILD_3DSX = 0
BUILD_3DSX = 1
BUILD_3DS = 0
BUILD_CIA = 1

Expand Down
25 changes: 12 additions & 13 deletions dist-scripts/dist-cores.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ elif [ $PLATFORM = "ctr" ] ; then
platform=ctr
SALAMANDER=yes
EXT=a
mkdir -p ../pkg/3ds/cia
mkdir -p ../pkg/3ds/rom
mkdir -p ../pkg/3ds/3ds
mkdir -p ../pkg/3ds/retroarch/cores
mkdir -p ../pkg/${platform}/build/cia
mkdir -p ../pkg/${platform}/build/3dsx
mkdir -p ../pkg/${platform}/build/rom

# Emscripten
elif [ $PLATFORM = "emscripten" ] ; then
Expand Down Expand Up @@ -140,8 +139,12 @@ if [ $SALAMANDER = "yes" ]; then
make -C ../ -f Makefile.${platform}.salamander clean || exit 1
fi
if [ $PLATFORM = "ctr" ] ; then
mv -f ../retroarch_3ds_salamander.cia ../pkg/3ds/cia/retroarch_3ds.cia
make -C ../ -f Makefile.${platform} clean || exit 1
mv -f ../retroarch_3ds_salamander.cia ../pkg/${platform}/build/cia/retroarch_3ds.cia
mkdir -p ../pkg/${platform}/build/3dsx/RetroArch
mv -f ../retroarch_3ds_salamander.3dsx ../pkg/${platform}/build/3dsx/RetroArch/RetroArch.3dsx
mv -f ../retroarch_3ds_salamander.smdh ../pkg/${platform}/build/3dsx/RetroArch/RetroArch.smdh
# the .3ds port cant use salamander since you can only have one ROM on a cartridge at once
make -C ../ -f Makefile.${platform}.salamander clean || exit 1
fi
if [ $PLATFORM = "wii" ] ; then
mv -f ../retroarch-salamander_wii.dol ../pkg/${platform}/boot.dol
Expand Down Expand Up @@ -243,13 +246,9 @@ for f in `ls -v *_${platform}.${EXT}`; do
cp -fv ../../dist/info/"${name}_libretro.info" ../pkg/${platform}/retroarch.vpk/vpk/info/"${name}_libretro.info"
fi
elif [ $PLATFORM = "ctr" ] ; then
mv -f ../retroarch_3ds.cia ../pkg/3ds/cia/${name}_libretro.cia
mv -f ../retroarch_3ds.3ds ../pkg/3ds/rom/${name}_libretro.3ds
mv -f ../retroarch_3ds.core ../pkg/3ds/retroarch/cores/${name}_libretro.core
mkdir -p ../pkg/3ds/3ds/${name}_libretro
mv -f ../retroarch_3ds.3dsx ../pkg/3ds/3ds/${name}_libretro/${name}_libretro.3dsx
mv -f ../retroarch_3ds.smdh ../pkg/3ds/3ds/${name}_libretro/${name}_libretro.smdh
mv -f ../retroarch_3ds.xml ../pkg/3ds/3ds/${name}_libretro/${name}_libretro.xml 2> /dev/null
mv -f ../retroarch_3ds.cia ../pkg/${platform}/build/cia/${name}_libretro.cia
mv -f ../retroarch_3ds.3dsx ../pkg/${platform}/build/3dsx/${name}_libretro.3dsx
mv -f ../retroarch_3ds.3ds ../pkg/${platform}/build/rom/${name}_libretro.3ds
elif [ $PLATFORM = "unix" ] ; then
mv -f ../retroarch ../pkg/${platform}/${name}_libretro.elf
elif [ $PLATFORM = "ngc" ] ; then
Expand Down
4 changes: 2 additions & 2 deletions frontend/drivers/platform_ctr.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static void frontend_ctr_exec(const char* path, bool should_load_game)
char game_path[PATH_MAX];
const char* arg_data[3];
errorConf error_dialog;
char error_string[PATH_MAX + 200];
char error_string[200 + PATH_MAX];
int args = 0;
int error = 0;

Expand Down Expand Up @@ -251,7 +251,7 @@ static void frontend_ctr_exec(const char* path, bool should_load_game)
}

errorInit(&error_dialog, ERROR_TEXT, CFG_LANGUAGE_EN);
sprintf(error_string, "Cant launch core:%s", path);
snprintf(error_string, sizeof(error_string), "Cant launch core:%s", path);
errorText(&error_dialog, error_string);
errorDisp(&error_dialog);
exit(0);//couldnt launch new core, but context is corrupt so we have to quit
Expand Down

0 comments on commit 6c1e865

Please sign in to comment.