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