English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. C/C++ (https://eab.abime.net/forumdisplay.php?f=118)
-   -   WarpOS version of SDL (https://eab.abime.net/showthread.php?t=88760)

emufan 08 December 2017 16:07

I only have AmigaOS3 68k toolchains. but grelbfarlk may try I guess :spin

Marlon_ 08 December 2017 16:42

Quote:

Originally Posted by emufan (Post 1204736)
I only have AmigaOS3 68k toolchains. but grelbfarlk may try I guess :spin

Alright

grelbfarlk 09 December 2017 01:34

Quote:

Originally Posted by Marlon_ (Post 1204743)
Alright

So what does this use AHI? Or ? SDL?

Marlon_ 09 December 2017 04:07

Quote:

Originally Posted by grelbfarlk (Post 1204845)
So what does this use AHI? Or ? SDL?

SDL and AHI through SDL.

grelbfarlk 09 December 2017 15:11

It was building swimmingly up until LHA compression, missing lhasa.h. Need to do some aminet looting.

Marlon_ 09 December 2017 15:19

Quote:

Originally Posted by grelbfarlk (Post 1204913)
It was building swimmingly up until LHA compression, missing lhasa.h. Need to do some aminet looting.

Oh, you didn't run the premake script? there's some submodules that need to build as well. lhasa, zziplib, zlib and bzlib2 are all included as submodules in git, you just have to initialize them.

If you downloaded the source as zip, I suppose the premake script won't initialize the submodules.

Here's all the submodules:
https://github.com/MBeijer/MilkyTrac...src/submodules

grelbfarlk 09 December 2017 15:32

I did run the premake script, but yes I downloaded it as a zip.

Marlon_ 09 December 2017 15:35

Quote:

Originally Posted by grelbfarlk (Post 1204919)
I did run the premake script, but yes I downloaded it as a zip.

so, yeah, each submodule must be initialized (or downloaded as zip and extracted) in src/submodules/ before running the premake script.

grelbfarlk 09 December 2017 16:42

Ok got a little further. LHASA, BZLIP, ZLIB built, did see one thing to worry about later that we don't have vasnprintf...
But it failed on zziplib, I guess I should run configure for that so I get a config.h that defines HAVE_DIRENT and all that?

unzip-mem.c
In file included from ../src/submodules/zziplib/bins/unzip-mem.c:10:
../src/submodules/zziplib/zzip/memdisk.h:35: parse error before `dir'
make[1]: *** [obj/ppc-amigaos/Release/zziplib/unzip-mem.o] Error 1
make: *** [zziplib] Error 2

Marlon_ 09 December 2017 17:24

Just have this in your include path:
https://github.com/MBeijer/MilkyTrac...zzip/_config.h

grelbfarlk 09 December 2017 19:25

Ok, got past that error by building libzzip and using the config.h from that instead.
Next problem:
DecompressorLHA.cpp
../src/compression/DecompressorLHA.cpp:92: warning: ANSI C++ forbids initialization of member `input_stream'
../src/compression/DecompressorLHA.cpp:92: warning: making `input_stream' static
../src/compression/DecompressorLHA.cpp:92: ANSI C++ forbids in-class initialization of non-const static member `input_stream'
../src/compression/DecompressorLHA.cpp:93: warning: ANSI C++ forbids initialization of member `reader'
../src/compression/DecompressorLHA.cpp:93: warning: making `reader' static
../src/compression/DecompressorLHA.cpp:93: ANSI C++ forbids in-class initialization of non-const static member `reader'
make[1]: [obj/ppc-amigaos/Release/compression/DecompressorLHA.o] Error 1 (ignored)

grelbfarlk 09 December 2017 19:28

Let's just -i and see what happens with the rest.

Next:
AslRequester.cpp
Code:

../src/ppui/osinterface/amiga/AslRequester.cpp:94: unterminated macro call
../src/ppui/osinterface/amiga/AslRequester.cpp:173: warning: preprocessing directive not recognized within macro arg
../src/ppui/osinterface/amiga/AslRequester.cpp:173: warning: preprocessing directive not recognized within macro arg

repeated many times...

Next:

PPOpenPanel_SDL.cpp
Code:

../src/ppui/osinterface/sdl-1.2/PPOpenPanel_SDL.cpp: In method `enum PPModalDialog::ReturnCodes PPOpenPanel::runModal()':
../src/ppui/osinterface/sdl-1.2/PPOpenPanel_SDL.cpp:75: ambiguous overload for `bool ? PPString & : const char[1]'
../src/ppui/osinterface/sdl-1.2/PPOpenPanel_SDL.cpp:75: candidates are: operator ?:(bool, PPString, PPString) <builtin>
../src/ppui/osinterface/sdl-1.2/PPOpenPanel_SDL.cpp:75:                operator ?:(bool, const char *, const char *) <builtin>
make[1]: [obj/ppc-amigaos/Release/ppui/PPOpenPanel_SDL.o] Error 1 (ignored)

PPSavePanel_SDL.cpp
Code:

../src/ppui/osinterface/sdl-1.2/PPSavePanel_SDL.cpp: In method `enum PPModalDialog::ReturnCodes PPSavePanel::runModal()':
../src/ppui/osinterface/sdl-1.2/PPSavePanel_SDL.cpp:56: ambiguous overload for `bool ? PPString & : const char[1]'
../src/ppui/osinterface/sdl-1.2/PPSavePanel_SDL.cpp:56: candidates are: operator ?:(bool, PPString, PPString) <builtin>
../src/ppui/osinterface/sdl-1.2/PPSavePanel_SDL.cpp:56:                operator ?:(bool, const char *, const char *) <builtin>
make[1]: [obj/ppc-amigaos/Release/ppui/PPSavePanel_SDL.o] Error 1 (ignored)

Churning.... churning harder....

Marlon_ 09 December 2017 19:45

Quote:

Originally Posted by grelbfarlk (Post 1204975)
Let's just -i and see what happens with the rest.

Next:
AslRequester.cpp
Code:

../src/ppui/osinterface/amiga/AslRequester.cpp:94: unterminated macro call
../src/ppui/osinterface/amiga/AslRequester.cpp:173: warning: preprocessing directive not recognized within macro arg
../src/ppui/osinterface/amiga/AslRequester.cpp:173: warning: preprocessing directive not recognized within macro arg

repeated many times...

Next:

PPOpenPanel_SDL.cpp
Code:

../src/ppui/osinterface/sdl-1.2/PPOpenPanel_SDL.cpp: In method `enum PPModalDialog::ReturnCodes PPOpenPanel::runModal()':
../src/ppui/osinterface/sdl-1.2/PPOpenPanel_SDL.cpp:75: ambiguous overload for `bool ? PPString & : const char[1]'
../src/ppui/osinterface/sdl-1.2/PPOpenPanel_SDL.cpp:75: candidates are: operator ?:(bool, PPString, PPString) <builtin>
../src/ppui/osinterface/sdl-1.2/PPOpenPanel_SDL.cpp:75:                operator ?:(bool, const char *, const char *) <builtin>
make[1]: [obj/ppc-amigaos/Release/ppui/PPOpenPanel_SDL.o] Error 1 (ignored)

PPSavePanel_SDL.cpp
Code:

../src/ppui/osinterface/sdl-1.2/PPSavePanel_SDL.cpp: In method `enum PPModalDialog::ReturnCodes PPSavePanel::runModal()':
../src/ppui/osinterface/sdl-1.2/PPSavePanel_SDL.cpp:56: ambiguous overload for `bool ? PPString & : const char[1]'
../src/ppui/osinterface/sdl-1.2/PPSavePanel_SDL.cpp:56: candidates are: operator ?:(bool, PPString, PPString) <builtin>
../src/ppui/osinterface/sdl-1.2/PPSavePanel_SDL.cpp:56:                operator ?:(bool, const char *, const char *) <builtin>
make[1]: [obj/ppc-amigaos/Release/ppui/PPSavePanel_SDL.o] Error 1 (ignored)

Churning.... churning harder....

Make sure __AMIGA__ and AMIGA is defined. Some of these warnings is probably because you're using an older version of GCC.

grelbfarlk 09 December 2017 19:50

Quote:

Originally Posted by Marlon_ (Post 1204977)
Make sure __AMIGA__ and AMIGA is defined. Some of these warnings is probably because you're using an older version of GCC.

Yeah.... so part if it is probably because I have __os4__ defined, I started the build from there which screwed a lot of stuff up.

Also need to wrap #pragma pack(2) around the Amiga OS includes or Hedeon will punch me in the face.

At least that's what I think is what's going on with the ASL requester.

The other two PPUI objects, I don't know is this supposed to work on SDL 1.2.6?

The good news is those are the only four objects that didn't build it tried to link Milkytracker after that. So probably not so insurmountable.

Marlon_ 09 December 2017 21:32

Quote:

Originally Posted by grelbfarlk (Post 1204980)
Yeah.... so part if it is probably because I have __os4__ defined, I started the build from there which screwed a lot of stuff up.

Also need to wrap #pragma pack(2) around the Amiga OS includes or Hedeon will punch me in the face.

At least that's what I think is what's going on with the ASL requester.

The other two PPUI objects, I don't know is this supposed to work on SDL 1.2.6?

The good news is those are the only four objects that didn't build it tried to link Milkytracker after that. So probably not so insurmountable.



Any changes you do to the source would be appreciated if you send them back to me so I can patch my sources and put it on github. Also your changes for ppc-warpos Makefile and I'll put it in premake.

Yes, this works with SDL-1.2.6 from Aminet.

Marlon_ 09 December 2017 21:35

Oh, and I'd prefer #ifdef __WARPOS__ (or whatever is common for WarpOS) for WarpOS specific fixes so it doesn't break for the other OS'es! :)

grelbfarlk 10 December 2017 00:59

Hoped to work on this more today but in the AslRequester.cpp now have it complaining about:
Code:

In file included from ../src/ppui/osinterface/amiga/AslRequester.cpp:25:
../src/ppui/osinterface/amiga/AslRequester.h:37: `CONST_STRPTR' was not declared in this scope
../src/ppui/osinterface/amiga/AslRequester.h:37: parse error before `,'
make[1]: [obj/ppc-amigaos/Release/ppui/AslRequester.o] Error 1 (ignored)

Offending line from AslRequester.h:
Code:

PPSystemString GetFileName(CONST_STRPTR title, bool saveMode = false, CONST_STRPTR name = "");
I thought CONST_STRPTR is like a basic type for AmigaOS, not sure what I'm missing here.


Nevermind, stupid mistake on my part.

3 left.

Marlon_ 10 December 2017 01:05

I was going to suggest changing it to "const char*". But had a look at the include "exec/types.h" and found this code:

Code:

#ifdef __cplusplus
typedef CONST char          *CONST_STRPTR; /* STRPTR to const data */
#else
typedef CONST unsigned char  *CONST_STRPTR; /* STRPTR to const data */
#endif

Check your include path. In the GCC6 toolchain the amiga os includes are in a folder called "sys-include", while in older toolchains it is called "os-include" or something like that.

grelbfarlk 10 December 2017 01:34

Quote:

Originally Posted by Marlon_ (Post 1205041)
I was going to suggest changing it to "const char*". But had a look at the include "exec/types.h" and found this code:

Code:

#ifdef __cplusplus
typedef CONST char          *CONST_STRPTR; /* STRPTR to const data */
#else
typedef CONST unsigned char  *CONST_STRPTR; /* STRPTR to const data */
#endif

Check your include path. In the GCC6 toolchain the amiga os includes are in a folder called "sys-include", while in older toolchains it is called "os-include" or something like that.

Yeah it was my adjustments to the header for that I had the wrong define for what I added-like I said stupid mistake.

So just what's left above with the errors remaining:
DecompressorLHA.cpp
PPOpenPanel_SDL.cpp
PPSavePanel_SDL.cpp

Marlon_ 10 December 2017 01:40

Quote:

Originally Posted by grelbfarlk (Post 1205046)
DecompressorLHA.cpp

Try changing:
Code:

LHAInputStream* input_stream = NULL;
LHAReader* reader = NULL;

To:
Code:

const LHAInputStream* input_stream = NULL;
const LHAReader* reader = NULL;

On line 92 and 93.


All times are GMT +2. The time now is 10:09.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.14104 seconds with 11 queries