Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- : '
- This script installs a CrossOver bottle that contains the IDEC automation suite.
- It assumes CrossOver is installed and configures the environment accordingly.
- Use at your own risk.
- '
- # Set the bottle name here
- BOTTLE_NAME="WindLDR"
- # Exit if CrossOver is not installed
- if ! command -v cxrun &> /dev/null; then
- echo "Error: CrossOver is not installed. Please install it first."
- exit 1
- fi
- echo "CrossOver is installed."
- # Function to check if a package is installed
- is_installed() {
- dpkg -l "$1" &> /dev/null
- return $?
- }
- # List of required packages
- packages=(
- "ttf-mscorefonts-installer"
- "winetricks"
- "cups"
- "cups-pdf"
- "udev"
- "libusb-dev"
- "libusb-1.0-0-dev"
- "linux-tools-virtual"
- "hwdata"
- )
- # Install required packages
- for package in "${packages[@]}"; do
- if ! is_installed "$package"; then
- echo "Installing $package..."
- sudo apt-get install -y "$package"
- else
- echo "$package is already installed."
- fi
- done
- # Run winetricks with proper WINEPREFIX
- WINEPREFIX="$HOME/.cxoffice/$BOTTLE_NAME" winetricks allfonts corefonts
- # Add user to plugdev if not already a member
- if ! groups $USER | grep -q "\bplugdev\b"; then
- sudo usermod -aG plugdev $USER
- echo "Added $USER to plugdev group."
- fi
- # Create or update udev rules for USB access
- UDEV_RULE_FILE="/etc/udev/rules.d/99-usb.rules"
- if [ ! -f "$UDEV_RULE_FILE" ]; then
- echo 'SUBSYSTEM=="usb", MODE="0666"' | sudo tee "$UDEV_RULE_FILE"
- echo "Created $UDEV_RULE_FILE with USB rule."
- else
- echo "Udev rule file already exists. Appending USB rule."
- echo 'SUBSYSTEM=="usb", MODE="0666"' | sudo tee -a "$UDEV_RULE_FILE"
- fi
- # Reload udev rules
- sudo udevadm control --reload-rules
- # Restore CrossOver archive
- echo "Restoring bottle from archive..."
- cxrestore --archive="$BOTTLE_NAME.cxarchive" --bottle="$BOTTLE_NAME"
- # Link virtual printer output and USB COM port
- BOTTLE_PATH="$HOME/.cxoffice/$BOTTLE_NAME"
- ln -sf "/var/spool/cups-pdf/$USER" "$BOTTLE_PATH/dosdevices/c:"
- ln -sf "/dev/ttyACM0" "$BOTTLE_PATH/dosdevices/com1"
- echo "CrossOver bottle installation and configuration completed."
- exit 0
- : '
- OG process notes:
- Installing WindLDR in wine, or crossover:
- before making your bottle, install cups, cups-pdf before making the WindLDR bottle
- make sure cups is running.
- else WindLDR isnt smart enough to find a virtual printer.
- $ln-s /var/spool/cups-pdf/$USER ~/.cxoffice/[YOUR_BOTTLE]/dosdevices/c:
- this takes care of the inability to print.
- WindLDR is the only component of the suite with this issue.
- sudo apt install ttf-mscorefonts-installer
- sudo apt install winetricks
- $ winetricks corefonts
- $ winetricks allfonts
- how to use wintricks in crossover:
- Enviornmental Variable:
- WINEPREFIX=~/.cxoffice/YOUR_BOTTLE_NAME winetricks
- This (should ) take care of various issues related to missing fonts.
- most notable: Veranda is the default, although we are using Western.
- sudo apt install libusb-dev libusb-1.0-0-dev
- sudo apt install linux-tools-virtual hwdata
- add user to plugdev if not previously there:
- $sudo usermod -aG plugdev $USER
- Write a udev rule:
- /etc/udev/rules.d/99-usb.rules
- SUBSYSTEM=="usb", MODE="0666"
- Save file, reload udev rules:
- $sudo udevadm control --reload-rules
- ## WHY 99-rules file? NN-device-rules, NN sets priority, 99 is a low priority.
- link the device to com1 in wine or crossover:
- $ ln -s /dev/ttyACM0 ~/.cxoffice/[YOUR_BOTTLE]/dosdevices/com1
- previus error was like USB port not found:
- (IT basic instructions)
- Current error:
- lol none fixed it.
- '
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement