[Chinese]
如果你使用 ActiveX control 技術, 你應該會用到 INF 檔幫你在客戶端自動安裝所有需要散佈的程式元件. 我們是否可以用一個變數來管理所有元件的版本號碼呢?
Yes, we can.
下面是一個最簡單的範例.
[English]
If you are using Active Control technique, you should already using a INF file to install the components. How can I use a variable to address the version number for components in INF file? Here is an example.
// ------------ code snippet -----------
[version]
signature=$Chicago$
AdvancedINF=1.0
Version_Control=1,0,0,18 ; <------ our version variable
...
[abc.dll]
file=thiscab
FileVersion= %Version_Control% ;注意: 使用 % % 把變數包起來
[my.ocx]
file=thiscab
CLSID={E39CF0E2-827E-4BF1-9A27-23393C753E4E}
RegisterServer=yes
FileVersion= %Version_Control%
Enjoy.
by Jing.
[相關知識]
[1] 如何寫一個最簡單的 INF 檔, "http://mqjing.blogspot.com/2008/11/plugin-inf.html, " 2008,11.
沒有留言:
張貼留言