Skip to content

Commit

Permalink
Improve linux GUI installer (#51)
Browse files Browse the repository at this point in the history
* fix_linux_installer

* update changelog
  • Loading branch information
trappitsch authored Jun 7, 2024
1 parent bc08b77 commit 8e2e293
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
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

0 comments on commit 8e2e293

Please sign in to comment.