From 838ea5f9604887b837b6a0584716f30605cbd8bd Mon Sep 17 00:00:00 2001 From: flowtron Date: Sun, 25 Jul 2021 16:52:22 +0200 Subject: [PATCH] name:tag packaging directories --- source/dev_tools/packaging_guide.txt | 43 +++++++++++++++------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/source/dev_tools/packaging_guide.txt b/source/dev_tools/packaging_guide.txt index 747e7d29..e712b5f5 100644 --- a/source/dev_tools/packaging_guide.txt +++ b/source/dev_tools/packaging_guide.txt @@ -2,42 +2,45 @@ 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). +The development occured in Path-A:repo, packaging occurs in Path-B:build and Path-C:pack. The profile folder is Path-D:profile. +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]. +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). 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 + Path-A:repo: /usr/local/src/AC/git + Path-B:build: /usr/local/src/AC/PACKAGE/build + Path-C:pack: /usr/local/src/AC/PACKAGE/pack + Path-D:profile: /home/user/.assaultcube/v9.9.9 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. + Preferred: "git archive", assuming a tag has been created and local repository is up-to-date ("git pull") + Alternatives: download ZIP github.com/assaultcube/AC or a clean "git clone" + Example: user@machine:/usr/local/src/AC/git$ git archive --format=tar.gz -o ../PACKAGE/v9.9.9.tar.gz v9.9.9 + 2. Extract the package twice + 1. Extract the package to Path-C:pack. Example: user@machine:/usr/local/src/AC/PACKAGE/pack$ tar xzf ../PACKAGE/v9.9.9.tar.gz - 2. Extract the package to Path-B. + 2. Extract the package to Path-B:build. 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 + 1. compile binaries for client & server inside Path-B:build 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 + 1. delete Path-D:profile – most importantly Path-D:profile/config/mapmodelattributes.cfg and Path-D:profile/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. copy Path-D:profile/config/mapmodelattributes.cfg to Path-C:pack + 2. copy the binaries for the target platform to Path-C:pack 1. rename 'native_*' - - Windows: renamed to 'ac_*' into Path-C/bin_win32 - - Linux: renamed to 'linux_*' into Path-C/bin_unix + - Windows: renamed to 'ac_*' into Path-C:pack/bin_win32 + - Linux: renamed to 'linux_*' into Path-C:pack/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) + 3. copy model shadow files (shadows.dat) to Path-C:pack - NOT the crypto:entropy.dat + Example: user@machine:/usr/local/src/AC/PACKAGE/pack$ ACPROFILE=~/.assaultcube/v9.9.9; while read pfad; do subpfad=$(echo "$pfad"|cut -d'/' -f6-); cp $pfad $subpfad; done < <(find $ACPROFILE -type f -name shadows.dat) + CAUTION: you need to fix the ACPROFILE value to match Path-D:profile 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 @@ -56,7 +59,7 @@ III. clean out packaging area 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 {} \; + Example: find Path-C:pack -type f -name "*.bat" -exec rm {} \; IV. wrap the package 1. generate checksum list file (packages/misc/checksums_md5.txt)