On 19 March 2013 10:58, Marko Lindqvist
<no-reply.invalid-addr...@gna.org> wrote:
>
> But then compiler errors begun:
> src.patched/server/plrhand.c: In function 'kill_player':
> src.patched/server/plrhand.c:159:17: error: 'struct packet_game_info' has no
> member named 'gameloss_style'
> src.patched/server/plrhand.c:159:35: error: 'GAMELOSS_STYLE_CWAR' undeclared
> (first use in this function)

 If this is, as I expect, result of problems arranging local patches,
scripts I've been using myself may help.

 My setup is such that I have one directory for these utility scripts
(named 'fc_test' for historical reasons, but there should be no
reference to that name - you may name it as you wish) and main
directory of each branch in main freeciv work directory. Under each
branch directory are directories "src.orig", which is svn checkout of
the branch, "src.patched" where current locallly patched version of
the sources live, and 'builds' under which different builds live.
There's no need for 'src.patched' to contain svn information, so it
can be svn export (in practice that takes only half the space of
checkout as checkout has both working copy and the checked out
version).


 - fc_test
 - patches
 - TRUNK
   - src.orig
   - src.patched
   - builds
     - gtk2
     - gtk3
     - ...
 - S2_4
   - src.orig
   - src.patched
   - builds
     - gtk2
     - gtk3
     - ...
 - ...



 All the scripts are meant to be run in branch specific directory so
they find correct 'src.orig' and 'src.patched'.

 - 'create_patch.sh' creates patch src.orig -> src.patched
 - 'remove_patch.sh' removes patch from src.patched. This is not
attached as script, but should be symbolic link to apply_patch.sh
 - 'apply_patch.sh' applies patch to src.patched
 - 'sync_dirs.sh' makes src.patched identical to 'src.orig'

 These do not handle binary files, so if .pngs change, you have to do
some more manual work.

 Typical workflow:

 > cd src.orig
 > svn up
 > cd ..
 > ../fc_test/sync_dirs.sh
 > # Modify src.patched
 > ../fc_test/create_patch.sh ../patches/MyNewPatch.patch
 > ../fc_test/sync_dirs.sh
 > # Create second patch

 To work on old patch:
 > ../fc_test/sync_dirs.sh
 > ../fc_test/apply_patch.sh ../patches/MyNewPatch.patch
 > # Modify src.patched some more
 > ../fc_test/create_patch.sh ../patches/MyNewPatch-2.patch
 > ../fc_test/sync_dirs.sh



 - ML

Attachment: .diff_ignore
Description: Binary data

Attachment: create_patch.sh
Description: Bourne shell script

Attachment: apply_patch.sh
Description: Bourne shell script

Attachment: sync_dirs.sh
Description: Bourne shell script

_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to