12 Commits

Author SHA1 Message Date
Storm Dragon
efb308ac72 latest testing code merged. Nothing major reported from testing branch, so if we get no reports, this will become the next stable release. I'm waiting a bit to tag because major new features introduced. 2025-06-17 00:53:28 -04:00
Storm Dragon
f6be6c54fb Bug fixes mostlry, tested and seems to be working better. 2025-06-13 23:21:46 -04:00
Storm Dragon
f18c31df6c Merge branch 'testing' bug fix for remoteDriver 2025-06-07 18:24:44 -04:00
Storm Dragon
3dca3e5b23 Merged for new release. 2025-06-07 12:23:53 -04:00
Storm Dragon
1b9a9a90b1 Fixed version conflict. 2025-06-06 20:35:07 -04:00
Storm Dragon
4c8c8d896d Fixed version conflict. 2025-06-05 16:05:11 -04:00
Storm Dragon
4672592dba Latest merge from testing. 2025-04-28 15:41:14 -04:00
Storm Dragon
7a12992b88 latest release. 2025-04-17 00:36:26 -04:00
Storm Dragon
7a87fb51bb Fixed version for master branch. 2025-04-14 20:04:14 -04:00
Storm Dragon
2cc2fda28c Actually fix the version file this time. 2025-03-02 17:59:20 -05:00
Storm Dragon
c99d0f6ee1 Fixed version.py. 2025-03-02 17:44:32 -05:00
Storm Dragon
5b642cd9e2 Fixed error in settings file. 2025-02-26 17:41:01 -05:00
4 changed files with 38 additions and 199 deletions

View File

@@ -1,141 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Install script for Fenrir Screen Reader #Basic install script for Fenrir.
set -e read -rp "This will install Fenrir. Press ctrl+C to cancel, or enter to continue."
# Check if running as root
if [[ $(whoami) != "root" ]]; then
echo "This script must be run as root"
exit 1
fi
# Check Python version
pythonVersion=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
requiredVersion="3.8"
if ! python3 -c "import sys; exit(0 if sys.version_info >= (3, 8) else 1)" 2>/dev/null; then
echo "Python ${requiredVersion} or higher is required. Current version: ${pythonVersion}"
exit 1
fi
echo "Fenrir Screen Reader Installation"
echo "=================================="
read -rp "This will install the Fenrir screen reader. Press Ctrl+C to cancel, or Enter to continue."
# Check for pip3
if ! command -v pip3 &> /dev/null; then
echo "pip3 is required but not installed. Please install pip3 first."
exit 1
fi
# Function to check dependencies
checkDependencies() {
echo "Checking dependencies..."
if python3 check-dependencies.py; then
return 0
else
return 1
fi
}
# Function to install dependencies with pip
installWithPip() {
echo "Installing Python dependencies with pip..."
pip3 install -r requirements.txt --break-system-packages
}
# Function to detect package manager and provide instructions
detectPackageManager() {
if command -v apt &> /dev/null; then
echo "apt"
elif command -v dnf &> /dev/null; then
echo "dnf"
elif command -v yum &> /dev/null; then
echo "yum"
elif command -v pacman &> /dev/null; then
echo "pacman"
elif command -v zypper &> /dev/null; then
echo "zypper"
else
echo "unknown"
fi
}
# Function to show package manager instructions
showPackageInstructions() {
local pm=$1
echo "Package manager installation instructions:"
case $pm in
"apt")
echo " sudo apt update"
echo " sudo apt install python3-evdev python3-daemonize python3-dbus python3-pyudev python3-pexpect"
echo " sudo apt install python3-pyte python3-setproctitle python3-enchant python3-xdg"
echo " sudo apt install speech-dispatcher espeak-ng sox alsa-utils"
;;
"dnf"|"yum")
echo " sudo $pm install python3-evdev python3-daemonize python3-dbus python3-pyudev python3-pexpect"
echo " sudo $pm install python3-pyte python3-setproctitle python3-enchant python3-pyxdg"
echo " sudo $pm install speech-dispatcher espeak-ng sox alsa-utils"
;;
"pacman")
echo " sudo pacman -S python-evdev python-daemonize python-dbus python-pyudev python-pexpect"
echo " sudo pacman -S python-pyte python-setproctitle python-pyenchant python-pyxdg"
echo " sudo pacman -S speech-dispatcher espeak-ng sox alsa-utils"
;;
"zypper")
echo " sudo zypper install python3-evdev python3-daemonize python3-dbus python3-pyudev python3-pexpect"
echo " sudo zypper install python3-pyte python3-setproctitle python3-enchant python3-pyxdg"
echo " sudo zypper install speech-dispatcher espeak-ng sox alsa-utils"
;;
*)
echo " Unknown package manager. Please install the dependencies manually."
echo " Required packages: evdev, daemonize, dbus-python, pyudev, pexpect, pyte, setproctitle"
echo " System packages: speech-dispatcher, espeak-ng, sox, alsa-utils"
;;
esac
}
# Initial dependency check
echo "Performing initial dependency check..."
if ! checkDependencies; then
echo ""
echo "Some dependencies are missing. You have two options:"
echo "1. Install using pip (not recommended uses --break-system-packages)"
echo "2. Install using your system package manager (recommended assuming I got the package names and package manager syntax right)"
echo ""
read -rp "Use pip to install Python dependencies? (y/N): " usePip
usePip="${usePip:0:1}"
if [[ "${usePip^}" == "Y" ]]; then
installWithPip
else
packageManager=$(detectPackageManager)
echo ""
showPackageInstructions "$packageManager"
echo ""
echo "Please install the packages above, then press Enter to continue..."
read -r
fi
# Check dependencies again
echo "Rechecking dependencies..."
if ! checkDependencies; then
echo "Some dependencies are still missing. Please install them manually."
echo "You can run 'python3 check-dependencies.py' to see which ones are missing."
exit 1
fi
fi
echo "All dependencies satisfied!"
# Install Fenrir application files
echo "Installing Fenrir application files..."
# Fenrir main application # Fenrir main application
install -m755 -d /opt/fenrirscreenreader install -m755 -d /opt/fenrirscreenreader
cp -af src/* /opt/fenrirscreenreader cp -af src/* /opt/fenrirscreenreader
ln -fs /opt/fenrirscreenreader/fenrir /usr/bin/fenrir ln -fs /opt/fenrirscreenreader/fenrir /usr/bin/fenrir
# tools # tools
install -m755 -d /usr/share/fenrirscreenreader/tools install -m755 -d /usr/share/fenrirscreenreader/tools
cp -af tools/* /usr/share/fenrirscreenreader/tools cp -af tools/* /usr/share/fenrirscreenreader/tools
@@ -172,49 +43,24 @@ if [ -f "/etc/fenrirscreenreader/settings/settings.conf" ]; then
fi fi
else else
install -m644 -D "config/settings/settings.conf" /etc/fenrirscreenreader/settings/settings.conf install -m644 -D "config/settings/settings.conf" /etc/fenrirscreenreader/settings/settings.conf
fi fi
# Install systemd service if systemd is available
if command -v systemctl &> /dev/null; then
echo "Installing systemd service..."
# Detect which service file to use
if [ -f "/etc/arch-release" ] || [ -f "/etc/manjaro-release" ]; then
serviceFile="autostart/systemd/Arch/fenrir.service"
else
serviceFile="autostart/systemd/Debian/fenrir.service"
fi
if [ -f "$serviceFile" ]; then
install -m644 "$serviceFile" /etc/systemd/system/fenrir.service
systemctl daemon-reload
echo "Systemd service installed. Enable with: sudo systemctl enable fenrir"
else
echo "Warning: Systemd service file not found: $serviceFile"
fi
else
echo "Warning: Systemd not detected. Manual service setup may be required."
fi
# Final message # end message
cat << EOF cat << EOF
Installation complete.
install path:/opt/fenrirscreenreader
settings path:/etc/fenrirscreenreader
Installation complete! To test Fenrir:
============================= sudo fenrir
Install path: /opt/fenrirscreenreader
Settings path: /etc/fenrirscreenreader
Next steps: To have Fenrir start on system boot using systemd:
1. Test Fenrir: sudo fenrir download service file: https://raw.githubusercontent.com/chrys87/fenrir/master/autostart/systemd/Arch/fenrir.service
2. Enable autostart: sudo systemctl enable fenrir move the service file to: /etc/systemd/system/fenrir.service
3. Configure audio (run both as user and root): sudo systemctl enable fenrir
- PulseAudio: /usr/share/fenrirscreenreader/tools/configure_pulse.sh
- PipeWire: /usr/share/fenrirscreenreader/tools/configure_pipewire.sh
For help: Pulseaudio users may want to run
- Documentation: https://git.stormux.org/storm/fenrir /usr/share/fenrirscreenreader/tools/configure_pulse.sh
- Configuration: sudo fenrir --help once from their user account, then once from the root.
- Dependency check: python3 check-dependencies.py
Fenrir installation successful!
EOF EOF

View File

@@ -1,16 +1,9 @@
daemonize>=2.5.0 daemonize
evdev>=1.4.0 evdev
dbus-python>=1.3.0 pexpect
pyperclip>=1.8.0 pyenchant
pyudev>=0.24.0 pyperclip
pyte>=0.8.0 pyte
setproctitle>=1.3.0 pyudev
setuptools>=65.0.0 pyxdg
pexpect>=4.8.0 setproctitle
# Optional dependencies for enhanced functionality:
# pyenchant>=3.2.0 # For spell checking commands
# pyxdg>=0.28 # For XDG base directory support
# PyGObject>=3.42.0 # For GStreamer sound driver
# pyatspi>=2.40.0 # For AT-SPI input driver
# speechd>=0.11.0 # For speech-dispatcher Python bindings

View File

@@ -94,17 +94,17 @@ setup(
data_files=dataFiles, data_files=dataFiles,
# Dependent packages (distributions) # Dependent packages (distributions)
python_requires='>=3.8', python_requires='>=3.6',
install_requires=[ install_requires=[
"evdev>=1.4.0", "evdev>=1.1.2",
"daemonize>=2.5.0", "daemonize>=2.5.0",
"dbus-python>=1.3.0", "dbus-python>=1.2.8",
"pyperclip>=1.8.0", "pyperclip",
"pyudev>=0.24.0", "pyudev>=0.21.0",
"setuptools>=65.0.0", "setuptools",
"setproctitle>=1.3.0", "setproctitle",
"pexpect>=4.8.0", "pexpect",
"pyte>=0.8.0", "pyte>=0.7.0",
], ],
) )
@@ -113,12 +113,12 @@ if not forceSettingsFlag:
# create settings file from example if not exist # create settings file from example if not exist
if not os.path.isfile('/etc/fenrirscreenreader/settings/settings.conf'): if not os.path.isfile('/etc/fenrirscreenreader/settings/settings.conf'):
try: try:
copyfile('config/settings/settings.conf', '/etc/fenrirscreenreader/settings/settings.conf') copyfile('config/fenrirscreenreader/settings/settings.conf', '/etc/fenrirscreenreader/settings/settings.conf')
print('create settings file in /etc/fenrirscreenreader/settings/settings.conf') print('create settings file in /etc/fenrirscreenreader/settings/settings.conf')
except OSError as e: except OSError as e:
print(f"Could not copy settings file to destination: {e}") print(f"Could not copy settings file to destination: {e}")
else: else:
print('settings.conf file found. It is not overwritten automatically') print('settings.conf file found. It is not overwritten automatical')
print('') print('')
print('To have Fenrir start at boot:') print('To have Fenrir start at boot:')

View File

@@ -4,5 +4,5 @@
# Fenrir TTY screen reader # Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers. # By Chrys, Storm Dragon, and contributers.
version = "2025.06.16" version = "2025.06.17"
codeName = "installation-script-updates" codeName = "master"