User Tools

Site Tools


software-cst-317-2015

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
software-cst-317-2015 [2016/06/20 21:16]
pedro
software-cst-317-2015 [2016/06/30 12:01]
pedro
Line 11: Line 11:
 The next step is to learn the basics of Lua, which is a simple and elegant programming language. We provide an introduction about Lua for TerraME users: The next step is to learn the basics of Lua, which is a simple and elegant programming language. We provide an introduction about Lua for TerraME users:
  
-  * Lua for TerraME: A Short Introduction.+  * [[http://​www.terrame.org/​lib/​exe/​fetch.php?​media=docs:​luaforterrame-ashortintroduction2.pdf|Lua for TerraME: A Short Introduction.]]
  
 ===== TerraME ===== ===== TerraME =====
Line 20: Line 20:
  
   - Download the EXE application to your desktop.   - Download the EXE application to your desktop.
-  - Doubleclick ​the EXE application. When prompted for an installation directory, please choose "​C:​\TerraME"​. ​+  - Double click the EXE application. When prompted for an installation directory, please choose "​C:​\TerraME"​. ​
  
 ==== TerraME installation in MAC OS X  ==== ==== TerraME installation in MAC OS X  ====
  
-  - Download the DMG application to your destktop.+  - Download the DMG application to your Destktop.
   - Double click the DMG application and move the TerraME icon to the Applications folder.   - Double click the DMG application and move the TerraME icon to the Applications folder.
   - In MAC OS X, TerraME should be run from a Terminal. To allow for terminal execution, please add the following line to your "​.bash_profile":​ ''​export PATH=$PATH:/​Applications/​terrame.app/​Contents/​bin''​   - In MAC OS X, TerraME should be run from a Terminal. To allow for terminal execution, please add the following line to your "​.bash_profile":​ ''​export PATH=$PATH:/​Applications/​terrame.app/​Contents/​bin''​
Line 35: Line 35:
 After you download ZeroBraneStudio (ZBS), please do the following steps: After you download ZeroBraneStudio (ZBS), please do the following steps:
  
-==== Zero Brane Studio in Windows ==== 
  
-  - Configuration file: tells ZBS where to find the TerraME interpreter. ​Copy the [[http://​www.dpi.inpe.br/​gilberto/​terrame/​zerobrane/​user.lua | user.lua]] ​configuration ​file to ''​C:​\ZeroBraneStudio\cfg''​. +=== Copy configuration ​files ===
-  - Interpreter description file: tells ZBS how to use TerraME. Copy the [[http://​www.dpi.inpe.br/​gilberto/​terrame/​zerobrane/​terrame.lua | terrame.lua]] interpreter description file to ''​C:​\ZeroBraneStudio\interpreters''​.  +
-  - Keyword description:​ tells ZBS to highlight both Lua and TerraME keywords. Copy the [[http://​www.dpi.inpe.br/​gilberto/​terrame/​zerobrane/​lua.lua | lua.lua]] keyword description file to  ''​C:​\ZeroBraneStudio\spec''​. +
-  - Optional: delete the other interpreters of ZeroBrane (Corona, Guideros, etc.) and leave only Lua, Lua5.2 and TerraME.+
  
-==== Zero Brane Studio ​in MAC OS X ====+Copy three configuration files below to a directory within ​Zero Brane Studio ​installation directory. ​
  
-  - Configuration file: tells ZBS where to find the TerraME interpreter. Copy the [[http://www.dpi.inpe.br/gilberto/​terrame/​zerobrane/​user.lua | user.lua]] ​configuration file to ''​/​Applications/​ZeroBraneStudio.app/Contents/​ZeroBraneStudio/​cfg''​. +^**File** ​ ^**What it does** ​ ^ **Copy ​to**  | 
-  - Interpreter description file: tells ZBS how to use TerraME. Copy the [[http://www.dpi.inpe.br/gilberto/​terrame/​zerobrane/​terrame.lua | terrame.lua]] ​interpreter description file to ''​/​Applications/​ZeroBraneStudio.app/​Contents/​ZeroBraneStudio/​interpreters''​. +^[[https://raw.githubusercontent.com/TerraME/terrame/master/ide/zerobrane/lua.lua | lua.lua]] ​ ​|Tells ZBS to highlight both Lua and TerraME keywords. ​ |''​ZeroBraneStudio/​spec'' ​(there is already one with this name here, overwrite it) |  
-  - Keyword description:​ tells ZBS to highlight both Lua and TerraME keywords. Copy the [[http://www.dpi.inpe.br/gilberto/​terrame/​zerobrane/​lua.lua | lua.lua]] ​keyword description file to ''​/​Applications/​ZeroBraneStudio.app/Contents/​ZeroBraneStudio/​spec''​+^[[https://raw.githubusercontent.com/TerraME/terrame/master/ide/​zerobrane/​terrame.lua | terrame.lua]] ​ ​|Tells ZBS how to use TerraME. ​ |''​ZeroBraneStudio/​interpreters'' ​ | 
-  - Optional: delete the other interpreters of ZeroBrane (Corona, Guideros, etc.) and leave only Lua, Lua5.2 and TerraME.+^[[https://raw.githubusercontent.com/TerraME/terrame/master/ide/zerobrane/user.lua | user.lua]] ​ ​|Tells ZBS where to find the TerraME interpreter. ​ |''​ZeroBraneStudio/​cfg'' ​|
  
-==== Zero Brane Studio in Linux ====+The default installation directories for Zero Brane are: 
 + 
 +  - Windows: ''​C:​\ZeroBraneStudio\''​ 
 +  - Mac: ''/​Applications/​ZeroBraneStudio.app/​Contents/​ZeroBraneStudio/''​ 
 +  - Linux: ''/​opt/​zbstudio/''​ 
 + 
 +=== Checking if it was correctly configured ​=== 
 + 
 +  - If Zero Brain is running, close it and open again. 
 +  - Go to ''​File''​ menu, and click ''​New''​ 
 +  - In the main window (which is blank), write ''​print("​hello"​)''​ 
 +  - Save the file with ''​.lua''​ extension in your computer 
 +  - You will see that the names ''​print''​ and ''"​hello"''​ will become colored 
 +  - Go to ''​Project''​ menu, in ''​Lua Interpreter'',​ select ''​TerraME''​ 
 +  - Click in the green icon with two triangles pointing to the right (''​Execute the current project/​file''​) 
 +  - If everything went fine, you will get the following text in the ''​Output''​ box in the bottom of Zero Brane: 
 +  - <​code>​Program '​terrame'​ started in [...] 
 +hello 
 +Program completed in [...] seconds [...]</​code>​
  
-  - Configuration file: tells ZBS where to find the TerraME interpreter. Copy the [[http://​www.dpi.inpe.br/​gilberto/​terrame/​zerobrane/​user.lua | user.lua]] configuration file to  ''/​opt/​zbstudio/​cfg''​. 
-  - Interpreter description file: tells ZBS how to use TerraME. Copy the [[http://​www.dpi.inpe.br/​gilberto/​terrame/​zerobrane/​terrame.lua | terrame.lua]] interpreter description file to  ''/​opt/​zbstudio/​interpreters''​. 
-  - Keyword description:​ tells ZBS to highlight both Lua and TerraME keywords. Copy the [[http://​www.dpi.inpe.br/​gilberto/​terrame/​zerobrane/​lua.lua | lua.lua]] keyword description file to ''/​opt/​zbstudio/​spec''​. 
-  - Optional: delete the other interpreters of ZeroBrane (Corona, Guideros, etc.) and leave only Lua, Lua5.2 and TerraME. 
  
 ===== Additional Packages for TerraME ===== ===== Additional Packages for TerraME =====
software-cst-317-2015.txt · Last modified: 2016/07/05 11:25 by pedro