• 0
karger

Duplicate executables in linux zipfile?

Question

I've just downloaded the KSP zipfile for linux, unzipped it and launched KSP.  All working fine so far.  But I've noticed that the unzipped directory contains duplicate files: a KSP.exe and Launcher.x86 that are identical, and similarly a KSP_64.exe and Launcher.x86_64 .  Is there a reason for this duplication?  Did a symbolic link accidentally get transformed into a real file at some point?  Is it safe for me to delete one of the duplicates (which one?) and replace it with a symlink?

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Hi @karger, these are not duplicates at all.

KSP.x86 starts 32bit KSP on Linux.

KSP.x86_64 starts 64bit KSP on Linux

Launcher.x86 opens the 32bit KSP launcher.

Launcher.x86 opens the 64bit KSP launcher.

KSP.exe is the Windows binary, you can delete this.

You don't need to symlink any of these.

Share this post


Link to post
Share on other sites
  • 0

I should have been clearer.  I know XSP.x86 and KSP.x86_64 are different.  My question was why KSP.x86 and Launcher.x86 are identical (according to a diff command).

Share this post


Link to post
Share on other sites
  • 0
20 hours ago, karger said:

I should have been clearer.  I know XSP.x86 and KSP.x86_64 are different.  My question was why KSP.x86 and Launcher.x86 are identical (according to a diff command).

Apart from one opening the game and the other opening the launcher you mean?

This is how the Unity3D engine works, all Unity3D binaries for a platform and architecture are the same, for all Unity3D games, you can take the Linux x64 binary from an empty Unity3D project, another game or even just from the Unity3D editor, rename it KSP.x86_64 and plonk it into your KSP folder, it will work.

That binary is the core of the Unity standalone player for a given platform, everything that's the actual game, or in this case the game and the launcher, is in the other folders in your KSP directory.

But you cannot launch the launcher using KSP.x86, and you cannot launch the launcher using a renamed symlink to the KSP.x86, you can rename the Launcher.x86 to KSP.x86 and it will start the game, but that's not very useful.

So if you want to be able to launch both you'll need both binaries, even though only the name is different.

Share this post


Link to post
Share on other sites
  • 0

So it's basically working in a similar way to busybox, the program acts differently depending on its own filename?

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, cantab said:

So it's basically working in a similar way to busybox, the program acts differently depending on its own filename?

Yep pretty much, though in this case it loads different assets depending on its filename.

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, sal_vager said:

Yep pretty much, though in this case it loads different assets depending on its filename.

But can't you accomplish the same thing better under linux by using a symbolic link from one filename to the other instead of copying the entire program? 

Share this post


Link to post
Share on other sites
  • 0
29 minutes ago, karger said:

But can't you accomplish the same thing better under linux by using a symbolic link from one filename to the other instead of copying the entire program? 

Feel free to try it, it didn't work when I tried it earlier today.

It's not the entire program, it's the Unity3D engine binary, and this is how the Unity3D engine works, also just in case you didn't know, the Unity3D engine is made by Unity Technologies, not by Squad who only licence the engine to make KSP.

Squad didn't copy the binary, when you export a Unity3D project it creates a new binary for it.

It's only 20 something megs, that's not a lot.

Share this post


Link to post
Share on other sites
  • 0

Yeah, evidently the Unity player goes by the real filename not the symlink name.

You could make the KSP and the Launcher files hard links if you like, that seems to work. But hardlinks are kind of uncommon nowadays.

Probably the biggest reason KSP doesn't use them by default is that the ZIP format doesn't support them and quite probably Steam doesn't properly support developers using them either.

Share this post


Link to post
Share on other sites
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.