Hi Johannes,
On Wednesday, 03 April, 2013 04:23 AM, Johannes Schmid wrote:
What about porting Anjuta itself to Windows? I tried cross-compiling it
today, disabling some POSIX-specific code. It can only edit files
(without symbol-viewer, completion, etc.) currently. Autotools also
works, but compiling and running doesn't work yet. Symbol Viewer needs
some changes for shared memory. Glade seems to work. Terminal will never
work since it needs VTE. Other plugins that don't work usually needs
fork, waitpid and execlp porting, and some fixing for MIME (which is not
fully supported by Windows, most files have application/x-ext-* MIME
type). It also has to be fixed so that paths will be created on runtime.
There was even a README entry about porting to Windows
Haven't seen any in the README file :D
By the way, seems like it wasn't updated since Anjuta 2.0 alpha.
But it seems interesting to me over all despite that I don't own any
windows license privately anymore. In the past we more or less tried to
use GLib methods whereever possible and those are usually implemented
for POSIX, Windows and Mac, especially things like IO-Channels. There is
probably not much work needed to make things working in a win32 fashion
using #ifdef.
I also don't own any Windows license currently, since I no longer use
Windows for years . I usually code in Linux using Wine then test them in
real Windows installations afterwards (I sometimes use the computers in the
office where I work).
What is more interesting is the implementation of fork() if not using
cygwin, which might require a new code path but there are probably
various examples to do that.
If fork is used to execute a program, we could use g_spawn_async to
replaceit. Most use of fork in Anjuta is to do that. The only problem is
the forkpty emulation which currently I don't know how to implement.
Then the symbol-database could actually be more difficult but I don't
know much about shared memory.
I also don't know much about shared memory, especially how it is
implemented in Linux (uses shm_open and shm_unlink). Windows uses the
same API for mapped files, so I just used GMappedFile for it (seems like
it is not the same for Linux though, but does it really need to share
the file with other processes?), but I haven't tested it yet because
symbol-db shows a warning that the project doesn't have any files.
Might be related to MIME types, though.
I don't know much how that plugin works.
Most important would be to create an installer of course because
otherwise there won't be many people that would actually be able to
build things correctly.
I already have some type of an installer infrastructure that uses NSIS,
which I already used with gWaei and my programs, so it shouldn't need
a lot of time to create one for Anjuta .
Regards,
Arnel