The Dawn Of Time
The Official Forums for the Dawn Of Time Mud Codebase
 
Log in Register FAQ Memberlist Search The Dawn Of Time Forum Index Goto the Official Dawn Website

Noobism Help getting started

 
Post new topic   Reply to topic    The Dawn Of Time Forum Index » Getting Started
View previous topic :: View next topic  
Author Message
TheChan



Joined: 08 Dec 2012
Posts: 9

PostPosted: Sat Dec 08, 2012 9:29 am    Post subject: Noobism Help getting started Reply with quote

What's up guys, I've been looking at the src Dawn code for a long time now and I'm finally ready to do something with it. I guess you could say I'm still amateur status programmer but what I am completely new to is getting this code base launched on a shell acct so I can start looking at both sides of the game. Currently I'm using win7 but also have an older comp that I was thinking about putting ubuntu on. I guess the first main question I have is would it be easier to have the other computer set up, or do I still have to use cygwin to compile onto my shell? Sorry for the noobism just trying to find a place to start. Thanks


Back to top
View user's profile Send private message
derek



Joined: 23 Sep 2007
Posts: 125

PostPosted: Sat Dec 08, 2012 1:06 pm    Post subject: Reply with quote

I'd recommend setting ubuntu (or any other flavor of linux that suits your fancy.) If you're going to be doing your compilation on the server, you don't need cygwin set up on your win7 box. You'll just need to either code on the linux box, or transfer your code over and then compile it there. You will need putty or another ssh client in order to connect to the linux box if you're going to run it headless.

It does rather depend on your workflow, though. If you're intending to do the bulk of the coding on your win7 box, it might ultimately be easier to install cygwin so that you've got a build environment on that machine, particularly if you're not intending to open the mud up for outside connections.


Back to top
View user's profile Send private message
TheChan



Joined: 08 Dec 2012
Posts: 9

PostPosted: Sat Dec 08, 2012 3:43 pm    Post subject: Reply with quote

Ok I have no problem xfering code. I write some stuff at work and what not so that's not a problem. I have two associates that are staffing with me so I'd like to have it up and running so we can make changes, start building, etc. My main machine is the win7 box so I guess I'm looking for the best way to get the code from this box to compiled and ready for the shell acct I have.. If that makes sense. After looking through the code for months I had no idea it would be so complex to get it running so I could log through a client like zmud.
-I feel like I'm missing something still though


Back to top
View user's profile Send private message
derek



Joined: 23 Sep 2007
Posts: 125

PostPosted: Sat Dec 08, 2012 7:17 pm    Post subject: Reply with quote

Setting up your ubuntu box for the mud won't be too onerous. Once you've got the base operating system installed, install build-essential and openssh-server. That will get you the bare minimum of tools you'll need to build the mud and connect to the linux box. I'm not sure which version of gcc is shipped with ubuntu 12.10, but if that becomes your roadblock, there should be a variety of older versions to install which won't give you grief. I've got 12.04 installed here (well, mint, but close enough) and I didn't have any trouble compiling with the default gcc, so hopefully this will be a non-issue for you.

Once you've got openssh-server installed, that will allow you to use sftp to transfer your source files over, then you can just compile the mud on the server and be on your merry way. Depending upon the tools you like to use, you might even just use ssh and vim or something and do your coding on the linux box.

If there are several of you coding, you might want to look into git or another version control system at some point, but there's no real point in adding more complexity at this point.


Back to top
View user's profile Send private message
TheChan



Joined: 08 Dec 2012
Posts: 9

PostPosted: Sun Dec 09, 2012 7:54 am    Post subject: Reply with quote

So what your telling is there's no easy way to get the code base launched from my win 7 box, so my staff can be looking and building in the mean time? Would it help if I told you who I have a shell acct with, and I didn't know all that other software was mandatory. I didn't think I needed the sshserver software if my host already has it.


Back to top
View user's profile Send private message
derek



Joined: 23 Sep 2007
Posts: 125

PostPosted: Sun Dec 09, 2012 8:52 am    Post subject: Reply with quote

If you've got a shell account somewhere else, not the second computer you were talking about installing ubuntu on, then chances are good the build tools are already on it and nothing else will need to be installed. You should be able to sftp the mud (and any changes you make to source files) up to that server, compile it there and run the mud. Then your staff should be able to connect and start building.

If you want to run the mud on your win7 box, then you'll need to install cygwin and the build tools within cygwin.

If you're wanting to take that second computer, put ubuntu on it and run the mud server from there, then you will need to make sure that you've got the 'openssh-server' and 'build-essential' packages installed in order to connect via ssh/sftp and to compile the mud. They aren't generally installed by default on an ubuntu install, although it's just as simple as 'sudo apt-get install openssh-server build-essential' to get them on there.


Back to top
View user's profile Send private message
TheChan



Joined: 08 Dec 2012
Posts: 9

PostPosted: Sun Dec 09, 2012 3:50 pm    Post subject: Reply with quote

Ohh.. ok. Excellent. The host I have has everything I believe. I just didn't know if I could load it, and make changes on my main, running win7. That's why I mentioned the other box. I appreciate your patience Derek and thanks for the help. Odds are I'll probably be back with more questions Razz


Back to top
View user's profile Send private message
TheChan



Joined: 08 Dec 2012
Posts: 9

PostPosted: Sun Dec 09, 2012 4:33 pm    Post subject: Reply with quote

Ok, latest. Logged onto shell acct and got as far as changing the directory.
cd ~/dot/src comess up saying no such file or directory. Followed every other command perfect and I'm scared to change anything now. The step guide on the dot page says find someone more experienced Razz
This is what I'm getting now.
> ls dot
area
dawn1.69r-src.tgz
dawn1.69r-support.tgz
help
src
system


Back to top
View user's profile Send private message
derek



Joined: 23 Sep 2007
Posts: 125

PostPosted: Sun Dec 09, 2012 5:14 pm    Post subject: Reply with quote

hm, well, the ~/dot/src directory is there, it's showing up when you do an ls. try moving into them one at a time: cd dot/, cd src/

my guess is you just made a typo, but who knows. if that doesn't work, please post the output of ls -al ~/dot/


Back to top
View user's profile Send private message
TheChan



Joined: 08 Dec 2012
Posts: 9

PostPosted: Mon Dec 10, 2012 12:17 pm    Post subject: Reply with quote

ok it seemed like it worked when I tried to move them one at a time. I'll just copy what I did since at this point I'm not entirely sure what I'm doing.
> ls dot
area
dawn1.69r-src.tgz
dawn1.69r-support.tgz
help
src
system
> cd ~/dot/src
~/dot/src: No such file or directory
> cd dot/
> cd src/
> make
=============================================================================
Change into the configure directory and run ./configure to create a makefile

Notes: The makefile configure generates requires a version of make that
has the sort function amoung other things. If you find that make
is only compiling com_time.cpp when you type 'make rebuild' then you
need to use a newer version of make or manually remove the use
of sort from the makefile.

If the makefile has problems compiling the resolver, manually compile
extras/resolver.cpp as resolver in the directory above the source and
remove the resolver reference from the 'all' line in the makefile.

=============================================================================
> cd configure
> ./configure
checking for g++... g++
checking for C++ compiler default output... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for sys/types.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/sysctl.h usability... yes
checking sys/sysctl.h presence... yes
checking for sys/sysctl.h... yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking for pid_t... yes
checking for size_t... yes
checking if socklen_t defined... yes
checking whether time.h and sys/time.h may both be included... yes
checking return type of signal handlers... void
checking for strftime... yes
checking for vprintf... yes
checking for _doprnt... no
checking for gettimeofday... yes
checking for select... no
checking for socket... yes
checking for strstr... yes
checking for deflate in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for BSD make...
Not found
checking for GNU make... make
Found
configure: creating ./config.status
config.status: creating ../makefile
config.status: creating ../config.h
> cd cot
cot: No such file or directory
> cd ..
> make
g++ -c -Wall -g -O act_comm.cpp -o obj/act_comm.o
act_comm.cpp: In function 'void do_delete(char_data*, char*)':
act_comm.cpp:82:59: warning: deprecated conversion from string constant to 'char*'
act_comm.cpp:92:26: warning: deprecated conversion from string constant to 'char*'
act_comm.cpp:127:66: warning: deprecated conversion from string constant to '
///more warnings///
make: *** [act_info.o] Error 1
and I stopped there


Back to top
View user's profile Send private message
derek



Joined: 23 Sep 2007
Posts: 125

PostPosted: Mon Dec 10, 2012 10:11 pm    Post subject: Reply with quote

okay, you're getting there.

this should solve that problem for you: http://www.forums.dawnoftime.org/viewtopic.php?p=9411#9411

are you using r or one of the s betas? i ask because I think this is already addressed in s and it's got some extra features you might find useful.


Back to top
View user's profile Send private message
TheChan



Joined: 08 Dec 2012
Posts: 9

PostPosted: Tue Dec 11, 2012 8:17 am    Post subject: Reply with quote

I've been looking at the r files for a while now so I used them. I'm open to any suggestions that your willing to share.

Looking at this page confuses me a little bit. Do I need to change something in act_info.cpp or.. I don't understand how I'm adding the "-wno-write-strings" I've used linux a bunch just not in this setting so again, I'm lost. Thanks for your patience derek.


Back to top
View user's profile Send private message
derek



Joined: 23 Sep 2007
Posts: 125

PostPosted: Tue Dec 11, 2012 9:39 am    Post subject: Reply with quote

ah, okay. I would suggest you go ahead and grab the latest version of the S beta series then and try that. If nothing else, it will relieve you from having to go wade through several years of bug reports here on the forums and backport the fixes for everything.

You wouldn't have to do this in S, but in R, you'll add the -Wno-write-strings flag to the line that starts C_FLAGS in configure/makefile.in, then do a make resetconfig, make clean, etc. in src directory. That'll get it added to the makefile permanently and tell gcc to use that switch when it compiles the pages, ignoring those warnings.

The bit about lockers.h in that post is something else you'll need to do to get R to compile, but you just have to remove that specific bit of code. I believe that is also not an issue in S, but it's been I've slept since the last time I've compiled it, so take that for what it's worth.


Back to top
View user's profile Send private message
TheChan



Joined: 08 Dec 2012
Posts: 9

PostPosted: Tue Dec 11, 2012 10:29 am    Post subject: Reply with quote

lol completely understand. Ok that actually sounds like a better idea using s. Do I need to empty the directory now and start over, and the beta download only shows support. Is there another .src somewhere I'm not seeing?


Back to top
View user's profile Send private message
derek



Joined: 23 Sep 2007
Posts: 125

PostPosted: Tue Dec 11, 2012 11:02 am    Post subject: Reply with quote

There's a link to download the source files in the announcement thread for the release of beta6:
http://www.forums.dawnoftime.org/viewtopic.php?p=9928#9928

The beta src tarballs don't go up in the open on the ftp site, for whatever reason, which is why you only see the support files listed there.

It looks like there have been a handful of bugs reported for it in the beta6 area of the board (the above post is the first topic in that section), so be sure and apply any fixes in threads. Doesn't look like there's much there, though, so should go pretty quickly.


Back to top
View user's profile Send private message
derek



Joined: 23 Sep 2007
Posts: 125

PostPosted: Tue Dec 11, 2012 11:04 am    Post subject: Reply with quote

oh, and yes, just wipe the directory and start over with the stuff for S. That's probably not even necessary, but since you're starting fresh, you may as well avoid any possible headaches.


Back to top
View user's profile Send private message
TheChan



Joined: 08 Dec 2012
Posts: 9

PostPosted: Sat Dec 15, 2012 3:34 pm    Post subject: Reply with quote

Got all the way to the end then got this..

> ./dawn
`=aBcd[24339]Dec 14 21:00:30::
-= The Dawn Of Time was last compiled on Dec 14 2012 at 20:54:37 (c++ build)=-
-= Parent codebase version Dawn 1.69s_beta5 - 23May2009:

:: Reading in game settings from gameset.txt...
:: File 'gameset.txt' not found, cancelled gio list loading.
:: *************************************************************************
Gamesettings file 'gameset.txt' was not found - creating empty file then
reloading it to get default settings.
****************************************************************************
:: gio_generic_loadlist() reading in from gameset.txt...
:: Finished gio_generic_loadlist [1].
:: Allocated 5340032 bytes for string storage. (MAX_STRING setting)
:: Starting gio_generic_savelist to gameset.txt.write.
:: GIOBACKUP: Renaming old gameset.txt to gameset.txt.giobak
:: Renaming new gameset.txt.write to gameset.txt
:: Finished gio_generic_savelist [1].
:: Starting gio_generic_savelist to gameset.txt.write.
:: GIOBACKUP: Renaming old gameset.txt to gameset.txt.giobak
:: Renaming new gameset.txt.write to gameset.txt
:: Finished gio_generic_savelist [1].
:: initiating logging to file
[24339]Dec 14 21:00:30::
-= The Dawn Of Time was last compiled on Dec 14 2012 at 20:54:37 (c++ build)=-
-= Parent codebase version Dawn 1.69s_beta5 - 23May2009:

:: Reading in game settings from gameset.txt...
:: File 'gameset.txt' not found, cancelled gio list loading.
:: *************************************************************************
Gamesettings file 'gameset.txt' was not found - creating empty file then
reloading it to get default settings.
****************************************************************************
:: gio_generic_loadlist() reading in from gameset.txt...
:: Finished gio_generic_loadlist [1].
:: Allocated 5340032 bytes for string storage. (MAX_STRING setting)
:: Starting gio_generic_savelist to gameset.txt.write.
:: GIOBACKUP: Renaming old gameset.txt to gameset.txt.giobak
:: Renaming new gameset.txt.write to gameset.txt
:: Finished gio_generic_savelist [1].
:: Starting gio_generic_savelist to gameset.txt.write.
:: GIOBACKUP: Renaming old gameset.txt to gameset.txt.giobak
:: Renaming new gameset.txt.write to gameset.txt
:: Finished gio_generic_savelist [1].
:: initiating logging to file
:: logging to logs/game/4000-121214-01.log
:: *************************************************************************
Note: on machines which have the tail command installed, you can follow this
log using the command: tail -n 5000 -f logs/game/4000-121214-01.log
****************************************************************************
:: *************************************************************************
Note2: you can change the startup behaviour if desired, to do so
type "./dawn --help" for more information.
****************************************************************************
:: switching to daemon mode (background running process)
:: The mud is now running in the background, process id = 24340.
Mud failed to complete the startup process
The startup process was terminated by do_read_classes()
With a message of: classes list not found
The last bug text in the log reads:
An error occurred trying to open system/classes.txt for reading!
This may or may not be related to why the mud didn't complete starting up.
==================================================
For more details, either review the logfile or
start the mud with the -f commandline option.
==================================================


Back to top
View user's profile Send private message
derek



Joined: 23 Sep 2007
Posts: 125

PostPosted: Sat Dec 15, 2012 6:10 pm    Post subject: Reply with quote

Sounds like you're either missing the support files or they're sitting in the wrong place.

move the area, help and system directories from the dawn s beta 4 support tarball into the dawn directory (the one your src/ directory sits in) and give it another try.


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The Dawn Of Time Forum Index » Getting Started All times are GMT + 13 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2005 phpBB Group
Theme created by Vjacheslav Trushkin