Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2a41072

Browse filesBrowse files
authored
Windows installer via cargo-packager (#5549)
* cargo-packager config Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * add templates * update release.yml * update wix installer config --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2 parents 01d470f + 12c3fa0 commit 2a41072
Copy full SHA for 2a41072

File tree

4 files changed

+1034
-1
lines changed
Filter options

4 files changed

+1034
-1
lines changed

‎.github/workflows/release.yml

Copy file name to clipboardExpand all lines: .github/workflows/release.yml
+27-1Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
steps:
5151
- uses: actions/checkout@v4
5252
- uses: dtolnay/rust-toolchain@stable
53+
- uses: cargo-bins/cargo-binstall@main
5354

5455
- name: Set up Environment
5556
shell: bash
@@ -78,6 +79,31 @@ jobs:
7879
run: cp target/${{ matrix.platform.target }}/release/rustpython.exe target/rustpython-release-${{ runner.os }}-${{ matrix.platform.target }}.exe
7980
if: runner.os == 'Windows'
8081

82+
- name: Install cargo-packager
83+
run: cargo binstall cargo-packager
84+
85+
- name: Generate MSI
86+
if: runner.os == 'Windows'
87+
run: cargo packager -f wix --release -o installer
88+
89+
- name: Upload MSI
90+
if: runner.os == 'Windows'
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: rustpython-installer-msi-${{ runner.os }}-${{ matrix.platform.target }}
94+
path: installer/*.msi
95+
96+
- name: Generate DMG
97+
if: runner.os == 'macOS'
98+
run: cargo packager -f dmg --release -o installer
99+
100+
- name: Upload DMG
101+
if: runner.os == 'macOS'
102+
uses: actions/upload-artifact@v4
103+
with:
104+
name: rustpython-installer-dmg-${{ runner.os }}-${{ matrix.platform.target }}
105+
path: installer/*.dmg
106+
81107
- name: Upload Binary Artifacts
82108
uses: actions/upload-artifact@v4
83109
with:
@@ -140,7 +166,7 @@ jobs:
140166
uses: actions/download-artifact@v4
141167
with:
142168
path: bin
143-
pattern: rustpython-release-*
169+
pattern: rustpython-*
144170
merge-multiple: true
145171

146172
- name: List Binaries

‎Cargo.toml

Copy file name to clipboardExpand all lines: Cargo.toml
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,25 @@ rev = "2024.02.14"
9292
[package.metadata.vcpkg.target]
9393
x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md", dev-dependencies = ["openssl" ] }
9494

95+
[package.metadata.packager]
96+
product-name = "RustPython"
97+
identifier = "com.rustpython.rustpython"
98+
description = "An open source Python 3 interpreter written in Rust"
99+
homepage = "https://rustpython.github.io/"
100+
license_file = "LICENSE"
101+
authors = ["RustPython Team"]
102+
publisher = "RustPython Team"
103+
resources = ["LICENSE", "README.md", "Lib"]
104+
icons = ["32x32.png"]
105+
106+
[package.metadata.packager.nsis]
107+
installer_mode = "both"
108+
template = "installer-config/installer.nsi"
109+
110+
[package.metadata.packager.wix]
111+
template = "installer-config/installer.wxs"
112+
113+
95114
[workspace]
96115
resolver = "2"
97116
members = [

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.