Check if steam is installed in wineprefix before installation
I was trying to install Mafia II where it's installation failed, but steam was installed. While i try to run the same installation again it prompts me to install Steam which is already present in wineprefix which is not expected.
Recommends adding a sanity check for steam verb to check if steam is installed in said wineprefix to avoid duplicated. Same logic should also be included in other verbs.
Is this possible? I.e. how should we determine whether or not Steam is installed. For example, checking if steam.exe is probably not sufficient.
Is this possible? I.e. how should we determine whether or not Steam is installed. For example, checking if steam.exe is probably not sufficient.
i would check for executable and last file that is beeing installed in steam installation based on modify date. Unless you want to make a tarbar extraction and then follow up with tar -d to verify that it has been extracted correctly.
Example of sanitized code: https://github.com/RXT067/KREYROCK/blob/f89326058f850ce858b5b5f967e0cbc9405cbb04/src/slash-bedrock/share/brl-fetch/distros/exherbo
This example it checking for file content:
# Configuration of $td/etc/paludis/repositories/installed.conf
if ! grep -qF "builddir = \${root}/var/tmp/paludis_${target_name}" "$td/etc/paludis/repositories/installed.conf" ; then
printf "builddir = \${root}/var/tmp/paludis_${target_name}\n" \
>> "$td/etc/paludis/repositories/installed.conf" || die "Unable to update $td/etc/paludis/repositories/installed.conf"
info "File $td/etc/paludis/repositories/installed.conf has been configured"
elif grep -qF "builddir = \${root}/var/tmp/paludis_${target_name}" "$td/etc/paludis/repositories/installed.conf" ; then
info "File $td/etc/paludis/repositories/installed.conf is already configured"
else
unexpected_die
fi
Notice that there are no unexpected reactions either the expected file fits the if statement or it fails where else should never happend in this scenario. -> Would be cool if phoenicis has simmilar code quality
~~excluding that this is script~~
I think this is dangerous. You cannot be 100% sure that this test is able to verify if there is a fully completed Steam installation. If the previous install crashed, the users might never be able to recover from that. Therefore I prefer the current behavior.
Current behavior just installs over and causes all kinds of unexpected results.. That is more dangerous..
And you can be 100% sure depending on the implementation.. Those are basics of code sanitization..
For example in this scenario: Steam will self-repair if some files are missing so we can just add definitions to check only mandatory files for steam runtime.
For example in this scenario: Steam will self-repair if some files are missing
That's exactly what I'm talking about. If we simply assume that Steam is installed already, this will not happen (possibly leaving a broken installation).
That's exactly what I'm talking about. If we simply assume that Steam is installed already,
Which is insane since you can never be sure if steam was installed correctly..
But that's my point: We cannot be sure if Steam was installed correctly. However, we can assume that the Steam installation itself knows if Steam was installed correctly.
@plata We can be sure since we can check for the executable and other pathname..
Steam installation is just going to overwrite the steam based on my experience which is insane..
we don't want any unexpected results here!!!
I had no problem installing a steam app today. However, It seems that the downloader "Downloading runtime json..." message is displayed everytime, the order messages only appear a few milliseconds. @plata any idea why ?
The message should be printed every time according to the code: https://github.com/PhoenicisOrg/scripts/blob/53a6846f18c9841225d063a1a5d15c7aa94abbdd/Engines/Wine/Engine/Implementation/script.js#L112 https://github.com/PhoenicisOrg/scripts/blob/53a6846f18c9841225d063a1a5d15c7aa94abbdd/Engines/Wine/Engine/Implementation/script.js#L127
I though it would be printed only when the file is actually being downloaded.
The json is downloaded every time. The runtime itself is downloaded only if the json is different.
Yes, but when the download is finished and a new message occurs, the json downloading message should disappear. But is seems it is displayed over and over while the installation process, like a default message.
Which message do you expect instead?
All the messages in SteamScript.go() for example.
@ImperatorS79 which are? assuming it beeing wine output i doubt that phoenicis windows is optimize to handle them..
Also stop fragmenting issues this issue is about sanitization of steam script.
This is not any wine output, I am talking about phoenicis message that guides you during the installation process. But you are right, I should open a new issue for that.