README.txt 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. This file has been dedicated to the public domain, to the extent
  2. possible under applicable law, via CC0. See
  3. http://creativecommons.org/publicdomain/zero/1.0/ for more
  4. information. This file is offered as-is, without any warranty.
  5. ========================================================================
  6. HOW TO RUN
  7. If you have downloaded a version of the game designated for a particular
  8. system, simply run the executable.
  9. To run the source code, you will need Python 3.6 or later
  10. <https://www.python.org>. You will also need the dependencies listed in
  11. requirements.txt, which you can install automatically by using the
  12. following command:
  13. python3 -m pip install -r requirements.txt
  14. Once you have installed the dependencies, you can start the game by
  15. running "retux.py". On most systems, this should be done by
  16. double-clicking on it; if you are shown a dialog asking you if you want
  17. to display or run the file, choose to run it.
  18. There are some command-line options that can be passed. Run the game in
  19. a terminal with the "-h" command-line option for more information.
  20. BUILDING LOCALES (FOR DEVELOPERS AND PACKAGERS)
  21. If you have cloned the source code directly from Git, locales will need
  22. to be built for languages other than English to work. This step is only
  23. necessary if you are a developer, translator, or packager running the
  24. source code taken directly from the Git repository.
  25. To build locales, ensure your system has the msgfmt command (which is a
  26. part of gettext), then do the following from the data/locale directory:
  27. ./build.py
  28. CREATING FROZEN EXECUTABLES (FOR DEVELOPERS AND PACKAGERS)
  29. This game is written in Python, so it is run directly as a script with
  30. the Python interpreter. However, it can be and is "frozen" with certain
  31. tools to make it possible to run on systems which don't have Python
  32. installed, or which are missing one or more of the game's dependencies.
  33. Of course, all dependencies required to run ReTux from source code are
  34. also required to freeze an executable.
  35. This game supports two methods of freezing: PyInstaller and cx_Freeze.
  36. In general, PyInstaller is preferred since it is easier to use and
  37. generally better in our experience. However, cx_Freeze can also be used
  38. as a fallback if you can't get PyInstaller to work.
  39. To build with PyInstaller on Linux, we use the following command within
  40. the game's root directory:
  41. pyinstaller -F retux.py
  42. For Windows, we instead use the following command (utilizing -w and -i):
  43. pyinstaller -Fw -i data/images/misc/icon.ico retux.py
  44. A binary will be produced and placed in the dist directory. You can then
  45. move the binary out to the game's root directory and it should run just
  46. as retux.py runs. The left-over build and dist directories, as well as
  47. the retux.spec file, can then be deleted.
  48. If the -F option does not work or a single executable file is
  49. undesirable, the -F option can be omitted, in which case a binary and
  50. several other files (including shared object files) will be produced,
  51. all of which must be moved to the game's root directory.
  52. To build with cx_Freeze, the command used is the same regardless of
  53. the system:
  54. python3 setup.py build
  55. This will produce a usable binary along with several other files needed
  56. by the binary within a subdirectory named based on your architecture
  57. under the build directory. Move all of these files to the game's root
  58. directory and the binary produced should run the same as the source code
  59. does.