How to search the source

How to search the source

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

How to search the source

Post by Caydr »

I are dumb. How do I search source files for things, for instance, every occurrence of "airhoverfactor"?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

err, teh same way youd do it for anything else

ctrl+f
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

There's like 6,000 files though. That would be time consuming.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

well airhover factor isnt going to be found in CAdvTreeRenderer.h, and your probably going to find it in a cpp nto a h, and its not going to be in build or librry fodlers.

A little common sense will take that 6k figure and shave off 99% of it.

Its air, so that restricts your search parameters greatly. Perhaps try looking at the files that have air in their filenames? That limits it to 2 or 3 files at best.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Google:
file search tool
file search utility

It ain't rocket science boys and girls ;-)
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Post by knorke »

AF wrote:err, teh same way youd do it for anything else
ctrl+f
yup, windows has an "look for text in files" option. not sure whats its called in english but its the second textbox in the searchdialog on windows xp.

or install http://www.bloodshed.net/devcpp.html or any other free IDE, most should be able to open many files at once, liked tabed browsing or whatever.
User avatar
lale
Posts: 73
Joined: 29 Apr 2007, 08:36

Post by lale »

Install linux: :lol:
Use rgrep -r "airhoverfactor" in shell, on root folder.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

You're all missing the most important point:
I are dumb.
I want to download everything here: https://spring.clan-sy.com/svn/spring/trunk/ And I can search it using any of a dozen programs I've got. But I don't know how to get my hands on the whole, most recent source code.


Again:
I are dumb.
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Post by Nemo »

google SVN client.
User avatar
lale
Posts: 73
Joined: 29 Apr 2007, 08:36

Post by lale »

If u only need to read the source, you might not need to download it.
enter:
"site:spring.clan-sy.com/svn/spring/trunk/ airhoverfactor"
in googles searchbox
ofcouse google might not have an uptodate search "picture" (cache)

try it here:
http://www.google.com/search?hl=en&q=si ... gle+Search
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

SVN client... didn't know such a thing existed. I'll give it a try, thanks.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

I reccomend tortoisesvn
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

FLOZi wrote:I reccomend tortoisesvn
Yup. Best thing there is for windows. It's actually the only one I know besides the command line tool and I'm too lazy to use it.

http://spring.clan-sy.com/phpbb/viewtopic.php?t=3409

Hm the download link is outdated in the thread. Should be replaced by this one instead.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

lale wrote:Install linux: :lol:
Use rgrep -r "airhoverfactor" in shell, on root folder.
Or get GNU for Win32, that's how I got my grep.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

total commander has a great search facility, but grep probably is better. I'd recommend codeblocks, it's got a good 'find in files' function, but that's probably too complicated for you - might still try, though.
zyzy
Posts: 57
Joined: 27 Jan 2006, 22:40

Post by zyzy »

if you used, commercial tools.

i prefer 10x ultraedit/UEstudio.

i dont think there is good native open source tool for win32.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Google wingrep, its good enough for me
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

unxutils
python
batch scripting
regex engine
"Find In Files" feature of most advanced tex editors
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Windows:

notepad++ ftw it just pwns
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Visual C++ 2005 Express Edition
Post Reply

Return to “Engine”