Skip to content

Conversation

@gabreek
Copy link

@gabreek gabreek commented Jul 17, 2025

What is the name of the app?
yaScrcpy GUI

Where is the app hosted?
https://github.com/gabreek/qt-yascrcpygui

About the app
Main Purpose
yaScrcpy GUI is a user-friendly graphical interface for the powerful Android screen
mirroring tool, scrcpy. It allows users to manage and launch scrcpy sessions without
needing to use the command line, making it more accessible for all users, especially those
who prefer a visual workflow.

How it Works
The application is built with Python and the PySide6 (Qt) framework. The provided
installation script handles the entire setup process:

It first checks if the scrcpy dependency is already installed on the system.
It then clones the source code from GitHub.
It builds a standalone executable using PyInstaller within an isolated Python virtual
environment to avoid conflicts with system packages.
Finally, it installs the binary, an application icon, and a .desktop shortcut for the
system's application menu.
Pi-Apps Eligibility
This app fits the Pi-Apps rubric because it is open-source, provides a useful function for
Raspberry Pi users (interacting with Android devices), and enhances an existing, popular
command-line utility (scrcpy) with an accessible GUI. It has no special kernel or hardware
requirements.

#2807

@theofficialgman
Copy link
Collaborator

Pretty sure this won't work on arm32 due to no whl for pyside6 on it. https://pypi.org/project/PySide6/

@gabreek
Copy link
Author

gabreek commented Jul 18, 2025

Okay, I hadn't checked that. I've renamed the install script.

"${DIRECTORY}/manage" install-if-not-installed Scrcpy || exit 1

# Install other necessary system packages
sudo apt-get install -y python3-pip git python3-venv
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be replaced with install_packages.
Please read https://pi-apps.io/wiki/development/Creating-an-app/

Comment on lines +19 to +39
git clone --depth 1 "https://github.com/gabreek/qt-yascrcpygui.git" "${TEMP_DIR}"

# Change into the temp directory
cd "${TEMP_DIR}"

# Create a virtual environment and install Python packages
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install pyinstaller

# Build the executable
pyinstaller main.spec
deactivate

# 3. Install the application files
# Copy the built program to a system-wide location
sudo cp "dist/${APP_NAME}" "/usr/local/bin/${APP_NAME}"

# Copy the icon
sudo cp "gui/icon.png" "/usr/share/pixmaps/${APP_NAME}.png"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All lines like these could fail for one reason or another, so if they fail, they need to make the script exit with an error message. Search all existing app install scripts for || error at the end of lines.

Comment on lines +16 to +40
main() {
status "Starting uninstallation of ${APP_NAME}..."

status "Removing application binary..."
sudo rm -f "${BIN_PATH}"

status "Removing application icon..."
sudo rm -f "${ICON_PATH}"

status "Removing application shortcut..."
sudo rm -f "${DESKTOP_FILE}"

status "Updating icon cache..."
# Use || true to prevent the script from failing on non-critical cache update errors
sudo update-icon-caches /usr/share/icons/* || true
sudo xdg-icon-resource forceupdate --mode system || true

# The dependencies (git, python3-pip, python3-venv) are common system packages
# and will not be removed to avoid breaking other applications.

status "Uninstallation of ${APP_NAME} completed successfully!"
}

# Run the main function
main "$@"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of putting this into a main() function here??

sudo rm -f "${DESKTOP_FILE}"

status "Updating icon cache..."
# Use || true to prevent the script from failing on non-critical cache update errors
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|| true is only necessary if the script has set -e enabled, causing the script to exit if any comnmands exit with a nonzero exit code. Pi-Apps does not use set -e, meaning it does not care about nonzero exit codes, making || true unnecessary where failing is OK, but || error very important where failing is not OK.

@Botspot Botspot added the waiting on response Further information is requested from the issue owner by the pi-apps devs label Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting on response Further information is requested from the issue owner by the pi-apps devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants