【问题标题】:NSIS: get a text from the internet and put in "BrandingText"NSIS:从互联网上获取文本并输入“BrandingText”
【发布时间】:2014-04-28 00:42:44
【问题描述】:

我想从在线文本文件link 中添加一个文本,然后按以下方式插入:

BrandingText "14.05.01"

!define MUI_WELCOMEPAGE_TEXT "14.05.01"

NSIS 是否提供这种可能性?

【问题讨论】:

    标签: nsis


    【解决方案1】:

    是的,这是可能的。我使用inetc plugin 从网站访问文件:

    #get txt file (silently)
    inetc::get /NOCANCEL /SILENT "https://valeo.googlecode.com/svn/trunk/versao.txt" "$TEMP\versao.txt" /end
    #you may check the return value with: 'Pop $0' and 'StrCmp $0 "OK" 0 Error'
    #read file content
    FileOpen $4 "$TEMP\versao.txt" r
    # read until the end of line and save it to $1
    FileRead $4 $1 
    #close the file
    FileClose $4 
    # Now do what you want with $1
    

    更新:

    是的,这段代码进入了一个函数。不过这个没问题,按照说明here就好了。

    【讨论】:

    • 如果 BrandingText 不能在 Section 或 Function 中,如何使用此代码。而且上面的代码不能出现在Section或者Function之外?
    猜你喜欢
    • 2012-07-08
    • 2023-03-19
    • 2013-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多