newbie help! dc++ building structure?

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

newbie help! dc++ building structure?

Post by squeek » 2004-08-06 18:46

hello
ive only just learned how to compile dc++ source from some of the great ppl on here and i still have a lot to learn.
im still trying to learn how to use Ms Visual Studio .net 2003 and ive read a lot of the docs but they talk in gobol de gook and i dont quite understand.
firstly i dont understan these, SOLUTION EXPLORER,CLASSIC VIEW,RESOURCE VIEW???
They all show the same folders in all 3 windows.
secondly the folders , bzip2, client, DCPlusPlus, MakeDefs, zlib
what are each folders for and how do you know what is to go where?

i am totally new to all of this and i am trying to get the basics. please help

thank you

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-07 09:25

A single question is easier to answer than a post full of them.

Sit down and play with the Visual Studio for a day before asking more questions. Use the online help, google, play around.

You'll answer most of the questions yourself.

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-07 14:29

ive already played around with Visual Studio and read loads of the doc's
ive read a lot of the docs but they talk in gobol de gook and i dont quite understand
i was hoping for a little direct help other than being pushed away but thanks for your help anyway :? [/quote]

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2004-08-07 17:14

No one is pushing you away. From what you're saying, it seems as though you are reading a lot of documentation, but not reading with a purpose.

What is it that you actually want to do with Visual Studio? Once you can answer that question, you can then start to look for information in the appropriate places.

I assume the answer is "to compile DC++" or else you wouldn't be here. If that is your goal, how many of the things you mentioned in the initial post do you in all honesty believe are relevant to that goal?

As GMT said, one question at a time. Don't overwhelm yourself with an avalanche of information. :)

Read compile.txt as well. That should tell you about some of the things you need to do to compile the project.

Once you've read that, if you have specific questions, please ask.
The world is coming to an end. Please log off.

DC++ Guide | Words

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-07 17:36

squeek wrote:i was hoping for a little direct help other than being pushed away
If you've been on the helping side, you know that specific focused questions are easier to answer and help with. General questions, or a bunch of them, overwhelms us.

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2004-08-07 18:21

squeek wrote:ive already played around with Visual Studio and read loads of the doc's
ive read a lot of the docs but they talk in gobol de gook and i dont quite understand
i was hoping for a little direct help other than being pushed away but thanks for your help anyway :?
Please listen to what these people tell you, They are experienced and have alot of knowledge that can't be explained in a few sentences. No one's pushing you away but you have to understand the nature of a tool like VS.NET 2003. It's overwhelming at first. Try to start with easy things, don't try to understand everything at once. Maybe it's better if you start with commandline programs (Not windows).

Regards
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-07 19:12

Guitarm wrote:Try to start with easy things, don't try to understand everything at once. Maybe it's better if you start with commandline programs (Not windows).
I played around a bit with the tutorials in one of the SAMS Learn MFC in 24 hours books, and the structure helps. Much moreso than trying to dive into the Game Programming in DirectX book I have (which I still haven't opened).

Also, I cannot recommend The C++ Standard Library enough. I'm still unfamiliar with most of STL, but this has helped me with the pats I do understand. (It doesn't help learn the Visual Studio IDE though.)

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-07 19:48

hi, thanks for the replys!
im not realy interested in other projects, im just interested in how DC++ works, how its put together, what type of application it is.
i just find it fasinating and frustrating at the same time because i dont know where to start. there seems to be a lot of parts to build one project and i dont know what part does what :lol:
on a bright note i did manage to compile it with the help of the ppl on here :)
the only problem i have found so far is that there is no documentation on what each of the files in DC++ source do. this would help a lot :)
thanks

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-07 20:15

squeek wrote:im just interested in how DC++ works, how its put together, what type of application it is.
Settle in, you'll be here a while.
squeek wrote:the only problem i have found so far is that there is no documentation on what each of the files in DC++ source do. this would help a lot
Documentation? Once you've coded on it for a while, most of it's pretty intuitive.
I never used these, but compile.txt says:
COMPILE.TXT wrote:By the way, with doxygen, graphviz and some luck you can use the supplied doxygen configuration file to generate some nice docs...just check that the paths in doxyfile are correct (graphviz)...

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-07 20:18

squeek wrote:there seems to be a lot of parts to build one project and i dont know what part does what
zlib - the zlib library. used for decompressing dclsts and for compressed transfers
bzip2 - the bzip2 library, used for .bz2 encoded files like file lists and hublists
makedefs - makes the string table out of stringdefs.h
client - the client
dcplusplus - the gui

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-07 20:55

thanks for those replys they do help
ive been reading as much as posible and i am starting to understand a little better now, thank you GargoyleMT, that was what i was looking for. simple lamen and easy to understand. i just wish i started this a long time ago :roll:
thanks

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-08 16:16

back once again :oops:
ok after checking through those i am finally understanding the basic structure!
what about 'Client' is there a little more info on what that section does?
thank you :)

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-08 16:20

squeek wrote:what about 'Client' is there a little more info on what that section does?
It's the part that actually does stuff, like connect to hubs, hash files, maintain the share, transfer files, etc.

Check out the filenames of the modules, they're meant to be explanatory, like SearchManager.cpp/h, HashManager.cpp/h, etc. It's a huge topic to summarize, let alone explain.

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-08 16:31

wow speedy reply :)
ok exelent, i will go through them all. I hope this section is of some help to others because there are some questions answered here that were never asked anywhere on this forum.
thanks for your help, much appreciated

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-08 16:59

squeek wrote:ok exelent, i will go through them all. I hope this section is of some help to others because there are some questions answered here that were never asked anywhere on this forum.
I don't know how you learn, but you can always find a feature request in bugzilla or the old tracker and see how to implement it.

It might be easier to explore the source if you have a goal.

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2004-08-09 06:11

Just a note...This take's time to learn, I myself have a little C knowledge and I'm struggling with this C++ code too. This takes time, be aware of that. Don't be hasty. Try to stay calm and work your way through the code.

I still recommend you to learn, at least, the basics of a C++ program, Classes, inheritance and so forth. This is a hard program to understand if you don't understand the ideas and goals behind C++.

Regards
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-09 12:28

i agree with you, a project like this could take a very long time to learn but i will do it eventually with the help from this exelent forum and reading up other sources.

from a newbie's point of view, the question is... Where do i start???
I thought about this question many times (as im sure that other newbie's thought the same) and thought to myself, best way to start was to learn was why there are different files and what the file types do and how they are grouped. after learning that i could find out what each file was doing and so forcing me to learn C++ at the same time. My only problem is that i also have to learn how to use MS-VS-2003 which isnt that easy due to too many buttons /controls /tabs
i dont think i would ever learn without this forum, its nice to know that there is real live support for a project like this here. thanks

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-09 13:29

squeek wrote:My only problem is that i also have to learn how to use MS-VS-2003 which isnt that easy due to too many buttons /controls /tabs
That's just the GUI for editing the files - the only things that may matter in terms of understanding how the source code works are the properties for each project (client.vcproj, dcplusplus.vcproj, etc.) and the dependencies - all of which are in the solution explorer pane/tree.

If you feel more comfortable browsing the source with emacs or notepad, go ahead and do so.

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-09 14:39

I did happen to look at the properties of all those files in the Solution Explorer. I am not sure what everything on that Properties page does or how to configure it yet but there's no rush, i will take your advice and take one step at a time :D
I find it a lot easier when i have an image of the basics in my mind, it looks quite a clever program and i can see that there has been a lot of work put into it.
now i will do some more reading up. thanks

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2004-08-09 15:08

What kind of programming background do you have? The reason I ask, is that if you are using this as an opportunity to learn C++, I don't think it's a great idea if you have no programming background. It would be better to learn some of the fundamentals first.

Conversely, if you *do* have a programming background, jumping straight in can actually be quite interesting as you get to compare and contrast how things are done with C++ compared to the other languages you know.
The world is coming to an end. Please log off.

DC++ Guide | Words

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-09 17:39

i have programmed C++ but it was a long time ago. a lot of the code looks familiar so thats not the issue. ive seen quite a few other clients and to be honist, i dont realy like the general look of them or the way they work. DC++ is well presented, easy to use, much more tidy, easier to configure, more options than most clients avalible and much more...
it is also how it comunicates with the hubsoft and vice versa, i find it fasinating. maybe one day i might be on the other side of the fence and being able to help a newbie like myself here on this forum. If i knew half as much as you guys and gals on here i'd be greatful.

btw
i know VB, LUA, and a few other languages but i am right out of practice with most.

PseudonympH
Forum Moderator
Posts: 366
Joined: 2004-03-06 02:46

Post by PseudonympH » 2004-08-09 22:22

squeek wrote:and gals
we wish :wink:

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2004-08-10 08:31

squeek wrote:i have programmed C++ but it was a long time ago. a lot of the code looks familiar so thats not the issue. ive seen quite a few other clients and to be honest, i dont realy like the general look of them or the way they work. DC++ is well presented, easy to use, much more tidy, easier to configure, more options than most clients avalible and much more...
it is also how it comunicates with the hubsoft and vice versa, i find it fasinating. maybe one day i might be on the other side of the fence and being able to help a newbie like myself here on this forum. If i knew half as much as you guys and gals on here i'd be greatful.

btw
i know VB, LUA, and a few other languages but i am right out of practice with most.
Ok, so now you're on your way :) , but as said before: Try not to get an immediate understanding of this program. Like Garg said before: Try to have a goal with what you want to know. You can approach this code in different ways. I myself have tried to take one step at a time. Choose a function or a specific task in the program that you're interrested in, then try to find that function in code. Another way to approach it is to step through the code: When the proj is loaded -> press F10 (F11) and try to understand the rows of code you see (if you want explanation of a specific function, put the cursor on it and push F1). Step one line at a time. You'll discover that each row doesn't do much in itself but together they've become this amazing program.

You can also make paperprints of the code (Although I don't recommend you printing everything at once :wink: ).

Read and try to get a mental picture of what's happening in the prog.

Good luck!


Regards
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-10 11:21

ok, i have thought about first goals and my first goal is to figure out how the GUI is designed. There is one thing that has me curious and that is when you have many windows open ect...
hubs/ downloads/ Private Messages all at the same time. when you close one or several in any order, it remembers the previous windows opened in the right order and will goto that window. might not sound important to most users but to me i find it very clever. i tryed to write something like that once on Visual Basic and it was a headache also yes i gave up in the end because i just couldnt figure a way to do it. :oops:
DC++ seems to have many great little features that must have taken ages to figure out how to do, its just great.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-10 11:31

Well, part of what you're talking about can be explained by saying that DC++ is a MDI (Multiple Document Interface) application - each of the hubs, PMs, filelists is a MDI client window. The other alternative is SDI - single document interface.

You jump right in with the heavy stuff, don't you? I haven't been curious enough to really look at the MDI code, and I've been contributing to DC++ for a year and a half.

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-10 13:18

i didnt know that it was the deep end, i just thought that it might be the obvious place to start. A question was put to me some time ago about designing a project like this and they said:-
where do you start, do you start by drawing the GUI or writing the code and then the GUI or even both together? i didnt know how to answer that realy but i would have started with the GUI myself and then added the code for each function.
maybe starting in the deep end and spending more time there might make the shallow end seem like a walk in the park? :)

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2004-08-10 16:59

squeek wrote:where do you start, do you start by drawing the GUI or writing the code and then the GUI or even both together?
None of the above. You start by designing the application. :)

GUI and code are irrelevant if the fundamental design is either flawed, or not there at all.
The world is coming to an end. Please log off.

DC++ Guide | Words

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-10 19:05

TheParanoidOne wrote:GUI and code are irrelevant if the fundamental design is either flawed, or not there at all.
Mmm Waterfall development style.

Todi
Forum Moderator
Posts: 699
Joined: 2003-03-04 12:16
Contact:

Post by Todi » 2004-08-11 04:05

Thus spake the master programmer:

"A well-written program is its own heaven;
a poorly-written program is its own hell."

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-11 17:39

It seems my C++ skills are not up to date, i have a LOT to learn :cry:

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-11 23:10

squeek wrote:i have a LOT to learn
Which, although overwhelming to learn everything you need to know, has a great payout. If you want a feature in DC++, you can make it. And submit it. And thousands of people will run it.

PseudonympH
Forum Moderator
Posts: 366
Joined: 2004-03-06 02:46

Post by PseudonympH » 2004-08-11 23:24

You forgot that you can get your name in both the changelog and the about box.

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-12 00:33

i think it will be a while before i could do anything usefull though i do have a few good ideas. there's just so much to go through :D
im going to keep at it. :wink:

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-13 14:34

I'm back with 2 more questions but i will ask one at a time :oops:
ok her's goes nothing :D

the file that i had to download and include in the compiling of DC++ ...
STLPort-4.6.2
what does this file do, what purpose does it have???
i think you can guess the 2nd question after this one :D
this is getting realy addictive, i MUST know more :lol:
thanks

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-14 09:37

squeek wrote:what does this file do, what purpose does it have???
STL = Standard Template Library

http://www.sgi.com/tech/stl/

It's the reason I recommended that one book earlier in the thread. It's mostly data structures.
squeek wrote:i think you can guess the 2nd question after this one :D
Ugh. presumably "what is WTL?" Please, just ask the questions, don't make us guess your question, guess what you wanted to know, then make an answer. Please. :-(

WTL = Windows Template Library

http://sourceforge.net/projects/wtl/
Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components. It extends ATL (Active Template Library) and provides a set of classes for controls, dialogs, frame windows, GDI objects, and more.
This is the toolkit that produces the GUI. It's a lot more light weight than MFC (Microsoft Foundation Classes).

squeek
Posts: 31
Joined: 2004-04-15 08:50
Location: UK
Contact:

Post by squeek » 2004-08-14 14:56

i was told to ask one question at a time on thise forum to make things easier and simpler...
A single question is easier to answer than a post full of them
those links came in handy, thanks
ive started to play around with some sample programs to get the hang of things but it still looks a bit complicated :oops: the main thing is, im learning and beginning to understand a lot better now than before i first started (with your help) thank you

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-15 10:04

squeek wrote:i was told to ask one question at a time on thise forum to make things easier and simpler...
:) Like most rules, this is subject to a certain flexibility.
squeek wrote:i'm learning and beginning to understand a lot better now than before i first started (with your help) thank you
Quite glad to hear it.

Locked