Closed khwj closed 5 years ago
I'm not one of the project's maintainers and just recently tried the same (using MacPorts, not HomeBrew). I got past these errors by enclosing the "wrong" statement in yet another pair of parenthesis, so e.g.
QKeychain::WritePasswordJob job(QLatin1String(openfortigui_config::password_manager_namespace));
becomes
QKeychain::WritePasswordJob job ((QLatin1String(openfortigui_config::password_manager_namespace)));
The problem is that once I built the project and ran it in QT Creators IDE, no buttons of OpenFortiGUI worked and debugging somehow didn't work either. After several failed attempts to get it working, I lost patience but don't get discouraged - you may have more knowledge/time/motivation/luck than me :). I think I compiled against Qt 5.11 though and if (e.g.) "only" Qt 5.5 is supported, problems could arise.
Also note that you'll probably need to remove the :!macx
piece of code from the project's .pro
file to successfully compile. If you haven't done so yet, of course.
Oh and one more thing. In my case (MacPorts), I also had to edit the .pro
file as follows to successfully compile against OpenSSL:
unix:!symbian: LIBS += -L/opt/local/include -lcrypto -lpthread -lssl -lutil -lqt5keychain
@SkyCrawl thanks for the really helpful advise. I proceeded to add extra pair of parenthesises, removed :!macx as recommended and I am able to build the project without any error.
The icons seems to work except for the App Icon/Dock Icon.
The main menu, the tray menu, About window and the Settings also seem to work as well. However, I cannot click anything on the main window, cannot click anything on the Initial Setup wizard and cannot open the Preferences (which is the most important).
I've never used Qt Creator before but Debug mode seems to work though.
I need more advise and I still have no idea what I'm doing. I also hope someone would pick this up and complete it and probably motivate those who lost patience :) (@SkyCrawl perhaps?).
Ping @theinvisible .
For now, I’m going to commit my change and create a PR soon.
Note that I still compiled with Qt5 v11.1 (tried to downgrade to v5.5, or even v5.6, with no success).
@khwunchai you're welcome :).
However, I cannot click anything on the main window, cannot click anything on the Initial Setup wizard and cannot open the Preferences (which is the most important).
That was my problem too and I was unable to get past it. And I lost patience because I couldn't find anything on this on the internet and came to believe that solid QT knowledge was necessary to move on (although the issue is most likely caused by something really trivial).
Anyway, how did you get the windows in screenshots 1 and 3 to appear?
EDIT:
Ah, I suppose you used the tray icon?
Hi,
thanks for your effort for supporting MacOS.
As i said once i can not provide support as i dont have any Apple devices here. I just can say that it MAY work as openfortivpn runs on Mac and Qt in general also does.
I have also now merged your requested fixes to compile on MacOS.
I cant say why the UI on MacOS is not working as expected, maybe there are some MacOS required fixes needed? I dont know really as long as i cant get a MacOS device for testing.
Cheers Rene
I'll close this issue now, unresponsive UI should be treated as a separate topic as this issue is only regard building process. Maybe I'll add instruction for building from source for MacOS as well and hopefully someone will pick up and fix it🤞.
Thanks!
P.S. @SkyCrawl Indeed I used the tray icon lol.
/subscribe looking forward to the GUI building on my High Sierra - lmk if I can help with bottling it up for brew
Are there any news on this? Would love to be able to use this client on macOS as the official client is super laggy and awful to use 😭
Here is the needed stuff to do to the .pro to build it:
diff --git a/openfortigui/openfortigui.pro b/openfortigui/openfortigui.pro
index cd1f88a..b8485db 100644
--- a/openfortigui/openfortigui.pro
+++ b/openfortigui/openfortigui.pro
@@ -84,9 +84,9 @@ FORMS += mainwindow.ui \
RESOURCES += \
res.qrc
-OPENFORTIVPN_FLAGS = -DHAVE_USR_SBIN_PPPD=1 -DHAVE_PROC_NET_ROUTE=1 -DHAVE_STRUCT_TERMIOS=1 -DHAVE_RT_ENTRY_WITH_RT_DST=1 -DHAVE_SYSTEMD=0 -DHAVE_X509_CHECK_HOST=1 -DPPP_PATH=\\\"/usr/sbin/pppd\\\"
-QMAKE_CFLAGS += $$(CPPFLAGS) $${OPENFORTIVPN_FLAGS}
-QMAKE_CXXFLAGS += $${OPENFORTIVPN_FLAGS}
-QMAKE_LFLAGS += $$(LDFLAGS)
+OPENFORTIVPN_FLAGS = -DHAVE_USR_SBIN_PPPD=1 -DHAVE_PROC_NET_ROUTE=1 -DHAVE_STRUCT_TERMIOS=1 -DHAVE_SYSTEMD=0 -DHAVE_X509_CHECK_HOST=1 -DPPP_PATH=\\\"/usr/sbin/pppd\\\"
+QMAKE_CFLAGS += $$(CPPFLAGS) $${OPENFORTIVPN_FLAGS} -I/usr/local/opt/openssl/include -I/usr/local/opt/qtkeychain/include
+QMAKE_CXXFLAGS += $${OPENFORTIVPN_FLAGS} -I/usr/local/opt/openssl/include -I/usr/local/opt/qtkeychain/include
+QMAKE_LFLAGS += $$(LDFLAGS) -L/usr/local/opt/qtkeychain/lib
It's possible to bypass the wizard with the tray icon -> settings -> save, force kill and set setupwizard=true
in ~/.openfortigui/main.conf
.
I've tried adding a vpn, but connection doesn't work pass the "accept cert" and it segfaulted when clicking on "disconnect".
Now the gui doesn't start and log:
juin 9 22:42:37 openfortiGUI::Debug: "start-main::"
juin 9 22:42:37 openfortiGUI::Warning: "QLocalSocket::connectToServer : Connection refused"
So for my part I will stick with the CLI client for now.
Would providing a remote desktop/ssh access to a mac helps in making the GUI more stable ?
Any updates on this?
Hi, I also use the OpenFortiGUI on Linux. It is very very good software. Now I am testing MacBookAir and I lookup alternative vpn client for official Forticlient, because it is slow, bad and it can not multi connection at the same time.
Maybe an idea. If Rene Hadler was interested? Wouldn't it be possible to create a collection to buy a test macbook for him? I would very much like to contribute as far as I can. Maybe there would be more people with the same interest.
-- Radek
@radekskr for now you can use CLI - https://github.com/adrienverge/openfortivpn
e.g.
openfortivpn url-to-host:<port> --username=<user> --password=<pass> --persistent=5
You can get that info from FortiClient Console
I too am looking forward to someone who managed to build/run this on macOS to maybe add instructions to the project documentation.
On OSX you can use CLI openfortivpn (install it with Homebrew) :
sudo openfortivpn your-vpn-gateway:8443
Or you can check openfortivpn
OSX wrapper I build for myself. Maybe it will help you - https://github.com/karol-f/openfortivpn-osx-wrapper
On OSX you can use CLI openfortivpn (install it with Homebrew) :
sudo openfortivpn your-vpn-gateway:8443
Or you can check
openfortivpn
OSX wrapper I build for myself. Maybe it will help you - https://github.com/karol-f/openfortivpn-osx-wrapper
Thank you! I wasted like a whole day trying to get FortiClient to work and was able to connect via openfortivpn
openfortigui is such a great open source, I always prefer using openfortigui with openfortivpn when I was using a Linux machine mainly because openfortivpn is capable of connecting multiple VPNs simultaneously and I'm more comfortable using open sources.
Now I'm switch to Mac and there is no alternative other than official Forti client which lack the features I mentioned above.
I'm aware that openfortigui is not officially support macOS at the moment (and probably not plan to) and I'm not an expert in qt and c++ so let me know if I'm wrong.
Here are my assumptions:
build-essential
package are included in Xcode's command-line tools.If the above assumptions are correct this might be just the matter of lacking build instruction for macOS.
I have followed the build instruction and adapt it for macOS and stuck with a few issues and need some advise.
Steps I've taken so far:
sudo xcode-select --install
brew install openfortivpn
qmake && make -j4
In the last step, I got the following error
Please advise.