Changes between Version 63 and Version 64 of BuildAndDeploymentEnvironment


Ignore:
Timestamp:
Aug 31, 2022, 4:48:19 AM (21 months ago)
Author:
Andy Alt
Comment:

appimage:change $HOME to $WORK_DIR

Legend:

Unmodified
Added
Removed
Modified
  • BuildAndDeploymentEnvironment

    v63 v64  
    160160set -ev # exit on error, be verbose
    161161
     162#WORK_DIR=
    162163#ABS_PATH_SRC_ROOT=/0ad
     164
     165if [ -z "${WORK_DIR}" ]; then
     166  echo "set the work dir!"
     167  exit 1
     168fi
    163169
    164170if [ -z "${ABS_PATH_SRC_ROOT}" ]; then
     
    169175cd $ABS_PATH_SRC_ROOT
    170176
    171 install -s binaries/system/pyrogenesis -Dt $HOME/AppRun/usr/bin
    172 install -s binaries/system/ActorEditor -Dt $HOME/AppRun/usr/bin
     177install -s binaries/system/pyrogenesis -Dt ${WORK_DIR}/AppRun/usr/bin
     178install -s binaries/system/ActorEditor -Dt ${WORK_DIR}/AppRun/usr/bin
    173179
    174180# This loop uses 'patchelf', which may not be installed on some distros.
     
    176182# TODO: add code here to check for the existence of 'patchelf'
    177183
    178 cd $HOME/AppRun/usr/bin
     184cd ${WORK_DIR}/AppRun/usr/bin
    179185
    180186for lib in libmozjs78-ps-release.so \
     
    191197cd $ABS_PATH_SRC_ROOT
    192198
    193 install binaries/system/libCollada.so -Dt $HOME/AppRun/usr/lib
    194 install build/resources/0ad.appdata.xml -Dt $HOME/AppRun/usr/share/appdata
    195 install build/resources/0ad.desktop -Dt $HOME/AppRun/usr/share/applications
    196 install build/resources/0ad.png -Dt $HOME/AppRun/usr/share/pixmaps
    197 
    198 mkdir -p $HOME/AppRun/usr/data/config
    199 cp -a binaries/data/config/default.cfg $HOME/AppRun/usr/data/config
    200 
    201 cp -a binaries/data/l10n $HOME/AppRun/usr/data
     199install binaries/system/libCollada.so -Dt ${WORK_DIR}/AppRun/usr/lib
     200install build/resources/0ad.appdata.xml -Dt ${WORK_DIR}/AppRun/usr/share/appdata
     201install build/resources/0ad.desktop -Dt ${WORK_DIR}/AppRun/usr/share/applications
     202install build/resources/0ad.png -Dt ${WORK_DIR}/AppRun/usr/share/pixmaps
     203
     204mkdir -p ${WORK_DIR}/AppRun/usr/data/config
     205cp -a binaries/data/config/default.cfg ${WORK_DIR}/AppRun/usr/data/config
     206
     207cp -a binaries/data/l10n ${WORK_DIR}/AppRun/usr/data
    202208
    203209# IMPORTANT: If you're creating the image from a distribution archive, this should copy
     
    207213# pyromod archive builder. It's recommended to create the two zip files
    208214# in a directory outside of the AppRun folder, in case you need to remove
    209 # the AppRun folder, and then copy them to $HOME/AppRun/usr/data
     215# the AppRun folder, and then copy them to ${WORK_DIR}/AppRun/usr/data
    210216# see https://trac.wildfiregames.com/wiki/Modding_Guide#Distributingyourmods
    211217#
    212 cp -a binaries/data/mods $HOME/AppRun/usr/data
     218cp -a binaries/data/mods ${WORK_DIR}/AppRun/usr/data
    213219
    214220# Remove any symlinks to mods that may be in binaries/data/mods (this will cause 0ad to crash
     
    217223}}}
    218224
    219 Note that binaries/system{libmoz*,libnv*} will be moved into the AppRun folder automatically when linuxdeploy is run below.
    220 
    221 Change the Exec line in $HOME/AppRun/usr/share/applications/0ad.desktop to `pyrogenesis` and also change the Exec line for Atlas.
     225Note that binaries/system{libmoz*,libnv*} will be moved into the ${WORK_DIR}/AppRun folder automatically when linuxdeploy is run below.
     226
     227Change the Exec line in ${WORK_DIR}/AppRun/usr/share/applications/0ad.desktop to `pyrogenesis` and also change the Exec line for Atlas.
    222228
    223229Get a copy of [https://github.com/linuxdeploy/linuxdeploy/releases linuxdeploy] (you can use `wget` to get the desired release/arch).
     
    226232
    227233{{{
    228 cd $HOME
     234cd ${WORK_DIR}
    229235
    230236linuxdeploy -d AppRun/usr/share/applications/0ad.desktop \
     
    238244Other Notes:
    239245
    240 To test any changes you want to make to the appimage, or for debugging, you can make changes inside the 'AppRun' folder, then cd back to the base 'AppRun' folder and enter `./AppRun`. When satisfied, repeat the "Create image" step above.
     246To test any changes you want to make to the appimage, or for debugging, you can make changes inside the '${WORK_DIR}/AppRun' folder, then cd back to '${WORK_DIR}/AppRun' and enter `./AppRun`. When satisfied, repeat the "Create image" step above.
    241247
    242248To use the --writableRoot option with the 0ad appimage, it must be extracted by providing the --appimage-extract option to the 0ad appimage. Then cd into squashfs-root, and type in `./AppRun --writableRoot`.