Go Down

Topic: IDE 1.8.0 Released -- update: 1.8.7 (Read 95661 times) previous topic - next topic

alenrobin


Ace_Tech

i just downloaded the Arduino IDE 1.8.7, and checked it out.

there is still an accessibility issue that's not fully resolved in the version 1.8.6 and now the 1.8.7.

in the Preferences panel, there is now a tab called Theme with a drop-down menu containing 'Default Theme'.
no matter what one does there, one can not change the 'Default Theme' to any other theme.

i already know that inside the compiler app's java/lib/syntax/theme folder there are two themes - dafault.xml and dark.xml
and that there is a 'theme.txt buried inside /lib folder.

i don't know why one can not change the theme option inside the preferences, when plainly there are two, not one, themes.

changing the theme by replacing the 'theme' folder inside the /syntax folder in Finder, does work in changing the look of the IDE, but is awkward, clunky and not very user-friendly, and still doesn't resolve the selecting of themes problem in preferences.

the original theme is not very readable at the best of times.

can anyone resolve this issue, please?

btw, has anyone ported the Arduino Theme Editor from Windows, over to mac OS-X yet?

zoomx

Reading here
https://github.com/AbhishekGhosh/Arduino-Themes
where thare are themes that requires manual installation,
and there
https://github.com/jeffThompson/DarkArduinoTheme
where is the dark theme,
it seems that there is something to do because it will need a folder with more than one theme and we have only a theme folder with only one theme inside. So it seems that this is the folder to modify, the modification will be simpler but it seems that it is not ready.

Ace_Tech

#198
Sep 25, 2018, 06:49 am Last Edit: Sep 25, 2018, 06:55 am by Ace_Tech
the theme folder inside the IDE's java/lib/syntax/ has two themes, not one. they're 'default.xml' and 'dark.xml' - only the 'default' theme is listed and selectable in Preferences panel.

as you say, it seems that the pop-down menu in Preferences for themes is a stub, waiting for functional routines to be written and compiled into the IDE.

thanks for the links to those theme files. i have now downloaded them. :)
i have already changed the original theme to a dark theme in my IDE - the code is more legible now. but it was an awkward, error-prone procedure, in Finder operations. :-\

btw, is it now possible to write, debug and edit the libraries, as easily as the main code? atm, in my experience, one has to do a work-around in using a text editor to save the libraries as *.h and *.cpp. a bit awkward for us beginners on that subject.

zoomx

We are OT but...
Usually I don't modify library because if there is an update all my changes are lost.
Instead I copy .h and .cpp in the same sketch folder so I am able to modify it using the IDE.
I have to change from
Code: [Select]
#include <library>
 to
Code: [Select]
#include "library"
This way you modified library is tied to you sketch. So you need a sketch that uses it.

Unfortunately this can't be done with libraries that have many files like SD or Ethernet.

pert

in the Preferences panel, there is now a tab called Theme with a drop-down menu containing 'Default Theme'.
no matter what one does there, one can not change the 'Default Theme' to any other theme.
Here's where the new theme preference was added:
https://github.com/arduino/Arduino/pull/7124
This feature is fully working. It is not a stub. Arduino would not make a release with a stub in the user interface.

The way it works is you create a folder named theme in your sketchbook folder (the location of which you can find at File > Preferences > Sketchbook location). You put all the themes you want to chose from in .zip files and put them under that folder. The tricky part I ran into is that the files need to be directly under the .zip file, not in a folder. I don't like this because it is not at all common for .zip files to be structured this way and it makes it more difficult for theme authors to distribute their themes in a form compatible with this system.

However, I'm very grateful for the improvement of the theme system. As you said, this is an accessibility issue and the previous system was far from idea. I don't really see a lot of need for user selectable themes but the ability to store custom themes in the sketchbook is crucial. Before, you would end up back with the default theme anytime you updated to a new version of the Arduino IDE.

It's unfortunate that Arduino has not documented this useful feature beyond a mention in the release notes. There are quite a few such features that are rarely used simply because people don't know about them.

pert

btw, is it now possible to write, debug and edit the libraries, as easily as the main code? atm, in my experience, one has to do a work-around in using a text editor to save the libraries as *.h and *.cpp. a bit awkward for us beginners on that subject.
There is a way to edit libraries via the Arduino IDE. It's a little bit of a hack but it works well enough:
  • Add a file named .development to the library. Without this file, the Arduino IDE treats anything in the libraries folder as read-only to prevent users from accidentally modifying examples. It doesn't matter what the contents of the file are. Windows Explorer doesn't allow you to create a file of this name so you'll need to do it from the command line.
  • If the library doesn't contain a library.properties file, create one. Follow the specification here: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format. It doesn't matter what the content of the file is as long as it follows the specification.
  • Create a file named {library folder name}.ino, where {library name} is the name of the library folder. This is a dummy file that tricks the Arduino IDE into thinking the library is a sketch. The .ino file will not be compiled when the library is used. I like to use this file to store my "to-do" list. You could also turn it into a test sketch for the library.

After adding those files, you can simply open the .ino file from the Arduino IDE. All the header and source files in the same folder as the .ino file will be opened in the IDE as tabs. This does not work so well for libraries that have their source code in subfolders. If all the code is under the src folder then you could work around that by putting the dummy .ino file in the src folder and naming it src.ino.

Ace_Tech

i have been trying to install the themes in my Arduino IDE 1.8.7...so far, no success, unfortunately.
a bit frustrating, what with the lack of documentation on this feature.

...The way it works is you create a folder named theme in your sketchbook folder (the location of which you can find at File > Preferences > Sketchbook location). You put all the themes you want to choose from in .zip files and put them under that folder. The tricky part I ran into is that the files need to be directly under the .zip file, not in a folder...
in order to download the zipped files from the github sites linked by earlier people in this thread, i had to uncheck the "Open 'safe' files after downloading..." option in my Safari browser, just to stop it from unzipping the files.
atm, i don't have a way of rezipping up the unzipped files.

does the IDE 1.8.7 unzip the ***theme.zip files itself?

it also appears that the installation instructions on those github links for the theme files need updating - the info is for older versions of IDE eg, up to 1.8.5, not for the 1.8.6 and 1.8.7.

pert, do you mean the '...<sketchbook folder>/theme/***theme.zip'? [ *** being the name of a particular theme, e.g, DarkArduinoTheme.zip ]
i found that did not work. bummer.

what is the exact directory outline? do you mean by '...under the .zip file, not in a folder...' that all the collected themes need to be zipped up into one big .zip file, and not stored individually inside theme folder?

thanks in advance for any help you can give me on the subject.

pert

atm, i don't have a way of rezipping up the unzipped files.
You need to get one. I'd be surprised if macOS doesn't come with a native file compression tool.

does the IDE 1.8.7 unzip the ***theme.zip files itself?
I don't know the underlying details about how the feature works. All I know is it does work. That's enough for me.

it also appears that the installation instructions on those github links for the theme files need updating - the info is for older versions of IDE eg, up to 1.8.5, not for the 1.8.6 and 1.8.7.
True. Likely the authors don't even know about this new feature. I haven't updated the installation instructions on my themes either, though it's on my "to-do" list. The old installation instructions still work fine so it's not especially urgent.

pert, do you mean the '...<sketchbook folder>/theme/***theme.zip'? [ *** being the name of a particular theme, e.g, DarkArduinoTheme.zip ]
You could name the file whatever you like. The menu entry in File > Preferences > Theme is determined by the filename.

what is the exact directory outline?
{sketchbook folder}
|_theme
   |_DarkArduinoTheme.zip
      |_theme.txt
      |_etc.

do you mean by '...under the .zip file, not in a folder...' that all the collected themes need to be zipped up into one big .zip file, and not stored individually inside theme folder?
No. I mean that all the files of a given theme must be directly under the .zip folder, rather than being in a folder that's zipped (as is usually done).

For example, to download https://github.com/jeffThompson/DarkArduinoTheme you would likely click on Clone or download > Download ZIP. The downloaded file structure looks like this:

DarkArduinoTheme-master.zip
|_DarkArduinoTheme-master
   |_DarkThemeTestCode
   |  |_AnotherTab.ino
   |  |_DarkThemeTestCode.ino
   |_theme
      |_theme.txt
      |_etc.

In this case the theme is in the DarkArduinoTheme-master/theme subfolder of the .zip file so that .zip file won't work with the Arduino IDE's user selectable theme feature. You'll need to take the files from the DarkArduinoTheme-master/theme folder and zip them up.

As far as I know, all usable 3rd party Arduino IDE themes are hosted on GitHub and GitHub-generated .zip files are always in a folder. So even if we move our themes to the root of the repository, the GitHub-generated .zip files will still not be compatible with the selectable theme system.

oqibidipo

Quote
i don't have a way of rezipping up the unzipped files.
Yes, you do. In Finder, right-click (or control+click) -> Compress.

Ace_Tech

Yes, you do. In Finder, right-click (or control+click) -> Compress.
yes, thank you, oqibidipo.  8)  i asked Siri how, earlier, before i read your post and it was a 'do'h! of course.' moment when Siri pointed out the site that gave the exact same instructions.

pert, you were dead right about the macOS having a native compress/uncompress routine. i just didn't have a need for that, so i didn't know about it. turned out to be quite simple to use. right-click...double-click as needed...blah blah...that sort of thing. :-)

True. Likely the authors don't even know about this new feature. I haven't updated the installation instructions on my themes either, though it's on my "to-do" list. The old installation instructions still work fine so it's not especially urgent.
i think you may be right about the authors of the github theme links not knowing about the features. it does take time for the knowledge to spread through the community at large. so, no huhu about that.  8)

For example, to download https://github.com/jeffThompson/DarkArduinoTheme you would likely click on Clone or download > Download ZIP. The downloaded file structure looks like this:

DarkArduinoTheme-master.zip
|_DarkArduinoTheme-master
   |_DarkThemeTestCode
   |  |_AnotherTab.ino
   |  |_DarkThemeTestCode.ino
   |_theme
      |_theme.txt
      |_etc.

In this case the theme is in the DarkArduinoTheme-master/theme subfolder of the .zip file so that .zip file won't work with the Arduino IDE's user selectable theme feature. You'll need to take the files from the DarkArduinoTheme-master/theme folder and zip them up.
your explanation on the installation of the files makes it clear that i had to unzip the downloaded github .zip file, drill down to the folder 'theme', select all the files inside that folder, compress them into a single 'Archive.zip', and then move that .zip file to my <sketchbook> location's theme folder. and rename that Archive.zip to *theme.zip, appropriately, of course.

 :smiley-lol:  :smiley-lol:  :smiley-lol:  yes, it worked.  :smiley-lol:  :smiley-lol:  :smiley-lol:

much thanks, pert. :-) saved me countless more metaphorical head-banging on the wall. :-)

the only, minor quibble i have is that to see the results, one has to quit then restart the IDE.
not sure why that is necessary.
i would have thought if the theme was changed in the preferences, it would flag the change and cause the IDE to refresh the entire display...
but what would i know?
i don't claim much knowledge of compiler-writing. :-)

pert

I don't have an answer about the restart being needed either. It could be that it's technically possible, but would require touching a ton of code and potentially breaking other things. I don't think it's a big inconvenience because it's unlikely that people will be changing the selected theme frequently and the requirement is documented right there in the Preferences dialog.

JustRoger

I've searched the WEB I've search the forums and have had no success in getting a clear guide to upgrading Arduino IDE on my Raspberry PI B.

Yes I did the sudo apt-get update
Yes I did the sudo apt-get upgrade

and they appeared successful.

I downloaded the latest version of IDE for a LinuxArm since I am running it from the PI.  Is this correct?

OK so is there a step-by-step procedure to move from Arduino 1.0.1 to the 1.8.7 on my raspberry pi?

Appreciate any help.

Regards,

JustRoger

pert

  • Download the latest "Linux ARM" version of the Arduino IDE from https://www.arduino.cc/en/Main/Software
  • Right click on the downloaded file and select "Extract Here". The folder arduino-1.8.7 will be extracted from the downloaded file.
  • You can move this folder to any convenient location on your drive.
  • To start the Arduino IDE, run the file arduino-1.8.7/arduino.


There is also an install script but it's not necessary to run that. It just creates a shortcut on your desktop.

Ace_Tech

#209
Sep 30, 2018, 02:44 am Last Edit: Sep 30, 2018, 03:05 am by Ace_Tech
pert, what theme are you using at the moment?
i just had a look at your https://github.com/per1234?tab=repositories , and saw some of your code in your libraries.
very legible and quite good syntax-highlighted.

i agree that the fact of necessity of restarting the arduino IDE everytime a different theme is selected, is really only a minor quibble, given that the setting in the Preferences won't be changed that often.

as for the instructions on installation of themes into Arduino IDE, the procedure turns out to be quite simple, though non-obvious, of course, to us noobies. :-)

first, for us Mac Fanatics, uncheck 'Open safe files...' option in Safari's preferences <General>, just to make sure it doesn't automatically unzip the downloaded files. this may be optional, however.

click on this link-

https://github.com/jeffThompson/DarkArduinoTheme

once that site loads, click on the green button 'Clone or download' and select 'Download as Zip'.
the DarkArduinoTheme.zip file should then appear in your Downloads folder.
Archive this file in your folder of choice.
uncompress it there. you may have a duplicate uncompressed folder DarkArduinoTheme in your archive folder now.
now go into that folder...the next folder, then to the folder 'theme'.
open that folder 'theme' and select all of the files. right-click on them all. a pop-open menu should appear, and you should select 'Compress xx files'.
you will have a compressed 'Archive.zip' file appear in that theme folder.
move that file to your <sketchbook> location [specified in your IDE's preferences] /theme.
rename the 'Archive.zip' to e.g DarkArduinoTheme.zip'.

test this by running your IDE, and looking at the preference's theme option.
your new theme should now appear in that option and be selectable.
quit IDE, then re-run.
if the displayed windows reflects the new theme, congratulations!
you're done. :)

btw, pert, thanks for your off-topic tip on writing libraries - i will be looking into that soon.
could you point me at the thread on that subject? i'm a noob on this forum - i don't know how to search it very well yet. :-)

Go Up