Howto Checkout Modules


#1

Aloha, I’ve followed the instructions in the ‘jucequake’ post about how to checkout the modules branch using git and it didn’t seem to work. Well, actually it did download a copy of juce but to all appearances it’s 1.5.4 and nowhere do I see a modules folder. Could someone please provide an update on the procedure to use. I’m running windows xp/sp3, have cygwin installed (latest version) and downloaded this version of git - Git-1.7.9-preview20120201.exe

I installed it, told it to use the explorer hooks, and windows cr/lf’s
I then used the ‘git bash here’ command from the windows explorer and issued the checkout commands
Actually I did the complete sequence twice (the second one is below) - the first time I used the -b option after the clone.
The second time (below) I did the ‘git checkout modules’ after the clone. In both cases, I don’t seem to have the modules branch.

What do I do next?

kolsen@SHUTTLEX ~/My Documents/Visual Studio 2010/Projects
$ git clone --depth 1 git://juce.git.sourceforge.net/gitroot/juce/juce
Cloning into 'juce'...
remote: Counting objects: 1620, done.
remote: Compressing objects: 100% (1423/1423), done.
remote: Total 1620 (delta 400), reused 723 (delta 160)
Receiving objects: 100% (1620/1620), 6.68 MiB | 84 KiB/s, done.
Resolving deltas: 100% (400/400), done.

kolsen@SHUTTLEX ~/My Documents/Visual Studio 2010/Projects
$ cd juce

kolsen@SHUTTLEX ~/My Documents/Visual Studio 2010/Projects/juce (master)
$ git checkout modules
error: pathspec 'modules' did not match any file(s) known to git.

kolsen@SHUTTLEX ~/My Documents/Visual Studio 2010/Projects/juce (master)
$ git checkout -b origin/modules
Switched to a new branch 'origin/modules'

kolsen@SHUTTLEX ~/My Documents/Visual Studio 2010/Projects/juce (origin/modules)
$

#2

After you checked out origin/modules, you should be on the modules branch. To confirm, just type “git branch”.

That should list all the branches with a “*” next to the one you are on.

You can also look at the source folder. There should now be a modules folder with Juce code in it.

To use modules, the next thing you have to do is open your existing introjucer project with the new, modules, introjucer and resave it. This worked for me, though other people have reported problems. In that case, create a new introjucer project that matches your old one.


#3

Thanks, I did as you suggested and the output is below…but I don’t have a modules folder!

kolsen@SHUTTLEX ~/My Documents/Visual Studio 2010/Projects/juce (origin/modules)
$ git branch
  master
* origin/modules

kolsen@SHUTTLEX ~/My Documents/Visual Studio 2010/Projects/juce (origin/modules)
$

#4

I’m not sure what is going on for you. I just switched to Windows 7 and Msysgit (which it looks like you are using). I don’t normally pull a depth of 1 (I usually grab everything from remote repositories), but I went ahead and did so:

Joe@JOE-LAPTOP /c/Src/test
$ git clone --depth 1 git://juce.git.sourceforge.net/gitroot/juce/juce
Cloning into juce...
remote: Counting objects: 5705, done.
remote: Compressing objects: 100% (4459/4459), done.
remote: Total 5705 (delta 3729), reused 2057 (delta 1101)
Receiving objects: 100% (5705/5705), 24.77 MiB | 288 KiB/s, done.
Resolving deltas: 100% (3729/3729), done.

Joe@JOE-LAPTOP /c/Src/test
$ cd juce

Joe@JOE-LAPTOP /c/Src/test/juce (master)
$ ls
Builds        bin     juce.h                juce_amalgamated.h
Juce.jucer    docs    juce_Config.h         juce_amalgamated.mm
amalgamation  extras  juce_amalgamated.cpp  src

If I just try to checkout origin/modules, I get a warning about being in detached head state (which I would expect), but the directory listing shows the modules folder.

Joe@JOE-LAPTOP /c/Src/test/juce (master)
$ git checkout origin/modules
Checking out files: 100% (2621/2621), done.
Note: checking out 'origin/modules'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at a6fe278... Avoided spurious mouse-up when double-clicking win32 n
ative titlebars. More OpenGL fixes.

Joe@JOE-LAPTOP /c/Src/test/juce ((a6fe278...))
$ ls
amalgamation  extras  juce_amalgamated.cpp  juce_amalgamated.mm
docs          juce.h  juce_amalgamated.h    modules

I can get back to the original 1.5x with checkout master:

Joe@JOE-LAPTOP /c/Src/test/juce ((a6fe278...))
$ git checkout master
Checking out files: 100% (2621/2621), done.
Previous HEAD position was a6fe278... Avoided spurious mouse-up when double-clic
king win32 native titlebars. More OpenGL fixes.
Switched to branch 'master'

Joe@JOE-LAPTOP /c/Src/test/juce (master)
$ ls
Builds        bin     juce.h                juce_amalgamated.h
Juce.jucer    docs    juce_Config.h         juce_amalgamated.mm
amalgamation  extras  juce_amalgamated.cpp  src

And checkout out the modules branch into a new modules branch on my machine thus:

Joe@JOE-LAPTOP /c/Src/test/juce (master)
$ git checkout -b modules origin/modules
Checking out files: 100% (2621/2621), done.
Branch modules set up to track remote branch modules from origin.
Switched to a new branch 'modules'

Joe@JOE-LAPTOP /c/Src/test/juce (modules)
$ ls
amalgamation  extras  juce_amalgamated.cpp  juce_amalgamated.mm
docs          juce.h  juce_amalgamated.h    modules

The one thing that stands out to me is that you aren’t fetching and resolving many objects. Sorry I couldn’t be of more help.


#5

Thanks, I’ll try this out later today, and all the help is appreciated.