🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
6.7 KiB

  1. The latest PhysicsFS information and releases can be found at:
  2. https://icculus.org/physfs/
  3. Building is (ahem) very easy.
  4. ALL PLATFORMS:
  5. Please read the text file LICENSE.txt in the root of the source tree.
  6. The license is extremely liberal, even to closed-source, commercial
  7. applications.
  8. If you've got Doxygen (http://www.doxygen.org/) installed, you can run it
  9. without any command line arguments in the root of the source tree to generate
  10. the API reference (or build the "docs" target from your build system). This
  11. is optional. You can browse the API docs online here:
  12. https://icculus.org/physfs/docs/
  13. BUILD IT WITH YOUR OWN PROGRAM:
  14. If you don't care about formal packaging: just add everything in the "src"
  15. directory to whatever you use to build your program and compile it along with
  16. everything else, and you're done. It should compile with any reasonable
  17. ANSI C compiler, should build cleanly even with excessive compiler warnings
  18. enabled, needs no extra configuration, and allows static linking.
  19. WinRT and Haiku need C++ compilers for their system APIs, but if you aren't on
  20. these platforms and don't have a C++ compiler, don't build the .cpp files.
  21. Likewise: Apple platforms (macOS, iOS, etc) need an Objective-C compiler, but
  22. if you aren't on these platforms and don't have a Objective-C compiler, don't
  23. build the .m file. Everything you need is in the .c sources.
  24. If this all worked for your specific project, you can stop reading now.
  25. Unix:
  26. You will need CMake (https://www.cmake.org/) 2.4 or later installed.
  27. Make a directory, wherever you like. This will be your build directory.
  28. Chdir to your build directory. Run "cmake /where/i/unpacked/physfs" to
  29. generate Makefiles. You can then run "ccmake ." and customize the build,
  30. but the defaults are probably okay. You can have CMake generate KDevelop
  31. or Ninja project files or whatever, if you prefer these.
  32. Run "make". PhysicsFS will now build.
  33. As root, run "make install".
  34. If you get sick of the library, run "make uninstall" as root
  35. and it will remove all traces of the library from the system paths.
  36. Once you are satisfied, you can delete the build directory.
  37. Primary Unix development is done with GNU/Linux, but PhysicsFS is known to
  38. work out of the box with several flavors of Unix. It it doesn't work, patches
  39. to get it running can be sent to icculus@icculus.org.
  40. Windows:
  41. If building with Cygwin, mingw32, MSYS, or something else that uses the GNU
  42. toolchain, follow the Unix instructions, above.
  43. If you want to use Visual Studio, nmake, or the Platform SDK, you will need
  44. CMake (https://www.cmake.org/) 2.4 or later installed. Point CMake at the
  45. CMakeLists.txt file in the root of the source directory and hit the
  46. "Configure" button. After telling it what type of compiler you are targeting
  47. (Borland, Visual Studio, etc), CMake will process for while and then give you
  48. a list of options you can change (what archivers you want to support, etc).
  49. If you aren't sure, the defaults are probably fine. Hit the "Configure"
  50. button again, then "OK" once configuration has completed with options that
  51. match your liking. Now project files for your favorite programming
  52. environment will be generated for you in the directory you specified.
  53. Go there and use them to build PhysicsFS.
  54. PhysicsFS will only link directly against system libraries that have existed
  55. since Windows NT 3.51. If there's a newer API we want to use, we try to
  56. dynamically load it at runtime and fallback to a reasonable behaviour when
  57. we can't find it. Note that Windows 98 and later _should_
  58. work if you use the Microsoft Layer for Unicode (UNICOWS.DLL) to provide
  59. some missing system APIs, but this is no longer tested as of PhysicsFS 2.1.0.
  60. PhysicsFS 2.0.x is known to work with Windows 95 without UNICOWS.DLL.
  61. PhysicsFS works on 32-bit and 64-bit Windows. There is no 16-bit Windows
  62. support at all. Windows RT is covered below.
  63. Windows RT:
  64. Windows RT (Windows Phone, Windows Store, UWP) 8.0 and later are supported.
  65. Make sure you include both physfs_platform_windows.c _and_
  66. physfs_platform_winrt.cpp in your build, and that the C++ file has
  67. "Consume Windows Runtime Extension" set to "Yes" in its Visual Studio
  68. properties (from the command line, you want to compile this file with the
  69. "/ZW" compiler switch). CMake can, in theory, generate a project file for
  70. WinRT if you pick a recent Visual Studio target, choose manual cross-compile
  71. options, and set the system name to "WindowsPhone" or "WindowsStore" and the
  72. correct OS version (8.0 or later).
  73. PocketPC/WindowsCE:
  74. Support for PocketPC was removed in PhysicsFS 2.1.0. This was known to work
  75. in the 1.0 releases, but wasn't tested in 2.0 and later. PhysicsFS should
  76. work on modern Windows Phones (see "Windows RT" section).
  77. macOS:
  78. You will need CMake (https://www.cmake.org/) 2.4 or later installed.
  79. You can either generate a Unix makefile with CMake, or generate an Xcode
  80. project, whichever makes you more comfortable.
  81. PowerPC and Intel Macs should both be supported.
  82. MAC OS 8/9 ("Mac OS Classic"):
  83. Classic Mac OS support has been dropped in PhysicsFS 2.0. Apple hasn't updated
  84. pre-OSX versions in more than a decade at this point, none of the hardware
  85. they've shipped will boot it for almost as many years, and finding
  86. developer tools for it is becoming almost impossible. As the switch to Intel
  87. hardware has removed the "Classic" emulation environment, it was time to
  88. remove support from PhysicsFS. That being said, the PhysicsFS 1.0 branch can
  89. still target back to Mac OS 8.5, so you can use that if you need support for
  90. this legacy OS. We still very much support modern macOS, though: see above.
  91. Emscripten:
  92. Use the "Unix" instructions, above. You can install the Emscripten SDK and use
  93. the extras/buildbot-emscripten.sh script to automate this for you.
  94. BeOS, Zeta, YellowTab:
  95. BeOS support was dropped in PhysicsFS 2.1.0. Consider installing Haiku, which
  96. we still support.
  97. Haiku:
  98. Use the "Unix" instructions, above.
  99. OS/2:
  100. OS/2 is known to work with OpenWatcom and GCC-based compilers. I couldn't get
  101. an OS/2 port of CMake to generate OpenWatcom project files (although it should
  102. be able to do that in theory), it should be able to do Unix Makefiles with
  103. GCC. It might be easier to just compile PhysicsFS along with the rest of
  104. your project on this platform.
  105. OTHER PLATFORMS:
  106. Many Unix-like platforms might "just work" with CMake. Some of these platforms
  107. are known to have worked at one time, but have not been heavily tested, if
  108. tested at all. PhysicsFS is, as far as we know, 64-bit and byteorder clean,
  109. and is known to compile on several compilers across many platforms. To
  110. implement a new platform or archiver, please read the heavily-commented
  111. physfs_internal.h and look at the physfs_platform_* and physfs_archiver_*
  112. source files for examples.
  113. --ryan. (icculus@icculus.org)