Page 29 of 37

Re: Development Blah: Comments

Posted: Thu Jun 12, 2014 4:37 pm
by Sirius
Eclipse used to be a pretty good IDE back when I used it, although I think that was pretty much entirely for Java as part of a computer science degree... and it was also 7-8 years ago. It was a little slow but I figured that was the price you paid for all the auto-complete stuff.

Re: Development Blah: Comments

Posted: Thu Jun 12, 2014 5:49 pm
by karx11erx
It is slow because it is written in Java - jit compiler or not.

steel,

100% agreement on sudo handling. I using Eclipse not just for debugging, but for editing my source code. code::blocks looks interesting, but I would need to learn yet another IDE - and I have no clue of your cmake project.

Re: Development Blah: Comments

Posted: Thu Jun 12, 2014 6:24 pm
by steel01
I wouldn't think editing files in code blocks would be any different than any other editor. Go to declaration or implementation is on the right click menu, etc. But yeah, it's said the best tool is the one you know. Personally, I haven't got there yet. I like poking at new stuff.

Setting up cmake for a test run should be fairly simple if you ever want to try. Apply the patch, run cmake, open the project.

Code: Select all

cd $d2x-xl-dir
patch -p0 < /path/to/name.patch
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" ..

Then open the CBP in code blocks. To generate normal make files, leave off the -G param, then run make. Release is the other valid build type. The other cmake build types won't have the preprocessor defines the code expects.

Steel01

Re: Development Blah: Comments

Posted: Thu Jun 12, 2014 8:32 pm
by karx11erx
I have understood now that code::blocks is a full blown IDE, not just a debugger. Looks very interesting. I will try it as soon as I find time.

What exactly does your patch do? If any files that are or should be in the source repo are affected, I would like to add/update these after patching.

Re: Development Blah: Comments

Posted: Thu Jun 12, 2014 8:47 pm
by steel01
The patch adds the CMakeLists.txt file that cmake uses for to define everything. It also modifies audio.h and #ifdefs out the conf.h reference there like every other reference has. Very simple. But like I said in the SF request, the followup cleanup will be somewhat more work.

Steel01

Re: Development Blah: Comments

Posted: Thu Jun 12, 2014 9:28 pm
by karx11erx
Do you have an idea why d2x-xl cannot create subfolders in /var/cache/d2x-xl on my system despite /var/cache/d2x-xl having access rights "drwxrw-rw-"?

Edit:

Darn umask ... couldn't create folders in ~/.d2x-xl either. Now I can there, but still not in /var/cache/d2x-xl. :think:

Edit 2:

I know why everything is so dark. Change the brightness setting in the render options to "standard", and there will be light. ;)

Re: Development Blah: Comments

Posted: Fri Jun 13, 2014 12:48 am
by steel01
Well, to traverse a directory, you have to have execute privileges. So, you'll probably want 777. I'll use 775 owned by root:games. Then I'll sure gaming users are members of the games group.

Hmm... I'll have to check the brightness. I think I turned it up to standard, but some areas still seem too dark. Like going down the hallway off to the left of the spawn in D2:L1. After the bots get mowed down, it's really dark. But that might just be me.

Steel01

Re: Development Blah: Comments

Posted: Fri Jun 13, 2014 1:10 am
by karx11erx
Just fixed a bug that could cause crashes, plus a ton of fixes to the game folder handling.

How do you make sure games group members can write to /var/cache/d2x-xl?

Re: Development Blah: Comments

Posted: Fri Jun 13, 2014 1:53 am
by steel01
I don't know if there's a better way than trying to open a file for writing. A quick google shows a couple stackoverflow questions with answers confirming that. If the program can't write, fall back to the user cache. Though technically, if the folder exists and is readable, the shared cache should be read, but new stuff written to the user cache. But that's likely more trouble than it's worth.

Steel01

Re: Development Blah: Comments

Posted: Fri Jun 13, 2014 11:36 am
by karx11erx
If /var/cache/d2x-xl has r/w access for the "other" users, then d2x-xl should at least be able to create subfolders in it, shouldn't it?

Well, I will create a "games" group (if there isn't one already), add my current desktop user to it, and make that group own /var/cache/d2x-xl. Maybe that will help.

Re: Development Blah: Comments

Posted: Fri Jun 13, 2014 1:05 pm
by steel01
I guess I didn't put it clearly. You need the x bit set to be able to enter and go through a directory. So if you want others to be able to read files in a directory, the directory needs to be r-x, while the files are r--. That's why I said your case needs the directory to be 777 instead of 766.

Steel01

Re: Development Blah: Comments

Posted: Fri Jun 13, 2014 2:55 pm
by karx11erx
I had understood you, but I wasn't quite sure whether creating a subfolder requires entering its parent folder ... ofc it does, I just didn't spend much thought on it.

Re: Development Blah: Comments

Posted: Fri Jun 13, 2014 11:05 pm
by steel01
So, I can't reply in the patch request on SF for some reason... But the answer to the question is pretty much the same as the first two steps in the post above. The only file added is CMakeLists.txt and the only modified file is include/audio.h. Both will need added/updated in the svn repo.

Steel01

Re: Development Blah: Comments

Posted: Fri Jun 13, 2014 11:21 pm
by karx11erx
Applied. CMakeLists.txt now is in the repo and the source archive.

Re: Development Blah: Comments

Posted: Sat Jun 21, 2014 1:20 am
by steel01
That new music layout sounds great. A quick rename of my playlists and it should all work. I'll be testing that over the weekend or early next week.

Steel01