Skip to content

Building the Binary

Gene Mosher edited this page Dec 13, 2025 · 33 revisions

πŸ—οΈ Building ViewTouch

The Network graph is at https://github.com/ViewTouch/viewtouch/network


βœ… Build Status

Building has been tested on:

  • Debian 13 (Trixie) AMD64
  • Ubuntu AMD64
  • Raspbian OS (May 2025)

ViewTouch binary files are designed for 64-bit systems. The build maintains the additions of libcurl4-gnutls-dev and libcurlpp-dev.


πŸ› οΈ Building Requirements

Note: Adding packages to your Debian or Raspberry Pi OS for installing ViewTouch is most easily done by opening a terminal such as Xfce4-term and using the apt package maintenance program. Apt is a high-level command-line interface for Debian package management; it is designed to handle package relationships and dependency subsets.

⚠️ Important: Apt is run by user root. Root user commands can be entered by prefixing commands with sudo. Commonly, users switch to root user with sudo su and use exit when no longer wanting to be root.

# is the root prompt. $ is the user prompt (user is viewtouch).

πŸ“¦ Required Packages (Install as root)

# Core compilers
G++ or Clang

# X11 development
xorg-dev
xfonts-base
libmotif-dev
libfreetype6-dev

# Videocore VII development (not yet needed, but likely starting in 2026)
libvulkan-dev
vulkan-tools

# Network libraries
libcurlpp-dev
libcurl4-gnutls-dev

# Build tools
make
cmake
git
xwit

# Time zone data
tzdata  # (date.h is Howard Hinnant's highly optimized date library)

πŸ”§ Automatically Installed Development Libraries

These are automatically installed with the above packages:

  • libX11-dev
  • libfontconfig1-dev
  • libxrender-dev
  • libxt-dev
  • libxft-dev
  • libxmu-dev
  • libxpm-dev
  • zlib1g-dev

πŸ‘€ User Setup

Create a dedicated user viewtouch for remote access. SSH protocol (Secure Shell) is how remote ViewTouch display sessions attach to the ViewTouch Client Application on the host CPU.

# Create user
useradd viewtouch

# Set password
passwd viewtouch

# Add user to sudoers file
usermod -aG sudo viewtouch

πŸ“ Directory Structure Setup

As root, initialize the directory structure for ViewTouch binary and data files, then assign ownership to user viewtouch:

# Create main directory
mkdir /usr/viewtouch

# Set ownership
chown -R viewtouch:viewtouch /usr/viewtouch

# Set permissions
chmod -R o+rw /usr/viewtouch

Note: When ViewTouch runs, directories /usr/viewtouch/css and /usr/viewtouch/graphics are automatically created. It may seem tempting to set /usr/viewtouch as the viewtouch user's home directory, but this is inadvisable as it may be necessary to delete and recreate it.


πŸš€ Initial Build and Installation

Prepare Directory Structure

cd /usr/viewtouch && mkdir src bin dat
cd src

Clone and Build

# Clone the entire source tree
git clone https://github.com/ViewTouch/viewtouch.git

# Enter project directory
cd viewtouch

# Create build directory
mkdir build
cd build

# Configure with CMake
cmake ..

# Build
make

# Create data symlink
ln -s /usr/viewtouch/dat/ dat

# Install
make install

πŸ“₯ Download Data Files

# Download configuration files
wget -P /usr/viewtouch/bin https://www.viewtouch.com/vt_data
wget -P /usr/viewtouch/dat https://www.viewtouch.com/tables.dat
wget -P /usr/viewtouch/dat https://www.viewtouch.com/menu.dat
wget -P /usr/viewtouch/dat https://www.viewtouch.com/zone_db.dat
wget -P /usr/viewtouch/dat https://www.viewtouch.com/vt_data

▢️ Run ViewTouch Point of Sale

/usr/viewtouch/bin/runonce

πŸ”„ Subsequent Builds

Pull files which have been changed since first cloning:

cd /usr/viewtouch/src
git pull
cd build
cmake ..
make
make install

# Run ViewTouch
/usr/viewtouch/bin/runonce

Note: The default logon for user Editor is 123456789 or 42. You can change the Editor logon on Page One by selecting 'Edit Mode Documents'.


πŸ“‹ ViewTouch User Interface Files

There are two types of user interface (UI) data files in ViewTouch:

πŸ”§ System Files ('usr/viewtouch/bin')

  • vt_data` - Contains all graphical interface 'pages' needed by and common to all users

πŸ“Š User Files (/usr/viewtouch/dat)

Minimally populated 'seed' versions are created automatically on startup if they don't exist:

  • menu.dat
  • zone_db.dat
  • tables.dat
  • settings.dat
  • employee.dat
  • exception.dat
  • inventory.dat
  • locale.dat
  • media.dat

🎯 Getting Started

ViewTouch has extensive documentation and 'how-to' tips inside the program!

πŸ“– Accessing Documentation

  • Edit Mode Documents button in the upper left corner of Page One
  • Copyright button at top center of Page One

πŸ’‘ Unique Design Philosophy

From its outset in 1986, ViewTouch point of sale was a unique type of computer software:

  • πŸ”Έ In point of sale software, the user interface is never complete until the end user completes it
  • πŸ”Έ The user interface must be unique in every case
  • πŸ”Έ Point of sale software must include tools and instructions to enable users to complete the interface. We are continuously enhancing and extending these tools and instructions !

πŸ› οΈ Interface Design

The software tools must be intuitive and simple to allow each customer to learn, use, and complete the interface.

Menu Item Buttons are enhanced by assigning them sub-categories as:

  • Modifier (Descriptor) buttons - Like adjectives
  • Qualifier Buttons - Like adverbs

The analogy of nouns, adjectives, and adverbs is analogous to the various Button types available. As nouns are enhanced by adjectives and verbs by adverbs, so too are menu items enhanced by modifiers, and modifiers enhanced by qualifiers.

The ViewTouch interface is designed to allow ViewTouch Pages and Buttons to mirror the structure of human language. This design makes it possible for the ViewTouch interface to be intuitive to the point where it can be used with little or no training.

🧭 Navigation

The process of traversing ViewTouch Pages and selecting Buttons is a serial process similar to moving within a hierarchy of higher and lower levels. It is largely automatic but also dependent upon how Menu Pages and Buttons are built. This is covered in the program's internal documentation.


πŸ“ž Contact Information

Thank you for your interest in ViewTouch! Anyone may call Gene Mosher with comments, suggestions, questions, or help.


πŸš€ Running ViewTouch

Start Command

/usr/viewtouch/bin/runonce

The program vtpos is invoked when runonce is executed. vtpos can be run standalone to run ViewTouch with special options:

# Show help
/usr/viewtouch/bin/vtpos -h

# Run with custom path
/usr/viewtouch/bin/vtpos path /usr/viewtouch/your.directory

🎨 Styling

All loadable .css files reside in /usr/viewtouch/css.

πŸ–₯️ Desktop Launchers

Desktop Launchers make running ViewTouch simple when using touchscreens.

πŸ“š Documentation

A ViewTouch PDF user manual by Alex Underwood can be found at: http://www.viewtouch.com/ViewTouchManual.pdf

This file is also found on the ViewTouch Raspberry Pi image.


⚑ Build Optimization Tips

Multi-Core Building

Make uses the -j argument to speed completion by launching jobs in all available processor cores:

# Use all available cores
make -j

# Limit to specific number of cores (replace N with number)
make -jN

# Check available cores
nproc --all

CMake Cache Management

If necessary to do a "make clean" in CMake:

# Remove cache file
rm viewtouch/build/CMakeCache.txt

# Regenerate CMake files
cmake ..

Regeneration is necessary if a new file is added to source folder that matches patterns like *.cc. While not a "clean" per se, the CMake files are 'cleaned' by regenerating the caches.

Clone this wiki locally