Slade 2.0 alpha on Linux (and Unicode)
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Slade 2.0 alpha on Linux (and Unicode)
I made the necessary changes to get Slade 2.0 alpha (svn revision 53) to build on Linux with or without Unicode support built into wxWidgets. I wouldn't have undertaken it if I knew what a pain it would be, but I just decided to finish it once I got a good way into it.
It also contains some small code enhancements.
It also contains some small code enhancements.
- Attachments
-
- slade_20_alpha-r53-linux.diff.gz
- (15.63 KiB) Downloaded 66 times
After fixing error in render.cpp at line 1234 (cannot convert 'wxChar *' to 'const char *') and commenting out one of get_image_from_pk3 in archive.cpp or editor_window.cpp I was able to compile it. When I ran it it gave me an
error and then segfaulted.
Code: Select all
10:12:55: Error: can't open file 'řŚ°
řŚ°
ř řŚŻ řŚ°
řŚ°
ř řŚŻ ' (error 2: file not found)
Yeah, I haven't actually linked it yet, since now that I updated by NVIDIA drivers libwx_gtk2u_gl now references some symbols that aren't there. I'm rebuilding wxWidgets right now to fix that.
Here's a patch against revision 57, which is the latest as of this moment.
Edit: I've fixed my issue so it linked (see above, it's unrelated to anything in the patch), in addition to compiling. I get "Unable to open slade.pk3" when I run it. I'll see what I can do to fix that if I get a chance.
Here's a patch against revision 57, which is the latest as of this moment.
Edit: I've fixed my issue so it linked (see above, it's unrelated to anything in the patch), in addition to compiling. I get "Unable to open slade.pk3" when I run it. I'll see what I can do to fix that if I get a chance.
- Attachments
-
- slade_20_alpha-r57-linux.diff.gz
- (15.5 KiB) Downloaded 53 times
- sirjuddington
- Posts: 1025
- Joined: Wed Jul 16, 2003 4:47 am
- Location: Australia
- Contact:
slade.pk3 needs to be in the same directory as the slade executable. It runs fine for me in ubuntu/wxwidgets unicode without the patch, but most of those changes are needed so I'll merge it in, and update the svn soon.
Edit: Ok, SVN updated with the patch changes.
Also, by the way, you should delete archive.cpp and archive.h since they aren't needed any more and actually cause errors.
Edit: Ok, SVN updated with the patch changes.
Also, by the way, you should delete archive.cpp and archive.h since they aren't needed any more and actually cause errors.
That was because Slade read from a temporary buffer after it had been destroyed. This only occurred for Unicode capable builds of wxWidgets. I replaced the function responsible with a macro, which at least avoids causing the problem. (Not even an inline function worked when I tried that).Grubber wrote:Still the same error message with random characters.
I fixed some more issues in the code (various examples of inefficiency or lack of portability). I also made unix builds store settings in ~/.slade and read the shared data files by default from data_files/. This can be changed by setting SHARE_DIR to something else (in case someone actually wishes to install slade).
It gets as far as loading textures from slade.pk3 for me. Then, it uses a bunch of cpu for awhile and then the process eventually dies on its own.
- Attachments
-
- slade_20_alpha-r58-linux.diff.gz
- (2.04 KiB) Downloaded 41 times
Okay, here is a patch to stop the bizarre crash I described (only to have it segfault later). For the curious (but lazy ) the crash occurred because of an integer overflow when sizeof(wxChar) != 1 that resulted in gobs of memory being allocated:
Edit: The new patch now fixes the remaining crash too. That one was caused by slade looking for slade.pk3 in the current directory in src/wad_manager.cpp, instead of in the data directory.
Code: Select all
Index: src/console.cpp
===================================================================
--- src/console.cpp (revision 61)
+++ src/console.cpp (working copy)
@@ -103,7 +103,7 @@
string line = _T("<< S.L.A.D.E. -- \"SlayeR's LeetAss Doom Editor\" (");
line += __SLADEVERS;
line += _T(")");
- for (int a = 0; a < 21 - sizeof(__SLADEVERS); a++)
+ for (int a = 0; a < 21 - sizeof(__SLADEVERS)/sizeof(wxChar); a++)
line += _T(" ");
line += _T(">>");
console_print(_T("<< ------------------------------------------------------------------ >>"));
- Attachments
-
- slade_20_alpha-r61-linux.diff.gz
- (569 Bytes) Downloaded 47 times
- Krillancello
- Posts: 309
- Joined: Sat Nov 27, 2004 12:39 am
- Location: Teh Intarwebivurs
Could you give a diff of these changes orGrubber wrote:After fixing error in render.cpp at line 1234 (cannot convert 'wxChar *' to 'const char *') and commenting out one of get_image_from_pk3 in archive.cpp or editor_window.cpp I was able to compile it.
Code: Select all
them?
- Krillancello
- Posts: 309
- Joined: Sat Nov 27, 2004 12:39 am
- Location: Teh Intarwebivurs
- Siggi
- Posts: 3288
- Joined: Sun Oct 03, 2004 8:57 am
- Preferred Pronouns: They/Them
- Location: South Africa
I'm pretty sure I have wxWidgets installed, wxScintilla I'm not too sure about.Krillancello wrote:Siggi: Do you have wxWidgets (GTK version) aka wxGTK, and wxScintilla, installed properly?
I've found a link to Scintilla, I'm going to try and see if I can get that working.
Are those really the only 2 things I need?
Krillancello wrote:Could you give a diff of these changes orGrubber wrote:After fixing error in render.cpp at line 1234 (cannot convert 'wxChar *' to 'const char *') and commenting out one of get_image_from_pk3 in archive.cpp or editor_window.cpp I was able to compile it.Code: Select all
them?[/quote] The changes in the previous patches I posted have already been applied to the latest svn and include a fix for these problems in addition to innumerable other issues. Just check out revision 61, apply slade_20_alpha-r61-linux.diff, and compile. Keep in mind that even though it actualy runs without crashing with the patch, there are still some more fixes that need to be made before it will run very well.
Scintilla is not wxScintilla. You can download the source for wxScintilla 1.69.2 right here and then extract it and apply this patch I made: wxscintilla_1.69.2-Makefile.diff.gz. Then, build it and copy libwxscintilla.so to /usr/lib/ and wxscintilla.h to /usr/include/wx-2.6/wx/.Psycho Siggi wrote:I'm pretty sure I have wxWidgets installed, wxScintilla I'm not too sure about.Krillancello wrote:Siggi: Do you have wxWidgets (GTK version) aka wxGTK, and wxScintilla, installed properly?
I've found a link to Scintilla, I'm going to try and see if I can get that working.
Are those really the only 2 things I need?
- Siggi
- Posts: 3288
- Joined: Sun Oct 03, 2004 8:57 am
- Preferred Pronouns: They/Them
- Location: South Africa
Ok, I knew it was something stupid. Either my wxWidgets wasn't installed at all, or not installed correctly. I've reinstalled that from source and have reduced the compile erros I'm getting to this:
Jim: That was where I got wxScintilla (wxscintilla_1.69.2.tar.gz) from (I won't leave the 'wx' off this time ), however it did compile without errors. Should I recompile after applying your diff?
Also, is that the cause for my current compile error?
Thanks for the help guys
Code: Select all
g++ -c -O2 `wx-config --cxxflags` -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DNO_MAP_VIEWER=1 -DUNIX=1 -DSHARE_DIR="\"data_files/\"" -o src/3dmode.o src/3dmode.cpp
src/tex_browser.h:24: error: expected class-name before ‘{’ token
src/3dmode.cpp: In function ‘void apply_gravity()’:
src/3dmode.cpp:70: warning: passing ‘float’ for argument 1 to ‘point2_t::point2_t(int, int)’
src/3dmode.cpp:70: warning: passing ‘float’ for argument 2 to ‘point2_t::point2_t(int, int)’
make: *** [src/3dmode.o] Error 1
Also, is that the cause for my current compile error?
Thanks for the help guys
Yes, you should recompile it because otherwise when you link you will get an error complaining about a missing symbol "lmSpice". (I reported this bug; so it will be fixed in the next version.)
No, that is not the reason for your current compile error.
Your current error is most likely occurring because you don't have wxGTK-gl and wxGTK-gl-devel installed (the exact names and makeup of these packages will vary between distributions, e.g. SuSE doesn't have/need a wxGTK-gl-devel package).
No, that is not the reason for your current compile error.
Your current error is most likely occurring because you don't have wxGTK-gl and wxGTK-gl-devel installed (the exact names and makeup of these packages will vary between distributions, e.g. SuSE doesn't have/need a wxGTK-gl-devel package).