mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 01:49:03 +08:00
Update pyinstaller scripts using UltiMaker
Contributes to CURA-9808
This commit is contained in:
parent
14eb9371f6
commit
ed6018d4ad
14
.github/workflows/cura-installer.yml
vendored
14
.github/workflows/cura-installer.yml
vendored
@ -212,38 +212,38 @@ jobs:
|
|||||||
cp openssl/lib/*.lib ./cura_inst/Lib/
|
cp openssl/lib/*.lib ./cura_inst/Lib/
|
||||||
|
|
||||||
- name: Create the Cura dist
|
- name: Create the Cura dist
|
||||||
run: pyinstaller ./cura_inst/Ultimaker-Cura.spec
|
run: pyinstaller ./cura_inst/UltiMaker-Cura.spec
|
||||||
|
|
||||||
- name: Archive the artifacts (bash)
|
- name: Archive the artifacts (bash)
|
||||||
if: ${{ github.event.inputs.installer == 'false' && runner.os != 'Windows' }}
|
if: ${{ github.event.inputs.installer == 'false' && runner.os != 'Windows' }}
|
||||||
run: tar -zcf "./Ultimaker-Cura-$CURA_VERSION_FULL-${{ inputs.os_name }}.tar.gz" "./Ultimaker-Cura/"
|
run: tar -zcf "./UltiMaker-Cura-$CURA_VERSION_FULL-${{ inputs.os_name }}.tar.gz" "./UltiMaker-Cura/"
|
||||||
working-directory: dist
|
working-directory: dist
|
||||||
|
|
||||||
- name: Archive the artifacts (Powershell)
|
- name: Archive the artifacts (Powershell)
|
||||||
if: ${{ github.event.inputs.installer == 'false' && runner.os == 'Windows' }}
|
if: ${{ github.event.inputs.installer == 'false' && runner.os == 'Windows' }}
|
||||||
run: Compress-Archive -Path ".\Ultimaker-Cura" -DestinationPath ".\Ultimaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.zip"
|
run: Compress-Archive -Path ".\UltiMaker-Cura" -DestinationPath ".\UltiMaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.zip"
|
||||||
working-directory: dist
|
working-directory: dist
|
||||||
|
|
||||||
- name: Create the Windows exe installer (Powershell)
|
- name: Create the Windows exe installer (Powershell)
|
||||||
if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' }}
|
if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' }}
|
||||||
run: |
|
run: |
|
||||||
python ..\cura_inst\packaging\NSIS\create_windows_installer.py ../cura_inst . "Ultimaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.exe"
|
python ..\cura_inst\packaging\NSIS\create_windows_installer.py ../cura_inst . "UltiMaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.exe"
|
||||||
working-directory: dist
|
working-directory: dist
|
||||||
|
|
||||||
- name: Create the Linux AppImage (Bash)
|
- name: Create the Linux AppImage (Bash)
|
||||||
if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Linux' }}
|
if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Linux' }}
|
||||||
run: python ../cura_inst/packaging/AppImage/create_appimage.py ./Ultimaker-Cura $CURA_VERSION_FULL "Ultimaker-Cura-$CURA_VERSION_FULL-${{ inputs.os_name }}.AppImage"
|
run: python ../cura_inst/packaging/AppImage/create_appimage.py ./UltiMaker-Cura $CURA_VERSION_FULL "UltiMaker-Cura-$CURA_VERSION_FULL-${{ inputs.os_name }}.AppImage"
|
||||||
working-directory: dist
|
working-directory: dist
|
||||||
|
|
||||||
- name: Create the MacOS dmg (Bash)
|
- name: Create the MacOS dmg (Bash)
|
||||||
if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Macos' }}
|
if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Macos' }}
|
||||||
run: python ../cura_inst/packaging/dmg/dmg_sign_noterize.py ../cura_inst . "Ultimaker-Cura-$CURA_VERSION_FULL-${{ inputs.os_name }}.dmg"
|
run: python ../cura_inst/packaging/dmg/dmg_sign_noterize.py ../cura_inst . "UltiMaker-Cura-$CURA_VERSION_FULL-${{ inputs.os_name }}.dmg"
|
||||||
working-directory: dist
|
working-directory: dist
|
||||||
|
|
||||||
- name: Upload the artifacts
|
- name: Upload the artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Ultimaker-Cura-${{ env.CURA_VERSION_FULL }}-${{ inputs.os_name }}
|
name: UltiMaker-Cura-${{ env.CURA_VERSION_FULL }}-${{ inputs.os_name }}
|
||||||
path: |
|
path: |
|
||||||
dist/*.tar.gz
|
dist/*.tar.gz
|
||||||
dist/*.zip
|
dist/*.zip
|
||||||
|
@ -21,7 +21,7 @@ class CuraConan(ConanFile):
|
|||||||
description = "3D printer / slicing GUI built on top of the Uranium framework"
|
description = "3D printer / slicing GUI built on top of the Uranium framework"
|
||||||
topics = ("conan", "python", "pyqt5", "qt", "qml", "3d-printing", "slicer")
|
topics = ("conan", "python", "pyqt5", "qt", "qml", "3d-printing", "slicer")
|
||||||
build_policy = "missing"
|
build_policy = "missing"
|
||||||
exports = "LICENSE*", "Ultimaker-Cura.spec.jinja", "CuraVersion.py.jinja"
|
exports = "LICENSE*", "UltiMaker-Cura.spec.jinja", "CuraVersion.py.jinja"
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
no_copy_source = True # We won't build so no need to copy sources to the build folder
|
no_copy_source = True # We won't build so no need to copy sources to the build folder
|
||||||
|
|
||||||
@ -226,13 +226,13 @@ class CuraConan(ConanFile):
|
|||||||
# Collect all dll's from PyQt6 and place them in the root
|
# Collect all dll's from PyQt6 and place them in the root
|
||||||
binaries.extend([(f"{p}", ".") for p in Path(self._site_packages, "PyQt6", "Qt6").glob("**/*.dll")])
|
binaries.extend([(f"{p}", ".") for p in Path(self._site_packages, "PyQt6", "Qt6").glob("**/*.dll")])
|
||||||
|
|
||||||
with open(Path(__file__).parent.joinpath("Ultimaker-Cura.spec.jinja"), "r") as f:
|
with open(Path(__file__).parent.joinpath("UltiMaker-Cura.spec.jinja"), "r") as f:
|
||||||
pyinstaller = Template(f.read())
|
pyinstaller = Template(f.read())
|
||||||
|
|
||||||
version = self.conf_info.get("user.cura:version", default = self.version, check_type = str)
|
version = self.conf_info.get("user.cura:version", default = self.version, check_type = str)
|
||||||
cura_version = Version(version)
|
cura_version = Version(version)
|
||||||
|
|
||||||
with open(Path(location, "Ultimaker-Cura.spec"), "w") as f:
|
with open(Path(location, "UltiMaker-Cura.spec"), "w") as f:
|
||||||
f.write(pyinstaller.render(
|
f.write(pyinstaller.render(
|
||||||
name = str(self.options.display_name).replace(" ", "-"),
|
name = str(self.options.display_name).replace(" ", "-"),
|
||||||
display_name = self.options.display_name,
|
display_name = self.options.display_name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user