MCC18 Installer Script

I’m working on a sort of cross-platform development server, like a software repository and compiler service bundled together to work with a thin client.

Anyway, I just got MCC18 working on my Ubuntu installation, and it was too painful to be worth it. :rolleyes:

So I’m wondering if it’s possible to make some scripts/installers for Linux that can automagically install MCC18. Meaning, the user pops in the MPLAB CD, the script finds the MCC18 folder, copies the files over to /opt/mcc18, fixes p18cxxx.h (per this post) and maybe offers an option to install WINE.

Is this feasible? I am by no means an experienced Linux user, so I wouldn’t know where to start.

You could write a bash script.

http://www.panix.com/~elflord/unix/bash-tute.html
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
www.google.com

How would I get it to install WINE or XAMPP? Also, how would I make it read from the CD drive?

The cdrom drive gets mounted at “/cdrom” in ubuntu. So you can copy files with something like this


sudo cp -r /cdrom/(mcc18 folder) /opt/mcc18

I believe opt requires root access to write to, so you will need to use the sudo command.

You can use apt to download and install wine and apache. Google apt commands.

Right, I’ve used apt plenty of times. So I can just put a “sudo apt-get” call in the script and it will install? Sweet.

Sorry, I’ve never written a linux script, obviously.

I’ve never actually tried it before, but when the shell runs a script it will run all of the commands as if you had typed them in, so it should work fine. Let us know when you finish this… it will be a great tool for those of us who develop on Linux.

I don’t know what your procedure was, but I didn’t have any problems on Fedora. I just copied C:\MCC18 from a windows installation. WINE was already installed and the compiler it just worked. I’m using piklab for my own projects though. I haven’t tried it with the robot code.