Files
assaultcube-/source/dev_tools/packaging_guide.txt
T
2021-05-25 16:19:44 +02:00

73 lines
4.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Packaging AssaultCube:
First follow all steps in 'releasing_guide.txt'.
The suggested setup involves four separate paths:
The development occured in Path-A, packaging occurs in Path-B and Path-C. The profile folder is Path-D.
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/assaultcube.[bat/sh].
In our example in the source path location a subfolder 'git' holds the repository used in development (that's Path-A) another subfolder 'PACKAGE' has two children 'build' (Path-B) and 'pack' (Path-C).
Example:
/usr/local/src/AC
Path-A: /usr/local/src/AC/git
Path-B: /usr/local/src/AC/PACKAGE/build
Path-C: /usr/local/src/AC/PACKAGE/pack
Some automation is provided by scripts in source/vcpp/buildEnv/*.bat and source/dev_tools/*.sh.
I. a clean build
1. Get a package of the release tag from the git repository.
Preferred: "git archive". Alternatives: download ZIP github.com/assaultcube/AC or a clean "git clone"
Example: user@machine:/usr/local/src/AC/git$ git archive --format=tar v9.9.9 | gzip > ../PACKAGE/v9.9.9.tar.gz
2. Extrac the package twice
1. Extract the package to Path-C.
Example: user@machine:/usr/local/src/AC/PACKAGE/pack$ tar xzf ../PACKAGE/v9.9.9.tar.gz
2. Extract the package to Path-B.
Example: user@machine:/usr/local/src/AC/PACKAGE/build$ tar xzf ../PACKAGE/v9.9.9.tar.gz
3. Building
1. compile binaries for client & server inside Path-B
Example: user@machine:/usr/local/src/AC/PACKAGE/build/source/src$ make clean && colormake && make install
2. generate fresh config/mapmodelattributes.cfg file
1. delete Path-D – most importantly Path-D/config/mapmodelattributes.cfg and Path-D/packages/models/mapmodels
2. run AC with an empty profile
3. in AC run "/loadallmapmodels" command
II. fill packaging area
1. copy Path-D/config/mapmodelattributes.cfg to Path-C
2. copy the binaries for the target platform to Path-C
1. rename 'native_*'
- Windows: renamed to 'ac_*' into Path-C/bin_win32
- Linux: renamed to 'linux_*' into Path-C/bin_unix
Example: native_client would become linux_client (32bit) or linux_64_client (64bit)
3. copy model shadow files (shadows.dat) to Path-C - NOT the crypto:entropy.dat
Example: user@machine:/usr/local/src/AC/PACKAGE/pack$ while read pfad; do subpfad=$(echo "$pfad"|cut -d'/' -f6-); echo cp $pfad $subpfad; done < <(find Path-D -type f -name shadows.dat)
4. Copy the whole content from htdocs/docs/ folder in the latest release tag in assaultcube.github.io repository to docs/ folder.
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 ]]
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
III. clean out packaging area
1. If you used 'git clone' in I.1: Delete .git folder, .gitignore, .travis.yml, if existent.
2. Should NOT be there anyway, but be sure to delete:
- config/init*.cfg, config/saved*.cfg, config/servervita*.cfg, config/servers.cfg, config/history
- clientlog*.txt
- packages/maps/*.cgz (and *.cfg), packages/maps/servermaps/incoming/*.cgz (and *.cfg)
3. Delete unwanted parts of the 'source' subfolder
- Windows: only after you have prepared EXE, DMG and Installer - then remove entire 'source' folder
- Linux: delete the following subfolders in 'source': doxygen, vcpp, xcode, lib and the source/codeblocks/AssaultCube.cbp file.
4. Delete contents of screenshots/ folder.
5. Delete contents of demos/ folder except tutorial_demo.dmo, if they exist. (tutorial_demo.dmo currently (v1.3_BETA1) does not exist anymore)
6. System scripts:
- Windows: delete any *.sh files and the bin_unix folder
- Linux: delete any *.bat files and the bin_win32 folder
Example: find /usr/local/src/AC/PACKAGE/pack -type f -name "*.bat" -exec rm {} \;
IV. wrap the package
1. generate checksum list file (packages/misc/checksums_md5.txt)
Example: user@machine:/usr/local/src/AC/PACKAGE/pack$ /bin/sh source/dev_tools/generate_md5_checksums.sh
2. Package AC
- Windows an Installer (.exe)
- Linux a bzip'ed tarball (.tar.bz2) /etc.) and
Example: user@machine:/usr/local/src/AC/PACKAGE/pack$ tar cjf ../AssaultCube_v1.2.3.0.tar.bz2 .
1. naming convention: AssaultCube_vMAJOR.MINOR.BUILD.REVISION.EXTENSION
Example: on Windows this could be AssaultCube_v1.3.10.512.exe
3. Create new release on GitHub and upload the packages