Jump to content

Long War for Mac OS/X - pointers / advice?


thither

Recommended Posts

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 by Hinmaton
Link to comment
Share on other sites

  • Replies 306
  • Created
  • Last Reply

Top Posters In This Topic

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 dir
cp_ -r "${MOD_DATA_DIR}/"* "${installdir}/${INSTALL_DATA_DIR}/"
INSTALLED_FILES="${LW_FILES}"
# copy xcomgame.int and xcomuishell.int to feraloverrides
for file in ${FERAL_OVERRIDES}; do
cp_ "${MOD_DATA_DIR}/$file" "${installdir}/${FERAL_OVERRIDE_DIR}/`basename $file`"
# XXX: seems like mac localization files are cached too
cp_ "${MOD_DATA_DIR}/$file" "${userfiles}/MacInit/`basename $file`"
# XXX: Terrible hack; since overrides are not under the install_data_dir, go two up
INSTALLED_FILES="${INSTALLED_FILES}
Edited by Hinmaton
Link to comment
Share on other sites

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 by tracktwo
Link to comment
Share on other sites

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/XEW
INSTALLDIR=~/Library/Containers/com.feralinteractive.xcomenemyunknown/Data/Library/Application\ Support/Feral\ Interactive/XCOM\ Enemy\ Unknown\ -\ Elite\ Edition
INSTALL_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=false
if [ $SELFNAME = "uninstall-LW-OSX.sh" ]; then
IS_UNINSTALL=true
fi
$IS_UNINSTALL && echo "Uninstalling Long War for XCOM:EW, please, be patient..." || echo "Installing Long War for XCOM:EW, please, be patient..."
dry_run=false
backup_data=true
function cp_() {
if $dry_run; then
echo cp $* >&2
else
cp "$@"
fi
}
function mkdir_() {
if $dry_run; then
echo mkdir $* >&2
else
mkdir "$@"
fi
}
function rm_() {
if $dry_run; then
echo rm $* >&2
else
rm "$@"
fi
}
function mv_() {
if $dry_run; then
echo mv $* >&2
else
mv "$@"
fi
}
function ln_() {
if $dry_run; then
echo ln $* >&2
else
ln "$@"
fi
}
function uninstall() {
echo "uninstalling Long War mod now"
# delete mod files
while read file; do
rm_ -f "${installdir}/${file}"
done < "${installdir}/.lw_install"
usersaves=$userfiles/SaveData
userconf=$userfiles/MacInit
rm_ -f $usersaves/*
rm_ -f $userconf/*
# restore original files
cp_ -r "${installdir}/backup/"* "${installdir}/"
cp_ -r "${userbackup}/"* "${userfiles}"
# delete restored backups
rm_ -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" ]; then
echo "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 yn
if [[ $yn == y || $yn == Y ]]
then
echo "Removing old Long War backup and all its content..."
rm_ -rf "${installdir}/backup_oldLW"
rm_ -rf "${userfiles}/backup_oldLW"
else
exit 1
fi
fi
# backup old LW files
mkdir_ "${installdir}/backup_oldLW"
while read file; do
mv_ "${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 files
cp_ -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 files
usersaves="$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 up
for file in ${LW_FILES}; do
case "$file" in
*upk)
if [ -e "${installdir}/${INSTALL_DATA_DIR}/file.uncompressed_size" ]; then
mkdir_ -p "${gamebackup}/`dirname $file`"
cp_ "${installdir}/${INSTALL_DATA_DIR}/$file.uncompressed_size" "$gamebackup/$file.uncompressed_size"
fi
;;
esac
done
# backup xcomgame.int and xcomuishell.int in feraloverrides
for file in ${FERAL_OVERRIDES}; do
if [ -e "${installdir}/${FERAL_OVERRIDE_DIR}/`basename $file`" ]; then
mkdir_ -p "${gamebackup}/${FERAL_OVERRIDE_DIR}"
cp_ "${installdir}/${FERAL_OVERRIDE_DIR}/`basename $file`" "${gamebackup}/${FERAL_OVERRIDE_DIR}/`basename $file`"
fi
done
# backup remaining files
for file in ${LW_FILES}; do
if [ -e "${installdir}/${INSTALL_DATA_DIR}/${file}" ]; then
mkdir_ -p "${gamebackup}/`dirname $file`"
cp_ "${installdir}/${INSTALL_DATA_DIR}/${file}" "${gamebackup}/$file"
fi
done
}
function install() {
# for each LW upk file check if corresponding .upk.uncompressed_size file exist and delete it
for file in ${LW_FILES}; do
case "$file" in
*upk)
if [ -e "${installdir}/${INSTALL_DATA_DIR}/$file.uncompressed_size" ]; then
rm_ -f "${installdir}/${INSTALL_DATA_DIR}/$file.uncompressed_size"
fi
;;
esac
done
# copy LW files to game dir
cp_ -r "${MOD_DATA_DIR}/"* "${installdir}/${INSTALL_DATA_DIR}/"
INSTALLED_FILES="${LW_FILES}"
# copy xcomgame.int and xcomuishell.int to feraloverrides
for file in ${FERAL_OVERRIDES}; do
cp_ "${MOD_DATA_DIR}/$file" "${installdir}/${FERAL_OVERRIDE_DIR}/`basename $file`"
# XXX: seems like mac localization files are cached too
cp_ "${MOD_DATA_DIR}/$file" "${userfiles}/MacInit/`basename $file`"
# XXX: Terrible hack; since overrides are not under the install_data_dir, go two up
INSTALLED_FILES="${INSTALLED_FILES}
../../${FERAL_OVERRIDE_DIR}/`basename $file`"
done
# copy LW defaultgamecore.ini to WritableFiles/XComGameCore.ini
cp_ "${MOD_CONFIG_DIR}/defaultgamecore.ini" "${userfiles}/MacInit/XComGameCore.ini"
# copy LW defaultloadouts.ini to WritableFiles/XComLoadouts.ini
cp_ "${MOD_CONFIG_DIR}/defaultloadouts.ini" "${userfiles}/MacInit/XComLoadouts.ini"
if ! ${dry_run}; then
echo "${INSTALLED_FILES}" > "${installdir}/.lw_install"
fi
if [ ! -e "${installdir}/${SELFNAME}" ]; then
cp_ "$0" "${installdir}/"
ln_ -s "${installdir}/${SELFNAME}" "${installdir}/uninstall-LW-OSX.sh"
fi
}
# checking command line parameters
if [ "$#" -lt 1 ]; then
userfiles="${USERFILES}"
else
userfiles="$1"
fi
if [ "$#" -lt 2 ]; then
if [ -d "${INSTALLDIR}" ]; then
installdir="${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
fi
fi
else
installdir="$2"
fi
# checking if directories exist
if [ -d "$userfiles" ]
then
echo "User files dir: $userfiles"
else
echo "$userfiles is not a directory!"
exit 1
fi
# backup location for existing files
userbackup="$userfiles/backup"
gamebackup="$installdir/backup"
if $IS_UNINSTALL; then
if [ -f "${installdir}/.lw_install" ]; then
echo -ne "\e[0;31mThis will delete all mod savegames and configs. Are you sure?\e[0m (y/n)"
read yn
if [[ $yn == y || $yn == Y ]]; then
uninstall
else
echo "you can find the savegames in ${userfiles}/savedata and settings in ${userfiles}/MacInit if you want to back them up."
fi
else
echo "Long War install not found!"
fi
exit 0
fi
keep_saves=false
if [ -f "${installdir}/.lw_install" ]; then
echo -ne "\e[0;31mOld version of Long War found. Keep savegames?\e[0m (y/n)"
read yn
if [[ $yn == y || $yn == Y ]]; then
echo "keeping savegames"
keep_saves=true
else
echo "not keeping savegames"
fi
uninstall_old
backup_data=false
fi
if ${backup_data}; then
# check if backup dir already exist
if [ -d "${userbackup}" -o -d "${gamebackup}" ]; then
echo "old backup already exists in ${userbackup} or ${gamebackup}."
echo -n "Owerwrite old backup? (y/n) "
read yn
if [[ $yn == y || $yn == Y ]]
then
echo "Removing old backup and all its content..."
rm_ -rf "$userbackup"
rm_ -rf "$gamebackup"
else
exit 1
fi
fi
backup
echo "Wrote backup to:"
echo "User files: $userbackup"
echo "Game files: $gamebackup"
fi
# clear user files
usersaves="$userfiles/savedata"
userconf="$userfiles/MacInit"
if ! ${keep_saves}; then
rm_ -f "$usersaves/"*
fi
rm_ -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

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 it
for file in ${LW_FILES}; do
case "$file" in
*upk)
if [ -e "${installdir}/${INSTALL_DATA_DIR}/$file.uncompressed_size" ]; then
rm_ -f "${installdir}/${INSTALL_DATA_DIR}/$file.uncompressed_size"
fi
;;
esac
done
# copy LW files to game dir
cp_ -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 feraloverrides
for file in ${FERAL_OVERRIDES}; do
cp_ "${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 too
cp_ "${MOD_DATA_DIR}/$file" "${userfiles}/MacInit/`basename $file`"
# XXX: Terrible hack; since overrides are not under the install_data_dir, go two up
INSTALLED_FILES="${INSTALLED_FILES}
../../${FERAL_OVERRIDE_DIR}/`basename $file`"
done
----------
This is the new output:

Last login: Wed Dec 30 23:42:43 on ttys000

Lyles-MacBook-Pro:LW-EW-Linux-OSX-v1_0 Lyle$ sudo ./install-lw-osx.sh

Password:

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/XEW

old 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) y

Removing 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/backup

Game files: /Users/Lyle/Library/Containers/com.feralinteractive.xcomenemyunknown/Data/Library/Application Support/Feral Interactive/XCOM Enemy Unknown - Elite Edition/backup

Copying 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 directory

Lyles-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

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

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 by Hinmaton
Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...