Changes between Version 65 and Version 66 of BuildAndDeploymentEnvironment
- Timestamp:
- Aug 31, 2022, 4:08:44 PM (21 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildAndDeploymentEnvironment
v65 v66 157 157 {{{ 158 158 #!/bin/sh 159 # install.sh 159 # install.sh: Installs files to prepare for building an AppImage 160 # Copyright 2022 The 0ad project 161 # 160 162 set -ev # exit on error, be verbose 161 163 162 #WORK_DIR= 164 165 #ABS_PATH_WORK_DIR= 163 166 #ABS_PATH_SRC_ROOT=/0ad 164 167 165 if [ -z "${WORK_DIR}" ]; then166 echo " set the work dir!"168 if [ ! -d "${ABS_PATH_WORK_DIR}" ]; then 169 echo "The work dir must be an absolute path to an existing directory." 167 170 exit 1 168 171 fi 169 172 170 if [ -z "${ABS_PATH_SRC_ROOT}" ]; then173 if [ ! -r "${ABS_PATH_SRC_ROOT}/binaries/source/main.cpp" ]; then 171 174 echo "set the source root!" 172 175 exit 1 173 176 fi 174 177 175 cd $ABS_PATH_SRC_ROOT 176 177 install -s binaries/system/pyrogenesis -Dt ${WORK_DIR}/AppRun/usr/bin 178 install -s binaries/system/ActorEditor -Dt ${WORK_DIR}/AppRun/usr/bin 178 APPDIR=${ABS_PATH_WORK_DIR}/AppDir 179 180 cd ${ABS_PATH_SRC_ROOT} 181 182 install -s binaries/system/pyrogenesis -Dt ${APPDIR}/usr/bin 183 install -s binaries/system/ActorEditor -Dt ${APPDIR}/usr/bin 179 184 180 185 # This loop uses 'patchelf', which may not be installed on some distros. … … 182 187 # TODO: add code here to check for the existence of 'patchelf' 183 188 184 cd ${ WORK_DIR}/AppRun/usr/bin189 cd ${APPDIR}/usr/bin 185 190 186 191 for lib in libmozjs78-ps-release.so \ … … 195 200 patchelf --set-rpath libAtlasUI.so:${ABS_PATH_SRC_ROOT}/binaries/system ActorEditor 196 201 197 cd $ ABS_PATH_SRC_ROOT198 199 install binaries/system/libCollada.so -Dt ${ WORK_DIR}/AppRun/usr/lib200 install build/resources/0ad.appdata.xml -Dt ${ WORK_DIR}/AppRun/usr/share/appdata201 install build/resources/0ad.desktop -Dt ${ WORK_DIR}/AppRun/usr/share/applications202 install build/resources/0ad.png -Dt ${ WORK_DIR}/AppRun/usr/share/pixmaps203 204 mkdir -p ${ WORK_DIR}/AppRun/usr/data/config205 cp -a binaries/data/config/default.cfg ${ WORK_DIR}/AppRun/usr/data/config206 207 cp -a binaries/data/l10n ${ WORK_DIR}/AppRun/usr/data202 cd ${ABS_PATH_SRC_ROOT} 203 204 install binaries/system/libCollada.so -Dt ${APPDIR}/usr/lib 205 install build/resources/0ad.appdata.xml -Dt ${APPDIR}/usr/share/appdata 206 install build/resources/0ad.desktop -Dt ${APPDIR}/usr/share/applications 207 install build/resources/0ad.png -Dt ${APPDIR}/usr/share/pixmaps 208 209 mkdir -p ${APPDIR}/usr/data/config 210 cp -a binaries/data/config/default.cfg ${APPDIR}/usr/data/config 211 212 cp -a binaries/data/l10n ${APPDIR}/usr/data 208 213 209 214 # IMPORTANT: If you're creating the image from a distribution archive, this should copy … … 212 217 # If you're using the svn/git version, you'll need to use the pyrogenesis 213 218 # pyromod archive builder. It's recommended to create the two zip files 214 # in a directory outside of the AppRun folder,in case you need to remove215 # the AppRun folder, and then copy them to ${WORK_DIR}/AppRun/usr/data219 # in a directory outside of the ${APPDIR} folder (in case you need to remove 220 # the ${APPDIR} folder later) and then copy them to ${APPDIR}/usr/data 216 221 # see https://trac.wildfiregames.com/wiki/Modding_Guide#Distributingyourmods 217 222 # 218 cp -a binaries/data/mods ${ WORK_DIR}/AppRun/usr/data223 cp -a binaries/data/mods ${APPDIR}/usr/data 219 224 220 225 # Remove any symlinks to mods that may be in binaries/data/mods (this will cause 0ad to crash … … 223 228 }}} 224 229 225 Note that binaries/system{libmoz*,libnv*} will be moved into the ${ WORK_DIR}/AppRunfolder automatically when linuxdeploy is run below.226 227 Change the Exec line in ${ WORK_DIR}/AppRun/usr/share/applications/0ad.desktop to `pyrogenesis` and also change the Exec line for Atlas.230 Note that binaries/system{libmoz*,libnv*} will be moved into the ${APPDIR} folder automatically when linuxdeploy is run below. 231 232 Change the Exec line in ${APPDIR}/usr/share/applications/0ad.desktop to `pyrogenesis` and also change the Exec line for Atlas. 228 233 229 234 Get a copy of [https://github.com/linuxdeploy/linuxdeploy/releases linuxdeploy] (you can use `wget` to get the desired release/arch). … … 232 237 233 238 {{{ 234 cd ${ WORK_DIR}235 236 linuxdeploy -d AppRun/usr/share/applications/0ad.desktop \237 --icon-file= AppRun/usr/share/pixmaps/0ad.png \239 cd ${ABS_PATH_WORK_DIR} 240 241 linuxdeploy -d ${APPDIR}/usr/share/applications/0ad.desktop \ 242 --icon-file=${APPDIR}/usr/share/pixmaps/0ad.png \ 238 243 --icon-filename=0ad \ 239 --executable AppRun/usr/bin/pyrogenesis \240 --appdir AppRun\244 --executable ${APPDIR}/usr/bin/pyrogenesis \ 245 --appdir ${APPDIR} \ 241 246 --output appimage 242 247 }}} … … 244 249 Other Notes: 245 250 246 To 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.251 To test any changes you want to make to the appimage, or for debugging, you can make changes inside the '${APPDIR}' folder, then cd back to '${APPDIR}' and enter `./AppRun`. When satisfied, repeat the "Create image" step above. 247 252 248 253 To 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`.