Skip to content

Commit 69cf5ba

Browse files
authored
Add handling for post-install and pre-uninstall scripts. (#70)
1 parent e2f1f43 commit 69cf5ba

File tree

6 files changed

+382
-55
lines changed

6 files changed

+382
-55
lines changed

.github/workflows/update-binary.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Update binary
22
on:
3-
pull_request:
43
push:
54
tags:
65
- 'b*'

cookiecutter.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
"package_path": "C:\\path\\to\\content",
1717
"binary_path": "{{ cookiecutter.formal_name }}.exe",
1818
"document_types": "",
19+
"install_options": "",
20+
"installer_path": "_installer",
21+
"post_install_script": "",
22+
"pre_uninstall_script": "",
1923
"python_version": "3.X.0",
2024
"_extensions": [
2125
"briefcase.integrations.cookiecutter.PythonVersionExtension",

{{ cookiecutter.format }}/briefcase.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ target_version = "0.3.24"
66
app_path = "x64/Release/app"
77
app_packages_path = "x64/Release/app_packages"
88
support_path = "x64/Release"
9+
extras_path = "extras"
910
{# Minor versions for 3.10, 3.11, and 3.12 cannot be bumped further -#}
1011
{# since Python is not hosting embeddable zipped versions of them -#}
1112
{{ {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
setlocal enabledelayedexpansion
3+
SET ALLUSERS=%1
4+
{% for name in cookiecutter.install_options -%}
5+
{%- set argn = loop.index + 1 -%}
6+
SET OPTION_{{ name.upper() }}=%{{ argn }}
7+
{% endfor -%}
8+
9+
CALL "%~dp0post_install.bat"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@echo off
2+
setlocal enabledelayedexpansion
3+
4+
CALL "%~dp0pre_uninstall.bat"

0 commit comments

Comments
 (0)