several Celestia version

Have a question about using Celestia? Check here first for FAQs and helpful advice.
Forum rules
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Avatar
Topic author
gironde M
Posts: 851
Joined: 16.12.2016
Age: 72
With us: 7 years 11 months
Location: Montigny-Les-Metz, France

several Celestia version

Post #1by gironde » 02.08.2020, 21:33

hello,

I have several versions of Celestia installed on my pc
Celestia 1.6.1 (32 bit)
Celestia EP3 (32 bit)
Celestia 1.6.2 (64 bit)
and soon Celestia 1.7 (64 bit)

I would like to have only one version of the addons, lua-applications, textures and models files.
Currently, I know how to move dat files (catalogs), extras files and lua-applications files. But are there any system variables for config.cfg that support moving models, textures and data (not extras)?
This will prevent muticopy of my files common to all versions.

:hi:

Janus
Posts: 537
Joined: 13.08.2016
With us: 8 years 3 months

Post #2by Janus » 03.08.2020, 03:07

I am on windows so what I do may directly apply.

I have two methods I use.
First:Give each version a distinct name in the same directory.
Celestia-161_x86.exe
Celestia-161_x64.exe
Celestia-????_x??.exe
Etc.
This runs all the versions with the exact same setup.


Second:Create a Celestia subdirectory.
Put the celestia exectuable in a subdirectory.
This allows each setup to be customized, such as txf vs ttf fonts, etc.
This one also involves some source code tweaks I use in some of my experimental forks, so it may not work for everybody.
I set IN_SUB in my solution which prepends "../../" to several path strings during compile.
I have not brought this one forward to current, so I may have forgotten a step.
I was working on adding a BASE_PATH = to the cfg file when the world decided to go nuts, been buried in work since.
/Celestia/161_x86/
/Celestia/161_x64/
Etc.

Then put a celestia.cfg in each of the sub/sub directories with the following tweaks.

Code: Select all

  StarDatabase                "../../data/stars.dat"
  StarNameDatabase            "../../data/starnames.dat"
  StarCatalogs               [ "../../data/revised.stc"
                               "../../data/extrasolar.stc"
                               "../../data/nearstars.stc"
                               "../../data/visualbins.stc"
                               "../../data/spectbins.stc"
                               "../../data/charm2.stc" ]

  HDCrossIndex                 "../../data/hdxindex.dat"
  SAOCrossIndex                "../../data/saoxindex.dat"
  GlieseCrossIndex             "../../data/gliesexindex.dat"

  SolarSystemCatalogs        [ "../../data/solarsys.ssc"
                               "../../data/asteroids.ssc"
                               "../../data/comets.ssc"
                               "../../data/outersys.ssc"
                               "../../data/minormoons.ssc"
                               "../../data/numberedmoons.ssc"
                               "../../data/extrasolar.ssc"
                               "../../data/eros_locs.ssc"
                               "../../data/gaspra_locs.ssc"
                               "../../data/ida_locs.ssc"
                               "../../data/merc_locs.ssc"
                               "../../data/venus_locs.ssc"
                               "../../data/earth_locs.ssc"
                               "../../data/mars_locs.ssc"
                               "../../data/moon_locs.ssc"
                               "../../data/marsmoons_locs.ssc"
                               "../../data/jupitermoons_locs.ssc"
                               "../../data/saturnmoons_locs.ssc"
                               "../../data/uranusmoons_locs.ssc"
                               "../../data/neptunemoons_locs.ssc"
                               "../../data/ring_locs.ssc"
                               "../../data/world-capitals.ssc" ]
                        
  DeepSkyCatalogs            [ "../../data/galaxies.dsc"
                              "../../data/globulars.dsc" ]     
                        
  AsterismsFile                "../../data/asterisms.dat"
  BoundariesFile               "../../data/boundaries.dat"

  FavoritesFile    "../../favorites.cel"
  DestinationFile  "../../guide.cel"
  Cursor           "../../crosshair"

  InitScript  "../../start.cel"
  DemoScript  "../../demo.cel"

  ExtrasDirectories  [ "../../extras-standard" "../../extras" ]



Janus.

Avatar
Topic author
gironde M
Posts: 851
Joined: 16.12.2016
Age: 72
With us: 7 years 11 months
Location: Montigny-Les-Metz, France

Post #3by gironde » 03.08.2020, 16:12

Thanks Janus for your response.

I am already using the first solution with Celestia EP3 and Celestia 1.6.1.
But for Celestia 1.6.2, it is 64 bits and Windows installs in the C: / Program files directory while the 32 bits are installed in C: \ Program Files (x86). Does 'C: \ Program Files (x86)' accept 64-bit programs?
In 1.6.2, which files are versions different from 1.6.1?
My lua dll is lua5.1.dll (version 5.1.5.0 of 19/8/2017), in 1.6.2 the dll is lua51.dll. They are not interchangeable, Windows gives error 0xc000007b even when changing the name of the file.

If we take the second solution, we must be able to tell Celestia in celestia.cfg to load the 'models' and 'textures' in another place except 'extras'.

:hi:

onetwothree
Site Admin
Posts: 706
Joined: 22.09.2018
With us: 6 years 2 months

Post #4by onetwothree » 03.08.2020, 17:03

You can always use symlinks. They're supported on NTFS.

Avatar
Topic author
gironde M
Posts: 851
Joined: 16.12.2016
Age: 72
With us: 7 years 11 months
Location: Montigny-Les-Metz, France

Post #5by gironde » 03.08.2020, 17:16

What is it, Onetwothree ?

onetwothree
Site Admin
Posts: 706
Joined: 22.09.2018
With us: 6 years 2 months

Post #6by onetwothree » 03.08.2020, 20:55

a file which references another file or directory, so when you open it you actually open its target. for example, you have celestia1.6.1\textures, you create a symlink celestia1.6.2\textures which references the former, so when you start celestia 1.6.2 it look for textures in celestia1.6.2\textures which are actually provided by 1.6.1.

https://en.wikipedia.org/wiki/Symbolic_link#Microsoft_Windows

Janus
Posts: 537
Joined: 13.08.2016
With us: 8 years 3 months

Post #7by Janus » 04.08.2020, 02:56

@gironde

I don't install anything to C: unless I have no choice at all.
Even then I do not use the program files gibberish if I can avoid it.
Programs are put into categories off the root: Games, Astronomy, Text, etc.
None of my work is kept on C, I only copy it over so everything is compiled and points there.

The name thing for x86 vs x64 is part of why all my work is statically linked.
Since I do not use support DLLs, their names can't conflict for me.
I also have a lot of tools that can only use specific versions of some DLLs, which is why avoid using them whenever I can.

The path fixes I was working on were differing approaches to the same underlying idea.
Each of these is intended to cover absolute & relative paths, of which I prefer relative.

1: Add recognition of CELESTIA_DATA environmental variable via C++ getenv() for where to look for celestia.cfg & the data directories.
2: Add a command line option of the same name.
3: Add CELESTIA_DATA = "" to celestia.cfg for the smallest change, just the data directories.

My preference is to end up with 1 & 3, allowing 3 to override 1, which would maximize versatility.
Though a case could be made for allowing 2 to override 1, 3 to override 2 & 1 both.

Like I said though, I have been buried in work the last few months.
So I am not going to be able to tinker with this right now.
I am sure a real C/C++ programmer could do this in a day or two, but as I say, I am not a real C/C++ programmer, I dislike both.
I do like astronomy though, and celestia makes a great reason to practice.


Janus.


Return to “Help Central”