mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-28 04:12:19 -05:00
Pass in custom assets to OTRExporter (#3328)
* bump submodules and use custom assets dir * bump submodules
This commit is contained in:
parent
3558a32222
commit
e369ad4c86
@ -124,7 +124,7 @@ add_custom_target(
|
|||||||
ExtractAssets
|
ExtractAssets
|
||||||
# CMake versions prior to 3.17 do not have the rm command, use remove instead for older versions
|
# CMake versions prior to 3.17 do not have the rm command, use remove instead for older versions
|
||||||
COMMAND ${CMAKE_COMMAND} -E $<IF:$<VERSION_LESS:${CMAKE_VERSION},3.17>,remove,rm> -f oot.otr oot-mq.otr soh.otr
|
COMMAND ${CMAKE_COMMAND} -E $<IF:$<VERSION_LESS:${CMAKE_VERSION},3.17>,remove,rm> -f oot.otr oot-mq.otr soh.otr
|
||||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --non-interactive
|
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --non-interactive --xml-root ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/xml --custom-otr-file soh.otr "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom
|
||||||
COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake
|
COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
|
||||||
COMMENT "Running asset extraction..."
|
COMMENT "Running asset extraction..."
|
||||||
@ -146,7 +146,7 @@ add_custom_target(
|
|||||||
GenerateSohOtr
|
GenerateSohOtr
|
||||||
# CMake versions prior to 3.17 do not have the rm command, use remove instead for older versions
|
# CMake versions prior to 3.17 do not have the rm command, use remove instead for older versions
|
||||||
COMMAND ${CMAKE_COMMAND} -E $<IF:$<VERSION_LESS:${CMAKE_VERSION},3.17>,remove,rm> -f soh.otr
|
COMMAND ${CMAKE_COMMAND} -E $<IF:$<VERSION_LESS:${CMAKE_VERSION},3.17>,remove,rm> -f soh.otr
|
||||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --norom
|
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --norom --custom-otr-file soh.otr "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom
|
||||||
COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -DONLYSOHOTR=On -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake
|
COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -DONLYSOHOTR=On -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
|
||||||
COMMENT "Generating soh.otr..."
|
COMMENT "Generating soh.otr..."
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 89de1472606b101a25d489d3e01f1769d3bc186c
|
Subproject commit f1bc0a726813d7e70ad471fdebd080e6fd77996a
|
2
ZAPDTR
2
ZAPDTR
@ -1 +1 @@
|
|||||||
Subproject commit e6b0764799309b96c46f4c77e3ea2aa670f15e89
|
Subproject commit 9b8e224dac83aa8e47a688884ad48725f18fc293
|
@ -26,7 +26,6 @@ while [[ (! -e "$SHIP_HOME"/oot.otr) || (! -e "$SHIP_HOME"/oot-mq.otr) ]]; do
|
|||||||
ln -s "$HERE"/usr/bin/{assets,soh.elf,ZAPD} "$ASSETDIR"
|
ln -s "$HERE"/usr/bin/{assets,soh.elf,ZAPD} "$ASSETDIR"
|
||||||
export OLDPWD="$PWD"
|
export OLDPWD="$PWD"
|
||||||
mkdir -p "$ASSETDIR"/tmp
|
mkdir -p "$ASSETDIR"/tmp
|
||||||
mkdir -p "$ASSETDIR"/Extract
|
|
||||||
ln -s "$romfile" "$ASSETDIR"/tmp/rom.z64
|
ln -s "$romfile" "$ASSETDIR"/tmp/rom.z64
|
||||||
cd "$ASSETDIR"
|
cd "$ASSETDIR"
|
||||||
ROMHASH=$(sha1sum -b "$ASSETDIR"/tmp/rom.z64 | awk '{ print $1 }')
|
ROMHASH=$(sha1sum -b "$ASSETDIR"/tmp/rom.z64 | awk '{ print $1 }')
|
||||||
@ -166,7 +165,6 @@ while [[ (! -e "$SHIP_HOME"/oot.otr) || (! -e "$SHIP_HOME"/oot-mq.otr) ]]; do
|
|||||||
continue;;
|
continue;;
|
||||||
esac
|
esac
|
||||||
if [[ ! -e "$SHIP_HOME"/"$OTRNAME" ]]; then
|
if [[ ! -e "$SHIP_HOME"/"$OTRNAME" ]]; then
|
||||||
cp -r "$ASSETDIR"/assets/game "$ASSETDIR"/Extract/assets
|
|
||||||
if [ -n "$ZENITY" ]; then
|
if [ -n "$ZENITY" ]; then
|
||||||
(echo "# 25%"; echo "25"; sleep 2; echo "# 50%"; echo "50"; sleep 3; echo "# 75%"; echo "75"; sleep 2; echo "# 100%"; echo "100"; sleep 3) |
|
(echo "# 25%"; echo "25"; sleep 2; echo "# 50%"; echo "50"; sleep 3; echo "# 75%"; echo "75"; sleep 2; echo "# 100%"; echo "100"; sleep 3) |
|
||||||
zenity --progress --title="OTR Generating..." --timeout=10 --percentage=0 --icon-name=soh --window-icon=soh.png --height=80 --width=400 &
|
zenity --progress --title="OTR Generating..." --timeout=10 --percentage=0 --icon-name=soh --window-icon=soh.png --height=80 --width=400 &
|
||||||
|
@ -180,9 +180,7 @@ if [ ! -e "$SHIP_HOME"/oot.otr ] || [ ! -e "$SHIP_HOME"/oot-mq.otr ]; then
|
|||||||
export ASSETDIR
|
export ASSETDIR
|
||||||
cp -r "$RESPATH/assets" "$ASSETDIR"
|
cp -r "$RESPATH/assets" "$ASSETDIR"
|
||||||
mkdir -p "$ASSETDIR"/tmp
|
mkdir -p "$ASSETDIR"/tmp
|
||||||
mkdir -p "$ASSETDIR"/Extract
|
|
||||||
cp "$ROMPATH" "$ASSETDIR"/tmp/rom.z64
|
cp "$ROMPATH" "$ASSETDIR"/tmp/rom.z64
|
||||||
cp -r "$ASSETDIR"/assets/game "$ASSETDIR"/Extract/assets/
|
|
||||||
cd "$ASSETDIR" || return
|
cd "$ASSETDIR" || return
|
||||||
|
|
||||||
# If an invalid rom was detected, let the user know
|
# If an invalid rom was detected, let the user know
|
||||||
|
Loading…
Reference in New Issue
Block a user