Celestia 1.7.0 Development Thread

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
Anthony_B_Russo10
Moderator
Posts: 672
Joined: 03.07.2018
Age: 21
With us: 6 years 4 months
Location: Tallahassee, Florida, US

Post #661by Anthony_B_Russo10 » 26.11.2019, 08:35

Yay another developer!
Anthony B. Russo, I like Pluto. Mod of the Celestia subreddit: https://www.reddit.com/r/Celestiasoftware/
I have over 40 computers, trying to list them here would be a pain.
Responsible for the NEO catalog: https://celestiaproject.space/forum/viewtopic.php?f=23&t=22203
And mod of the Discord server.

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

Post #662by Lafuente_Astronomy » 26.11.2019, 11:55

Nathan Moschkin

I'm glad that you're willing to help. And yes, take your time in helping the devs improve Celestia. Any time you spend is precious
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.

Topic author
onetwothree
Site Admin
Posts: 706
Joined: 22.09.2018
With us: 6 years 1 month

Post #663by onetwothree » 26.11.2019, 17:19

nmoschkin wrote:I had no idea that the development of this wonderful program had been stalled for so many years. I was just reading through the thread, and it seems it's been challenging.

This is a long and sad story.

nmoschkin wrote:I am a C/C++/C# developer with a few decades of experience ... mostly I work in C#, now, but I think I can still remember C++ ...

I'm not a programmer, and joined Celestia development with nearly zero C++ knowledge :)

nmoschkin wrote:although, full disclosure, nearly all of that development has been on the Windows side.

That's, actually, great! We look for windows maintainer(s) for a long time without big success.

nmoschkin wrote:I really like this program, and I'll help in any way I feel I can, although my time is limited.

You are welcome! Even if you are able just to keep native windows frontend in sync with Qt-based one it will be great.

Regarding some technical points:
We use C++11 standard and will migrate to newer standards when all OSes we support are able to compile it (actually now we can bump it to C++14). We use GitHub with usual github-workflow to propose patches and discuss development.

nmoschkin
Posts: 12
Joined: 26.11.2019
With us: 4 years 11 months

Post #664by nmoschkin » 26.11.2019, 18:19

onetwothree wrote:We use C++11 standard and will migrate to newer standards when all OSes we support are able to compile it (actually now we can bump it to C++14). We use GitHub with usual github-workflow to propose patches and discuss development.

Can I get the GitHub link? I will request to join your development group. Then, I will attempt to build it.

Is the 1.7.0 fork in a specific branch I should be looking at, and do you have a "to do" list for the Windows build?

Also ... what about the data? There's been some very interesting developments in astronomy, in recent years, including the Juno flyby of Pluto... When do you guys plan to update the data sets?

Topic author
onetwothree
Site Admin
Posts: 706
Joined: 22.09.2018
With us: 6 years 1 month

Post #665by onetwothree » 26.11.2019, 19:28

nmoschkin wrote:Can I get the GitHub link? I will request to join your development group. Then, I will attempt to build it.

https://github.com/CelestiaProject/Celestia

Check INSTALL for build instructions.

nmoschkin wrote:Is the 1.7.0 fork in a specific branch I should be looking at, and do you have a "to do" list for the Windows build?

1.7 is in master. 1.6.2 is in 1.6.x branch.

For 1.7 you can check https://github.com/CelestiaProject/Celestia/projects/2.

Both 1.6.2 and 1.7 require to fix or workaround the following problem: on HiDPI displays users have to enable "Disable display scaling on high DPI setting" in the lnk file. That's a problem #1. Other issues to do: https://github.com/CelestiaProject/Celestia/issues/11 and add https://github.com/CelestiaProject/Celestia/issues/459 (here qt and gtk are done, windows frontend should be updated as well). We also need proper DLL for GNU gettext & GNU iconv built using MSVC2015 as versions provided by vcpkg have bugs.

nmoschkin wrote:Also ... what about the data? There's been some very interesting developments in astronomy, in recent years, including the Juno flyby of Pluto... When do you guys plan to update the data sets?

We rely on the community here :) Askaniy updated several textures but now he is busy with his main project Celestia Origin. FarGetNik is making textured update but his changes are not integrated yet.

Avatar
CM1215 M
Posts: 221
Joined: 30.08.2017
Age: 22
With us: 7 years 2 months
Location: Ohio, U. S. A.

Post #666by CM1215 » 26.11.2019, 21:07

nmoschkin wrote:including the Juno flyby of Pluto
Right...and New Horizons was the Jupiter Polar Orbiter...
CM1215: Celestial master in learning.

nmoschkin
Posts: 12
Joined: 26.11.2019
With us: 4 years 11 months

Post #667by nmoschkin » 26.11.2019, 21:54

Okay.

I just downloaded and installed most of the libraries and got the master branch and I cracked open the Win32 code.

Gracious this code is ancient. Good old fashioned Win-32 API platform calls, WndProc, message pumps.

Most modern Windows apps use a C#/WPF/XAML graphical design... but I can see how it would be a big chore to reimplement all of these windows in .NET and then reference all the rest of the Celestia, which is all built in C++...

Sigh. I guess you can't modernize everything. I'm sure there's plenty of programs, out that, that still use this approach.

Added after 54 minutes 4 seconds:
Right...and New Horizons was the Jupiter Polar Orbiter...

Yeah, I get those satellites confused. LOL. My apologies.

Avatar
Anthony_B_Russo10
Moderator
Posts: 672
Joined: 03.07.2018
Age: 21
With us: 6 years 4 months
Location: Tallahassee, Florida, US

Post #668by Anthony_B_Russo10 » 27.11.2019, 00:21

Well the Windows version of 1.6.1 still works on Windows 2000 and the MacOS X version still works on 10.3 Panther.
Anthony B. Russo, I like Pluto. Mod of the Celestia subreddit: https://www.reddit.com/r/Celestiasoftware/
I have over 40 computers, trying to list them here would be a pain.
Responsible for the NEO catalog: https://celestiaproject.space/forum/viewtopic.php?f=23&t=22203
And mod of the Discord server.

nmoschkin
Posts: 12
Joined: 26.11.2019
With us: 4 years 11 months

Post #669by nmoschkin » 27.11.2019, 00:29

I have successfully built the entire thing only to find out that path::empty() is broken.

configFileName = L"" but size is being returned as 1 because it's counting the null terminator.

LOL ... I love it ... bugs, instantly.

Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 29
With us: 15 years 9 months
Location: Suzhou, China

Post #670by Markerz » 27.11.2019, 00:48

Welcome aboard!

nmoschkin wrote:Most modern Windows apps use a C#/WPF/XAML graphical design... but I can see how it would be a big chore to reimplement all of these windows in .NET and then reference all the rest of the Celestia, which is all built in C++...

There can never be too many front end implementation as long as one wants to do it.

Overall there’s the CelestiaCore class which exposes all the interfaces you need to manipulate control, rendering etc. so if one wants to do it in another language or for another platform, I guess you need to wrap it and provide corresponding UI to make these calls to the CelestiaCore object

nmoschkin
Posts: 12
Joined: 26.11.2019
With us: 4 years 11 months

Post #671by nmoschkin » 27.11.2019, 01:09

Well... I can't even get past the Splash screen because it is going into an infinite recursion when iterating the extra's directory.

luascript.cpp, lines 175 and 176...

it goes into an infinite loop.

and I can trace it to a file called filesystem...

#pragma message("The contents of <filesystem> are only available with C++17 or later.")

Which is problematic ... #if _HAS_CXX17 is not returning true... soooooo ... that's bad.

I thought VC supported almost all of C++ 17 ... :-/

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

Post #672by Janus » 27.11.2019, 01:25

@nmoschkin

I am glad to see more people getting involved.

My platform is windows, I have trouble with Linux so I avoid it.
I do my own fork where I keep everything static linked because I have a personal preference of avoiding DLLs to the greatest extent possible.
I do the same with other open source stuff I use as well.

I currently use VS2015 pro on a very customized W7_x64 system, VS2017/19 break my desktop, and I also cannot afford them.
I am hoping to update my static linked release before the first of the year, if work allows that is.

Make sure you use SDK 8.1 or later as target.
You will also need to check for filesystem stuff, and adjust it to use std::experimental::filesystem instead.

Good luck.


Janus.

nmoschkin
Posts: 12
Joined: 26.11.2019
With us: 4 years 11 months

Post #673by nmoschkin » 27.11.2019, 01:33

Yeah. I see that it is very difficult to compile with the latest standards. I keep getting syntax errors... I'm going to clean CMake and clean out the code, and start from square one.

Added after 8 minutes 15 seconds:
Yes, I've noticed that this is a big problem.

FileSystem functions WILL NOT work without C++ 17, but this entire program WILL NOT compile with any C++ version greater than 14.

Added after 29 minutes 30 seconds:
That is to say, the Lua script initialization function is not working.

Added after 2 seconds:
That is to say, the Lua script initialization function is not working.

Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 29
With us: 15 years 9 months
Location: Suzhou, China

Post #674by Markerz » 27.11.2019, 02:15

nmoschkin wrote:FileSystem functions WILL NOT work without C++ 17, but this entire program WILL NOT compile with any C++ version greater than 14.

You can disable the use of c++ filesystem by forcing on using the compatible file system implementation (celestia::filesystem) in celcompat/filesystem.h. Although you shouldn’t need to modify it since cmake should have checked if it’s available and added appropriate macros to use the correct filesystem implementation while generating the project

nmoschkin
Posts: 12
Joined: 26.11.2019
With us: 4 years 11 months

Post #675by nmoschkin » 27.11.2019, 02:34

The problem is I'm using the Celestia compat filesystem (Because native C++ file system functions don't support the kind of code that's been executed) ... so, I can get nowhere. I get passed Lua, then it spins for ever loading stars, and all because the iteration never ends ... so like, filesystem is problem.

If I switch to C++ 17, I get all kinds of syntax errors ... if I stay at C++ 14, I have to use the compat filesystem ... and it no workie.

Added after 19 minutes 12 seconds:
Yep. This build 1.7.0 is not playing nicely with Windows (it's not playing at all.)

Added after 6 minutes 35 seconds:
fs::recursive_directory_iterator(dir) is broken ... and the thing will just not move forward. Also... the Windows native version of this application looks DRASTICALLY different than the current Celestia 1.6.1 that I have installed.

Topic author
onetwothree
Site Admin
Posts: 706
Joined: 22.09.2018
With us: 6 years 1 month

Post #676by onetwothree » 27.11.2019, 08:47

nmoschkin wrote:I have successfully built the entire thing only to find out that path::empty() is broken.
configFileName = L"" but size is being returned as 1 because it's counting the null terminator.

Interesting. Sounds like a MSVC bug. This code:

Code: Select all

#ifdef _WIN32
    fs::path p = L"";
    std::cout << p.empty() << '\n';
#endif

outputs 1 when compiled with MingW64.

nmoschkin wrote:fs::recursive_directory_iterator(dir) is broken
I tested it with GCC and MingW64, sounds like another MSVC issue.

Added after 3 hours 37 minutes:
btw, with this pr https://github.com/CelestiaProject/Celestia/pull/539/files Celestia is buildable in C++17 mode

nmoschkin
Posts: 12
Joined: 26.11.2019
With us: 4 years 11 months

Post #677by nmoschkin » 29.11.2019, 16:17

Okay. That's good to know that I'm not going crazy or doing something wrong, on my end.

I will attempt to compile with C++ 17 and see if the problem persists. If it does, I will being looking for a work-around.

Sorry for the delay in replying. It was a national holiday in my country, and I had other obligations.

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

Post #678by cartrite » 29.11.2019, 17:18

I was able to compile and run the latest master for win32 and didn't have any problems with the build or running the program. It is using a virtual machine thpugh. Vmware running windows 7. It's using msvc 2017.
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

nmoschkin
Posts: 12
Joined: 26.11.2019
With us: 4 years 11 months

Post #679by nmoschkin » 29.11.2019, 21:27

I'm having trouble getting that pull request. I'll wait until you merge it with the master branch. Just let me know.

Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 29
With us: 15 years 9 months
Location: Suzhou, China

Post #680by Markerz » 30.11.2019, 00:28

nmoschkin wrote:I'm having trouble getting that pull request. I'll wait until you merge it with the master branch. Just let me know.

It’s already merged


Return to “Development”