Panthablack
@Panthablack

Как добавить иконку приложения для macOS?

Иконка для Windows отображается а для macos нет

сейчас собирает так pyinstaller --onefile --icon=icons.ico

name: Build-All-Platforms

on:
  push:
    branches: [ "main" ]
  workflow_dispatch:

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
            python-version: 3.9
            container: "python:3.9-buster"
          - os: windows-latest
            python-version: 3.x
          - os: macos-latest
            python-version: 3.x

    runs-on: ${{ matrix.os }}
    container: ${{ matrix.container }}

    steps:
      - uses: actions/checkout@v3

      - name: Setup Python
        if: ${{ !matrix.container }} # Use setup-python only if not in the container
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - name: Upgrade pip (Windows & macOS)
        if: ${{ !matrix.container }} # Run only if not in the container
        run: |
          python -m pip install --upgrade pip
      - name: Upgrade pip (Ubuntu)
        if: ${{ matrix.container }} # Run only in the container
        run: |
          pip install --upgrade pip
      - name: Install System Dependencies (Ubuntu)
        if: ${{ matrix.container }} # Run only in the container
        run: |
          apt-get update
          apt-get install -y python3-tk gettext tcl-thread tk tk-dev tcl libxcb-xinerama0
      - name: Install Pyinstaller Dependencies
        run: |
          pip install pyinstaller
      - name: Install Package Dependencies
        run: |
          pip install -r requirements.txt
      - name: Build Executable
        run: |
          pyinstaller --onefile --icon=icons.ico app.py
      - name: Set Execution Permissions (Linux)
        if: runner.os == 'Linux'
        run: chmod +x dist/*

      - name: Set Execution Permissions (macOS)
        if: runner.os == 'macOS'
        run: chmod +x dist/*

      - name: Upload Artifacts
        uses: actions/upload-artifact@v2
        with:
          name: ${{ runner.os }} Build
          node-version: 16
          path: |
            dist/*
  • Вопрос задан
  • 49 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы