I recently got annoyed at the TIGCC/GCC4TI IDE on Linux... or lack thereof.
As such, I decided to take the only sane path: Write my own.
Current features:
Cross platform (works on MacOS and Linux, it should support Windows, but I haven't tested it.
Written in Java, using SWT for the UI.
License: GPL v2 or later (As of now, I'm not distributing it, because the current codebase looks like it was written by a highschooler using chocolate as a caffeine source, which it was.)
Screenshot:

I'll update this as I add more stuff.

And finally some questions...
My current plan for compilation is to call "tigcc" behind the scenes using Java's ProcessBuilder utility. Is there a way to reliably locate an executable?

I currently do it by going to the x86 program files directory on Windows and looking there and by inspecting things like ".profile" and ".bashrc" on *nix to find $TIGCC, but that doesn't account for all kinds of things, like using different shells.

Edit: There really isn't a standard place to install it, so I'll just pop up a dialog asking for the compiler path.
Also, because of the way I wrote the IDE, it's possible to use it for CE C projects as well.
Edit: I've finished implementing the finding tigcc, now for ez80-clang...
Okay...
Never mind. Compiling doesn't work.

Currently, the way I'm doing it is generating a shell script in the project/build directory and running it. The script looks like this, for example:

Code:

#!/bin/bash
export TIGCC=/usr/local/tigcc
/bin/echo "Attempting compilation"
/usr/local/tigcc/bin/tigcc -o test_comp -Os -Wpedantic -Wall /home/michael/test_workspace/test_comp/src/c/test_comp.c && /bin/echo "Compilation finished"

However, only the first echo prints something. This means that tigcc isn't running correctly, but nothing gets printed to stdout or stderr. How can I make the script print what tigcc spits out?

EDIT:
From Jacobly:

Code:

import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException, InterruptedException {
    System.out.println("Attempting compilation");
    ProcessBuilder pb = new ProcessBuilder("/usr/local/tigcc/bin/tigcc", "-o", "test_comp", "-Os", "-Wpedantic", "-Wall", "/home/michael/test_workspace/test_comp/src/c/test_comp.c");
    pb.environment().put("TIGCC", "/usr/local/tigcc");
    Process proc = pb.inheritIO().start();
    if (proc.waitFor() == 0) {
      System.out.println("Compilation finished");
    } else {
      // failed
    }
  }
}
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement