Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve linux GUI installer #51

Merged
merged 2 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
- Fix linux GUI uninstaller, such that it will only delete the installation folder if it is empty.
- Allow icons to be stored in any folder that is named `assets`.
- Finish installers for MacOS.
- CLI installer is created using [applecrate](https://github.com/RhetTbull/applecrate) and standard configuration.
- GUI installer is created by creating a minimal folder structure for an `.app` file, packing the executable and the icon into it, and then creating a `.dmg` file using [`dmgbuild`](https://github.com/dmgbuild/dmgbuild) (with standard configuration).

## v0.2.0

Expand Down
5 changes: 4 additions & 1 deletion src/box/installer_utils/linux_hlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,10 @@ def create_bash_installer_gui(name_pkg, version, icon_name) -> str:
echo " exit 1" >> $UNINSTALL_FILE
echo " fi" >> $UNINSTALL_FILE
echo "" >> $UNINSTALL_FILE
echo "rm -rf $INSTALL_DIR" >> $UNINSTALL_FILE
echo "rm -f $INSTALL_DIR/$INSTALL_NAME" >> $UNINSTALL_FILE
echo "rm -f $INSTALL_DIR/$ICON_NAME" >> $UNINSTALL_FILE
echo "rm -f $UNINSTALL_FILE" >> $UNINSTALL_FILE
echo "rmdir $INSTALL_DIR" >> $UNINSTALL_FILE
echo "rm -f $DESKTOP_FILE" >> $UNINSTALL_FILE
echo "rm -rf $HOME/.local/share/pyapp/$INSTALL_NAME" >> $UNINSTALL_FILE
echo "" >> $UNINSTALL_FILE
Expand Down
3 changes: 3 additions & 0 deletions tests/cli/test_cli_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def test_installer_gui_linux(rye_project):
assert file_content.find(icon_file_content, icon_start) != -1
assert os.stat(installer_file).st_mode & stat.S_IXUSR != 0

# assure we only have one `rm -rf` in the install file (for pyapp folder)
assert file_content.count("rm -rf") == 1

assert installer_file.name in result.output


Expand Down
Loading