Oolite Bulletins

For information and discussion about Oolite.
It is currently Sun Oct 22, 2017 3:44 pm

All times are UTC




Post new topic  Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Wed Oct 09, 2013 10:39 pm 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Tue Aug 29, 2006 5:02 pm
Posts: 2073
Location: Norway
I have been looking at a solution for some small annoyances I have been having with my Oolite installations under Windows.
-When testing different versions of Oolite I want to be able to use the same set of AddOns and save games without moving or copying the folders around.
-When I want to compile a different branch of Oolite and do a make clean prior to compiling, I want my save files and AddOns folder to be left intact.

Well, it turns out that you can use SymLinks under windows, and this seems to solve these problems. (You might know about this, but this is news to me)
It's a command line tool called MKLINK under Windows that is included with all versions of Windows starting with Vista, and it works with NTFS only.
If you don't want to use the command line there are some nice tools around that provides you with a simple GUI.

http://code.google.com/p/symlinker/ This one seems to be the most user friendly.
http://sourceforge.net/projects/symlink-creator/ More functionality, but also a bit more complex.

Use this to create SymLink folders that points to your save game folder and your AddOns folder and suddenly you can have several versions of Oolite sharing the same AddOns folder and you can keep you addons and save games in a different location, e.g safe when doing a make clean before compiling.

Disclaimer: I have tested this briefly and it seems to work fine, but no guarantees are given. Remember to keep a backup just in case something goes wrong.

_________________
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
Also, my tiny contribution to the Ooniverse


Top
   
PostPosted: Thu Oct 10, 2013 6:34 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon Apr 06, 2009 12:20 pm
Posts: 6203
Location: Aboard the Pitviper S.E. "Blackwidow"
So are these different than the standard 'shortcuts' that Windows has had for years? I always just right-clicked the item in question, selected "Create shortcut', then moved the shortcut to wherever I wanted it located and renamed it as required..

Will have to have a play with my Virtual installs of XP and Win7 when I get a chance..

_________________
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied


Top
   
PostPosted: Thu Oct 10, 2013 6:42 am 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Tue Aug 29, 2006 5:02 pm
Posts: 2073
Location: Norway
Quote:
So are these different than the standard 'shortcuts' that Windows has had for years? I always just right-clicked the item in question, selected "Create shortcut', then moved the shortcut to wherever I wanted it located and renamed it as required..

Will have to have a play with my Virtual installs of XP and Win7 when I get a chance..
Yes, they are different from a standard shortcut.
Essentially they behave as POSIX Symlinks, and were introduced on Windows to aid application compatibility with POSIX operating systems.

[Wikipedia] More details here.

_________________
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
Also, my tiny contribution to the Ooniverse


Top
   
PostPosted: Thu Oct 10, 2013 8:07 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon Apr 06, 2009 12:20 pm
Posts: 6203
Location: Aboard the Pitviper S.E. "Blackwidow"
Quote:
Yes, they are different from a standard shortcut.
Essentially they behave as POSIX Symlinks, and were introduced on Windows to aid application compatibility with POSIX operating systems.

[Wikipedia] More details here.
Cool.. good to know.. thanks!

Edit: others should note, Windows symlinks only work on Vista, Win7 and Win8.

_________________
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied


Top
   
PostPosted: Thu Oct 10, 2013 9:05 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Tue Sep 22, 2009 11:07 am
Posts: 2988
Location: Enfield, Middlesex
Interesting. I used to have SymLinks on my old Atari Falcon setup, very useful when I had to split a large hard drive into a lot of partitions (the only way to use a large HD on the Atari). I would use the SymLinks to knit it all back together lol.

SymLinks under Windows could be useful if you have a network server, and use a few computers attached to it over a wifi network. Imagine, you could host your AddOns on the server, and SymLink it to your Oolite installations on different computers.


Top
   
PostPosted: Thu Oct 10, 2013 9:38 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon Apr 06, 2009 12:20 pm
Posts: 6203
Location: Aboard the Pitviper S.E. "Blackwidow"
Quote:
SymLinks under Windows could be useful if you have a network server, and use a few computers attached to it over a wifi network. Imagine, you could host your AddOns on the server, and SymLink it to your Oolite installations on different computers.
You could do the same with your game saves.. have them accessible from any machine.

_________________
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied


Top
   
PostPosted: Thu Oct 10, 2013 12:05 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Tue Sep 22, 2009 11:07 am
Posts: 2988
Location: Enfield, Middlesex
I just thought that the SymLinks could well be of use with testing the 64-bit version of Oolite, so that I can use the same saved games instead of a copy. Now how do I create them again...? ...(looks at the first post)...

EDIT: tried this idea out, but Oolite couldn't find the Saved Games folder. I had to navigate normally using the Ctrl buttons to move between folders.


Top
   
PostPosted: Thu Oct 10, 2013 1:19 pm 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Tue Aug 29, 2006 5:02 pm
Posts: 2073
Location: Norway
Quote:
I just thought that the SymLinks could well be of use with testing the 64-bit version of Oolite, so that I can use the same saved games instead of a copy. Now how do I create them again...? ...(looks at the first post)...

EDIT: tried this idea out, but Oolite couldn't find the Saved Games folder. I had to navigate normally using the Ctrl buttons to move between folders.
I did this and it works fine.
I have moved my AddOns and oolite-saves folders to a separate directory and created symlink folders in the oolite installations.
You have to have administrator access to create the links, so you have to run cmd.exe, or if you are using the tools I linked to, as administrator.

_________________
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
Also, my tiny contribution to the Ooniverse


Top
   
PostPosted: Thu Oct 10, 2013 11:54 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun May 13, 2012 11:12 pm
Posts: 821
Location: Bradford, UK. (Anarchic)
Just tested this with Cygwin and it understands the symlinks created with MKLINK but Windows doesn't understand symlinks created with Cygwin.

One other thing. Do the snapshots get placed in the Windows symlink'd oolite-save directory or do they get placed in oolite.app\oolite-saves\snapshots directory of the different builds?

I know I can direct Oolite to look in one directory for all builds for the save files by using the save-directory entry in .GNUstepDefaults but the snapshots always get placed in the separate build directories.

_________________
Image
Facebook | Twitter
I3 channel logs | Dedicated servers


Top
   
PostPosted: Fri Oct 11, 2013 8:27 am 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Tue Aug 29, 2006 5:02 pm
Posts: 2073
Location: Norway
Quote:
Just tested this with Cygwin and it understands the symlinks created with MKLINK but Windows doesn't understand symlinks created with Cygwin.

One other thing. Do the snapshots get placed in the Windows symlink'd oolite-save directory or do they get placed in oolite.app\oolite-saves\snapshots directory of the different builds?

I know I can direct Oolite to look in one directory for all builds for the save files by using the save-directory entry in .GNUstepDefaults but the snapshots always get placed in the separate build directories.
All my snapshots are placed in the "Windows symlink'd oolite-save directory" the way I have it set up.

I have:
Image

[I know it's a mess, I'll clean it up when I re-install my PC some time in the future.]

_________________
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
Also, my tiny contribution to the Ooniverse


Top
   
PostPosted: Wed Feb 19, 2014 4:06 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon Apr 06, 2009 12:20 pm
Posts: 6203
Location: Aboard the Pitviper S.E. "Blackwidow"
Quote:
I have:
Image

[I know it's a mess, I'll clean it up when I re-install my PC some time in the future.]
Hey Gimi.. did you tidy this up, yet?

_________________
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied


Top
   
PostPosted: Wed Feb 19, 2014 7:22 am 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Tue Aug 29, 2006 5:02 pm
Posts: 2073
Location: Norway
Quote:
Quote:
[I know it's a mess, I'll clean it up when I re-install my PC some time in the future.]
Hey Gimi.. did you tidy this up, yet?
I did, but I haven't reimplemented the Symlinks. Their behaviour is not quite consistent so, while everything works fine from within Oolite, there is some strange behaviour that I don't like/understand from the Windows side. It's been a while since I played around with it though.

I think I'm going to ask cim to implement an additional and configurable location for OXP's and a clean command that leaves AddOns alone. The first one should be particularly convenient for OXP developers.

_________________
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
Also, my tiny contribution to the Ooniverse


Top
   
PostPosted: Thu May 22, 2014 10:18 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2408
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Quote:
I have heard of symlinks before but never used them. any chance of a quick how to?
Under Windows click on start menu/run then type cmd and enter to get a command prompt in a black window, where you can type something like this (please chage the directory names to point where your files are):
Code:
mklink /D /J c:\Users\Norby\Dropbox\oolite-saves c:\Oolite\oolite.app\oolite-saves
To get automatic backup you must install a software from your hosting service which run in the background and copy files at every changes from the directory mentioned first after mklink into your hosting space.

Under Linux:
Code:
ln -s /home/Norby/oolite-saves /home/Norby/Dropbox/oolite-saves 

_________________
OXPs by Norby


Top
   
PostPosted: Thu May 22, 2014 12:49 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Mar 26, 2014 10:11 am
Posts: 953
Location: Brisbane,Australia
Quote:
Quote:
I have heard of symlinks before but never used them. any chance of a quick how to?
Under Windows click on start menu/run then type cmd and enter to get a command prompt in a black window, where you can type something like this (please chage the directory names to point where your files are):
Code:
mklink /D /J c:\Users\Norby\Dropbox\oolite-saves c:\Oolite\oolite.app\oolite-saves
To get automatic backup you must install a software from your hosting service which run in the background and copy files at every changes from the directory mentioned first after mklink into your hosting space.

Under Linux:
Code:
ln -s /home/Norby/oolite-saves /home/Norby/Dropbox/oolite-saves 

thanks Norby, i did google it after i wrote that but still was not sure. what do you do with the original saver folder? does this automatically move the contents to the linked folder or do i have to do that manually? if so before or after i make the symlink?

_________________
Arthur: OK. Leave this to me. I'm British. I know how to queue.
OR i could go with
Arthur Dent: I always said there was something fundamentally wrong with the universe.
or simply
42


Top
   
PostPosted: Thu May 22, 2014 1:30 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2408
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
You do not need to touch the original folder. Symlinks are not real folders but pointers to another folder. If you make a pointer within your backup folder by the previous howto then the background software will follow the link and copy all files from the original directory into the host server.

_________________
OXPs by Norby


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 15 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited