zoukankan      html  css  js  c++  java
  • 修改spark install4j配置文件使得安装程序语言为中文(使得Spark安装程序过程为中文)

    http://blog.csdn.net/tyj1982/article/details/6686546

    在build/installer目录下,打开spark.install4j文件,做如下修改

    <languages skipLanguageSelection="true">
          <principalLanguage id="zh_CN", customLocalizationFile="" />

    在mediaSets段下修改默认语言为中文

    <mediaSets>
        <win32 name="Windows" id="2" mediaFileName="" installDir="Spark" overridePrincipalLanguage="true" requires64bit="false" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" includedJRE="windows-x86-1.6.0_18" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" customInstallBaseDir="" createUninstallIcon="true" contentFilesType="1" downloadURL="" runAsAdmin="true">
          <excludedLaunchers />
          <excludedComponents />
          <overriddenPrincipalLanguage id="zh_CN" customLocalizationFile="" />
          <exclude>
            <entry location="bin/startup.bat" launcher="false" />
            <entry location="bin/startup.sh" launcher="false" />
            <entry location="lib/linux" launcher="false" />
            <entry location="lib/mac" launcher="false" />
            <entry location="plugins/idlelinux.jar" launcher="false" />
          </exclude>
          <variables />
          <excludedInstallerScreens />
          <excludedUninstallerScreens />
        </win32>    
        <win32 name="Windows NON-JRE" id="19" mediaFileName="spark_${compiler:sys.version}_online" installDir="Spark" overridePrincipalLanguage="true" requires64bit="false" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" includedJRE="" manualJREEntry="false" bundleType="2" jreURL="http://www.jivesoftware.org/updater/releases/windows-x86-1.5.0_05.tar.gz" jreFtpURL="" jreShared="false" customInstallBaseDir="" createUninstallIcon="true" contentFilesType="1" downloadURL="" runAsAdmin="true">
          <excludedLaunchers />
          <excludedComponents />
          <overriddenPrincipalLanguage id="zh_CN" customLocalizationFile="" />
          <exclude>
            <entry location="bin/startup.bat" launcher="false" />
            <entry location="bin/startup.sh" launcher="false" />
            <entry location="lib/linux" launcher="false" />
            <entry location="lib/mac" launcher="false" />
            <entry location="plugins/idlelinux.jar" launcher="false" />
          </exclude>
          <variables />
          <excludedInstallerScreens />
          <excludedUninstallerScreens />
        </win32>
      </mediaSets>

    另外,一下这个段可以注释掉:

    <launcher name="starter" id="21" external="false" excludeFromMenu="false" menuName="" icnsFile="" pngIcon16File="" pngIcon32File="" macServiceDependencies="" swtApp="false">
          <executable name="starter" type="1" iconSet="false" iconFile="" executableDir="." redirectStderr="true" stderrFile="error.log" redirectStdout="false" stdoutFile="output.log" failOnStderrOutput="true" executableMode="1" changeWorkingDirectory="true" workingDirectory="." singleInstance="false" serviceStartType="2" serviceDependencies="" serviceDescription="" jreLocation="" executionLevel="asInvoker">
            <versionInfo include="false" fileVersion="" fileDescription="" legalCopyright="" internalName="" />
          </executable>
          <splashScreen show="false" autoOff="true" alwaysOnTop="true" width="0" height="0" bitmapFile="">
            <text>
              <statusLine x="20" y="20" text="" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" />
              <versionLine x="20" y="40" text="version ${compiler:sys.version}" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" />
            </text>
          </splashScreen>
          <java mainClass="org.jivesoftware.Restarter" vmParameters="" arguments="" allowVMPassthroughParameters="true" preferredVM="">
            <classPath>
              <scanDirectory location="lib" failOnError="false" />
            </classPath>
            <nativeLibraryDirectories />
          </java>
          <includedFiles />
          <unextractableFiles />
          <customScript mode="1" file="">
            <scriptLines />
          </customScript>
        </launcher>

    另外发现添加快捷启动栏无效(在xp下),所以可以把这个选项去掉

    <formComponent name="Create a quick launch icon" id="55" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent" insetTop="" insetLeft="" insetBottom="" insetRight="" resetInitOnPrevious="false">
                <serializedBean>
                  <java class="java.beans.XMLDecoder">
                    <object class="com.install4j.runtime.beans.formcomponents.CheckboxComponent">
                      <void property="checkboxText">
                        <string>${i18n:CreateQuickLaunchIcon}</string>
                      </void>
                      <void property="initiallySelected">
                        <boolean>true</boolean>
                      </void>
                      <void property="variableName">
                        <string>createQuicklaunchIconAction</string>
                      </void>
                    </object>
                  </java>
                </serializedBean>
                <initScript>component.setVisible(Util.isWindows());</initScript>
              </formComponent>

  • 相关阅读:
    关于clipboard插件的使用问题
    js复制内容到剪切板,兼容pc和手机端,支持Safari浏览器
    CSS选择器复习
    关于ajaxFileUpload图片上传,success和error都触发的情况
    百度地图API,定位您的当前位置
    开发移动端web页面click事件失效问题
    开发移动端web应用, 使用手机自带键盘的搜索按钮
    原生JS实现一个简单的前端路由(原理)
    计算机网络 —— 网络层
    计算机网络 —— 数据链路层
  • 原文地址:https://www.cnblogs.com/IamThat/p/3090913.html
Copyright © 2011-2022 走看看