FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login

    Mac Support

    Scheduled Pinned Locked Moved I need help
    19 Posts 6 Posters 2.2k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      Scabber
      last edited by

      I have a mac mini around. But why would you want the ancient python version instead of the java version. The mac version when attempting to compile only shows some errors and warnings https://i.postimg.cc/28DxJjpm/MAC-compiler-output.png
      (Same Code, Tools and Versions)

      1 Reply Last reply Reply Quote 0
      • tatsuT Offline
        tatsu
        last edited by

        I agree, you should probably build the java one instead. I didn't write this guide if you read well. I'm looking for an upgrade to this whole guide, would you help me out?

        How to setup FAF on linux

        1 Reply Last reply Reply Quote 0
        • S Offline
          Scabber
          last edited by

          Yes sure. I may not be much help with nasty mac problems but rewriting the compile guide would be nice.

          1 Reply Last reply Reply Quote 0
          • tatsuT Offline
            tatsu
            last edited by

            Ok, so can you try building and running the Java client on mac? (make sure you have java 14 installed first and you'll need to expose the INSTALL4J_JAVA_HOME variable as a variable that points towards the java bin folder, something like this :

             export INSTALL4J_JAVA_HOME=/usr/lib/jvm/jdk-14.0.2/
            

            somewhere mac picks up)

            an then see if it runs.

            How to setup FAF on linux

            1 Reply Last reply Reply Quote 0
            • L Offline
              LAMOREMEDICO
              last edited by

              @tatsu
              I'm excited that there has been some traction on an FAF for Mac Discussion. I hadn't played Supreme Commander FA for about 8 years (never played the original, but hopped in for FA and it was amazing) and was so excited to find a community still around it. I'm using PaulTheTalls Porting Kit on my 2017 MacBook Pro and have been running the campaign and normal online with no issues. I really want to get online and involved with FAF

              I have downloaded the Java Client. I made sure I had Java 14 installed. Then I ran the command you listed above. I then followed the rest of the instructions (here: https://wiki.faforever.com/index.php?title=Setting_Up_FAF_Linux) but making slight adjustments based on my file names.

              When I ran my faf-client executable I saw the following:
              java.lang.RuntimeException: No toolkit found
              at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
              at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
              at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
              at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
              at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
              at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
              at java.base/java.lang.Thread.run(Thread.java:832)

              After this, I started digging into the /usr/lib directory, and I couldn't find any folder named jvm. This leads me to believe that Java 14 wasn't installed correctly. I tried it again and still was not here. Not sure if this would mean I don't even have java downloaded. Feeling pretty stupid rn. Any thoughts?

              1 Reply Last reply Reply Quote 0
              • Brutus5000B Offline
                Brutus5000 FAF Server Admin
                last edited by

                I didn't check what tatsu is doing in particular.

                JavaFX has dedicated jars for Windows, Linux and Mac. Whether you took the Windows or the Linux release we provide, you are missing the JavaFX dependencies for Mac. The stacktrace indicates this as well. You would need a dedicated build for Mac. Not sure how tatsu worked around this.

                "Nerds have a really complicated relationship with change: Change is awesome when WE'RE the ones doing it. As soon as change is coming from outside of us it becomes untrustworthy and it threatens what we think of is the familiar."
                – Benno Rice

                1 Reply Last reply Reply Quote 0
                • L Offline
                  left_boy
                  last edited by

                  If you want mac support you should start the client from Intelij and make it has no issues if that works we can provide a built for mac

                  Soon™️

                  1 Reply Last reply Reply Quote 0
                  • L Offline
                    left_boy
                    last edited by

                    There is a video in the Read me that shows how to use the client via Intelij

                    Soon™️

                    1 Reply Last reply Reply Quote 0
                    • L Offline
                      LAMOREMEDICO
                      last edited by

                      @Brutus5000
                      Not sure if you had read, but he was referencing this original post on it: https://forums.faforever.com/viewtopic.php?f=2&t=16947#p169818 . Don't want to take up too much of your time but if you look at those instructions, do you think this would still work?

                      @axel12 are you saying just test to see if I can run the client from Intelij? I will start attempting this now and update you on my progress

                      1 Reply Last reply Reply Quote 0
                      • L Offline
                        left_boy
                        last edited by left_boy

                        Well I can built you can installer for mac but Ithink the client has bugs that make it unusable on mac. Those need to be resolved by someone on mac. Therefore you need to start it from Intelij and solve those. They are gonna be minor bugs. E.g. we have code that makes the icon blink but this code might not work on mac therefore would need to be wrapped in an

                        if(! isMac()){
                            ...
                        }
                        

                        Just as an example but we will only know what is bugged out on mac if somebody tries...

                        Soon™️

                        1 Reply Last reply Reply Quote 0
                        • L Offline
                          LAMOREMEDICO
                          last edited by LAMOREMEDICO

                          @axel12
                          Followed the Video in the readme to set up Intelij, and tried to run faf-client. Here is a majority of my output:

                          1:29:33 PM: Executing task 'Main.main() --stacktrace'...

                          Configure project :
                          Platform is: mac

                          Task :downloadIceAdapter UP-TO-DATE
                          Unable to get progress logger. Download progress will not be displayed.

                          Task :downloadUnixUid
                          Unable to get progress logger. Download progress will not be displayed.

                          Task :downloadWindowsUid UP-TO-DATE

                          Task :downloadNativeDependencies
                          Unable to get progress logger. Download progress will not be displayed.
                          Task :processResources UP-TO-DATE
                          Task :webview-patch:compileJava UP-TO-DATE
                          Task :webview-patch:processResources NO-SOURCE
                          Task :webview-patch:classes UP-TO-DATE
                          Task :webview-patch:jar UP-TO-DATE
                          Task :webview-patch:assemble UP-TO-DATE
                          Task :webview-patch:compileTestJava NO-SOURCE
                          Task :webview-patch:processTestResources NO-SOURCE
                          Task :webview-patch:testClasses UP-TO-DATE
                          Task :webview-patch:test NO-SOURCE
                          Task :webview-patch:check UP-TO-DATE
                          Task :webview-patch:build UP-TO-DATE
                          Task :compileJava UP-TO-DATE
                          Task :classes UP-TO-DATE

                          Task :Main.main()
                          13:29:35.280 [main] DEBUG com.faforever.client.preferences.PreferencesService - Logger initialized
                          2020-10-01 13:29:36.552 INFO 34270 --- [JavaFX-Launcher] o.s.boot.SpringApplication : Starting application on Nicholass-MBP.columbus.rr.com with PID 34270 (started by namore in /Users/namore/IdeaProjects/downlords-faf-client)
                          2020-10-01 13:29:36.554 INFO 34270 --- [JavaFX-Launcher] o.s.boot.SpringApplication : The following profiles are active: mac,prod
                          Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
                          Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
                          2020-10-01 13:29:37.692 INFO 34270 --- [JavaFX-Launcher] trationDelegate$BeanPostProcessorChecker : Bean 'asyncConfig' of type [com.faforever.client.config.AsyncConfig$$EnhancerBySpringCGLIB$$6f7770ec] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
                          2020-10-01 13:29:37.733 INFO 34270 --- [JavaFX-Launcher] trationDelegate$BeanPostProcessorChecker : Bean 'cacheConfig' of type [com.faforever.client.config.CacheConfig$$EnhancerBySpringCGLIB$$d0b62432] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
                          WARNING: An illegal reflective access operation has occurred
                          WARNING: Illegal reflective access by com.google.gson.internal.reflect.UnsafeReflectionAccessor (file:/Users/namore/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.8.5/f645ed69d595b24d4cf8b3fbb64cc505bede8829/gson-2.8.5.jar) to field java.net.HttpCookie.name
                          WARNING: Please consider reporting this to the maintainers of com.google.gson.internal.reflect.UnsafeReflectionAccessor
                          WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
                          WARNING: All illegal access operations will be denied in a future release
                          2020-10-01 13:29:38.244 INFO 34270 --- [JavaFX-Launcher] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'taskScheduler'
                          Error in LSRegisterURL: -10811
                          2020-10-01 13:29:38.677 INFO 34270 --- [JavaFX-Launcher] c.f.c.map.generator.MapGeneratorService : Deleting leftover generated maps...
                          2020-10-01 13:29:38.682 WARN 34270 --- [JavaFX-Launcher] com.faforever.client.map.MapService : Could not load maps: installation path is not set
                          2020-10-01 13:29:38.707 INFO 34270 --- [JavaFX-Launcher] com.faforever.client.update.Version : The current application version is: snapshot
                          2020-10-01 13:29:38.710 INFO 34270 --- [JavaFX-Launcher] c.f.c.update.ClientUpdateServiceImpl : Current version: snapshot
                          2020-10-01 13:29:38.725 INFO 34270 --- [pool-3-thread-2] c.f.client.update.CheckForUpdateTask : Checking for client update
                          2020-10-01 13:29:38.789 WARN 34270 --- [JavaFX-Launcher] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileOpeningHandler' defined in file [/Users/namore/IdeaProjects/downlords-faf-client/build/classes/java/main/com/faforever/client/os/FileOpeningHandler.class]: Invocation of init method failed; nested exception is java.awt.HeadlessException
                          2020-10-01 13:29:38.790 WARN 34270 --- [JavaFX-Launcher] c.f.client.fa.relay.ice.IceAdapterImpl : Ignoring call to ICE adapter as we are not connected: quit([])
                          2020-10-01 13:29:38.794 INFO 34270 --- [JavaFX-Launcher] com.faforever.client.config.AsyncConfig : Shutting down ExecutorService 'taskExecutor'
                          2020-10-01 13:29:38.794 INFO 34270 --- [JavaFX-Launcher] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler'
                          2020-10-01 13:29:38.800 INFO 34270 --- [JavaFX-Launcher] ConditionEvaluationReportLoggingListener :

                          Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
                          2020-10-01 13:29:38.811 ERROR 34270 --- [JavaFX-Launcher] o.s.boot.SpringApplication : Application run failed

                          org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileOpeningHandler' defined in file [/Users/namore/IdeaProjects/downlords-faf-client/build/classes/java/main/com/faforever/client/os/FileOpeningHandler.class]: Invocation of init method failed; nested exception is java.awt.HeadlessException
                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
                          at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
                          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
                          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
                          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
                          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:893)
                          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
                          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
                          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
                          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
                          at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
                          at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
                          at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)
                          at com.faforever.client.FafClientApplication.init(FafClientApplication.java:97)
                          at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:824)
                          at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
                          at java.base/java.lang.Thread.run(Thread.java:832)
                          Caused by: java.awt.HeadlessException: null
                          at java.desktop/java.awt.Desktop.getDesktop(Desktop.java:301)
                          at com.install4j.runtime.installer.helper.versionspecific.Java9Helper.setMacStartupListener(Java9Helper.java:30)
                          at com.install4j.runtime.installer.helper.versionspecific.VersionSpecificHelper.setMacStartupListener(VersionSpecificHelper.java:56)
                          at com.install4j.api.launcher.StartupNotification.registerStartupListener(StartupNotification.java:41)
                          at com.faforever.client.os.FileOpeningHandler.afterPropertiesSet(FileOpeningHandler.java:31)
                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855)
                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)
                          ... 18 common frames omitted

                          Exception in Application init method
                          Exception in thread "main" java.lang.RuntimeException: Exception in Application init method
                          at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:895)
                          at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
                          at java.base/java.lang.Thread.run(Thread.java:832)
                          Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileOpeningHandler' defined in file [/Users/namore/IdeaProjects/downlords-faf-client/build/classes/java/main/com/faforever/client/os/FileOpeningHandler.class]: Invocation of init method failed; nested exception is java.awt.HeadlessException
                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
                          at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
                          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
                          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
                          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
                          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:893)
                          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
                          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
                          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
                          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
                          at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
                          at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
                          at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)
                          at com.faforever.client.FafClientApplication.init(FafClientApplication.java:97)
                          at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:824)
                          ... 2 more
                          Caused by: java.awt.HeadlessException
                          at java.desktop/java.awt.Desktop.getDesktop(Desktop.java:301)
                          at com.install4j.runtime.installer.helper.versionspecific.Java9Helper.setMacStartupListener(Java9Helper.java:30)
                          at com.install4j.runtime.installer.helper.versionspecific.VersionSpecificHelper.setMacStartupListener(VersionSpecificHelper.java:56)
                          at com.install4j.api.launcher.StartupNotification.registerStartupListener(StartupNotification.java:41)
                          at com.faforever.client.os.FileOpeningHandler.afterPropertiesSet(FileOpeningHandler.java:31)
                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855)
                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)
                          ... 18 more

                          1 Reply Last reply Reply Quote 0
                          • L Offline
                            left_boy
                            last edited by

                            Gotta google what that means ...

                            Soon™️

                            1 Reply Last reply Reply Quote 0
                            • L Offline
                              LAMOREMEDICO
                              last edited by LAMOREMEDICO

                              @axel12
                              My misunderstanding then. I'm not sure I would have the capability to fix every bug to allow it to be run on a mac, given I have extremely limited developing experience.

                              Because you have a better understanding of the code, would you expect these to truly be easy fixes? - for example, adding those if blocks. If it's not stuff like that, I don't think I am the person to lead the rebuild.

                              1 Reply Last reply Reply Quote 0
                              • L Offline
                                left_boy
                                last edited by

                                We can try it. Me making changes and you copying the Exceptions 😄 and then use my code to fix them as long as they are easy fixes that is gonna work

                                Soon™️

                                1 Reply Last reply Reply Quote 0
                                • L Offline
                                  left_boy
                                  last edited by

                                  https://drive.google.com/file/d/1JiMZDQNEEsQoK-n23QsyNb0X4v41n4l4/view?usp=sharing

                                  Checkout the feature/mac-support branch and try again I should have fixed the Exception above but there are sure gonna be more.

                                  Soon™️

                                  1 Reply Last reply Reply Quote 1
                                  • tatsuT Offline
                                    tatsu
                                    last edited by tatsu

                                    java version 14 on mac too I imagine?
                                    your video doesn't play for me.

                                    https://github.com/FAForever/downlords-faf-client/issues/1972

                                    How to setup FAF on linux

                                    1 Reply Last reply Reply Quote 0
                                    • A Offline
                                      Androish
                                      last edited by

                                      Now how likely is it to be able to run faf on an m1 mac?

                                      I don't have one yet, but that would be pretty sweet.

                                      But given that it seems like it is no easy feat to get it to work even on intel macs I assume it might be a long shot 😛

                                      1 Reply Last reply Reply Quote 0
                                      • Brutus5000B Offline
                                        Brutus5000 FAF Server Admin
                                        last edited by

                                        Let's see:

                                        • Apple dropped support for OpenGL long ago and skipped Vulkan (required to emulate DirectX)
                                        • Apple somehow disclosed device details so that Linux support since 2017 is reduced to basic features
                                        • different CPU architecture will cause huge overhead on emulating x86.

                                        Apple works hard for years to keep Linux developers out of their ecosystem. But Wine and Proton are primarily Linux applications. Maybe some hardcore fanboys try to support it, but it will never reach the compatibility again it once had.

                                        "Nerds have a really complicated relationship with change: Change is awesome when WE'RE the ones doing it. As soon as change is coming from outside of us it becomes untrustworthy and it threatens what we think of is the familiar."
                                        – Benno Rice

                                        1 Reply Last reply Reply Quote 1
                                        • First post
                                          Last post