INSTALL.txt 6.5 KB

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