×

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: 82
  • Thank you received: 9

Replied by Adam on topic Ekos on Mac OS X ?

I deleted everything in build/libindi/ after the failed build attempts. Did you change the parameters to the cmake command?
Unfortunately, brew install qt5 also fails on 10.11 :( What version are you at?
7 years 6 months ago #10405
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

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

I think this is the series of terminal commands from my terminal history that successfully built libindi. There were several failed attempts though. There are also several typos in the code below and i had to repeat the commands. You can probably delete those B)

351 cd gsl-2.1
352 ls
353 .configure
354 configure
355 ./Configure
356 make
357 cd .
358 cd ..
359 l
360 ls
361 cd indicode
362 ls
363 cd ..
364 ls
365 cd indicode
366 cd libinidi-buil
367 cd libinidi-build
368 cd libindi-build
369 ls
370 cmake -G Xcode ../libindi
371 cd /Users/rlancaste/Desktop/indi-latest
372 ls
373 git clone github.com/indilib/indi.git
374 mkdir -p build/libindi
375 cd build/libindi
376 cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ../../indi/libindi
377 ls
378 make install
379 sudo make install
7 years 6 months ago #10406
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

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

For Qt5, I was able to do that earlier this summer. I didn't do it recently. it takes hours to build and install!!
7 years 6 months ago #10407
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

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

Oh and I don't remember, i might not have installed it using home-brew. It might have been another method. That is the trouble with trying all these different things and then finally getting something that works, you don't remember what all you tried and sometimes you don't know what you did that might have contributed to the success.

Thank you very much though for trying to go through my bumbling set of instructions. I did a better job with the instructions on how to set up a Raspberry Pi with Kstars and Ekos. This I am still trying to figure out myself.
7 years 6 months ago #10408
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

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

I have been further investigating the icons problem. For a long time I thought the error would be with trying to load icons from themes because the Linux themes would not be supported properly in OS X. Here is an example in KStarsInit.cpp for the show stars icon.

actionCollection()->add<KToggleAction>("show_stars", this, SLOT( slotViewToolBar() ) )
<< i18nc("Toggle Stars in the display", "Stars" )
<< QIcon::fromTheme("kstars_stars", QIcon(":/icons/stars.png") )
<< ToolTip( i18n("Toggle stars") );

This is supposed to be "foolproof" because if the theme stuff doesn't work it should use the fallback. But I thought it looked like the culprit, and this was reinforced by the fact that in other places in KStars where the fromTheme method was not used, but the setIcon method was used instead, it worked great. So I spent a lot of time trying different things like just using the fallback or trying to create a theme and set the theme etc. I had no success with that.

Then I noticed something! When you right click on the toolbar that is not showing the icons, in the contextual menu, the icon is present! For example, right clicking on the "Show stars" button shows the icon at the top of the menu. The icon is also present if you decide to configure the Toolbar. That tells me that I have told the system where the icons are properly. (I have tried putting them in enough different places that I would be surprised if it could not find them) But they still don't show up in the toolbar. I think that the toolbars are KToolbars and they are using KIconLoader to load the icons if I am not mistaken. Could there be some issue with kToolbar without a theme being declared? Why doesn't the toolbar just display the icon that has definitely been loaded by QIcon??
Last edit: 7 years 6 months ago by Rob Lancaster.
7 years 6 months ago #10414
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

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

So I had one error yesterday when I built libindi from source on OS X. I did not notice it when I built it, but when I tried to build kstars with it in place because it did not flag the error. I was trying to build kstars-bleeding from the git rather than the version from Sean Houghton. And It seemed to work except for this error. It said:

Undefined symbols for architecture x86_64:
"_from64tobits_fast", referenced from:
INDI::BaseDevice::setBLOB(_IBLOBVectorProperty*, _xml_ele*, char*) in libindiclientqt.a(basedevice.cpp.o)
ld: symbol(s) not found for architecture x86_64

I found that this method was not in the kstars code that I was building but in a linked file from libindi. I saw the method reference in basedevice.cpp in libindi. I also found the method it said it couldn't access was in base64.cpp, which is also a file in libindi so I knew it was there, it just for some reason didn't want to use it. I also tried building in Qt Creator instead of Xcode and got the same weird error. The weird thing was that my original build on Xcode was still working, but none of the new ones were. I tried a bunch of things, but finally just went to bed. Today, I tried investigating the problem again today and I found a solution. If I added the following line

${CMAKE_CURRENT_SOURCE_DIR}/base64.c

in the libindi CMakeLists.txt in two locations as shown below, and then I rebuilt libindi again, I could build successfully in both Qt Creator and in XCode.

set (indiclient_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/libs/indibase/basedevice.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/indibase/baseclient.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/indibase/indiproperty.cpp
${CMAKE_CURRENT_SOURCE_DIR}/base64.c
)

set (indiclientqt_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/libs/indibase/basedevice.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/indibase/baseclientqt.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/indibase/indiproperty.cpp
${CMAKE_CURRENT_SOURCE_DIR}/base64.c
)

I don't know if adding these lines to the CMakeList.txt is the correct solution, but it fixed the error and now I can build again.
7 years 6 months ago #10423
The topic has been locked.
  • 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.
Time to create page: 1.077 seconds