×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Ekos on Mac OS X ?

  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

Ok now I feel like an idiot. After all that work trying to get the icons working it was as simple as just installing the hicolor icon theme. I figured I had tried this already using homebrew, but I guess brew installs it in the wrong place.

Download the latest version from here:
www.freedesktop.org/software/icon-theme/

After unzipping, in a terminal window in the hicolor folder, do :

./configure
sudo make install

Then the icons on the view toolbar magically start working.
The following user(s) said Thank You: Adam
7 years 6 months ago #10437
The topic has been locked.
  • Posts: 82
  • Thank you received: 9

Replied by Adam on topic Ekos on Mac OS X ?

Great that you got the icons sorted! :)

I got the Qt5 issue sorted by applying this fix:

diff --git a/Formula/qt5.rb b/Formula/qt5.rb
index f63a40f..3be6244 100644
--- a/Formula/qt5.rb
+++ b/Formula/qt5.rb
@@ -89,6 +89,9 @@ class Qt5 < Formula
-qt-freetype
-qt-pcre
-nomake tests
+ -skip qtconnectivity
+ -skip qtwebengine
+ -skip qtwebview
-no-rpath
]

to the homebrew formula, which I found in the issues on git. It seems that the issue has to do with XCode 8. Manually installing Qt5 doesn't seem to work, because homebrew does not recognize manually installed Qt versions.
Also, I think that building libindi with the just the additional library folders only works when using the XCode project in the macox folder. When building outside XCode, one needs to really build and install the libraries I guess.

Edit: On OS X 10.11, building with just the folders in the right directory (as suggested in the readme) works fine outside XCode.
Last edit: 7 years 6 months ago by Adam.
7 years 6 months ago #10442
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

Adam, did you notice my post about making sure you edit the CMakeList before you build libindi? I found an error with a formula not being found properly if you didn't include base64.c in the sources. The error did not show up when I built libindi, but later when I tried to run KStars. I don't actually know how I was able to do it before without the error cropping up, but yesterday I had to rebuild libindi with the file included in order to build KStars.
7 years 6 months ago #10454
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

So with the Icons, the viewToolbar worked great after I applied the fix I stated earlier involving installing hicolor icon theme. But, the main/kstars toolbar did not look good with no icons. The reason was that the QIcon access code "from theme" doesn't work properly on OS X for some reason, as I surmised earlier. The viewToolbar icons had a fall back method of access and the png files are in the source code, and that does work on OS X. So as an experiment, I went in and copied and pasted some png files, edited the resource files, and edited the KStars Code to use the fallback method if the "from theme" method does not work. I got pretty good results. Here is what my kstars looks like now in OS X.


The following user(s) said Thank You: Jasem Mutlaq
7 years 6 months ago #10456
Attachments:
The topic has been locked.
  • Posts: 82
  • Thank you received: 9

Replied by Adam on topic Ekos on Mac OS X ?

That looks great! It even looks better than what Gnome currently does to the UI on my Linux PC :D

I didn't have the time anymore to build KStars yesterday, but I will try it later today with your fixes and report back :)
7 years 6 months ago #10458
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

I had further progress on the icons. In order to fix the problem, I am rewriting some of the icon loading lines of code in KStars so that all of the icons in KStars have a stored icon in the source directory to "fallback" on if the loading them from the theme doesn't work. As I mentioned earlier the viewToolbar was already using the fallback icons, but many of the icons did not allow for a fallback option. Some of the icons were very easy like the ones I posted about yesterday, but some of them have been slightly harder to work with. In particular, the icons from the KStandardActions and the icons from the Configure dialog window were more challenging to figure out. But now, I think have good solutions for both. Once I finish, I hope to upload my changes to KStars using git.

Here is an example of how I solved the problem with the KStandardAction Icons:
QAction *action;
action=KStandardAction::zoomIn(this, SLOT(ZoomIn()), actionCollection());
action->setIcon(QIcon::fromTheme("zoom-in", QIcon(":/icons/zoom-in.png")));

And here is an example of how I solved the problem with the Configuration Dialog Icons:

KPageWidgetItem *page;
page = dialog->addPage(opcatalog, i18n("Catalogs"), "kstars_catalog");
page->setIcon(QIcon::fromTheme("kstars_catalog", QIcon(":/icons/catalog.png")));

Now I have almost all the icons corrected!

Here are some screenshots showing them




7 years 6 months ago #10474
Attachments:
The topic has been locked.
  • Posts: 82
  • Thank you received: 9

Replied by Adam on topic Ekos on Mac OS X ?

Yesterday I managed to build KStars from the git source too. It worked quite well after some tweaks, I didn't look into the icons however.
Today I did a git pull and building fails with this error:

[ 60%] Building CXX object kstars/CMakeFiles/KStarsLib.dir/tools/modcalcplanets.cpp.o
In file included from /Users/adam/Projects/kstars/kstars/tools/modcalcplanets.cpp:18:
In file included from /Users/adam/Projects/kstars/kstars/tools/modcalcplanets.h:23:
In file included from /Users/adam/Projects/kstars-build/kstars/ui_modcalcplanets.h:36:
In file included from /Users/adam/Projects/kstars/kstars/widgets/dmsbox.h:25:
/Users/adam/Projects/kstars/kstars/auxiliary/dms.h:49:7: warning: 'dms' has
virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
class dms {
^
In file included from /Users/adam/Projects/kstars/kstars/tools/modcalcplanets.cpp:25:
In file included from /Users/adam/Projects/kstars/kstars/auxiliary/geolocation.h:25:
/Users/adam/Projects/kstars/kstars/auxiliary/cachingdms.h:32:7: warning:
'CachingDms' has virtual functions but non-virtual destructor
[-Wnon-virtual-dtor]
class CachingDms : public dms {
^
/Users/adam/Projects/kstars/kstars/tools/modcalcplanets.cpp:364:36: error: use
of overloaded operator '+' is ambiguous (with operand types 'dms' and
'CachingDms')
CachingDms LST = edt.gst() + longB;
~~~~~~~~~ ^ ~~~~~
/Users/adam/Projects/kstars/kstars/auxiliary/dms.h:387:12: note: candidate
function
inline dms operator + (dms a, dms b) {
^
/Users/adam/Projects/kstars/kstars/auxiliary/cachingdms.h:234:23: note:
candidate function
friend CachingDms operator +(const CachingDms &, const CachingDms &);
^
2 warnings and 1 error generated.
make[2]: *** [kstars/CMakeFiles/KStarsLib.dir/tools/modcalcplanets.cpp.o] Error 1
make[1]: *** [kstars/CMakeFiles/KStarsLib.dir/all] Error 2
make: *** [all] Error 2
7 years 5 months ago #10482
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

Did you do the cmake using the output as an xcode project or did you just try to build it? I made it an xcode project so I could see what is going on and edit some code if needed. I can check to see if I have those functions in my code. It is always possible that something has been changed since I downloaded it.
7 years 5 months ago #10484
The topic has been locked.
  • Posts: 82
  • Thank you received: 9

Replied by Adam on topic Ekos on Mac OS X ?

Yes, I tried both and cleaned everything in between. Maybe it is a bug since it seems there were some changes recently concerning the functions the error message mentions.
7 years 5 months ago #10485
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

Yes, it could be, because I did not even see "cachingDMS" anywhere in the sourcecode of the version I downloaded a couple of days ago.
7 years 5 months ago #10487
The topic has been locked.

Replied by Jasem Mutlaq on topic Ekos on Mac OS X ?

That was a recent addition by Akarsh, I informed him of the error.
The following user(s) said Thank You: Adam
7 years 5 months ago #10489
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

Tonight I had another success. I had been struggling with the fact that I couldn't get icons to work with the fromTheme method on OS X, since I couldn't get it to recognize the themes I installed, no matter what I tried. My solution was to use the fallback method, which works great most of the time, but then I ran into a problem. When I tried to fix the icons on the DatePicker, I realized I couldn't get access to the buttons to put icons on them, and since it was using the fromTheme method with no fallback, I had only a couple of options, create my own DatePicker or get Themes working. I tried the former, first, but gave up and tried the latter. I finally managed to create my own themes and bundle them in kstars specifying all of the files in the theme in the qrc file and providing a really basic index.theme file. Then I had just one line of code to add to KStarsInit so that if it doesn't detect a theme, to use one of my bundled themes.

On the plus side the date picker now has icons. On the minus side, I spent several days writing code for fallback icons so that I wouldn't have to use the fromTheme method because it didn't work. Well now it works. So. . .yeah. I think it might still be a good idea to have the fallback method for loading icons, however, because if we had trouble with it before, trouble could happen again. I will ponder this however, because the code is simpler with the new method.

On another plus side, you could bundle more than one theme and the user could then select their own theme! Since the themes I made are custom themes containing a minimum of icons, more themes would take up very little space. I made 2, oxygen and breeze, just to see how they looked. The entire oxygen set that we need is less than 300 kb and the entire breeze set that we need is less than 100 kb.


The following user(s) said Thank You: Jasem Mutlaq
7 years 5 months ago #10493
Attachments:
The topic has been locked.
Time to create page: 0.816 seconds