News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

install pak sets

Started by sdog, March 11, 2013, 12:25:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sdog

Could someone please point me to a tutorial on how to install paksets on different OS?
I get it asked often recently on g+.

An_dz

Isn't the same on all OS? Place the pakset folder on main Simutrans folder? I guess it's like that in the wiki.

Ters

Many probably have no idea whatsoever what a main Simutrans folder is. Some OSes don't even have folders (Windows does; Linux doesn't, but some of it's desktop environments might; don't know about Mac). Or the users don't know where it is. The Windows installer probably defaults to installing in C:\Program Files\, which is absolutely correct, but Windows don't like users doing stuff in there manually. It's similar on Linux, though Linux users are on avarage more technically competent and probably know su/sudo.

It would therefore be best that pak sets have their own installers, and that the main installer programs leaves behind information that allows them to find the Simutrans installation. Doing this for add-ons might be prohibitive, though. Can they be put in the user directory?

sdog

i've completely lost track of where user directories are on windows machines nowadays. I guess one can't just put it into the directory where the binaries and configuration files are installed on win (i guess those are at the same logical location?).

not the slightest idea on mac.

In linux i know where it was supposed to go in debian packages, two years ago. (I sloppily keep simutrans in a dir just in my home.)

From the answers, i take there's no howto or help file on this topic yet? Could we assemble something here perhaps?

IgorEliezer

#4
A bit beyond the topic:

Would it be a good reason to change the way how paksets are available and installed? I mean, currently you need to download and extract the files -- until here it's okay -- then you obtain a simutrans folder and inside it a pakset folder, the next step is to merge the folders simutrans (with pakset inside) with other simutrans (with EXE and config files). As you can see here, this method is quite "windows" way of thinking.

Most of games that let you modify something, they have a specific directory where you can drop the files in or they have a manager that downloads and installs the files in a specific directory of the game as well. I think the most intuitive and feasible way for now would be to have a paksets directory inside simutrans root, you could download the zip, extract it (or not), and obtain the pakset folder, you can move it into paksets directory. If the player doesn't know where simutrans was installed, the game could have an "Open paksets folder" button on the "Choose the pakset" window, if simutrans is capable of recording the installation path.

EDIT: Copy-pasta-move failed.

VS

My 2c = mostly +1 on what Igor writes:

Quote from: IgorEliezer on March 11, 2013, 06:49:19 AM
As you can see here, this method is quite "windows" way of thinking.
That's actually true...

Quote from: IgorEliezer on March 11, 2013, 06:49:19 AM
or they have a manager that downloads and installs the files in a specific directory of the game as well
Not just games. All browsers install addons automagically into user-specific folders (aka directories). It's a sort of standard...

Vonjo

For unix-like OS, there is get_pak.sh script to download and install pakset.
For windows, there is online installer.

sdog

so pak sets go into the same 'simutrans' directory as simutrans binaries, the same way it used to be for most of the time?

how do windows user locate where a progam is located? (back when i used windows i just remembered, but this was before installers putting it in rather obscure directory trees) Is there something like unix 'where' command?

I thought optional, user added content in windows has to go into a directory in the 'profiles' branch of tree, mydir or so (bloody thing is named differently on all windowses i've been at). Is putting it directly into the 'simutrans' dir  always allowed (i'm thinking of administration privileges). What has to be considered with mutliple users (doe file attributes have to be set to allow other users on the machine to read the files?

Can the windows pakset-downloader be called without re-installing simutrans?


@Vonjo: this applies to downloading and installing pak-sets. For pak-sets not on the list or already downloaded oneself a manual way is still needed?

@VS:
isn't 'directory' more appropriate here than 'folder'. The latter is only a gui metaphor, and may be linke to anything. The former is the actual place simutrans is looking for. Users also typically would either use a comand line (linux, mac) or a directory accessing tool (windows explorer, norton commander etc) to copy the pak-set.


lets try to sort what we have now:

Linux
- install from zip file, to a single dir in /home: either put paksets into the directory where you put your simutrans binaries, or use get_pak.sh to download and install paksets automatically.

Windows
copy pakset into same dir where simutrans itself is located.

Ters

Quote from: sdog on March 11, 2013, 04:20:58 PM
how do windows user locate where a progam is located? (back when i used windows i just remembered, but this was before installers putting it in rather obscure directory trees) Is there something like unix 'where' command?

Right click on shortcut, select properties. Or just remeber from when you installed it. Unlike Linux, it's not customary for Windows programs (at least non-console programs) to add themselves to PATH, so a where command can't easily find them. Installers usually leave behind information for the uninstaller as to where the product was installed, but the format of this might depend on the installer.

Quote from: sdog on March 11, 2013, 04:20:58 PM
I thought optional, user added content in windows has to go into a directory in the 'profiles' branch of tree, mydir or so (bloody thing is named differently on all windowses i've been at). Is putting it directly into the 'simutrans' dir  always allowed (i'm thinking of administration privileges). What has to be considered with mutliple users (doe file attributes have to be set to allow other users on the machine to read the files?

The Windows rules as I understand them are: User specific data of a technical nature (settings.xml, simu.log) should go into subdirectory of ApplicationData (or LocalApplicationData for non-roaming), user documents (probably savegames and screenshots) should go into Personal/MyDocument. The exceutable(s) and all static data go into subdirectory of ProgramFiles. The data must be read-only since admin rights are required for ProgramFiles for security reasons (just like /bin & co on Linux), and possibly also because it is shared by all users, and multiple users might be logged on simultaneously. There is also CommonDocuments for data shared between users.

Main differences from *nix (beyond names) is that executables and static data is lumped together on Windows, while *nix seems to lump together user specific configurations and documents in something like ~/.simutrans. I don't know how roaming works on *nix, or if *nix just uses a common network mount.

Vonjo

Quote from: sdog on March 11, 2013, 04:20:58 PM
@Vonjo: this applies to downloading and installing pak-sets. For pak-sets not on the list or already downloaded oneself a manual way is still needed?
Yes. However the list already contains a lot of pakset.
Windows version can update the pakset automatically.

We need to put a (link to the) tutorial at http://www.simutrans.com/en/paksets

sdog

Tusen takk Ters! This is a detailed and informative reply!

Quote from: Ters on March 11, 2013, 06:05:21 PM
Right click on shortcut, select properties. Or just remeber from when you installed it. Unlike Linux, it's not customary for Windows programs (at least non-console programs) to add themselves to PATH, so a where command can't easily find them. Installers usually leave behind information for the uninstaller as to where the product was installed, but the format of this might depend on the installer.
Ok, that's the way i've used in the past (but i thought it to be against convention, as it's a little awkward). We clearly have to add a not on this into the tutorial i think (footnote or appendix, most users shouldn't have difficulties with it).

Quote
The Windows rules as I understand them are: User specific data of a technical nature (settings.xml, simu.log) should go into subdirectory of ApplicationData (or LocalApplicationData for non-roaming), user documents (probably savegames and screenshots) should go into Personal/MyDocument. The exceutable(s) and all static data go into subdirectory of ProgramFiles. The data must be read-only since admin rights are required for ProgramFiles for security reasons (just like /bin & co on Linux), and possibly also because it is shared by all users, and multiple users might be logged on simultaneously. There is also CommonDocuments for data shared between users.
The question is, does simtrans follow those conventions when installed with the installer. Is it even able to do so, or are paks expected in the same location as the binary (where statical data is located)



Quote
Main differences from *nix (beyond names) is that executables and static data is lumped together on Windows, while *nix seems to lump together user specific configurations and documents in something like ~/.simutrans. I don't know how roaming works on *nix, or if *nix just uses a common network mount.
i had to look up roaming in wikipedia, typically one would just mount the users /home. At least that's the only thing i've seen so far.

... and sorry for the stupid questions, i haven't really used win since XP days, and was used to the work-around approach from previous versions and never learned the conventions and metaphors of windows.


Linux:
I think it is enough to cover Ubuntu and (if there are official installers) Fedora and (perhaps) Cinnamon. People who run mint, arch, etc tend to know how to do things. A line ... pak dir goes into X ... is enough.



ps:
i've just installed simutrans in ubuntu through apt-get:
pak sets are in: /usr/share/games/simutrans/

would it also look for paks in '.simutrans' without the -use_workdir parameter?

VS

Quoteare paks expected in the same location as the binary
I'd expect that to be a norm...

Quotewould it also look for paks in '.simutrans' without the -use_workdir parameter?
Assuming your question concerns mostly -use_workdir, the answer is NO. A pakset XYZ is considered loadable only if file workdir/XYZ/ground.Outside.pak exists. No other locations are checked for paksets. If I'm wrong, I'll eat my hat... ;)

Ters

Quote from: sdog on March 11, 2013, 07:20:03 PM
Ok, that's the way i've used in the past (but i thought it to be against convention, as it's a little awkward). We clearly have to add a not on this into the tutorial i think (footnote or appendix, most users shouldn't have difficulties with it).

I forgot to mention that newer Windowses (Vista and later I think) has a menu option to open target folder when holding down shift while opening the right click menu. (Along with other computer geek options, like copy path and open console here, previously available as power tools.) But as for convention, I think most Windows users probably don't need, or are supposed to need, to know where things are installed, as long as there is an easily visible icon to click on. (With all the Android phones around, the same thing can be said about Linux users these days.)

sdog

#13
    that shift-right click makes things a lot easier! I guess we don't need to write anything for older versions, there's hardly any XP or older around after five or ten years or so. For those who still use it and don't know their way we can just help them on request.

Draft
The files of a pak-set are kept together in a directory, with one of those files (ground.outside.pak) identifying it as a pak-set. This directory has to be placed in the very same directory the binary is located and ran. Throughout this help text this directory is called workdir. The logical location of the workdir of the simutrans instalation depends on your operating system (OS). Please read below, in the step-by-step instructions specific for your OS, on how to locate it. In general pak-set directories are compressed, into a single file. Typically the zip- and 7z- algorithms are used.

To install a pakset unpack the directory, keeping the directories sub-structure and copy it into the workdir. The next start of simutrans will open a dialogue where you can select the new pak-dir by it's directory name. You can change this directory name at will, to install different versions of a pak-set (for example: pak128 and pak128-nightly), these versions can be chosen in the selection dialogue.

Step-by-Step guide for Windows 7 and Vista

  • open the packed file, you should see one directory in it, eg: pak128
  • right-click on the simutrans launcher to open a context menu
  • select "open target folder"
  • icon to open a folder of the workdir
  • move the pak-directory from the unpacker window to the window showing the workdir
  • start simutrans to test

Step-by-Step guide for Windows XP and earlier

  • follow step 1 of above list
    • right-click on launcher icon to open a context menu
    • click on properties
    • look for the path the launcher is pointing to, copy it to clipboard, but ommit the file name itself (stop after the final '\' in the string)
    • open explorer, and paste the path into the address bar
  • follow steps 3 and onwards of the list for Windows 7
[/list]

An_dz

#14
Quote from: sdog on March 11, 2013, 11:16:13 PM
I guess we don't need to write anything for older versions, there's hardly any XP or older around after five or ten years or so. For those who still use it and don't know their way we can just help them on request.
Don't be so sure, this graph shows the number of XP users is very high.

@sdog & @Ters
There's no need for shift+right-click. Open target folder is available without it. And if you hover a shortcut it shows the target directory.

Ters

Quote from: An_dz on March 12, 2013, 01:15:52 AM
@sdog & @Ters
There's no need for shift+right-click. Open target folder is available without it. And if you hover a shortcut it shows the target directory.

Not on the front page of the start menu, nor for pinned programs either. Shift+Right click works in all circumstances.

Quote from: sdog on March 11, 2013, 11:16:13 PM
Step-by-Step guide for Windows 7 and Vista

       
  • open the packed file, you should see one directory in it, eg: pak128
  • right-click on the simutrans launcher to open a context menu
  • select "open target folder"
  • icon to open a folder of the workdir
  • move the pak-directory from the unpacker window to the window showing the workdir
  • start simutrans to test
Step-by-Step guide for Windows XP and earlier

       
  • follow step 1 of above list

    •       
    • right-click on launcher icon to open a context menu
    • click on properties
    • look for the path the launcher is pointing to, copy it to clipboard, but ommit the file name itself (stop after the final '\' in the string)
    • open explorer, and paste the path into the address bar
  • follow steps 3 and onwards of the list for Windows 7

Unfortunately, this is way too complicated for a lot of people. Perhaps most. Although the notion of right clicking and modifier keys is something Simutrans players simply must learn in order to play.

prissi

Why on earth does it that complex?

If simutrans is installed by the installer (which gets the most downloads on SF, so I think on can assume this) the installer remembers the path and will offer it for a new new installation. Then there is also the the pakset-updater, which knows all playable paks.

Just think: Simutrans has about 10000 user, judging by the monthly downloads of SF. Less than 1% are probably registered here. Thus the safest way to distribute a new pakset is via the installer. Simutrans could also check, whether a newer version is there and then download and execute the installer.

I would not rely on user to install paks. Who does this is already a pro.

Putting stuff into "ApplicationData" is not a good idea, as it spreads files unneccessariely through the system and leading to bloated folders. (Apart from the fact that this folder is not present on all windows versions, like Win2K and embedded Windows CE/Phone)

Ters

Quote from: prissi on March 12, 2013, 02:01:29 PM
Putting stuff into "ApplicationData" is not a good idea, as it spreads files unneccessariely through the system and leading to bloated folders.

I wasn't suggesting doing so. It's not worth it for just two files. (Though ~/.simutrans is essentially the equivalent to ApplicationData on *nix, but everything is there, so no split.)

Quote from: prissi on March 12, 2013, 02:01:29 PM
I would not rely on user to install paks. Who does this is already a pro.

Assuming you mean "manually, without installer", I agree. But there is a potential challenge for all the add-ons scattered on this and other forums. How many normal users find those and want to try them out?

There does not seem to be an installer for Mac on the download page. I've heard that Mac has something called bundles, but beyond that, it's unknown territory.

For Linux, it seems that each distro makes their own package available through their own package manager. That package may or may not have altered the directory structure.

An up-to-date description of where Simutrans looks for the various stuff would still be nice, for those of use that install Simutrans manually, as well as a starting point for the Linux users and those that make packages for various distros.

sdog

well, there are help questions on how to install a pak-set. The installer doesn't include new or obscure releases. An example is the new version of CS pak, i got two requests on g+ related to this. Previously it was about nightlies and development builds of pak128 (the latter shouldn't even get included). We can't just tell someone: "Sod off, you're to stupid for this." But we can offer them to read a tutorial.

The other question is, does the pak-set-updater only get called when installing a new simutrans version? Or can it be started independently? If the latter is the case, how can it be started?

A suggestion for a compromise: We could write a help text but add as first line the installer is prefered, and where it is?

Second suggestion: Instead of writing a text detailing every little step, just tell people what to do. Not how, someone who can't unpack doesn't learn it from us. Not step by step, but: "npack to the workdir dir. You can find workdir by shift-click on launcher."

For linux we really only have to look at the largest distributions. All the others have (a) not very many users, (b) typically those people know what to do. For the major distributions with automatic installers we ought to provide information where what is found. (we don't have to tell someone how to unzip a file, that's integrated into guis by default)

Ters

There should be a text describing the file system layout of standard Simutrans, but it shouldn't be "for dummies". Those typically need a person to hold their hand every step of the way anyway. A "for dummies" text would also struggle to cover all the different directory layouts of Windows (both XP vs. Vista/7 and 32-bit vs. 64-bit), different GUIs and different languages.

Vonjo

#20
A picture is worth a thousand words.
Ten pictures are worth ten thousand words.
A video is worth 20-30 thousand words per seconds.
;)
Put some screenshots in pak installation instruction.

sdog

Well a screenshot for win might be good. Anyone up to that?
(I do doubt the claim on videos though.)

For Linux it'd be enough to describe where it has to go. Screens off the terminal would be silly, everything is chars anyway.

Imo further discussing details or fundamental concepts of users won't get us any further at this point.

Questions still open:
- are there other Linux distros to include?
- how is it done on Mac?

IgorEliezer

... in a perfect world we would not need any tutorial to do something expected to be trivial...at all.

* IgorEliezer runs for the mountains

Ters

You'd still need pictures from different OS versions/variants and languages, though languages is less important if menu position is constant.

It's also still advanced stuff, and would still like the text. This should be possible without having to go browse through the directories, and without having to disable the security protecting Program Files.

sdog

Quote from: Ters on March 13, 2013, 04:46:58 PM
It's also still advanced stuff, and would still like the text. This should be possible without having to go browse through the directories, and without having to disable the security protecting Program Files.
That's mentioned the first time now...
To which win OS does it apply? Certainly we don't want to give a step by step guide for that! We ought to mention it however.

Ters

All Windowses since at least XP protect the Program Files and Windows directories. You have to dismiss a warning (which is for good I think) and promise that you know what you're doing before being allowed to browse the contents. In addition, from Vista onward, there's the UAC protection which prevent you from doing anything in there before elevating. Some operations will automatically ask for elevation, others are simply not available until elevation has occured.

sdog

Elevation means with admin rights?

Where is it installed when a user does not have admin rights. Ie  a single user installation?

An_dz

Quote from: sdog on March 13, 2013, 09:59:41 PM
Elevation means with admin rights?
Yes.
Quote from: sdog on March 13, 2013, 09:59:41 PM
Where is it installed when a user does not have admin rights. Ie  a single user installation?
There's no way to not run the installer without admin rights. And when you choose a different folder other than Program Files it asks if it's a portable installation.

On Windows 7 and 8 UAC confirmation in standard settings is only triggered when softwares needs access to protected folder.
I'm quite sure just early versions of Vista need UAC confirmation even for user changes in protected folders, an early update changed it.

ӔO

Yeah, the pak installer is pretty straight forward.

You just have to find it in the installation folder.

It might be a good idea to have a shortcut for that as well.
It would be even better if you could launch it at the pakset choose screen, but I'm not sure how that would be handled in OSX or linux.

VS

Starting with Vista I think, when the machine has an admin user and you are normal user, you have only restricted access to data and config. Just like linux. When an action comes up that needs "elevated rights", you can enter credentials for admin user and complete that action. If you don't know them... kthxbai. Very useful in schools!

Do keep in mind that this is a situation where the computer is intentionally set up so as to give you less access rights. Usual "dumb home user" configuration is as admin, so they get only prompt saying "do you want to allow this action? y/n".

sdog

elevation is an obstacle the users already have taken when they installed simutrans in the first place. it also doesn't require any specific action (like opening explorer as admin) they just get a prompt when doing something that's protected?

we just write something along the lines: "there might be a dialogue comming up asking you for permission to do so. if you're lost here rtfm"

An_dz


Ters

Quote from: sdog on March 14, 2013, 01:45:35 PM
elevation is an obstacle the users already have taken when they installed simutrans in the first place. it also doesn't require any specific action (like opening explorer as admin) they just get a prompt when doing something that's protected?

we just write something along the lines: "there might be a dialogue comming up asking you for permission to do so. if you're lost here rtfm"

As I wrote, some actions trigger a dialog for elevation, other actions are only available when the elevation has already taken place. Attempting to create or edit a file does not automatically trigger elevation, you must then start the file editor with run as admin and then open the file using the Open dialog. Copying and deleting files on the other hand do trigger the automatic elevation prompt.

So overcoming elevation when using an installer is a much lower obstacle than when fooling around in Explorer.

Quote from: ӔO on March 14, 2013, 08:35:43 AM
Yeah, the pak installer is pretty straight forward.

You just have to find it in the installation folder.

It might be a good idea to have a shortcut for that as well.

Without a shortcut, it might as well not exist.

sdog

back in my windows days i usually started everything with "run" shortcuts were much to tedious.

somehow everything got more short-bussed, more complicated and less consistent then back then...

prissi

Elevation also does not work on restricted users (like children on a timed account). They could however still install into a non-protected directory.