跳转到内容

OpenSCAD用户手册/OpenSCAD环境变量路径

维基教科书,自由的教学读本

本文为OpenSCAD查找与保存资源所用环境变量路径之概述。

环境变量[编辑]

  • HOME
  • XDG_CONFIG_HOME
  • OPENSCAD_FONT_PATH
  • OPENSCADPATH

每种平台的根目录[编辑]

  • ResourcesPath(资源路径)
    • Posix:
    • Mac OS X: OpenSCAD.app/Contents/Resources
      • Windows:
  • DocumentsPath(文档路径)
    • Posix: $HOME/.local/share
    • Mac OS X: [NSDocumentDirectory], 通常位于 $HOME/Documents
    • Windows XP: [CSIDL_PERSONAL], 通常位于 C:\documents and settings\username\my documents
    • Windows Vista->: [CSIDL_PERSONAL], 通常位于 C:\users\username\documents
  • UserConfigPath(用户配置路径)
    • Posix: $XDG_CONFIG_HOME/OpenSCAD 或 $HOME/.config/OpenSCAD
    • Mac: [NSApplicationSupportDirectory], 通常位于 $HOME/Library/Application Support/OpenSCAD
    • Windows: [CSIDL_LOCAL_APPDATA], 通常位于 C:\Documents and Settings\username\Local Settings\Application Data

只读资源[编辑]

  • 库: [ResourcesPath]/libraries
  • 字体: [ResourcesPath]/fonts
  • 渲染配色方案: [ResourcesPath]/color-schemes/render
  • 编辑器配色方案: [ResourcesPath]/color-schemes/editor

用户资源[编辑]

  • 库: $OPENSCADPATH, [DocumentsPath]/OpenSCAD/libraries
  • 字体
  * $HOME/.fonts
  • 渲染配色方案: [UserConfigPath]/color-schemes/render
  • 编辑器配色方案: [UserConfigPath]/color-schemes/editor

其他资源[编辑]

  • GUI引用 (采用QSettings):
  * Posix: $HOME/.config/OpenSCAD.conf
  * Windows: Registry
  * Mac OS X: $HOME/Library/Preferences/org.openscad.OpenSCAD.plist
  • 备份: [DocumentsPath]/OpenSCAD/backups

参考文献[编辑]

本章内容基于开发者kintel所写的 https://github.com/openscad/openscad/wiki/Path-locations