Jump to content


Photo

HOWTO: See binary file differences for mods using github (or other git hosting)


3 replies to this topic

#1 lynx

lynx
  • Modders
  • 2800 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 09 July 2016 - 07:22 AM

I realised this could be handy to more people developing mods, so here it goes.
 
If you used git log, git diff or just viewed some changes in github, you probably realised that it only displays text files and their differences (weidu code, documentation and similar). Any update of an IE format file is just considered done, misunderstood — you don't get to see the actual change.
 
This can be fixed though! Not on github, but for everyone developing or viewing through their own clones of the repositories, the process is relatively simple.
 
1. Get either iesh or ielister (and compile it).
2. Copy the files somewhere stable. For iesh this means everything, for ieparse the executable will do.
3. Tell git to use it when comparing IE formats.
3.1. Open .git/config of each mod repository you downloaded and add the following, replacing PARSERPATH with the path to either iesh's ieparse.py or ielister:

[diff "ie"]
textconv = PARSERPATH
cachetextconv = true

(if you use a global git config, you can do it there)
4. Tell git how to reckognise files in IE formats.
4.1. Again for each repo, add or edit .gitattributes with:

*.bcs diff=ie
*.chu diff=ie
*.pro diff=ie
*.spl diff=ie
*.vvc diff=ie
*.cre diff=ie
*.wmp diff=ie
*.gam diff=ie
*.sav diff=ie

You can add other formats as needed.

 

5. That's it, now viewing git log -p, git diff and similar will first convert the files to plaintext and then diff them normall. Example:

Spoiler

You can test it by deleting a file and seeing how it is displayed in git diff.

 

Note: both parsers are mostly complete, but neither has been updated with any of the EE structural changes yet.


Edited by lynx, 09 July 2016 - 07:22 AM.

GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Market android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...

#2 qwerty1234567

qwerty1234567
  • Members
  • 170 posts

Posted 09 July 2016 - 06:32 PM

Cool. I guess with hooks it can be embedded into commit messages themselves.


bad jarno, go away!


#3 agb1

agb1
  • Modders
  • 410 posts
  • Gender:Male

Posted 12 July 2016 - 01:42 PM

This looks very useful.  I tried compiling iesh with Python 3, but it didn't work.  I guess it needs Python 2?

 

ielister link above goes to a 404 page.


BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#4 lynx

lynx
  • Modders
  • 2800 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 13 July 2016 - 05:39 AM

Sourceforge has problems today, check tomorrow (re ielister).

 

iesh: correct, it was only partly ported to 3.


GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Market android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users