Author Topic: Source code access.  (Read 39546 times)

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Source code access.
« on: January 13, 2009, 10:36:45 AM »
This post has been edited to update the URLs.

The source code for WeiDU is now managed via git. The repository is git://github.com/WeiDUorg/weidu.git (Web Interface). This post will be edited with actual instructions on how to install git, checkout the code, and submit your changes, once I find a readable tutorial.



Using git with a graphical user interface (probably easier for newbies, but if you're going to edit WeiDU you should really learn up on cygwin anyway):
See this article.



Using git with cygwin (instructions can be adapted for OSX and Linux users pretty easily):
This is how Taimon suggests to work:

Quote
Just for the record, here is what I did for to get started:

    * `cd WeiDU'
    * `git clone git://github.com/WeiDUorg/weidu.git
    * log into github and fork the main project
    * `git remote add mypub git@github.com:<username>/weidu.git'


And these were the steps for the changes:

    * `cd WeiDU'
    * `git pull' for syncing the local repos with upstream (runs git fetch + git merge)
    * edit the files (they're in c::\cygwin\home\<username>\WeiDU if you follow these instructions)
    * `git commit -a'
    * `git push mypub' for pushing the changes to my public repos on github

Not mentioned here: install cygwin; when you get to select packages, choose the 'full' system and install the git and ssh packages. Run cygwin, run these commands:
Code: [Select]
mkdir WeiDU
cd WeiDU
git init
git config add user.name "Your full name"
git config add user.email "a valid email address"
ssh-keygen <and follow the instructions>
register to github; when it asks for the public key, it's in c:\cygwin\home\<username>\.ssh\id_rsa.pub by default.

Edited for details on where to access the source code.
« Last Edit: July 18, 2019, 04:17:59 PM by Wisp »
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: Source code access.
« Reply #1 on: January 13, 2009, 03:13:35 PM »
Let me know if you need any help concerning git itself.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Source code access.
« Reply #2 on: January 13, 2009, 03:32:54 PM »
Can you attempt submitting a patch? I need to see if I've understood fully the 300 steps required for me to accept it.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: Source code access.
« Reply #3 on: January 13, 2009, 04:47:51 PM »
Since I don't have write access to the github repos, that leaves me with the git-send-email option.
I've send the patch to your spellholdstudios.net address.

By the way, you should set user.email to a valid email address. :)

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Source code access.
« Reply #4 on: January 13, 2009, 04:57:20 PM »
Since I don't have write access to the github repos, that leaves me with the git-send-email option.
The point is to give you (or other continuative contributers) write access, otherwise I could've just kept manually running patch. What's your github login?

Quote
By the way, you should set user.email to a valid email address. :)
I managed to set user.mail instead  :(
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: Source code access.
« Reply #5 on: January 13, 2009, 05:47:24 PM »
The point is to give you (or other continuative contributers) write access, otherwise I could've just kept manually running patch.
There is a git utility that directly applies the patch emails to your local repository. (Haven't tried it.)

Quote
What's your github login?
taimon

/Edit:
I guess the github plan is, that I create my own "fork" of your weidu repos and you pull my changes from this fork.
« Last Edit: January 13, 2009, 06:18:40 PM by Taimon »

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Source code access.
« Reply #6 on: January 13, 2009, 06:02:13 PM »
There is a git utility that directly applies the patch emails to your local repository. (Haven't tried it.)
Oh. Guess it's 1% easier than downloading a patch from here, since I use thunderbird and not mutt  ;)

Quote
taimon
OK, now you're a contributor to WeiDU. You should be able to merge stuff directly to the repo, if I understand this correctly.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Source code access.
« Reply #7 on: January 13, 2009, 06:20:30 PM »
Cheers, I got the whole process going  :)

Can you write a straight tutorial for pulling, branching and pushing for the benefit of other contributors?
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: Source code access.
« Reply #8 on: January 13, 2009, 06:31:46 PM »
Wait a sec, I think I messed something up. :D
I've created the fork and pushed there, but afterwards decided to also push to git@github.com:vbigiani/weidu.git.
(Check git log to see what I mean.)

I'm unsure whether I should push to my fork or to the main-line (i.e. your account) now.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Source code access.
« Reply #9 on: January 13, 2009, 06:36:50 PM »
Wait a sec, I think I messed something up. :D
I've created the fork and pushed there, but afterwards decided to also push to git@github.com:vbigiani/weidu.git.
(Check git log to see what I mean.)

I'm unsure whether I should push to my fork or to the main-line (i.e. your account) now.
Um, your patch needs my signoff for being applied, so what you're doing appears to work correctly... But then again, it's not like I actually know 100% of what's going on and what's supposed to go on.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: Source code access.
« Reply #10 on: January 13, 2009, 07:10:17 PM »
So I guess there are two different options for the workflow:

1. I get updates from the main repos (your public repos), make changes locally, push them to my fork and send a pull request to you.
You pull from my public to your local repos, check if everything is fine and push the changes to the main repos.

2. Instead of pushing to the fork, I directly push to your public repos (needs the contributor status)

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Source code access.
« Reply #11 on: January 13, 2009, 07:11:38 PM »
Umm, I guess 1 is fine for occasional contributors and 2 is better for people who contribute more consistently (you, dev, and somebody else I guess).
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Source code access.
« Reply #12 on: January 13, 2009, 07:41:57 PM »
Umm, I guess 1 is fine for occasional contributors and 2 is better for people who contribute more consistently (you, dev, and somebody else I guess).
Uh, whatever.

Like Wes before you, if I come up with it, you'll hear about it here. You guys can repo main and repo public and repo local and push and pull and fork and request. I'm sticking to "DO THIS PLEASE THANK YOU GBYE."

Offline Mike1072

  • Planewalker
  • *****
  • Posts: 298
  • Gender: Male
Re: Source code access.
« Reply #13 on: January 14, 2009, 02:19:59 AM »
I tried making some edits to the docs via Cygwin.  Hadn't used git before but I think that it worked...

However, I'm pretty lost as to whether I should be also doing stuff on the website or just via the command-line.  Also I don't know about all this branch/forking stuff.
« Last Edit: January 14, 2009, 02:26:49 AM by Mike1072 »

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: Source code access.
« Reply #14 on: January 14, 2009, 06:06:05 AM »
The fork process is a special github action.
By clicking on the fork button you basically create your own public repository (that is somehow linked to the original project) and push your local changes into it.
(Try something like `git remote add mypub git@github.com:username/weidu.git' and then `git push mypub'.)

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Source code access.
« Reply #15 on: January 14, 2009, 07:01:44 AM »
The workflow is like this:
setup:
install cygwin, and the git and ssh package.
register at github. Follow the instructions for setting up git and ssh and providing all the required info.
Fork my github repository (via github)
Via cygwin, create a new directory (for ex. WeiDU-devel), cd into it, and run `git init && git remote add mypub git@github:<username>/weidu.git'

writing publishing one or more diffs:
via github, merge your repository with mine.
cd into the git directory
git pull mypub
do whatever change you might want and test it
git commit -a -m 'one line description of the patch'
git push mypub master

once you're done and your work is tested:
if you're a contributor: push your commit to my repository (via github)
if not: send me a pull request

I don't need either because I subscribe via RSS to everything happening to vbigiani/weidu, but a push to my repo/pull request is a good way of telling me 'I'm done with this work, and it's tested'.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: Source code access.
« Reply #16 on: January 14, 2009, 08:31:46 AM »
Just for the record, here is what I did for to get started:
  • `git clone git://github.com/vbigiani/weidu.git'
  • log into github and fork the main project
  • `git remote add mypub git@github.com:<username>/weidu.git'

And these were the steps for the changes:
  • `git pull' for syncing the local repos with upstream (runs git fetch + git merge)
  • edit + `git commit -a'
  • `git push mypub' for pushing the changes to my public repos on github

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Source code access.
« Reply #17 on: January 14, 2009, 08:47:47 AM »
Just for the record, here is what I did for to get started:
  • `git clone git://github.com/vbigiani/weidu.git'
  • log into github and fork the main project
  • `git remote add mypub git@github.com:<username>/weidu.git'

And these were the steps for the changes:
  • `git pull' for syncing the local repos with upstream (runs git fetch + git merge)
  • edit + `git commit -a'
  • `git push mypub' for pushing the changes to my public repos on github
Um, does that sync with my repo before your editing?
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: Source code access.
« Reply #18 on: January 14, 2009, 11:04:20 AM »
Yep, the `git pull' there fetches any updates from your repos  (as this was the one I cloned from) and merges them into the current branch.

Offline Mike1072

  • Planewalker
  • *****
  • Posts: 298
  • Gender: Male
Re: Source code access.
« Reply #19 on: January 14, 2009, 08:20:57 PM »
Just for the record, here is what I did for to get started:
  • `git clone git://github.com/vbigiani/weidu.git'
  • log into github and fork the main project
  • `git remote add mypub git@github.com:<username>/weidu.git'

And these were the steps for the changes:
  • `git pull' for syncing the local repos with upstream (runs git fetch + git merge)
  • edit + `git commit -a'
  • `git push mypub' for pushing the changes to my public repos on github
Just wanted to say, this works and is relatively easy.

Thanks for the instructions.

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Source code access.
« Reply #20 on: July 02, 2009, 02:38:57 PM »
I tested out github. Hope it worked. I think it did. Taimon sent me an e-mail saying that I didn't have to send requests for him to look at my edits.
But I didn't do everything that was listed in the instructions.  I just used the github website.  Is that sufficient? Or do I need to figure out how to use the various offline programs?
If it helps, the only thing I'd ever do is add new macros and/or functions and adjust the readme doc to include information about them.  I'll leave the actual "weidu engine" alone...
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Source code access.
« Reply #21 on: July 02, 2009, 06:39:01 PM »
I received correctly the patches. The only hiccup was that you sent the whole files as patches because of CRLF issues, but this is not a git(hub) issue.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Source code access.
« Reply #22 on: July 15, 2009, 06:13:13 PM »
Finally got msysgit to work.  So now I should be able to add macros or functions to the appropriate tpp files, push the changes to my public repo and ask for them to be pulled.
When I set it up I told it to use unix style line endings, it seemed the least confusing of all the options.  Also, might solve some of the crlf issues I apparently had the last time I made some adjustments...

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Source code access.
« Reply #23 on: July 15, 2009, 06:39:56 PM »
cough some git guru should tell me the option to ignore crlf issues cough
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: Source code access.
« Reply #24 on: July 16, 2009, 12:34:55 AM »
Well, at least for the diff you can say --ignore-space-at-eol.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: