修改spark install4j配置文件使得安装程序语言为中文

在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>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值