Where $(SRC) = ..\..\..\src, $(DEMO) = ..\..\..\demo and
[NEW]
is your new platform (eg BeOS)
Make sure you type the slashes in the right direction ('\' vs '/')
Define the symbols PG[NEW] and PGTINY (the last one only for the HelloWorld
demo!)
For example -DPGBEOS -DPGTINY
Edit the header files in pg/pg/pgdep/[NEW] you only need:
The most important thing here is to include the platform dependent include
files (eg. windows.h or gtk/gtk.h)
The NEWLINE, NB_NEWLINE, FILE_SEP and PATH_SEP can be adjusted to your
new platform
The main procedure is different for Windows and GTK therefore it was defined
here. You can probably just copy the GTK version if your platform doesn't
need special tricks
pg[NEW]app.h
Include platform dependend variables for your application here (this file
is included in pg/pg/pgmain/pgapplication.h)
pg[NEW]comp.h
Include a pointer to platform dependent base for all components here (this
file is included in pg/pg/pgcomponent/pgcomponent.h)
For Windows, all controls have a HWND as handle, For GTK all widgets have
a GtkWidget* as reference
Include additional platform specific variables needed for all components
pg[NEW]cont.h
Same thing as above, but now for containers
There are only four small C++ files you have to change to make HelloWorld
work:
pgnormalcont[NEW].cpp, pgapp[NEW].cpp, pgwindow[NEW].cpp and pgframe[NEW].cpp
The best way to start is to first comment out everything platform-dependent
and try to make the source compile
void PGApplication::exit(int code) { //gtk_main_quit(); <-
comment out dependent stuff like this }
If it compiles OK, change the four platform dependent files