Celestia 1.7.0 Development Thread

The place to discuss creating, porting and modifying Celestia's source code.
Janus
Posts: 537
Joined: 13.08.2016
With us: 8 years 1 month

Post #121by Janus » 20.01.2019, 18:20

@cartrite

If you would like, I can put a copy of my working commit 5370 VS2015 source tree up for you to look at.
My VS2015 support libraries are already up, so you can compile them yourself if you like.
As always with my stuff, everything is setup for full static linking, no support libraries needed*.
* - Except for the QT version of course, but I do not care about it.

It will be the last actual match I will have since the changes they are making are not compatible with how my systems are setup.
However, the sln/vcxproj with precompiled support libraries should work for a while by just updating, or adding new files.

My attention is now going to be elsewhere.


Janus.

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #122by cartrite » 20.01.2019, 19:56

Thank You, but I finally figured it out. It all came down to editing 2 CMakeLists.txt files. 1 to turn off qt5. 2 to add celestia.rc and resource.h to the list in win32 folder. I also had to remove the entry for celestia.manifest from the rc file. I actually tried this at first but I kept getting the link error. I didn't completely understand why so I tried a different approach that didn't work.
This is a simpler way to build. The vcpkg makes it a lot easier. It downloads and builds all the windows libs. Then cmake creates all the sin/vcproj files. So Visual Studio can be used after the project files are generated. Try it, it looks like a major overhaul but .........

I created 2 .bat scripts. One just creates the project files and the other builds it too. The project files generated did not need any more configuring. Just clicked on the .sin file, VS started, waited till it processed the project, then clicked on build solution. With the other script, I just start the msbuild command terminal and type in "build". Then just wait. :smoke: When everything works that is.

After I got the menus working last night with Visual Studio, I saw how difficult it was to try and edit viewoptions with the gui. That quite an accomplishment you did. I think I would have better luck with a text editor. I did try a source from your site, it must have been an older one because the menus were still messed up. Yours built fine. But I tried building the master with the old windows folder and yours. Also tried building the libs myself. I was able to build all the celestia files but would get numerous link errors. Unresolved symbols. Anyhow, have a good one.
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Janus
Posts: 537
Joined: 13.08.2016
With us: 8 years 1 month

Post #123by Janus » 20.01.2019, 21:08

@cartrite

If the linker errors you got were 4099, then most likely it was complaining about the lack of pdb file for the support libs.
I've tried copying them, but it doesn't work often, not sure what is going on, still researching.
The view options page was a lot of work, yes, most definitely it was.
A large part of that is because the display system uses layered absolutes, a mix of XY & YX layout logic, and makes CSS look simple.
This in addition to the box for the text not being set by the text, but by the box command.
I ran into the same issue generating PDF files for reports. I had to hack fpdf quite a bit to get proper layout & setup support.

I am currently finishing getting 5386 working using my libs.
I will be cleaning up the downloads directory, then posting working projects for the libraries and 5386.
Enabling anyone who is interested to have a snapshot to work with instead of a live image/source tree.
I will update them as I have time, but my attention will no longer be concentrated here.

I do not actually understand how to use vcpkg, nor do I believe I could anyway.
I cannot use cmake due to what I do, its requirements contradict my setup.
My situation is unusual, and believe others will have far less hassle with it than mine puts me in.

They are setting up a development environment designed to keep everything live and up to date.
I require everything on my systems to be siloed and isolated, Mixing IP is not allowed.
Supporting existing/legacy hardware, existing systems(software/hardware), ROM(non flash), and other infrastructure headaches puts my needs outside of what most peoples.

I have also found that cmake makes project files that refer back to cmake during compile, ick.


Janus.

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #124by cartrite » 20.01.2019, 23:52

@Janus
I just started using vcpkg. It seems to be a Microsoft product. It installs in a folder that can be easily deleted. It basically downloads and builds libraries from github. It works with Visual Studio as well as cmake. Seems to have some bugs though. My link errors were LNK2001 errors. Probably what happened was some files were included that did not exist anymore or some were forgotten that really did exist. The curveplot folder from thirdparty as an example. You can remove that and move the source files to celengine. I've been around a while and seen build systems change before in the past. It is possible to keep the one you like. Little extra work though.

Anyhow, I just noticed another update to the master at github. This works with some consequences. The resource file is not visible until the project is compiled, then after compilation, all the names for boxes, dialogs, menus, etc have numbers instead of the names. Confusing if someone used Visual Studio to work on them. But it all worked. The running app displays the menus and even the viewoption dialog was fixed. The method I used was to simply add celestia.rc to the WIN32_Sources and resource.h to WIN32_Headers. That way all the names were preserved and it was also viewable (and workable) before the project was compiled. The sin/vcproject files generated by cmake also has 17 projects. One for each directory and for the star tools as well. Something new to look at.

@onetwothree
I'm working with windows on a vm only. Primarily I use linux with qt5 installed there. Do you have a complete installation of qt5 for this vcpkg to work or did you install it through vcpkg? I noticed that qt5 was in the list of available packages thru vcpkg. Maybe a bit smaller? I was also wondering why there was an edit to the CMakeList in the qt folder. Does the win32 qt version use win32 resources?

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Janus
Posts: 537
Joined: 13.08.2016
With us: 8 years 1 month

Post #125by Janus » 21.01.2019, 00:33

@cartrite

I just got done with 5386, now there is 5388.
It appears to be an update to resource.rc under win32, so I am recompiling with it to get a look.
Found a couple of glitches that caused it not to compile, a typo and a header oddity, didn't take long.

As for vcpkg, I cannot even have something like that on my system.
The idea of the compiler grabbing sources from github horrifies me, but I do not do general programming work, so my view is skewed.
More than ninety nine percent of my work is done matching what the customer is already using, and I absolutely cannot allow any cross contamination.
I don't use cmake if I can help it since the sln/prj it generates calls cmake during compile.
When I have to use it, I generate the set, then edit the calls back to cmake out by hand.

On a happier note, here is Celestia-5388, in x86 & x64 both.
Standalone, VS2015 compiled with my libraries, fully static linked.
I will be putting a source snapshot up of both celestia & the libraries with in a few hours.

@onetwothree

In /src/celutil/bytes.h#20

#ifdef WIN32 should be #ifdef _WIN32

In /src/celestia/win32/winsplash.cpp#42

The definitions of LWA_colorkey through ULW_opaque are missing, added at #38

#define LWA_COLORKEY 1
#define LWA_ALPHA 2
#define ULW_COLORKEY 1
#define ULW_ALPHA 2
#define ULW_OPAQUE 4

Edit: Okay, I have put archives of the source trees I used in My Downloads.
These are for those who prefer working with snapshots rather than live code.

Look in commit_5388 for latest source. {190120}
Look in Vs2015_Libs for support libraries.


Janus.
Last edited by Janus on 21.01.2019, 03:02, edited 1 time in total.

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #126by cartrite » 21.01.2019, 01:12

@Janus
You could always try what I do. I got a beat up laptop that doesn't even got a hard drive anymore. I use usb drives. I got 2. They fit in my pants. About the size of my phone. They can isolate your work. Simply unplug it. So anything that happens on it will not get to your main system. Just set it up so its blind to the host computer.
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Topic author
onetwothree
Site Admin
Posts: 705
Joined: 22.09.2018
With us: 5 years 11 months

Post #127by onetwothree » 21.01.2019, 09:33

cartrite wrote:I'm working with windows on a vm only. Primarily I use linux with qt5 installed there. Do you have a complete installation of qt5 for this vcpkg to work or did you install it through vcpkg? I noticed that qt5 was in the list of available packages thru vcpkg. Maybe a bit smaller? I was also wondering why there was an edit to the CMakeList in the qt folder. Does the win32 qt version use win32 resources?

I use qt installed by its official installer because: 1) i don't want to wait while it's compiled; 2) appveyor does the same and i don't want to support 2 configurations of a system i don't use; 3) i hope once we'll be able to use mingw (unfortunately its iostreams are too slow in windows).

On windows exe files can contain metadata (Alt+Enter too see them), that metadata is defined in rc files.

Janus wrote:In /src/celutil/bytes.h#20
#ifdef WIN32 should be #ifdef _WIN32

I don't have any errors here. WIN32 is defined both in VS and mingw. But I'll change it for consistency with other ifdefs.

Janus wrote:In /src/celestia/win32/winsplash.cpp#42

The definitions of LWA_colorkey through ULW_opaque are missing, added at #38

#define LWA_COLORKEY 1
#define LWA_ALPHA 2
#define ULW_COLORKEY 1
#define ULW_ALPHA 2
#define ULW_OPAQUE 4

The proper solution is to include winuser.h. I wonder why on your system it's not included automatically.


@Janus Virtual Machines solve all issues you have with keeping your projects clean from interference.

Janus
Posts: 537
Joined: 13.08.2016
With us: 8 years 1 month

Post #128by Janus » 21.01.2019, 17:28

@onetwothree

I am running a vanilla VS2015, with as classic and 3D a look as I can get, no compiler is in my path, as few of environmental variables set as I can get away with.
Biggest thing I hate about C/C++ is all the compilers want to be in your system path, which pollutes it for use with any other compiler.
I never had any problem with that until I got into C/C++, the rest of them behave much better.

I do not know on WIN32 being defined or not, I am simply matching patterns, and '_' underscores are a consistent issue with C/C++.

Line 16 of winsplash.cpp is #include <winuser.h> so it is there.

I agree that VMs solve many problems, but not all.
Especially with licensing, or worse, IO with debugging hardware, no VM is truly transparent when it comes to USB.
I am trying to fix some issues with the former, but finding them unencumbered is hard, though next year it will get far easier.
I also distrust any system/setup that is designed/meant to reach out to the internet at compile time.
This is a personal preference from my own experience.

As I have time I will try to keep my libraries updated to match once I have a list of project names.
I prefer to work with snapshots, and I wish you the best, but my focus remains that direction, not on live images.


Janus.

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #129by cartrite » 22.01.2019, 12:08

I noticed that cmake still fails to find cspice. I started with installing cspice on the C: drive. Also tried the Program File folders. Then I included paths on cmake cms line. Then it used cspice but got link errors. Multiple unresolved external symbols. On my Linux system, I had cspice in /usr/local/cspice and cmake did not find it there. Qmake always found it there. I also put the paths on the cmake cmd line, then it worked. Conclusion, cmake couldn't find a barn if it was stamding next to it. :wink:

Added after 8 minutes 56 seconds:
I also added .lib to the name list in the find_cspice.cmake and that did not work. Cspice win32 version uses cspice.lib and csupport.lib. Didn't work anyway.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Topic author
onetwothree
Site Admin
Posts: 705
Joined: 22.09.2018
With us: 5 years 11 months

Post #130by onetwothree » 22.01.2019, 12:33

Have you tried to set CMAKE_PREFIX_PATH? I was testing with cspice unpacked to /opt/cspice64/ so with -DCMAKE_PREFIX_PATH=/opt/cspice64/cspice it was working fine.

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #131by cartrite » 22.01.2019, 14:14

That works on my Linux system. It is found with win32, but lnk2001 errors.

Added after 1 minute 20 seconds:
Both celestia-qt and celestia-win. 22 errors in all.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Topic author
onetwothree
Site Admin
Posts: 705
Joined: 22.09.2018
With us: 5 years 11 months

Post #132by onetwothree » 23.01.2019, 20:27

Hi celestians!

A new dev snapshot is available here.

Basically it's the previous version, but:
1) native windows version has fixed "Options" dialogue (thanks, Janus!)
2) it provides some tools to woks with stardb
3) it can load binary xyzv files, new tool xyxz2bin is provided

To use binary xyzv files do the following:

Code: Select all

xyzv2bin /path/to/file.xyzv /path/to/file.xyzvbin


Important: binary file must have filename extension xyzvbin and must be located in the same folder as original text file xyzv to be loaded by Celestia.

The package is split into 3 files:
1) celestia-bin - qt5 & native frontend with required dll's
2) celestia-data - data files
3) celestia-tools - tools to work with celestia's data files

-bin and -tools are provided for win32 & win64

Avatar
Lafuente_Astronomy
Moderator
Posts: 726
Joined: 04.08.2018
Age: 26
With us: 6 years 1 month
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #133by Lafuente_Astronomy » 24.01.2019, 13:41

onetwothree wrote:Hi celestians!

A new dev snapshot is available here.

Basically it's the previous version, but:
1) native windows version has fixed "Options" dialogue (thanks, Janus!)
2) it provides some tools to woks with stardb
3) it can load binary xyzv files, new tool xyxz2bin is provided

To use binary xyzv files do the following:
CODE: SELECT ALL

xyzv2bin /path/to/file.xyzv /path/to/file.xyzvbin


Important: binary file must have filename extension xyzvbin and must be located in the same folder as original text file xyzv to be loaded by Celestia.

The package is split into 3 files:
1) celestia-bin - qt5 & native frontend with required dll's
2) celestia-data - data files
3) celestia-tools - tools to work with celestia's data files

-bin and -tools are provided for win32 & win64

I tried to open the whole thing after downloading it (I used all win64 versions of the -bin and -tools files), there was an error that read "Configuration not found", and it didn't load at all. Did I do something wrong or maybe my PC is not updated?
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #134by cartrite » 24.01.2019, 14:08

@onetwothree, I haven't checked your versions yet. Going to in a couple of minutes. But I did get Cspice working for both qt5 and win32. x64 and 32 bit. Had to rebuild cspice. All versions showed this when I viewed star style = points.

point-stars.jpg


I'm gonna download your versions now and see if yours show this.

cartrite

Added after 21 minutes 14 seconds:
OK. I downloaded the win32 versions and they show the same thing. Just set star style to points.

@Lafuente_Astronomy, You need to copy the contents of the bin folder to Celestia's main folder. So download the master from git-hub and then copy these into it. If you already have a copy of Celestia, then make another copy and copy the new files there. This would be for the bin files. I'm not sure about the others. Sorry if I got your user name wrong.

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Topic author
onetwothree
Site Admin
Posts: 705
Joined: 22.09.2018
With us: 5 years 11 months

Post #135by onetwothree » 24.01.2019, 15:13

Lafuente_Astronomy wrote:I tried to open the whole thing after downloading it (I used all win64 versions of the -bin and -tools files), there was an error that read "Configuration not found", and it didn't load at all. Did I do something wrong or maybe my PC is not updated?

Haha, shame on me! I have forgotten to put celestia.cfg into celestia-data. Please take it from a previous snapshot or your current installation.

Added after 2 minutes 42 seconds:
cartrite wrote:OK. I downloaded the win32 versions and they show the same thing. Just set star style to points.

I really hate windows and nvidia. What video card and driver version do you have?

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #136by cartrite » 24.01.2019, 15:17

I can confirm that this is a win32 problem. Same commit built with linux looks fine for star style = points.
cartrite

Added after 11 minutes 14 seconds:
This is on VMWare, I'll have to fire it up to get the details. But it is using ogl version 3.0.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Topic author
onetwothree
Site Admin
Posts: 705
Joined: 22.09.2018
With us: 5 years 11 months

Post #137by onetwothree » 24.01.2019, 15:47

cartrite wrote:This is on VMWare, I'll have to fire it up to get the details. But it is using ogl version 3.0.

Could you drop opengl32sw.dll from Qt5 into celestia folder renaming it into opengl32.dll and see what happens?

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #138by cartrite » 24.01.2019, 16:15

My host system, Tumbleweed, uses Mesa 18.3.1 . Intel Ivybridge mobile. Uses the kernel i915 driver. VMWARE open GL info reports Mesa 18.0.0 SVGA3D renderer LLVM

I did a search of vcpkg/installed which is where qt5 is installed and there was no such file. This issue was in win-native too. I think that file is in the Program Files somewhere, I seen a link for it in the depends list so I think that was linked statically.

Added after 20 minutes 3 seconds:
My build has a lot more qt .dll's. Im using/built qt.5.12. But the opengl32. Is in Visual Studio.

Added after 1 hour 40 minutes:
As far as I can tell, with an internet search, the file mentioned ships with the qt5 binary pkg. But I built it with vcpkg and that file isn't in the install dir.

Added after 9 minutes 40 seconds:
Looking at the linux build, it seems this may have something to do with halos around bright stars and win32. There are a couple of stars, viewed from earth, with halos, running qt5 in linux with stars = points. This looks normal. Or as you seemed to suggest, the VMWare driver?
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Topic author
onetwothree
Site Admin
Posts: 705
Joined: 22.09.2018
With us: 5 years 11 months

Post #139by onetwothree » 24.01.2019, 19:43

I have a report that "Scaled disks" are incorrectly shown on some Nvidia card, but you are the first who sees issues with "points". Have just tested in windows VM with software GL - no issues.

Maybe driver issue.

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #140by cartrite » 24.01.2019, 19:58

I got virtualbox too. Can't build with it but I should be able to run your builds and mine. That uses a Chromium driver. Only gl 2.0 though.

Added after 2 hours 7 minutes:
Ok.
1. The star points did not have a problem with virtualbox drivers. But menus did. The secondary menu that had star points was hidden but usable. Was able to change them.
2. Somewhere along looking I noticed the file you mentioned earlier, opengl32sw.dll, in a package I downloaded from your last build that I had a black screen. Anyhow I used that file and renamed it as you suggested earlier and the star points looked normal in VMWare too. Did that tell you something? I only tested that on your build. My build has extra dll's. More than yours. What setting did you have to have that file included in your deps?
cartrite

Added after 10 minutes 7 seconds:
Works on my builds too. Was that file included in deps with cmake files?
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4


Return to “Development”