Make Arduino Windows work like Arduino Mac

On the surface they are the same. But there is one difference that is causing me a lot of pain. Let me explain ...

On the Mac, I can install Arduino.app version 021 and rename it Arduino_021.app
Then I can install Arduino 1.0.1 and rename it Arduino101.app

I can customize each of these packages and there are no conflicts because all of the files are contained in the application package. The only file that I can think of that may be in common is the preferences.txt file in the /Users/me/Library/Arduino folder

Now, on the Windows PC I can extract the Arduino_021 files into a directory tree and the Arduino_1.0.1 files into another directory tree and it seems like they would behave the same as on the Mac, but they don't. After installing and running Arduino 1.0.1 I can no longer run Arduino 021. Arduino_021 cannot find WProgram.h or String.h or any of the other core files. I am supposing that this is due to some conflict or cross-linking of files. Maybe in th registry, though I don't think there are eny entries there.

Anyway, see if you can make it possible to have multiple Arduino versions on the PC behave as if they were independent programs like on the Mac.

And, if possible, put the preferences.txt file inside of each of the version's directory tree.

on windows I have .18 .22 1.0 and 1.01 installed and never experienced what you described so this is interesting

I really don't know what went wrong. I was happily completing project changes under version 021 just yesterday. Today, I tried to compile and I get a list of errors related to core files not found. It complains about INPUT and OUTPUT not being defined. The PString library cannot find String.h. And a few other issues like those. (probably something to do with environment variables - a holdover from ancient MS-DOS)

So, what happened?

I have a vague recollection that I was able to run 021 and 101 together for a while. Then I saw a thread about CodeBlocks and installed it. Maybe that is the real culprit.

But there is still that feeling of lack of control when it comes to Windows applications. I don't have any idea how to debug this problem and get the versions working together again. That is the problem with Windows. In the Mac world, it is all packaged up and I can understand how to deal with it.

I suppose - to keep it simple for the novices - the documentation has to be sparce and vague. Is there any real documentation on the directory structure of the various versions of Arduino? There is a new thread I read yesterday (http://arduino.cc/forum/index.php/topic,91890.0.html) about someone who spent a few hours trying to figure out the new variants folder structure. If you want to be kind to the novices, then you need to document the way things work better and package things up.

if it makes you feel better you should see the mess it makes in linux where it vomits files all over the place and becomes a hunt, while I have never really figured out how to have multiple versions co-exist happily

Well, I did figure out the conflict, and it does not make the task any easier.

My sketches are in a folder named 'Arduino Projects'. I recently installed Arduino 1.0.1 to try to catch up with the rest of the world. Since the new version did not directly support my processor (Mega644) I searched for someone who had modified version 1.0.1 and found one. They asked me to put their files in a folder named 'hardware' inside of my sketches folder. That seemed to work great for version 1.0.1, but ...

All of the versions previously installed use the same skatches folder, and they also looked at that new 'hardware' folder and tried to interpret the stuff in it. When they could not, they spit out errors upon errors. So, I have to remove the new 'hardware' folder to use the older versions.

Here is a partial listing of the errors I get when running Arduino_0021 with the version 101 'hardware' folder. The line in bold is the clue here.

E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega644p -DF_CPU=8000000L -DARDUINO=21 -IE:\Arduino Projects\hardware\mighty-1284p\cores\arduino -IE:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial -IE:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\utility E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\SoftwareSerial.cpp -oC:\Users\James\AppData\Local\Temp\build4082915697125474477.tmp\SoftwareSerial\SoftwareSerial.cpp.o
E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\SoftwareSerial.cpp:24:24: error: WConstants.h: No such file or directory
E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)':
E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\SoftwareSerial.cpp:51: error: 'HIGH' was not declared in this scope

I suppose that the same problem will occur on the Mac platform.

So, the suggestion stands, in a modified form. Instead of 'make the PC like the Mac' how about this

Make it possible to have multiple versions of Arduino without any cross linking or conflicts.
Put all modifications to the installed version inside of the installed version folder and don't allow overrides like putting a 'hardware' folder in a common folder like the sketches folder.

Checkers1811:
Well, I did figure out the conflict, and it does not make the task any easier.

My sketches are in a folder named 'Arduino Projects'. I recently installed Arduino 1.0.1 to try to catch up with the rest of the world. Since the new version did not directly support my processor (Mega644) I searched for someone who had modified version 1.0.1 and found one. They asked me to put their files in a folder named 'hardware' inside of my sketches folder. That seemed to work great for version 1.0.1, but ...

All of the versions previously installed use the same skatches folder, and they also looked at that new 'hardware' folder and tried to interpret the stuff in it. When they could not, they spit out errors upon errors. So, I have to remove the new 'hardware' folder to use the older versions.

Here is a partial listing of the errors I get when running Arduino_0021 with the version 101 'hardware' folder. The line in bold is the clue here.

E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega644p -DF_CPU=8000000L -DARDUINO=21 -IE:\Arduino Projects\hardware\mighty-1284p\cores\arduino -IE:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial -IE:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\utility E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\SoftwareSerial.cpp -oC:\Users\James\AppData\Local\Temp\build4082915697125474477.tmp\SoftwareSerial\SoftwareSerial.cpp.o
E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\SoftwareSerial.cpp:24:24: error: WConstants.h: No such file or directory
E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)':
E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\SoftwareSerial.cpp:51: error: 'HIGH' was not declared in this scope

I suppose that the same problem will occur on the Mac platform.

So, the suggestion stands, in a modified form. Instead of 'make the PC like the Mac' how about this

Make it possible to have multiple versions of Arduino without any cross linking or conflicts.
Put all modifications to the installed version inside of the installed version folder and don't allow overrides like putting a 'hardware' folder in a common folder like the sketches folder.

To solve this issue, I created a new ArduinoNew folder and 'hacked' the IDE to use another preferences file, so both versions runs perfect :slight_smile: (with old+new libs)