packaging_guide.txt 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. Packaging AssaultCube:
  2. First follow all steps in 'releasing_guide.txt'.
  3. The suggested setup involves four separate paths:
  4. The development occured in Path-A:repo, packaging occurs in Path-B:build and Path-C:pack. The profile folder is Path-D:profile.
  5. On a MacOS/Linux system we'd be somewhere in /usr/local/src/AC, on Windows D:\Development\AC. The location of the profile folders can be found in Path-A:repo/assaultcube.[bat/sh].
  6. In our example in the source path location a subfolder 'git' holds the repository used in development (that's Path-A:repo) another subfolder 'PACKAGE' has two children 'build' (Path-B:build) and 'pack' (Path-C:pack). We are using v9.9.9.0 as stand-in for your current version number and also the repository tag, but that can be a long or short commit identifier too (e.g. for 'git archive' in I.1.)
  7. Example:
  8. /usr/local/src/AC
  9. Path-A:repo: /usr/local/src/AC/git
  10. Path-B:build: /usr/local/src/AC/PACKAGE/build
  11. Path-C:pack: /usr/local/src/AC/PACKAGE/pack
  12. Path-D:profile: /home/user/.assaultcube/v9.9.9.0
  13. Some automation is provided by scripts in source/vcpp/buildEnv/*.bat and source/dev_tools/*.sh.
  14. I. a clean build
  15. 1. Get a package of the release tag from the git repository.
  16. Preferred: "git archive", assuming a tag has been created (v9.9.9.0) or you're using a commit identifier (short possible) and local repository is up-to-date ("git pull")
  17. Alternatives: download ZIP github.com/assaultcube/AC or a clean "git clone"
  18. Example: user@machine:/usr/local/src/AC/git$ git archive --format=tar.gz -o ../PACKAGE/v9.9.9.0.tar.gz v9.9.9.0
  19. user@machine:/usr/local/src/AC/git$ git archive --format=tar.gz -o ../PACKAGE/v1.3.0.1.tar.gz dd164437a
  20. 2. Extract the package twice
  21. 1. Extract the package to Path-C:pack.
  22. Example: user@machine:/usr/local/src/AC/PACKAGE/pack$ tar xzf ../v9.9.9.0.tar.gz
  23. 2. Extract the package to Path-B:build.
  24. Example: user@machine:/usr/local/src/AC/PACKAGE/build$ tar xzf ../v9.9.9.0.tar.gz
  25. 3. Building
  26. 1. Make a PRODUCTION build. In the file /usr/local/src/AC/PACKAGE/build/source/src/cube.h find the commented line "//#define PRODUCTION" and remove the "//".
  27. 2. compile binaries for client & server inside Path-B:build
  28. Example: user@machine:/usr/local/src/AC/PACKAGE/build/source/src$ make clean && colormake && make install
  29. 3. generate fresh config/mapmodelattributes.cfg file
  30. 1. delete Path-D:profile – most importantly Path-D:profile/config/mapmodelattributes.cfg and Path-D:profile/packages/models/mapmodels
  31. 2. run AC with an empty profile
  32. 3. in AC run "/loadallmapmodels" command
  33. II. fill packaging area
  34. 1. copy Path-D:profile/config/mapmodelattributes.cfg to the Path-C:pack "config" directory
  35. Example: cp /home/user/.assaultcube/v9.9.9.0/config/mapmodelattributes.cfg /usr/local/src/AC/PACKAGE/pack/config/
  36. 2. copy the binaries for the target platform to Path-C:pack
  37. 1. rename 'native_*'
  38. - Windows: renamed to 'ac_*' into Path-C:pack/bin_win32
  39. - Linux: renamed to 'linux_*' into Path-C:pack/bin_unix
  40. Example: native_client would become linux_client (32bit) or linux_64_client (64bit)
  41. 3. copy model shadow files (shadows.dat) to Path-C:pack - NOT the crypto:entropy.dat
  42. Example: user@machine:/usr/local/src/AC/PACKAGE/pack$ ACPROFILE=~/.assaultcube/v9.9.9.0; while read pfad; do subpfad=$(echo "$pfad"|cut -d'/' -f6-); cp $pfad $subpfad; done < <(find $ACPROFILE -type f -name shadows.dat)
  43. CAUTION: you need to fix the ACPROFILE value to match Path-D:profile
  44. 4. Copy the whole content from htdocs/docs/ folder in the latest release tag in assaultcube.github.io repository to docs/ folder. If the Path-B:build has newer content update both website and Path-C:pack.
  45. 5. Archive config/autoexec.cfg, config/favourites.cfg, config/pcksources.cfg into config/configtemplates.zip (see commit 41fd31d). [[ https://github.com/assaultcube/AC/commit/41fd31d ]]
  46. Example: user@machine:/usr/local/src/AC/PACKAGE/pack/config$ zip configtemplates.zip autoexec.cfg favourites.cfg pcksources.cfg; for stale in autoexec favourites pcksources; do rm ${stale}.cfg; done
  47. 6. fix the install_or_remove_menuitem.sh
  48. The values for LAUNCHERFILE and LAUNCHERTITLE should have the "(_)dev" parts removed (at least).
  49. III. clean out packaging area
  50. 1. If you used 'git clone' in I.1: Delete .git folder, .gitignore, .travis.yml, if existent.
  51. 2. Should NOT be there anyway, but be sure to delete:
  52. - config/init*.cfg, config/saved*.cfg, config/servervita*.cfg, config/servers.cfg, config/history
  53. - clientlog*.txt
  54. - packages/maps/*.cgz (and *.cfg), packages/maps/servermaps/incoming/*.cgz (and *.cfg)
  55. 3. Delete unwanted parts of the 'source' subfolder
  56. - Windows: only after you have prepared EXE, DMG and Installer - then remove entire 'source' folder
  57. - Linux: delete the following subfolders in 'source': doxygen, vcpp, xcode, lib and the source/codeblocks/AssaultCube.cbp file.
  58. 4. Delete contents of screenshots/ folder.
  59. 5. Delete contents of demos/ folder except tutorial_demo.dmo, if they exist. (tutorial_demo.dmo currently (v1.3_BETA1) does not exist anymore)
  60. 6. System scripts:
  61. - Windows: delete any *.sh files and the bin_unix folder
  62. - Linux: delete any *.bat files and the bin_win32 folder
  63. Example: find Path-C:pack -type f -name "*.bat" -exec rm {} \;
  64. IV. wrap the package
  65. 1. generate checksum list file (packages/misc/checksums_md5.txt)
  66. Example: user@machine:/usr/local/src/AC/PACKAGE/pack$ /bin/sh source/dev_tools/generate_md5_checksums.sh
  67. 2. Package AC
  68. - Windows an Installer (.exe)
  69. - Linux a bzip'ed tarball (.tar.bz2) /etc.) and
  70. Example: user@machine:/usr/local/src/AC/PACKAGE/pack$ tar cjf ../AssaultCube_v1.2.3.0.tar.bz2 .
  71. 1. naming convention: AssaultCube_vMAJOR.MINOR.BUILD.REVISION.EXTENSION
  72. Example: on Windows this could be AssaultCube_v1.3.10.512.exe
  73. 3. Create new release on GitHub and upload the packages