Hinmaton Posted December 31, 2015 Share Posted December 31, 2015 (edited) Okay, if this is a statement of the problem, then something is really, really wrong: cp: /Users/Lyle/Library/Containers/com.feralinteractive.xcomenemyunknown/Data/Library/Application Support/Feral Interactive/XCOM Enemy Unknown - Elite Edition/XCOM Enemy Unknown - Elite Edition.app/Contents/Resources/MacOverrides/XEW/xcomgame.int: No such file or directory Looking through the files in the Long War Mod folder, there is a file named "xcomgame.int", but it sounds to me like the reason the install script can't find it is because it's not in a folder named "XEW", "MacOverrides", or any of the other folders listed in that string. In my copy of the mod, it's here: (I'm going to try to construct a path name. I'm a carpenter, and this definitely isn't made of wood.) /Users/Lyle/Desktop/LW-EW-Linux-OSX-v1_0/install-files/xcomgame/localization/int/xcomgame.int The two paths are so different, it almost seems like the error statement is the destination, not the source. But you told me it's the source, and I did find it in what should be the source material. Edit: going back and trying to follow the path in the "cp:..." output down, you get inside "Containers", and the next folder, "com.feralinteractive.something" doesn't exist. Edited December 31, 2015 by Hinmaton Link to comment Share on other sites More sharing options...
Hinmaton Posted December 31, 2015 Share Posted December 31, 2015 (edited) It also looks to me like the error is in this, but I can't even read it: (The only reason I think that is because I see what my reading tells me is a comment that says "copy xcomgame.int and..." and xcomgame.int is at the end of the error output.) -------- # copy LW files to game dircp_ -r "${MOD_DATA_DIR}/"* "${installdir}/${INSTALL_DATA_DIR}/"INSTALLED_FILES="${LW_FILES}" # copy xcomgame.int and xcomuishell.int to feraloverridesfor file in ${FERAL_OVERRIDES}; docp_ "${MOD_DATA_DIR}/$file" "${installdir}/${FERAL_OVERRIDE_DIR}/`basename $file`" # XXX: seems like mac localization files are cached toocp_ "${MOD_DATA_DIR}/$file" "${userfiles}/MacInit/`basename $file`" # XXX: Terrible hack; since overrides are not under the install_data_dir, go two upINSTALLED_FILES="${INSTALLED_FILES} Edited December 31, 2015 by Hinmaton Link to comment Share on other sites More sharing options...
tracktwo Posted December 31, 2015 Share Posted December 31, 2015 (edited) It sounds like your install folder structure doesn't look at all like the one the script is expecting. I don't have a mac, but from what I understand there are a few different ways to get the game on mac and they all have slightly different setups. Evidently you don't have the same version as the person who created the mac script. The problem probably isn't in locating the xcomgame.int file within the LW package, my guess is that it can't find the *destination* folder it's trying to copy it to within the game package. It's hard to tell wtih all the variables in there, but one thing you can try to see exactly what it's trying to copy where is to make a copy of those two lines starting with cp_ and in the copy, put "echo" in front of cp_. That'll print out the line to the screen so it'll show you what command it's trying to execute. E.g. it should look like this: echo cp_ "${MOD_DATA_DIR}/$file" "${installdir}/${FERAL_OVERRIDE_DIR}/`basename $file`" echo cp_ "${MOD_DATA_DIR}/$file" "${userfiles}/MacInit/`basename $file`" In addition to the original two lines without echo. Then run it again and take a look at the output on the screen. See if you can find the corresponding destination folders in your game package at all, or if not, if you can at least find an existing xcomgame.int file in there. Edited December 31, 2015 by tracktwo Link to comment Share on other sites More sharing options...
Hinmaton Posted December 31, 2015 Share Posted December 31, 2015 Okay, I'm going to try that. For the record, this is the script I'm working with: --------- #!/bin/bash# Long War Linux install script set -eu # default values# FERAL_OVERRIDE_DIR=XCOM\ Enemy\ Unknown.app/Contents/Resources/MacOverrides/XEW USERFILES=~/Library/Containers/com.feralinteractive.xcomenemyunknown/Data/Library/Application\ Support/Feral\ Interactive/XCOM\ Enemy\ Unknown\ -\ Elite\ Edition/XEWINSTALLDIR=~/Library/Containers/com.feralinteractive.xcomenemyunknown/Data/Library/Application\ Support/Feral\ Interactive/XCOM\ Enemy\ Unknown\ -\ Elite\ EditionINSTALL_DATA_DIR="Data/XEW/XComGame" MOD_DATA_DIR="`dirname "$0"`/install-files"MOD_CONFIG_DIR="${MOD_DATA_DIR}/xcomgame/config" FERAL_OVERRIDES="xcomgame/localization/int/xcomgame.int xcomgame/localization/int/xcomuishell.int"FERAL_OVERRIDE_DIR=XCOM\ Enemy\ Unknown\ -\ Elite\ Edition.app/Contents/Resources/MacOverrides/XEW LW_FILES=`find "${MOD_DATA_DIR}/" -type f | sed "s,${MOD_DATA_DIR}/,,g"` SELFNAME=`basename "$0"` IS_UNINSTALL=falseif [ $SELFNAME = "uninstall-LW-OSX.sh" ]; thenIS_UNINSTALL=truefi $IS_UNINSTALL && echo "Uninstalling Long War for XCOM:EW, please, be patient..." || echo "Installing Long War for XCOM:EW, please, be patient..." dry_run=falsebackup_data=true function cp_() {if $dry_run; thenecho cp $* >&2elsecp "$@"fi} function mkdir_() {if $dry_run; thenecho mkdir $* >&2elsemkdir "$@"fi} function rm_() {if $dry_run; thenecho rm $* >&2elserm "$@"fi} function mv_() {if $dry_run; thenecho mv $* >&2elsemv "$@"fi} function ln_() {if $dry_run; thenecho ln $* >&2elseln "$@"fi} function uninstall() {echo "uninstalling Long War mod now" # delete mod fileswhile read file; dorm_ -f "${installdir}/${file}"done < "${installdir}/.lw_install" usersaves=$userfiles/SaveDatauserconf=$userfiles/MacInitrm_ -f $usersaves/*rm_ -f $userconf/* # restore original filescp_ -r "${installdir}/backup/"* "${installdir}/"cp_ -r "${userbackup}/"* "${userfiles}" # delete restored backupsrm_ -rf "${userbackup}" "${gamebackup}"rm_ -f "${installdir}/.lw_install" echo "Everything should be restored to pre mod versions."} function uninstall_old() {echo "uninstalling old version now"if [ -e "${installdir}/backup_oldLW" -o -e "${userfiles}/backup_oldLW" ]; thenecho "found old Long War backup in ${installdir}/backup_oldLW or ${userfiles}/backup_oldLW"echo -en "\e[0;31mremove old Long War backup files?\e[0m (y/n)"read ynif [[ $yn == y || $yn == Y ]]thenecho "Removing old Long War backup and all its content..."rm_ -rf "${installdir}/backup_oldLW"rm_ -rf "${userfiles}/backup_oldLW"elseexit 1fifi # backup old LW filesmkdir_ "${installdir}/backup_oldLW"while read file; domv_ "${installdir}/${INSTALL_DATA_DIR}/${file}" "${installdir}/backup_oldLW"done < "${installdir}/.lw_install" usersaves="$userfiles/savedata"userconf="$userfiles/MacInit"cp_ -r "$usersaves" "${installdir}/backup_oldLW"cp_ -r "$userconf" "${userfiles}/backup_oldLW" # restore original filescp_ -r "${installdir}/backup/"* "${installdir}/${INSTALL_DATA_DIR}/"# no need to restore savedata or userdata since both would just be deleted anyway rm_ -f "${installdir}/.lw_install" echo "old Long War version backed up in:"echo "${installdir}/backup_oldLW"echo "${userfiles}/backup_oldLW"} function backup() {mkdir_ "$userbackup"mkdir_ "$gamebackup" # backup user filesusersaves="$userfiles/savedata"userconf="$userfiles/MacInit" cp_ -r "$usersaves" "$userbackup"cp_ -r "$userconf" "$userbackup" # iterate through LW files and backup corresponding game files# for each LW upk file check if corresponding .upk.uncompressed_size file exist and back it upfor file in ${LW_FILES}; docase "$file" in*upk)if [ -e "${installdir}/${INSTALL_DATA_DIR}/file.uncompressed_size" ]; thenmkdir_ -p "${gamebackup}/`dirname $file`"cp_ "${installdir}/${INSTALL_DATA_DIR}/$file.uncompressed_size" "$gamebackup/$file.uncompressed_size"fi;;esacdone # backup xcomgame.int and xcomuishell.int in feraloverridesfor file in ${FERAL_OVERRIDES}; doif [ -e "${installdir}/${FERAL_OVERRIDE_DIR}/`basename $file`" ]; thenmkdir_ -p "${gamebackup}/${FERAL_OVERRIDE_DIR}"cp_ "${installdir}/${FERAL_OVERRIDE_DIR}/`basename $file`" "${gamebackup}/${FERAL_OVERRIDE_DIR}/`basename $file`"fidone # backup remaining filesfor file in ${LW_FILES}; doif [ -e "${installdir}/${INSTALL_DATA_DIR}/${file}" ]; thenmkdir_ -p "${gamebackup}/`dirname $file`"cp_ "${installdir}/${INSTALL_DATA_DIR}/${file}" "${gamebackup}/$file"fidone} function install() {# for each LW upk file check if corresponding .upk.uncompressed_size file exist and delete itfor file in ${LW_FILES}; docase "$file" in*upk)if [ -e "${installdir}/${INSTALL_DATA_DIR}/$file.uncompressed_size" ]; thenrm_ -f "${installdir}/${INSTALL_DATA_DIR}/$file.uncompressed_size"fi;;esacdone # copy LW files to game dircp_ -r "${MOD_DATA_DIR}/"* "${installdir}/${INSTALL_DATA_DIR}/"INSTALLED_FILES="${LW_FILES}" # copy xcomgame.int and xcomuishell.int to feraloverridesfor file in ${FERAL_OVERRIDES}; docp_ "${MOD_DATA_DIR}/$file" "${installdir}/${FERAL_OVERRIDE_DIR}/`basename $file`" # XXX: seems like mac localization files are cached toocp_ "${MOD_DATA_DIR}/$file" "${userfiles}/MacInit/`basename $file`" # XXX: Terrible hack; since overrides are not under the install_data_dir, go two upINSTALLED_FILES="${INSTALLED_FILES}../../${FERAL_OVERRIDE_DIR}/`basename $file`"done # copy LW defaultgamecore.ini to WritableFiles/XComGameCore.inicp_ "${MOD_CONFIG_DIR}/defaultgamecore.ini" "${userfiles}/MacInit/XComGameCore.ini" # copy LW defaultloadouts.ini to WritableFiles/XComLoadouts.inicp_ "${MOD_CONFIG_DIR}/defaultloadouts.ini" "${userfiles}/MacInit/XComLoadouts.ini" if ! ${dry_run}; thenecho "${INSTALLED_FILES}" > "${installdir}/.lw_install"fi if [ ! -e "${installdir}/${SELFNAME}" ]; thencp_ "$0" "${installdir}/"ln_ -s "${installdir}/${SELFNAME}" "${installdir}/uninstall-LW-OSX.sh"fi} # checking command line parametersif [ "$#" -lt 1 ]; thenuserfiles="${USERFILES}"elseuserfiles="$1"fi if [ "$#" -lt 2 ]; thenif [ -d "${INSTALLDIR}" ]; theninstalldir="${INSTALLDIR}"else echo "Can not find game files. Please specify xew dir location" read installdir installdir="${installdir%/}" if [ `basename "${installdir}"` != xew ]; then installdir="${installdir}/xew" fi if [ ! -d "${installdir}" ]; then echo "invalid directory specified." exit 1 fifielseinstalldir="$2"fi # checking if directories existif [ -d "$userfiles" ]thenecho "User files dir: $userfiles"elseecho "$userfiles is not a directory!"exit 1fi # backup location for existing filesuserbackup="$userfiles/backup"gamebackup="$installdir/backup" if $IS_UNINSTALL; thenif [ -f "${installdir}/.lw_install" ]; thenecho -ne "\e[0;31mThis will delete all mod savegames and configs. Are you sure?\e[0m (y/n)"read ynif [[ $yn == y || $yn == Y ]]; thenuninstallelseecho "you can find the savegames in ${userfiles}/savedata and settings in ${userfiles}/MacInit if you want to back them up."fielseecho "Long War install not found!"fi exit 0fi keep_saves=falseif [ -f "${installdir}/.lw_install" ]; thenecho -ne "\e[0;31mOld version of Long War found. Keep savegames?\e[0m (y/n)"read ynif [[ $yn == y || $yn == Y ]]; thenecho "keeping savegames"keep_saves=trueelseecho "not keeping savegames"fi uninstall_oldbackup_data=falsefi if ${backup_data}; then# check if backup dir already existif [ -d "${userbackup}" -o -d "${gamebackup}" ]; thenecho "old backup already exists in ${userbackup} or ${gamebackup}."echo -n "Owerwrite old backup? (y/n) "read ynif [[ $yn == y || $yn == Y ]]thenecho "Removing old backup and all its content..."rm_ -rf "$userbackup"rm_ -rf "$gamebackup"elseexit 1fifi backup echo "Wrote backup to:"echo "User files: $userbackup"echo "Game files: $gamebackup"fi # clear user filesusersaves="$userfiles/savedata"userconf="$userfiles/MacInit"if ! ${keep_saves}; thenrm_ -f "$usersaves/"*firm_ -f "$userconf/"* echo "Copying install files..." install echo -e "\e[0;32mLong War installed successfully.\e[0m"echo "Now run the game. Remeber to check your game settings (especially video settings)." exit 0 # end of install script Link to comment Share on other sites More sharing options...
Hinmaton Posted December 31, 2015 Share Posted December 31, 2015 I added two "echo" lines to the script, in the function "install". I underlined my additions here:------function install() {# for each LW upk file check if corresponding .upk.uncompressed_size file exist and delete itfor file in ${LW_FILES}; docase "$file" in*upk)if [ -e "${installdir}/${INSTALL_DATA_DIR}/$file.uncompressed_size" ]; thenrm_ -f "${installdir}/${INSTALL_DATA_DIR}/$file.uncompressed_size"fi;;esacdone # copy LW files to game dircp_ -r "${MOD_DATA_DIR}/"* "${installdir}/${INSTALL_DATA_DIR}/" echo cp_ -r "${MOD_DATA_DIR}/"* "${installdir}/${INSTALL_DATA_DIR}/" INSTALLED_FILES="${LW_FILES}" # copy xcomgame.int and xcomuishell.int to feraloverridesfor file in ${FERAL_OVERRIDES}; docp_ "${MOD_DATA_DIR}/$file" "${installdir}/${FERAL_OVERRIDE_DIR}/`basename $file`" echo cp_ "${MOD_DATA_DIR}/$file" "${installdir}/${FERAL_OVERRIDE_DIR}/`basename $file`" # XXX: seems like mac localization files are cached toocp_ "${MOD_DATA_DIR}/$file" "${userfiles}/MacInit/`basename $file`" # XXX: Terrible hack; since overrides are not under the install_data_dir, go two upINSTALLED_FILES="${INSTALLED_FILES}../../${FERAL_OVERRIDE_DIR}/`basename $file`"done---------- This is the new output: Last login: Wed Dec 30 23:42:43 on ttys000Lyles-MacBook-Pro:LW-EW-Linux-OSX-v1_0 Lyle$ sudo ./install-lw-osx.shPassword:Installing Long War for XCOM:EW, please, be patient...User files dir: /Users/Lyle/Library/Containers/com.feralinteractive.xcomenemyunknown/Data/Library/Application Support/Feral Interactive/XCOM Enemy Unknown - Elite Edition/XEWold backup already exists in /Users/Lyle/Library/Containers/com.feralinteractive.xcomenemyunknown/Data/Library/Application Support/Feral Interactive/XCOM Enemy Unknown - Elite Edition/XEW/backup or /Users/Lyle/Library/Containers/com.feralinteractive.xcomenemyunknown/Data/Library/Application Support/Feral Interactive/XCOM Enemy Unknown - Elite Edition/backup.Owerwrite old backup? (y/n) yRemoving old backup and all its content...Wrote backup to:User files: /Users/Lyle/Library/Containers/com.feralinteractive.xcomenemyunknown/Data/Library/Application Support/Feral Interactive/XCOM Enemy Unknown - Elite Edition/XEW/backupGame files: /Users/Lyle/Library/Containers/com.feralinteractive.xcomenemyunknown/Data/Library/Application Support/Feral Interactive/XCOM Enemy Unknown - Elite Edition/backupCopying install files...cp_ -r ./install-files/xcomgame /Users/Lyle/Library/Containers/com.feralinteractive.xcomenemyunknown/Data/Library/Application Support/Feral Interactive/XCOM Enemy Unknown - Elite Edition/Data/XEW/XComGame/cp: /Users/Lyle/Library/Containers/com.feralinteractive.xcomenemyunknown/Data/Library/Application Support/Feral Interactive/XCOM Enemy Unknown - Elite Edition/XCOM Enemy Unknown - Elite Edition.app/Contents/Resources/MacOverrides/XEW/xcomgame.int: No such file or directoryLyles-MacBook-Pro:LW-EW-Linux-OSX-v1_0 Lyle$ ----------- Now I'm not sure why it's not finding that folder, because looking by hand, the folder XEW does indeed exist, but the file "xcomgame.int" does not exist. Link to comment Share on other sites More sharing options...
tracktwo Posted December 31, 2015 Share Posted December 31, 2015 It looks like the first command is succeeding, but the second one is failing since you put the "echo" after the corresponding cp_ and it is printing the first one but not the second. When you say the XEW folder exists do you mean the one "<path to Xcom .app>/Contents/Resources/MacOverrides/XEW" or the one "<path to xcom folder>/Data/XEW"? Note there is a difference there between the two and not just on the end: the second is looking inside the .app and the first is not. IIRC (it's been a long time since I've used a mac) you need to take some special actions in the finder to be able to look "inside" an app to see its contents instead of executing it, and this is where the path in the error line is pointing. Link to comment Share on other sites More sharing options...
Hinmaton Posted January 1, 2016 Share Posted January 1, 2016 I got it running, thanks. Link to comment Share on other sites More sharing options...
Hinmaton Posted January 1, 2016 Share Posted January 1, 2016 (edited) To "look inside" the app, you have to right click on it, then choose "Show Package Contents" to see the tree inside the app. In the OS X guide, it said to put the app inside a particular folder in the Library, so the script would find it, and, I assume, look inside it. The problem I had was that following those directions, I dragged and dropped the app to that particular folder, but I didn't notice that it wasn't moving the app, it was creating an alias, and that didn't work. It worked as soon as I forced the Finder to move the app by copying and pasting it. Edited January 1, 2016 by Hinmaton Link to comment Share on other sites More sharing options...
Hinmaton Posted January 1, 2016 Share Posted January 1, 2016 It quit working. I don't know why, but now the opening scenario only has four soldiers in it. I'm about to give up on this game. Link to comment Share on other sites More sharing options...
dubiousintent Posted January 1, 2016 Share Posted January 1, 2016 It quit working. I don't know why, but now the opening scenario only has four soldiers in it. I'm about to give up on this game.I see tracktwo got you further along, which is great. The fact that the game reverted to having only four soldiers initially after you had gotten it working suggests that Steam did a "verify files" on you and reverted your LW files. This is why we say you have to run modded games with Steam in "Offline" mode. It is also why we "disable phone home" since that can also affect some mods. Both of those problems are covered in the "Basic Guide". Be sure to backup your modified LW install script so you don't lose those changes if you need to install an updated LW. Yeah, this game is often a major pain. As the saying goes: "That's XCOM, baby!" -Dubious- Link to comment Share on other sites More sharing options...
Recommended Posts