[Howto] properly install git on Windows / Fix Trinitycore rev. 1970-01-01 00:00:00 +0000

[SIZE=12px]Requirements:[/SIZE]

Msysgit can either by acquired directly from git for windows or using the “SetupComplete” package from GitExtensions.

Msysgit version required: 1.7+

Minimum required TC rev: b2404c1a26d9 (10997)

[SIZE=12px]Setup options:[/SIZE]

During the setup wizard you will encounter the following screen:

[ATTACH]24._xfImport[/ATTACH]

Make sure your git executable is added to the PATH variable by choosing one of the green marked options.

Fixes “Missing or outdated git - did you forget to install a recent version?”

During the install I selected the second option but there’s still no revision information. Tried installing in both the default path and windows directory. Using newest Git from http://code.google.com/p/msysgit/

What does entering

echo %PATH%

in a command window return to you?

Same problem with me on my 64 bit Windows Vista computer.

echo %PATH% returns:

[CODE]C:\Users\XXXX>echo %PATH%

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\A

TI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Roxio Sh

ared\DLLShared;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\

;C:\Program Files (x86)\Common Files\DivX Shared;c:\Program Files (x86)\Microso

ft SQL Server\90\Tools\binn;C:\Program Files (x86)\QuickTime\QTSystem;C:\Progr

am Files (x86)\Git\cmd[/CODE]

I installed both Git and GitExtensions in C:\Program Files (x86) and my Build (cmake), TDB, and TrinityCore folders in C:\ in their own folders. I installed Git like you stated above, so any idea what I’m doing wrong?

C:\Users\onehitxzibit>echo %PATH%C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\NVI

DIA Corporation\PhysX\Common;C:\Program Files\PC Connectivity Solution;C:\Windo

ws\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPower

Shell\v1.0;C:\Windows\system32\Wbem;C:\Program Files\Windows Live\Shared;C:\Pro

gram Files\Git\cmd;;C:\FPC\2.2.4\bin\i386-Win32

If things like “C:\Program Files (x86)\Git\cmd” show up in your PATH variable and that folder also contains the executables/scripts everything should work fine.

I do have "C:\Program Files\Git\cmd " in my path but revision still shows up as 0. I doubt my Git installation is the problem.

ich habe dasselbe Problem habe es erst mal temporär so gelöst

[translate google]

I have had the same problem solved it first time temporarily Sun


From fb65808e3563b4c083b8559b241bf088988a8ebb Mon Sep 17 00:00:00 2001

From: Robox <[email protected]>

Date: Mon, 3 Jan 2011 23:40:45 +0100

Subject: [PATCH 06/36] CMake rev fix


---

 cmake/genrev.cmake    |   12 +++++++++++-

 dep/genrev/genrev.cmd |    3 +++

 dep/genrev/genrev.sh  |    2 ++

 3 files changed, 16 insertions(+), 1 deletions(-)

 create mode 100644 dep/genrev/genrev.cmd

 create mode 100644 dep/genrev/genrev.sh


diff --git a/cmake/genrev.cmake b/cmake/genrev.cmake

index 1f6f43e..2eea19f 100644

--- a/cmake/genrev.cmake

+++ b/cmake/genrev.cmake

@@ -8,8 +8,18 @@

 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the

 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


+if( UNIX )

+

+set(genrev ${CMAKE_SOURCE_DIR}/dep/genrev/genrev.sh)

+

+else()

+

+set(genrev ${CMAKE_SOURCE_DIR}/dep/genrev/genrev.cmd)

+

+endif()

+

 execute_process(

-  COMMAND git describe --match init --dirty=+ --abbrev=12

+  COMMAND ${genrev}

   WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"

   OUTPUT_VARIABLE rev_info

   OUTPUT_STRIP_TRAILING_WHITESPACE

diff --git a/dep/genrev/genrev.cmd b/dep/genrev/genrev.cmd

new file mode 100644

index 0000000..d223fce

--- /dev/null

+++ b/dep/genrev/genrev.cmd

@@ -0,0 +1,3 @@

+@echo OFF

+set Git="C:\Program Files (x86)\Git\bin\git.exe"

+        %Git% describe --match init --dirty=+ --abbrev=12

diff --git a/dep/genrev/genrev.sh b/dep/genrev/genrev.sh

new file mode 100644

index 0000000..f2a294c

--- /dev/null

+++ b/dep/genrev/genrev.sh

@@ -0,0 +1,2 @@

+#/bin/bash

+git describe --match init --dirty=+ --abbrev=12

-- 

1.7.3.1.msysgit.0

So we need to pull our Trinity Core clone into the PATH folder (C:\Program Files (x86)\Trinity as an example) now?

I think I got it /emoticons/default_smile.png

During installation of GitExtension (Installation Option 2+3) the fallowing folder will be added to path variable:

C:\Program Files (x86)\Git\cmd

But in this folder you will only find batchfiles, no executeables.

As mentioned above, I try to insert the folder where the git executeables are located:

C:\Program Files (x86)\Git\bin” (At Windows 32 Bit “C:\Program Files\Git\bin”).

So I add “C:\Program Files (x86)\Git\bin” to path variable (without “”) and cmake was able to get trinity reviosion number /emoticons/default_smile.png

Please clear your cmake cache or delete the whole build directory!

This is only of interest if you’re planning to push commits to remote locations like github.

OK, I’m using Win Vista 32bit, installed Git Extensions 2.21, put “C:\Program Files\Git\bin” & “C:\Program Files\Git\cmd” into my PATH, uninstalled Git Extensions and started over several times using the 2nd option which adds it to the path, and still I get a db_version of 0 whenever I open up my world db and go to the table “version”. So apparently I’m missing something some where. Any ideas?

PS: “C:\Program Files\GetExtensions” is in the path statement as well.

Nevermind, I uninstalled everything, deleted the associated folders, and re-installed, and now it’s working.

I am having issues getting the revision info to display. I have tried reinstalling and recompiling multiple times to no avail. Everything else works fine. Both folders are in my path and I can call git from inside the source directory without using the path. I am following the wiki exactly so maybe I am missing something not documented there?

Git version 1.7.3.1

Cmake version 2.8.4

Path

Microsoft Windows XP [Version 5.1.2600]

© Copyright 1985-2001 Microsoft Corp.

C:>echo %path%

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Git\cmd

;C:\Program Files\Git\bin

worldserver output

2011-06-21 14:48:53 Using configuration file worldserver.conf.

2011-06-21 14:48:53 TrinityCore Hash: c4818f189216+ (Win32, Release (little-endian)) (worldserver-daemon)

2011-06-21 14:48:53 to stop.

2011-06-21 14:48:53 ______ __

2011-06-21 14:48:53 /__ _\ __ _/\ _

2011-06-21 14:48:53 //\ / _ __ /_\ ___ /_\ \ ,\ __ __

2011-06-21 14:48:53 \ \ /`‘__/\ \ /’ _ `/\ \ \ / /\ /\ \

2011-06-21 14:48:53 \ \ \ \ / \ \ /\ /\ \ \ \ \ _\ \ _\ \

2011-06-21 14:48:53 \ _\ _\ \ _\ _\ _\ _\ _\/`___ \

2011-06-21 14:48:53 //// ////////// `/_/> \

2011-06-21 14:48:53 C O R E /___/

2011-06-21 14:48:53 http://TrinityCore.org /__/

2011-06-21 14:48:53 Realm running as realm ID 1

2011-06-21 14:48:53 Using World DB: TDB 335.11.40

2011-06-21 14:48:53 Using creature EventAI: TDBAI 335.0.3

looks normal… the old numeric revision was removed a while back, because, you know, telling what revision you are on by reading a bunch of seemingly random numbers and letters is way easier than using a sequentially updated number…

Wait so the revision info doesn’t display anymore at all? And here I have been beating my head over this for two days now.

when i was in "Compiling the Source " step as the site goes it must be :

========== Build: 14 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

but my try went to :

========== Build: 13 succeeded, 0 failed, 1 up-to-date, 1 skipped ==========

[SIZE=14px]is there any problem? i cant find why. please answer[/SIZE]

@llars

Nope, it was removed.

@Ncognito

Reading and stuff… “0 failed”

Hey guys ,im new here and i have a problem.

Why i have not “Git Extension” option when i right click on a folder?i can’t clone…

Im using Windows 7,64bit

I already installed following this thread and re-installed git 20 times!

Iam not install msysgit but just git gui,so far it works well..thats why? Is there something maybe happenning?

follow the directions in the first post exactly, and there will be no problem.