Windows 模組
此模組提供用於建置 Windows 應用程式的功能。
方法
compile_resources
windows = import('windows')
windows.compile_resources(...(string | File | CustomTarget | CustomTargetIndex),
args: []string,
depend_files: [](string | File),
depends: [](BuildTarget | CustomTarget | CustomTargetIndex)
include_directories: [](IncludeDirectories | string)): []CustomTarget
編譯位置參數中指定的 Windows rc
檔案。傳回 CustomTarget
物件的列表,您可以將其放入要包含資源的目標的來源列表中。
自 0.61.0 版起,具有多個輸出的 CustomTargetIndexes 和 CustomTargets *可用作位置參數。
此方法具有以下關鍵字參數
-
args
列出要傳遞給資源編譯器的額外參數 -
depend_files
列出資源腳本所依賴的資源檔案(例如,位圖、游標、字型、html、圖示、訊息表、二進制資料或資源腳本引用的資訊清單檔案)(自 0.47.0 版起) -
depends
列出此目標所依賴的目標,即使它不將其作為參數使用(例如,如上所述,但已產生)(自 0.47.0 版起) -
include_directories
列出資源編譯器要搜尋的參考資源檔案的目錄,並將其新增至預處理器 include 搜尋路徑。
使用的資源編譯器可執行檔是以下列表中首先存在的
- 交叉檔案的
[binaries]
區段中給定的windres
可執行檔 WINDRES
環境變數- 與使用中的 C 或 C++ 編譯器屬於同一工具集的資源編譯器。
搜尋結果是