How to Compile: Synergy on mac

家住魔仙堡 提交于 2019-12-03 07:30:53

问题


I wanna use Synergy on my MAC and Windows. download synergy.zip file from https://github.com/synergy/synergy

and then I try to compile to Xcode Project

But I get the following error message

bash-3.2# ./hm.sh conf -g2
Mapping command: conf -> configure
Error: Arg missing: --mac-identity

I don't know why I cannot compile Synergy.

Questions.

  1. What is --mac-identity?
  2. How to typing command to terminal on my MAC?

回答1:


I was able to get this working on Yosemite with the following command:

./hm.sh conf -g2 --mac-sdk 10.10 --mac-identity Yosemite

Of course, this will only work given you have the dependencies. You can install them with the Homebrew package manager.

brew install cmake qt

Additionally, you'll want to build it with:

./hm.sh build

And finally, to install it, you'll get the compiled results from the bin folder, i.e. Synergy.app.




回答2:


I have the similar problem on Yosemite. Perhaps you can find a compiled version in the nightly builds.




回答3:


This is not how to compile it but if the reason you want to compile is to have it free, then you can just go to this link: synergy-project.org/download/free/

It allows you to download previous versions of synergy (not the last one), kind of to keep the spirit of open source.

I haven't tried it, though.




回答4:


I just ran into that problem, and the solutions here helped me on my quest. I'm still running Yosemite but El Capitan is out.

The consequence of that is that SDK has a different path, since it now is able to compile for El Capitan.

sh ./hm.sh config -g2 --mac-sdk 10.11 --mac-identity Yosemite # My answer

Anytime a new OS is out, it would be logical to run

xcrun --show-sdk-path

to update the argument.

As for the answer to "what is mac-identity", it's a parameter to the compile script located at ext/toolchain/commands1.py, which uses it to codesign:

    err = os.system('codesign --deep -fs "' + self.macIdentity + '" Synergy.app') 

somewhere along line 830.

BoldAsLove is correct that these lines must be commented out (or deleted)

#               if (NOT (OSX_TARGET_MAJOR EQUAL 10))
#                       message(FATAL_ERROR "Mac OS X target must be 10.x")
#               endif ()

Also, qmake was stored in

/opt/local/libexec/qt5-mac/bin/qmake

but this is probably a macports quirk.




回答5:


To compile on OS X 10.10 Yosemite, comment out the following lines starting at line 171 in CMakeLists.txt

#               if (NOT (OSX_TARGET_MAJOR EQUAL 10))
#                       message(FATAL_ERROR "Mac OS X target must be 10.x")
#               endif ()

#               if (OSX_TARGET_MINOR LESS 6)
                        # <= 10.5: 32-bit Intel and PowerPC
#                       set(CMAKE_OSX_ARCHITECTURES "ppc;i386"
#                               CACHE STRING "" FORCE)
#               else()
                        # >= 10.6: Intel only
                        set(CMAKE_OSX_ARCHITECTURES "i386"
                                CACHE STRING "" FORCE)
#               endif()


来源:https://stackoverflow.com/questions/26923227/how-to-compile-synergy-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!