Skip to content

Tutorial: CompileNF

ketoo edited this page Apr 21, 2020 · 21 revisions

IF YOU LIVING IN A COUNTRY CANNOT ACCESS GITHUB FASTLY PLZ BUILD NF WITH VPN

因为使用vcpkg管理依赖库,而依赖库又全是在境外,因此,如果遇到下载依赖库困难,请”科学上网“ 来完成依赖库的下载!

IF YOU CAN NOT BUILD THE DEPENDENCIES THEN PLEASE RUN THE CMDS BELOW TO SET UP THE ENVIRONMENT:

如果你使用境外的云服务器但是不能编译NF,请运行一下命令(这个是针对ubuntu,其他os,运行install4cmake.sh的时候会有提示):

  • sudo apt-get install g++
  • sudo apt-get install cmake
  • sudo apt-get install automake
  • sudo apt-get install zip unzip

Supported Compilers

  • GCC >= 7 (Tested in Ubuntu 16.04)
  • MSVC >= VS2019 (Tested in Win10)

Build and Install

FOR WINDOWS, MSVC >= 2019

  1. Git pull all source
  2. Open the solution: NoahFrame.sln, build FileProcessTool project
  3. Run GenerateConfigXML.bat to generate configuration files
  4. Run the script file named build_dep.bat where located /Dependencies
  5. Build the solution(if u build failed, please build again(not rebuild all))
  6. Run the binary file by _Out/rund.bat

FOR LUNUX(UBUNTU, CENTOS) ---- please use administrator(or sudo) to do these:

  1. Git pull all source
  2. Run install4cmake.sh to build NF (or run cd /Dependencies ./build_dep.sh then run buildServer.sh)
  3. Run the binary file by _Out/rund.sh

PS:

rebuild NF all(download and compile all dependence libraries):install4cmake.sh 全部重新编译NF(包含重新下载和编译依赖库):install4cmake.sh

only build NF(we dont download and compile any dependence library): buildServer.sh 只编译NF源码(不下载依赖库也不编译依赖库): buildServer.sh

Generate property system code and xml files from _Out/NFDataCfg/Excel/ : GenerateConfigXML.bat or GenerateConfigXML.sh 从 _Out/NFDataCfg/Excel/ 自动产生NF property system 需要的代码以及xml文件: GenerateConfigXML.bat or GenerateConfigXML.sh