Tinfour Execution Shortcut for Windows - gwlucastrig/Tinfour GitHub Wiki

Introduction

Many Tinfour applications require the use of a command window for execution. If you wish to run one of these applications under the Windows operating system, you may find it convenient to create a Windows shortcut. The notes below describe how to create a Windows shortcut that will open a command window and set the appropriate environment variables for use within that window.

Before you can run Tinfour, you must have Java installed on your computer. Even if you haven't deliberately done so, there is a chance that a version of Java has already been installed for you. More details about Tinfour and its relationship with Java are given in the Wiki page Tinfour Execution from the Command-Line

Steps for Setting up a Windows Shortcut

The main folder in the Tinfour software distribution includes a file called WindowsSetupJava.bat which sets environment variables that make it convenient to run Java from the command line. Copy or download this file to a stable location on your file system and use a text editor to configure it to your preferences. Instructions for configuring the file are included in its internal REMARKS area. The environment variables are set by the WindowsSetupJava.bat file (a batch file). It adjusts the PATH variable setting that will be used within the command window. This .bat file will not change the standard system settings. It will only modify the settings used within the command window.

Once your WindowsSetupJava.bat is ready, you can set up a Windows shortcut for the command window that will execute the WindowsSetupJava.bat file when you click on the shortcut. Doing so will apply the environment variable settings and present you with a suitable interface for running Tinfour applications.

  1. Using your Windows File Explorer (Windows Explorer under Windows 7), browse to the folder that contains cmd.exe executable which is used to present the command window. On most systems it will be located in the locations given below. If you do not find it right away, you may also use the Windows Search function to find it.

    • Windows 7 – C:\Windows\System32\cmd.exe
    • Windows 10 – C:\Windows\SysWOW64\cmd.exe
  2. Right click on the cmd.exe to raise a context menu. Click "Create Shortcut" menu item and save the shortcut to your desktop.

  3. Right click on the shortcut icon to raise a context menu. Click on the "Properties" menu item to raise the properties dialog shown below. In the dialog, click on the "Shortcut" tab.

Command Shortcut Properties

  1. In the figure below, note that the "Target" field includes the path to the cmd.exe. Append the following option to the end of the main target setting (do not change the path setting for cmd.exe). Be sure to modify the path shown in the example text below to match the appropriate settings for your system.

    /K c:\Tinfour-master\WindowsSetupJava.bat

  2. When working on Tinfour projects, it is a good idea to change the "Start in" field to give the path to a folder in which you will be conducting your work. Change the entry to a convenient location.

  3. Click on the General tab and modify the name of the shortcut to something descriptive such as Tinfour Work or Java Commands

  4. Click the OK button to store your settings

When you double click on the shortcut, Windows will run the java -version command to print the version of your current Java JDK or JRE to the display. This output serves as a good indicator that your installation was successful.

The default settings for a cmd.exe may result in a narrow command window (only 80 characters). To increase this setting to something more useful

  1. Double click on your shortcut to open a command window
  2. Right click on the title bar to raise a context menu
  3. Click on "Properties"
  4. In the "Layout" tab, change the Screen Buffer size to something larger, such as 120 characters.
  5. Click the OK button to store your settings.