#!/bin/bash set -o verbose # ==================== IMPORTANT ====================== # This script stops and restarts the shard by itself. # # It is used to re-calculate packed_sheets, sheet_id.bin and # Visual_slot.tab files, and this after the changes to # datasheets in the Khaganat-data directory HAVE BEEN PULLED!! # It is therefore necessary to have the "patch client" # automatically "set up" at the end of the script # # You just need to increment the index of 1 as usual # # This is automatically offered in the end, after # the modifications is done to the patch-release # # ------------- Edit these variables --------------- # Set path's of the installation files for the RC sources: #------------------------------------------------------------------ # OBS: Be sure to check that these PATH's is correct to your system #------------------------------------------------------------------ export RYZOM_HOME=~/khaganat export RYZOM_DATA_HOME=~/khaganat-data export PATCH_CLIENT_SYSTEM=~/patch_service # ------------- End of variables --------------- # Let's move to the data directory cd $RYZOM_DATA_HOME #We update the data with the Lirria branch of the data repository hg pull http://depots.khaganat.net/scm/hg/khaganat-data hg update -r lirria # Let's stop the shard: shard stop # Delete the old packed_sheets from the server and client folders: rm -f $RYZOM_HOME/code/ryzom/server/data_shard/*.packed_sheets rm -f $RYZOM_HOME/code/ryzom/client/data/*.packed_sheets rm -f $RYZOM_HOME/code/ryzom/common/data_common/visual_slot.tab # Regenerate the file sheet_id.bin: cd $RYZOM_HOME/code/build/bin ./make_sheet_id -o$RYZOM_DATA_HOME/leveldesign/game_elem/sheet_id.bin $RYZOM_DATA_HOME/leveldesign/game_elem $RYZOM_DATA_HOME/leveldesign/game_element $RYZOM_DATA_HOME/leveldesign/world $RYZOM_DATA_HOME/leveldesign/ecosystems $RYZOM_DATA_HOME/sound # Regenerate packed_sheets: cd $RYZOM_HOME/code/ryzom/tools/sheets_packer ./sheets_packer # Copy the new visual_slot.tab to it's right place: cp visual_slot.tab $RYZOM_HOME/code/ryzom/client/data/visual_slot.tab cp visual_slot.tab $RYZOM_HOME/code/ryzom/common/data_common/visual_slot.tab # In the following: $RYZOM_HOME/code/ryzom/client/data/ # - the client's packed_sheets # # In the following: $RYZOM_HOME/code/ryzom/common/data_common/ # - the visual_slot.tab # # In the following: $RYZOM_DATA_HOME/leveldesign/game_elem/ # - the sheet_id.bin # # Copy the necessary data(for the client) residing in the "patch creation directory". # This includes translation files. ### OBS: VERIFY THAT ALL NEW BNPs ARE LISTED IN $PATCH_CLIENT_SYSTEM/patchgame/ryzom.xml # nano $PATCH_CLIENT_SYSTEM/patchgame/ryzom.xml # Line added for server data: <_Files type="STRING" value="dataserver.bnp"/> # Generate a new patch patch_gen updateProduct patch_game/ryzom.xml # Edit the release notes: nano patch_game/patch/index.php # Enable the patch # Simply increment the two digits of the Lirria.version file by (1). nano patch_game/patch/Lirria.version # Shard restart rm -Rf $PATCH_CLIENT_SYSTEM/dataserver/* cp $RYZOM_HOME/code/ryzom/client/data/*.packed_sheets $PATCH_CLIENT_SYSTEM/dataserver/ cp $RYZOM_HOME/code/ryzom/common/data_common/visual_slot.tab $PATCH_CLIENT_SYSTEM/dataserver/ cp $RYZOM_DATA_HOME/leveldesign/game_elem/sheet_id.bin $PATCH_CLIENT_SYSTEM/dataserver/ cp $RYZOM_DATA_HOME/translation/translated/* $PATCH_CLIENT_SYSTEM/dataserver/ # Now, move to the directory where we will generate the new dataserver.bnp cd $PATCH_CLIENT_SYSTEM bnp_make /p $PATCH_CLIENT_SYSTEM/dataserver/ rm $PATCH_CLIENT_SYSTEM/patch_game/bnp/dataserver.bnp mv dataserver.bnp $PATCH_CLIENT_SYSTEM/patch_game/bnp/ # Optionally, you can add extra .bnp files in the $PATCH_CLIENT_SYSTEM/patchgame/bnp/ directory # to also be patched. shard start