Skip to content

Commit 6983bbb

Browse files
authored
Merge pull request #189 from No0ne558/master
Universal Installer
2 parents 4d9c649 + 290673c commit 6983bbb

File tree

6 files changed

+604
-7
lines changed

6 files changed

+604
-7
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build Universal Linux Installer
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
universal-installer:
11+
name: Universal Linux Installer (.run)
12+
runs-on: ubuntu-22.04
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Create Universal Installer
19+
run: |
20+
cd packaging/installer
21+
chmod +x create-universal-installer.sh
22+
./create-universal-installer.sh
23+
24+
- name: Upload Universal Installer
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: viewtouch-universal-installer
28+
path: installer-build/*.run
29+
30+
- name: Create Release (tag push only)
31+
if: startsWith(github.ref, 'refs/tags/')
32+
uses: softprops/action-gh-release@v2
33+
with:
34+
files: installer-build/*.run
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
build
22
dat
3+
installer-build/

CMakeLists.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,10 @@ add_executable(vt_main
287287
target_include_directories(vt_main PRIVATE ${VT_XLIBS_INCLUDE_DIRS})
288288
target_link_libraries(vt_main zone vtcore ${VT_XLIBS})
289289
target_link_libraries(vt_main tz curlpp_static)
290-
# on gcc 8 need to link against std++fs for std::filesystem support
291-
# https://stackoverflow.com/questions/54290254/problem-adding-stdfilesystem-to-cmake-project
292-
target_link_libraries(vt_main stdc++fs)
290+
# Link filesystem library if needed (GCC < 9)
291+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0")
292+
target_link_libraries(vt_main stdc++fs)
293+
endif()
293294

294295
add_executable(vt_term
295296
term/term_main.cc
@@ -307,9 +308,10 @@ target_include_directories(vt_term PRIVATE ${VT_XLIBS_INCLUDE_DIRS})
307308
target_link_libraries(vt_term
308309
vtcore conf_file image_data
309310
${VT_XLIBS} ${TERM_CREDIT_LIBS})
310-
# on gcc 8 need to link against std++fs for std::filesystem support
311-
# https://stackoverflow.com/questions/54290254/problem-adding-stdfilesystem-to-cmake-project
312-
target_link_libraries(vt_term stdc++fs)
311+
# Link filesystem library if needed (GCC < 9)
312+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0")
313+
target_link_libraries(vt_term stdc++fs)
314+
endif()
313315

314316
add_executable(vt_print print/print_main.cc)
315317
target_link_libraries(vt_print vtcore)
@@ -373,5 +375,5 @@ install(PROGRAMS scripts/vtcommands.pl DESTINATION viewtouch/bin/vtcommands)
373375
#install(CODE "MESSAGE(\"Sample install message.\")")
374376

375377
# Install bundled fonts
376-
install(DIRECTORY fonts/ttf/ DESTINATION share/viewtouch/fonts FILES_MATCHING PATTERN "*.ttf" PATTERN "*.otf")
378+
install(DIRECTORY fonts/ DESTINATION share/viewtouch/fonts FILES_MATCHING PATTERN "*.ttf" PATTERN "*.otf")
377379

docs/ARM64_SUPPORT.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# ARM64 (aarch64) Support for ViewTouch
2+
3+
## Current Status
4+
5+
ViewTouch **fully supports ARM64 architecture** with our **Universal Linux Installer** that works seamlessly on ARM64 systems including Raspberry Pi.
6+
7+
## Running on ARM64 Systems
8+
9+
ViewTouch works perfectly on ARM64 systems including:
10+
- **Raspberry Pi 4/5** with 64-bit Raspberry Pi OS
11+
- **ARM-based servers** (AWS Graviton, etc.)
12+
- **Apple Silicon Macs** via Docker/Linux VMs
13+
- **Other ARM64 Linux systems**
14+
15+
## Building Locally on ARM64
16+
17+
On any ARM64 Linux system, build ViewTouch natively:
18+
19+
```bash
20+
# Clone the repository
21+
git clone https://github.com/No0ne558/viewtouchFork.git
22+
cd viewtouchFork
23+
24+
# Install dependencies (Debian/Ubuntu-based)
25+
sudo apt-get update
26+
sudo apt-get install -y build-essential cmake git \
27+
libx11-dev libxft-dev libxmu-dev libxpm-dev libxrender-dev libxt-dev \
28+
libfreetype6-dev libfontconfig1-dev zlib1g-dev \
29+
libmotif-dev libcurl4-openssl-dev pkg-config
30+
31+
# Build ViewTouch
32+
cmake -B build -DCMAKE_BUILD_TYPE=Release
33+
cmake --build build -j$(nproc)
34+
35+
# Install locally
36+
sudo cmake --install build
37+
38+
# Run ViewTouch
39+
sudo /usr/viewtouch/bin/vtpos
40+
```
41+
42+
## Universal Installer for ARM64
43+
44+
The easiest way to install ViewTouch on ARM64 systems is using our Universal Linux Installer:
45+
46+
```bash
47+
# Download the universal installer
48+
wget https://github.com/No0ne558/viewtouchFork/releases/latest/download/ViewTouch-Universal-Installer.run
49+
50+
# Make it executable and install
51+
chmod +x ViewTouch-Universal-Installer.run
52+
sudo ./ViewTouch-Universal-Installer.run
53+
```
54+
55+
The universal installer will:
56+
- Auto-detect ARM64 architecture
57+
- Install dependencies using the system package manager
58+
- Compile ViewTouch optimized for your specific ARM64 system
59+
- Create desktop entries and system integration
60+
61+
## Distribution
62+
63+
The universal installer is automatically built by GitHub Actions and works on:
64+
- **Raspberry Pi OS** (64-bit)
65+
- **Ubuntu** (ARM64)
66+
- **Debian** (ARM64)
67+
- **Fedora** (ARM64)
68+
- **Arch Linux** (ARM64)
69+
- Any other ARM64 Linux distribution
70+
## Technical Details
71+
72+
The universal installer approach provides several advantages for ARM64:
73+
74+
- **Native compilation**: Builds are optimized for the specific ARM64 system
75+
- **Automatic dependencies**: System package manager handles ARM64 X11 libraries
76+
- **Better integration**: Proper desktop entries and system-wide installation
77+
- **No special requirements**: Works on containers and restricted environments
78+
79+
This approach ensures maximum compatibility and performance on ARM64 systems.
80+
81+
## Package Support
82+
83+
For manual package creation, ViewTouch supports:
84+
85+
- **DEB packages**: `cpack -G DEB` (on ARM64 system)
86+
- **RPM packages**: `cpack -G RPM` (on ARM64 system)
87+
- **Direct installation**: Works on all ARM64 Linux distributions
88+
89+
The codebase is fully ARM64-compatible and has been tested on Raspberry Pi systems.

packaging/installer/README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# ViewTouch Universal Linux Installer
2+
3+
This creates a single `.run` file that works on **ANY Linux distribution** - just like commercial software installers (NVIDIA, VMware, etc.).
4+
5+
## What It Does
6+
7+
**Universal compatibility** - Works on ANY Linux distro
8+
**Auto-detects** package manager (apt, dnf, yum, pacman, zypper)
9+
**Installs dependencies** automatically
10+
**Builds from source** for optimal performance
11+
**System-wide installation** to `/usr/viewtouch/`
12+
**Creates desktop entry** and command-line shortcuts
13+
**Single file** - easy to distribute
14+
15+
## Supported Linux Distributions
16+
17+
- **Debian-based**: Debian, Ubuntu, Linux Mint, Pop!_OS, Elementary OS
18+
- **Red Hat-based**: Fedora, RHEL, CentOS, Rocky Linux, AlmaLinux
19+
- **Arch-based**: Arch Linux, Manjaro, EndeavourOS
20+
- **SUSE-based**: openSUSE Leap, openSUSE Tumbleweed, SUSE Linux Enterprise
21+
- **Any Linux** with a supported package manager
22+
23+
## Supported Architectures
24+
25+
- **Intel/AMD x86_64**: Desktop and server systems
26+
- **ARM64**: Raspberry Pi 4, Pi 5, and compatible single-board computers
27+
28+
## Creating the Installer
29+
30+
Run this script to create the universal installer:
31+
32+
```bash
33+
cd packaging/installer
34+
./create-universal-installer.sh
35+
```
36+
37+
This creates: `ViewTouch-Universal-Installer.run`
38+
39+
## For End Users
40+
41+
### Installation
42+
43+
1. **Download** the `ViewTouch-Universal-Installer.run` file
44+
2. **Make executable**: `chmod +x ViewTouch-Universal-Installer.run`
45+
3. **Run as root**: `sudo ./ViewTouch-Universal-Installer.run`
46+
47+
The installer will:
48+
- Detect your Linux distribution
49+
- Install build dependencies
50+
- Build ViewTouch from source
51+
- Install system-wide
52+
- Create desktop shortcuts
53+
54+
### Usage After Installation
55+
56+
- **GUI**: Find "ViewTouch POS" in your Applications menu
57+
- **Terminal**: Run `vtpos` from anywhere
58+
- **Direct**: `/usr/viewtouch/bin/vtpos`
59+
60+
## Technical Details
61+
62+
The installer is a **self-extracting shell script** that:
63+
64+
1. **Detects distribution** using `/etc/os-release`
65+
2. **Installs dependencies** using the native package manager
66+
3. **Extracts source code** embedded in the installer
67+
4. **Builds with CMake** for the target architecture
68+
5. **Installs system-wide** with proper permissions
69+
6. **Creates shortcuts** for easy access
70+
7. **Cleans up** temporary files
71+
72+
## CI/CD Integration
73+
74+
The installer is automatically built by GitHub Actions:
75+
- **Workflow**: `.github/workflows/universal-installer.yml`
76+
- **Trigger**: Manual or git tags (`v*`)
77+
- **Artifact**: `ViewTouch-Universal-Installer.run`
78+
79+
## File Size
80+
81+
The installer contains the complete ViewTouch source code and is approximately **15MB**.

0 commit comments

Comments
 (0)