zoukankan      html  css  js  c++  java
  • VS2008发布程序

    下列附有VS2008发布程序介绍:
    vc2008程序发布指南2008-05-03 17:46vc2008开发的程序的发布方式可以有5种方式:

    1. 采用静态链接到crt和MFC. 只要你拥有组成程序的所有源代码,你就可以采用这种方式,
    这种方式除了程序变大一点,好处多多: 
    1) 不必重新发布vc2008基础库vcredist_x86.exe(安装到WinSxS).
    2) 不必产生,嵌入manifest.
    3) 也不把vc2008基础库放在程序所在目录.

    2. exe(嵌入manifest) + vcredist_x86.exe

       确保程序正确产生并嵌入manifest文件,然后把程序和vcredist_x86.exe一起发布.用户先安装
    vcredist_x86.exe(安装到WinSxS),然后程序就能正常运行了.

    3. exe(嵌入manifest) + 用到的基础库文件放到程序目录(包括库文件本身的manifest文件)

       确保程序正确产生并嵌入manifest文件,然后把程序用到的vc2008基础库相关文件复制到程序
    所在目录,这种方式适用于用户没有安装过vcredist_x86.exe,一旦用户安装过vcredist_x86.exe,
    若WinSxS中的相关文件遭到破坏,那么即使在程序目录放上所有用到的vc2008基础库,程序也跑
    不起来;若WinSxS中的相关文件正常,那么程序目录下的相关文件就是多余的了,删掉它们程序也能
    正常运行.

    4. exe(自行编写manifest) + vcredist_x86.exe

    5. exe(自行编写manifest) + 用到的基础库文件放到程序目录(包括库文件本身的manifest文件)


    另外,C:/Program Files/Common Files/Merge Modules 目录下有相应库的集成模块可以直接集成到安装包中去.


    附录:

    A. 自行编写的manifest文件命名: abc.exe 对应abc.exe.manifest

    B. 与程序对应的manifest的格式:

    <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
    <assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
    <requestedPrivileges>
    <requestedExecutionLevel level='asInvoker' uiAccess='false' />
    </requestedPrivileges>
    </security>
    </trustInfo>

    <dependency>                                // VC9 的CRT, 基本上所有用vc2008的程序都需要下面一段
    <dependentAssembly>
    <assemblyIdentity type='win32' name='Microsoft.VC90.CRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
    </dependency>

                                                  //用到 VC9的MFC库,需要加下面一段
    <dependency>
    <dependentAssembly>
    <assemblyIdentity type='win32' name='Microsoft.VC90.MFC' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
    </dependency>

    <dependency>                                //想使用windows xp 的6.0版本的通用控件,加需要下面一段
    <dependentAssembly>
    <assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*' />
    </dependentAssembly>
    </dependency>

    </assembly>

    C. 如何确保程序正确产生并嵌入manifest文件?
    - xxxproject > properties > Configuration Properties > Generate Manifest: 确保为Yes
    这个与Configuration Properties >Linker > Manifest File >Generate Manifest都是指同一个设置.
    - Project > Tool Build Order > Manifest Tool确保打勾.
    release版本可以看到有: xxx.exe.intermediate.manifest 生成, 它是由linker生成的,由manifest tool嵌入程序的.
    debug版本manifest tool把xxx.exe.intermediate.manifest嵌入程序后还会输出一个xxx.exe.embed.manifest,供检查内容是否一样

  • 相关阅读:
    让WPF的Popup不总置顶的解决方案
    virtio 驱动的数据结构理解
    关于Linux下面msyql安装后并未设置初始密码,但是登录报错“Access denied for user 'root'@'localhost' (using password: NO)”的解决方案
    gulp初涉
    前后端分离--构建前端Mock Server--windows部署rap
    一些css小用法总结(持续更新~)
    js原生封装自定义滚动条
    ie下面兼容性问题的一些总结
    关于html水平垂直居中的一些总结吧
    C# 正则表达式匹配string字符串中的时间串(yyyyMMdd)
  • 原文地址:https://www.cnblogs.com/lidabo/p/3422302.html
Copyright © 2011-2022 走看看