Difference between revisions of "Windows 10 64 bit Installation 2019"

From ConTeXt wiki
Line 1: Line 1:
{{note | You probably will need admin rights to your Windows to manage the installation process. If you don't have that, get somebody who does.}}
+
{{note | This is still work in progress}}
  
 
This instruction was written 2019 April 13 and is intended to install Context Mark IV.
 
This instruction was written 2019 April 13 and is intended to install Context Mark IV.
Line 89: Line 89:
  
 
Close/restart SciTe.
 
Close/restart SciTe.
 +
 +
==Ready, steady, test!==
 +
 +
Now you are ready to go. Start SciTE and open a ConTeXt document (if you have any) or try with a simple "Hello world":
 +
 +
<pre>
 +
\starttext
 +
 +
Hello, world!
 +
 +
\stoptext
 +
</pre>
 +
 +
Save the document as <tt>''something''.tex</tt>, e.g. helloworld.tex. The syntax highlighting should come on and show the ConTeXt codes differently than the text itself.
 +
 +
[[File:helloworld.png|600px]]
 +
 +
Now press F4 or menu/tools/build to build your file.
 +
I get the error message:
 +
<pre>
 +
>texexec --pdf Test.tex
 +
>Exit code: 1
 +
</pre>
 +
I expected to read:
 +
<pre>
 +
>context --pdf Test.tex
 +
</pre>
 +
 +
Anyway. Other manuals write this, maybe it works for you:
 +
 +
Now press Ctrl+F12 to process your file and auto-open the resulting pdf in your default pdf reader (most often Adobe Acrobat Reader). The first run will take a while, but if things starts happening, you probably have working ConTeXt.

Revision as of 22:15, 13 April 2019


NOTE: This is still work in progress

This instruction was written 2019 April 13 and is intended to install Context Mark IV. My intent is to deliver a up-to-date manual that every noob can use, and not to refer to old versions (e.g. from 2011).

Install ConTeXt

Step 1: Download and unzip the installer

For a 32 bit installation, download context-setup-mswin.zip onto your computer. For a 64 bit installation, download context-setup-win64.zip onto your computer. It contains a folder called context, unzip/extract that folder to C:\, so the result is C:\context\.


Step 2: Use installer to get the ConTeXt Suite

Open Command promt. Do this by using Cortana: Search for cmd.exe. Right click on the search result and select "run as admin". Command prompt should be in C:\Users\MyUserName\ Type in cd.. -> Enter -> cd.. -> Enter Now you are at C:\ Type in cd context You are now at C:\context

Tpe in first-setup.bat -> Enter.

This should print out much output and take a while (5 mins). Check if there is a folder C:\context\tex If no such folder has been created, this step failed. (It failed for me using C:\Programme\context and I resolved it by using C:\context\


Step 3: Add ConTeXt to Windows search path

You will have to go to the system settings of your Windows and add you will have to add C:\context\tex\texmf-win64\bin (or C:\context\tex\texmf-mswin\bin for using context-setup-mswin.zip) to the search path (environment variable path under advanced system properties). If you are the only user on the computer needing ConTeXt, you can put it under user variables, otherwise add it to the existing search path listing.

Do this by: Right click on "Dieser PC" or "this PC" and select "Eigenschaften/Settings". Then on the left side, click on "erweiterte Systemeinstellungen/extended Settings".

In the small popup "Systemeigenschaften/System settings" select the slider "Erweitert/extended". Select the button "Umgebungsvariablen/environment variables".

Select PATH, lick on button "edit" and ad a new row with C:\context\tex\texmf-win64\bin (or C:\context\tex\texmf-mswin\bin for using context-setup-mswin.zip)


After you've added the path to system settings, you have to reboot the computer. You can check that the path is there by opening command prompt and typing

path

If the resulting listing contains the address C:\context\tex\texmf-win64\bin (or C:\context\tex\texmf-mswin\bin for using context-setup-mswin.zip) , your computer knows where to find ConTeXt.

This step is an alternative to run setuptex.bat which is located in C:\context\tex\


Install SciTe

Now you have ConTeXt. To complement it, i.e. to easily write and compile ConTeXt files, install the SciTe editor. It is a nifty open source editor that, with some adjustments, will be able to highlight ConTeXt code and run ConTeXt from inside the editor. (And it is pretty useful for e.g. html and php editing, too.)

Step 1: Get SciTe

There's a SciTe included in your ConTeXt Suite, but you'll get less hassle with user rights and such if you use Windows installer for SciTe. Keep accepting everything it suggests and you'll get a very standard Windows program installed without any hassle. I recommend not using the 'context menu' during setup (you can right-click any text file (html, php, tex, txt) and give command "Edit with SciTe in New Tab" or "Edit with SciTe in New Window".)


Step 2: Fetch and install lexer add-in

See also https://foicica.com/scintillua/manual.html

The up-to-date ConTeXt version uses external lexers and for that you have to Download the lexer add-in zip (just get the top-most file of those listed in the download directory).

Then extract/unzip the contents of the lexer zip into a temporary directory. You get a directory scintilluaxxx-n (e.g. scintillua375-1). Insite the temp folder, look for a folder called 'lexers'.

Locate your SciTE installation, typically C:\Program Files\SciTE\ for Windows for Linux. Move the 'lexers' directory to the root of your SciTE installation.

Also leave the SciTe program folder open. You'll need it next!

Adjust SciTe to work with ConTeXt

Copy setup files

Go to C:\context\tex\tex\texmf-context\context\data\scite\context\lexers. Copy everything from this folder to your SciTe program lexers folder. If you only plan to use SciTe for ConTeXt, you can replace all files. If you want to keep all the existing functionality, copy the subfolder contents by hand, but make sure you get everything.

Import settings into SciTe

Open SciTe. Go to the Options menu and choose Open Global Options File. Scroll all the way to then end of the file and write

import lexers/lpeg
import scite-context-user

and save the file.

Close/restart SciTe.

Ready, steady, test!

Now you are ready to go. Start SciTE and open a ConTeXt document (if you have any) or try with a simple "Hello world":

\starttext

Hello, world!

\stoptext

Save the document as something.tex, e.g. helloworld.tex. The syntax highlighting should come on and show the ConTeXt codes differently than the text itself.

Helloworld.png

Now press F4 or menu/tools/build to build your file. I get the error message:

>texexec --pdf Test.tex
>Exit code: 1

I expected to read:

>context --pdf Test.tex

Anyway. Other manuals write this, maybe it works for you:

Now press Ctrl+F12 to process your file and auto-open the resulting pdf in your default pdf reader (most often Adobe Acrobat Reader). The first run will take a while, but if things starts happening, you probably have working ConTeXt.