我正在尝试使用gswin64c (gswin32c也可以,但下面的小脚本也会给GitHub操作带来同样的问题),但是在安装包之后,仍然找不到gswin64c可执行文件所使用的工作流:
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows Latest MSVC Debug",
os: windows-latest,
build_type: "Debug", cc: "cl", cxx: "cl",
build_gen: "NMake Makefiles"
}
steps:
- name: Install Ghostscript (Windows)
run:
choco install ghostscript
if: matrix.config.os == 'windows-latest'
- name: Check tool versions (Windows)
shell: bash
run: |
echo "=== ghostscript 64 bit ===";
gswin64c --version;
if: matrix.config.os == 'windows-latest'我得到了错误:
=== ghostscript 64 bit ===
D:\a\_temp\2690ee6c-4c94-4de6-9dac-3f11a4aee19e.sh: line 19: gswin64c: command not found
Error: Process completed with exit code 127.发布于 2020-12-18 13:31:15
看起来,第二步是添加:
- name: Setting Ghostscript paths (Windows)
shell: bash
run: |
echo "C:/Program Files (x86)/gs/gs9.53.3/bin/" >> $GITHUB_PATH
echo "C:/Program Files/gs/gs9.53.3/bin/" >> $GITHUB_PATH
export PATH="/c/Program Files (x86)/gs/gs9.53.3/bin/:$PATH"
export PATH="/c/Program Files/gs/gs9.53.3/bin/:$PATH"
if: matrix.config.os == 'windows-latest'使gswin64c可用。
https://stackoverflow.com/questions/65357083
复制相似问题