Linux: add script and instructions for creating snap packages

We will now maintain the Blender package on snapcraft.io/blender.

Differential Revision: https://developer.blender.org/D5342
This commit is contained in:
Brecht Van Lommel 2019-07-24 18:45:20 +02:00
parent d25386b8a7
commit 79ce2054d4
Notes: blender-bot 2023-02-14 02:26:44 +01:00
Referenced by issue #67753, Alpha BLEND and SHADOW together cause crash
Referenced by issue #67118, bpy.ops.wm.save_as_mainfile does not work as expected on MacOS when run from script
Referenced by issue #66915, Changing Point Density Radius crashes Blender
Referenced by issue #65111, cant launch blender
3 changed files with 107 additions and 0 deletions

View File

@ -0,0 +1,38 @@
Snap Package Instructions
=========================
This folder contains the scripts for creating and uploading the snap on:
https://snapcraft.io/blender
Setup
-----
This has only been tested to work on Ubuntu.
# Install required packages
sudo apt install snapd snapcraft
Steps
-----
# Build the snap file
python3 bundle.py --version 2.XX --url https://download.blender.org/release/Blender2.XX/blender-2.XX-x86_64.tar.bz2
# Install snap to test
# --dangerous is needed since the snap has not been signed yet
# --classic is required for installing Blender in general
sudo snap install --dangerous --classic blender_2.XX_amd64.snap
# Upload
snapcraft push --release=stable blender_2.XX_amd64.snap
Release Values
--------------
stable: final release
candidate: release candidates

View File

@ -0,0 +1,21 @@
#!/usr/bin/env python3
import argparse
import os
import pathlib
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument("--version", required=True)
parser.add_argument("--url", required=True)
parser.add_argument("--grade", default="stable", choices=["stable", "devel"])
args = parser.parse_args()
yaml_text = pathlib.Path("snapcraft.yaml.in").read_text()
yaml_text = yaml_text.replace("@VERSION@", args.version)
yaml_text = yaml_text.replace("@URL@", args.url)
yaml_text = yaml_text.replace("@GRADE@", args.grade)
pathlib.Path("snapcraft.yaml").write_text(yaml_text)
subprocess.call(["snapcraft", "clean"])
subprocess.call(["snapcraft", "snap"])

View File

@ -0,0 +1,48 @@
name: blender
summary: Blender is the free and open source 3D creation suite.
description: |
Blender is the free and open source 3D creation suite. It supports the
entirety of the 3D pipeline—modeling, rigging, animation, simulation,
rendering, compositing and motion tracking, and video editing.
Blender is a public project, made by hundreds of people from around the
world; by studios and individual artists, professionals and hobbyists,
scientists, students, VFX experts, animators, game artists, modders, and
the list goes on.
The standard snap channels are used in the following way:
stable - Latest stable release.
candidate - Test builds for the upcoming stable release.
icon: ../icons/scalable/apps/blender.svg
passthrough:
license: GPL-3.0
confinement: classic
apps:
blender:
command: ./blender
desktop: ./blender.desktop
version: @VERSION@
grade: @GRADE@
parts:
blender:
plugin: dump
source: @URL@
build-attributes: [keep-execstack, no-patchelf]
override-build: |
snapcraftctl build
sed -i 's|Icon=blender|Icon=${SNAP}/blender.svg|' ${SNAPCRAFT_PART_INSTALL}/blender.desktop
stage-packages:
- libxcb1
- libxext6
- libx11-6
- libxi6
- libxfixes3
- libxrender1
- libxxf86vm1