東川印記

一本東川,笑看爭龍斗虎;寰茫兦者,度橫佰昧人生。

使用openfire+jitsi搭建视频聊天09之PC客户端打包及发布

2015年4月19日星期日



发现聊天室功能需要部署多台机器才能用。。。。
执行ant build-installation-generic
  1. Buildfile: /home/senrsl/test/jisti/jitsi/build.xml
  2. clean-install-generic:
  3.     [mkdir] Created dir: /home/senrsl/test/jisti/jitsi/release/generic
  4. define-izpack-task:
  5. BUILD FAILED
  6. /home/senrsl/test/jisti/jitsi/resources/install/build.xml:55: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
  7.  using the classloader AntClassLoader[]
  8. Total time: 629 milliseconds
找不到IzPackTask,看来是跟openfire打包一样,要依赖第三方工具。
地址http://izpack.org /,下载http://dist.codehaus.org/izpack/releases /4.3.5/IzPack-install-4.3.5.jar
下载页的说明

Launching an IzPack-based installer is easy. On most operating systems, a double-click on the Jar file icon will do. Otherwise, you may need to launch it from a shell command:

$ java -jar izpack-dist-5.0.0-rc4-installer.jar
安装

选择安装目录/home/senrsl/tools/IzPack
总共9步。。。。
最后一步还可以生成安装脚本
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <AutomatedInstallation langpack="chn">
  3. <com.izforge.izpack.panels.CheckedHelloPanel id="hellopanel"/>
  4. <com.izforge.izpack.panels.HTMLInfoPanel id="infopanel"/>
  5. <com.izforge.izpack.panels.HTMLLicencePanel id="licensepanel"/>
  6. <com.izforge.izpack.panels.TargetPanel id="targetpanel">
  7. <installpath>/home/senrsl/tools/IzPack</installpath>
  8. </com.izforge.izpack.panels.TargetPanel>
  9. <com.izforge.izpack.panels.PacksPanel id="packspanel">
  10. <pack index="0" name="Core" selected="true"/>
  11. <pack index="1" name="HTML Documentation" selected="true"/>
  12. <pack index="2" name="PDF Documentation" selected="true"/>
  13. <pack index="3" name="Javadocs Documentation" selected="true"/>
  14. <pack index="4" name="Utilities" selected="true"/>
  15. <pack index="5" name="Sample" selected="true"/>
  16. </com.izforge.izpack.panels.PacksPanel>
  17. <com.izforge.izpack.panels.SummaryPanel id="summarypanel"/>
  18. <com.izforge.izpack.panels.InstallPanel id="installpanel"/>
  19. <com.izforge.izpack.panels.ShortcutPanel id="shortcutpanel">
  20. <programGroup name="IzPack4.3.5"/>
  21. <shortcut KdeSubstUID="false" categories="" commandLine="/home/senrsl/tools/IzPack/doc/izpack/html/index.html" createForAll="true" description="This opens a WebBrowser to look into the IzPack 4.3.5 (HTML) user documentation" encoding="UTF-8" group="false" icon="help" iconIndex="0" initialState="0" mimetype="" name="IzPack4.3 Html Documentation" target="/home/senrsl/tools/IzPack/bin/start.sh" terminal="" terminalOptions="" tryexec="" type="Application" url="/home/senrsl/tools/IzPack/doc/izpack/html/index.html" usertype="0" workingDirectory=""/>
  22. <shortcut KdeSubstUID="false" categories="" commandLine="/home/senrsl/tools/IzPack/doc/izpack/html/index.html" createForAll="true" description="This opens a WebBrowser to look into the IzPack 4.3.5 (HTML) user documentation" encoding="UTF-8" group="true" icon="help" iconIndex="0" initialState="0" mimetype="" name="IzPack4.3 Html Documentation" target="/home/senrsl/tools/IzPack/bin/start.sh" terminal="" terminalOptions="" tryexec="" type="Application" url="/home/senrsl/tools/IzPack/doc/izpack/html/index.html" usertype="0" workingDirectory=""/>
  23. <shortcut KdeSubstUID="false" categories="" commandLine="/home/senrsl/tools/IzPack/doc/izpack/javadoc/index.html" createForAll="true" description="This opens a WebBrowser to look into the IzPack 4.3.5 (HTML) Java documentation" encoding="UTF-8" group="false" icon="help" iconIndex="0" initialState="0" mimetype="" name="IzPack4.3 Java Documentation" target="/home/senrsl/tools/IzPack/bin/start.sh" terminal="" terminalOptions="" tryexec="" type="Application" url="/home/senrsl/tools/IzPack/doc/izpack/javadoc/index.html" usertype="0" workingDirectory=""/>
  24. <shortcut KdeSubstUID="false" categories="" commandLine="/home/senrsl/tools/IzPack/doc/izpack/javadoc/index.html" createForAll="true" description="This opens a WebBrowser to look into the IzPack 4.3.5 (HTML) Java documentation" encoding="UTF-8" group="true" icon="help" iconIndex="0" initialState="0" mimetype="" name="IzPack4.3 Java Documentation" target="/home/senrsl/tools/IzPack/bin/start.sh" terminal="" terminalOptions="" tryexec="" type="Application" url="/home/senrsl/tools/IzPack/doc/izpack/javadoc/index.html" usertype="0" workingDirectory=""/>
  25. <shortcut KdeSubstUID="false" categories="" commandLine="/home/senrsl/tools/IzPack/doc/izpack/pdf/manual.pdf" createForAll="true" description="This opens Adobe (Acrobat) Reader (if available) to look into or print the IzPack 4.3.5 (PDF) user documentation" encoding="UTF-8" group="false" icon="acroread" iconIndex="0" initialState="0" mimetype="" name="IzPack4.3 PDF Documentation" target="acroread" terminal="" terminalOptions="" tryexec="" type="Application" url="" usertype="0" workingDirectory=""/>
  26. <shortcut KdeSubstUID="false" categories="" commandLine="/home/senrsl/tools/IzPack/doc/izpack/pdf/manual.pdf" createForAll="true" description="This opens Adobe (Acrobat) Reader (if available) to look into or print the IzPack 4.3.5 (PDF) user documentation" encoding="UTF-8" group="true" icon="acroread" iconIndex="0" initialState="0" mimetype="" name="IzPack4.3 PDF Documentation" target="acroread" terminal="" terminalOptions="" tryexec="" type="Application" url="" usertype="0" workingDirectory=""/>
  27. <shortcut KdeSubstUID="true" categories="" commandLine="-jar &quot;/home/senrsl/tools/IzPack/Uninstaller/uninstaller.jar&quot;" createForAll="false" description="This uninstalls IzPack 4.3.5" encoding="UTF-8" group="true" icon="trashcan_full" iconIndex="0" initialState="0" mimetype="" name="Izpack4.3 Uninstaller" target="java" terminal="" terminalOptions="" tryexec="" type="Application" url="" usertype="0" workingDirectory=""/>
  28. </com.izforge.izpack.panels.ShortcutPanel>
  29. <com.izforge.izpack.panels.FinishPanel id="finishpanel"/>
  30. </AutomatedInstallation>
然后怎么搞。。。。
https://jitsi.org/Documentation/HowToBuildAnInstaller 打不开,腊肉集团真恶心

然后,挨个的找配置文件
发现了这个/home/senrsl/test/jisti/jitsi/resources/install /installers.properties
原来izpack的路径是在这里配置
  1. # The path where IzPack is installed
  2. #izpack.dir=/opt/izpack
  3. izpack.dir=/home/senrsl/tools/IzPack
然后ant build-installation-generic,报/home/senrsl/test/jisti/jitsi/resources /install/generic/installer-generic.xml这个16行错误,
注释掉

再ant
  1. Buildfile: /home/senrsl/test/jisti/jitsi/build.xml
  2. clean-install-generic:
  3.    [delete] Deleting directory /home/senrsl/test/jisti/jitsi/release/generic
  4.     [mkdir] Created dir: /home/senrsl/test/jisti/jitsi/release/generic
  5. define-izpack-task:
  6. -pre-version:
  7. version:
  8.     [javac] Compiling 3 source files to /home/senrsl/test/jisti/jitsi/classes
  9.     [javac] 警告: [options] 未与 -source 1.6 一起设置引导类路径
  10.     [javac] 1 个警告
  11.      [echo] Jitsi version 2.4.0.build.by.SVN
  12. load-properties:
  13. build-installation-generic:
  14. [propertyfile] Creating new property file: /home/senrsl/test/jisti/jitsi/release/generic/versionupdate.properties
  15.      [copy] Copying 1 file to /home/senrsl/test/jisti/jitsi/release/generic
  16.      [copy] Copying 1 file to /home/senrsl/test/jisti/jitsi/release/generic
  17.    [izpack] Warning: /home/senrsl/test/jisti/jitsi/release/generic/tmp-installer-generic.xml:61: Panel jar file not found: /home/senrsl/tools/IzPack/bin/panels/HelloPanel2.jar
  18.    [izpack] Building installer jar: /home/senrsl/test/jisti/jitsi/release/generic/jitsi-2.4.0.build.by.SVN.jar
  19.    [izpack] Copying 60 files into installer
  20.    [izpack] Merging 5 jars into installer
  21.    [izpack] Writing 3 Packs into installer
  22. BUILD SUCCESSFUL
  23. Total time: 5 seconds
竟然成功了。

然后运行
  1. senrsl@senrsl-ubuntu:~$ cd /home/senrsl/test/jisti/jitsi/release/generic
  2. senrsl@senrsl-ubuntu:~/test/jisti/jitsi/release/generic$ ll
  3. 总用量 22372
  4. drwxrwxr-x 2 senrsl senrsl     4096  2月  9 20:15 ./
  5. drwxrwxr-x 3 senrsl senrsl     4096  2月  9 20:15 ../
  6. -rw-rw-r-- 1 senrsl senrsl 22893816  2月  9 20:15 jitsi-2.4.0.build.by.SVN.jar
  7. -rw-rw-r-- 1 senrsl senrsl      171  2月  9 20:15 versionupdate.properties
  8. senrsl@senrsl-ubuntu:~/test/jisti/jitsi/release/generic$ java -jar jitsi-2.4.0.build.by.SVN.jar
  9. java.lang.ClassNotFoundException: com.izforge.izpack.panels.HelloPanel2
  10.     at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
  11.     at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
  12.     at java.security.AccessController.doPrivileged(Native Method)
果然是不能注释呢,这个选了语言就崩掉了,注掉的hello应该是安装引导。

把注释取消就这问题
  1.      [copy] Copying 1 file to /home/senrsl/test/jisti/jitsi/release/generic
  2.      [copy] Copying 1 file to /home/senrsl/test/jisti/jitsi/release/generic
  3.    [izpack] ERROR:  '与元素类型 "null" 相关联的 "value" 属性值不能包含 '<' 字符。'
  4.    [izpack] ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: 与元素类型 "null" 相关联的 "value" 属性值不能包含 '<' 字符。'
  5. BUILD FAILED
  6. /home/senrsl/test/jisti/jitsi/resources/install/build.xml:163: com.izforge.izpack.adaptator.XMLException: Error in /home/senrsl/test/jisti/jitsi/release/generic/tmp-installer-generic.xml at line 16, column 104 : javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: 与元素类型 "null" 相关联的 "value" 属性值不能包含 '<' 字符。
  7. Total time: 1 second
挨个文件的乱改。。。。发现了关键是这句:与元素类型 "null" 相关联的 "value" 属性值不能包含 '<' 字符。'
配置是这个文件:/home/senrsl/test/jisti/jitsi/resources/install/ant-build- config.properties
这里面配置了那三个hello,第一个里面有邮箱,用<>这对符号标注。。。。。
去掉就能编译了。
  1. [propertyfile] Creating new property file: /home/senrsl/test/jisti/jitsi/release/generic/versionupdate.properties
  2.      [copy] Copying 1 file to /home/senrsl/test/jisti/jitsi/release/generic
  3.      [copy] Copying 1 file to /home/senrsl/test/jisti/jitsi/release/generic
  4.    [izpack] Building installer jar: /home/senrsl/test/jisti/jitsi/release/generic/vber4im-2.4.2047.jar
  5.    [izpack] Copying 10 files into installer
  6.    [izpack] Merging 6 jars into installer
  7.    [izpack] Writing 3 Packs into installer
  8. BUILD SUCCESSFUL
  9. Total time: 5 seconds
第一屏

后面跟安装izpack一样,萝莉啰嗦的好几屏,明日继续。
2015年02月09日21:00:58

没往linux上安,按到win xp上,都配完发现生成快捷方式报错。
  1. C:\download>java -jar vber4im-2.4.2047.jar
  2. could not read shortcut spec!
  3. com.izforge.izpack.installer.ResourceNotFoundException: Cannot find named Resour
  4. ce: '/res/shortcutSpec.xml' AND '/res/shortcutSpec.xml_chn'
  5.         at com.izforge.izpack.installer.ResourceManager.getLanguageResourceStrin
  6. g(Unknown Source)
  7.         at com.izforge.izpack.installer.ResourceManager.getInputStream(Unknown S
  8. ource)
  9.         at com.izforge.izpack.panels.ShortcutPanel.readShortcutSpec(Unknown Sour
  10. ce)
  11.         at com.izforge.izpack.panels.ShortcutPanel.panelActivate(Unknown Source)
  12.         at com.izforge.izpack.installer.InstallerFrame.switchPanel(Unknown Sourc
  13. e)
  14.         at com.izforge.izpack.installer.InstallerFrame.navigateNext(Unknown Sour
  15. ce)
  16.         at com.izforge.izpack.installer.InstallerFrame.navigateNext(Unknown Sour
  17. ce)
  18.         at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.navigat
  19. e(Unknown Source)
  20.         at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.access$
  21. 100(Unknown Source)
  22.         at com.izforge.izpack.installer.InstallerFrame$NavigationHandler$1.run(U
  23. nknown Source)
  24.         at java.lang.Thread.run(Unknown Source)
  25. java.io.IOException: Cannot run program "C:\Program": CreateProcess error=2, ???
  26. ??????
  27.         at java.lang.ProcessBuilder.start(Unknown Source)
  28.         at java.lang.Runtime.exec(Unknown Source)
  29.         at java.lang.Runtime.exec(Unknown Source)
  30.         at java.lang.Runtime.exec(Unknown Source)
  31.         at com.izforge.izpack.util.LibraryRemover.initJavaExec(Unknown Source)
  32.         at com.izforge.izpack.util.LibraryRemover.<init>(Unknown Source)
  33.         at com.izforge.izpack.util.LibraryRemover.invoke(Unknown Source)
  34.         at com.izforge.izpack.util.Librarian.cleanUp(Unknown Source)
  35.         at com.izforge.izpack.util.Housekeeper.shutDown(Unknown Source)
  36.         at com.izforge.izpack.installer.InstallerFrame.exit(Unknown Source)
  37.         at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.navigat
  38. e(Unknown Source)
  39.         at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.access$
  40. 100(Unknown Source)
  41.         at com.izforge.izpack.installer.InstallerFrame$NavigationHandler$1.run(U
  42. nknown Source)
  43.         at java.lang.Thread.run(Unknown Source)
  44. Caused by: java.io.IOException: CreateProcess error=2, ?????????
  45.         at java.lang.ProcessImpl.create(Native Method)
  46.         at java.lang.ProcessImpl.<init>(Unknown Source)
  47.         at java.lang.ProcessImpl.start(Unknown Source)
  48.         ... 14 more
  49. C:\download>cd C:\Program Files\vber4im\lib
这还不是重要的,重要的是安装完成的目录里面竟然时linux的shell脚本。。。。

好吧,明日继续。
2015年02月10日10:40:10开始
/home/senrsl/test/jisti/jitsi/resources/install /installers.properties这个文件里配置jre的路径。

单只配linux的,然后 ant build-installation-linux
  1. Buildfile: /home/senrsl/test/jisti/jitsi/build.xml
  2. clean-install-linux:
  3.     [mkdir] Created dir: /home/senrsl/test/jisti/jitsi/release/linux
  4.     [mkdir] Created dir: /home/senrsl/test/jisti/jitsi/release/linux/tmp
  5. define-izpack-task:
  6. -pre-version:
  7. version:
  8.     [javac] Compiling 3 source files to /home/senrsl/test/jisti/jitsi/classes
  9.     [javac] 警告: [options] 未与 -source 1.6 一起设置引导类路径
  10.     [javac] 1 个警告
  11.      [echo] Jitsi version 2.4.2047
  12. load-properties:
  13. build-installation-linux:
  14. [propertyfile] Creating new property file: /home/senrsl/test/jisti/jitsi/release/linux/versionupdate.properties
  15.      [copy] Copying 2 files to /home/senrsl/test/jisti/jitsi/release/linux/tmp
  16.     [mkdir] Created dir: /home/senrsl/test/jisti/jitsi/release/linux/tmp/jre
  17.      [copy] Copying 698 files to /home/senrsl/test/jisti/jitsi/release/linux/tmp/jre
  18.      [copy] Copied 99 empty directories to 1 empty directory under /home/senrsl/test/jisti/jitsi/release/linux/tmp/jre
  19.      [copy] Copying 1 file to /home/senrsl/test/jisti/jitsi/release/linux/tmp
  20.      [copy] Copying 1 file to /home/senrsl/test/jisti/jitsi/release/linux
  21.      [copy] Copying 1 file to /home/senrsl/test/jisti/jitsi/resources/install/linux
  22.    [izpack] Warning: /home/senrsl/test/jisti/jitsi/release/linux/tmp/tmp-installer-linux.xml:62: Panel jar file not found: /home/senrsl/tools/IzPack/bin/panels/HelloPanel2.jar
  23.    [izpack] Building installer jar: /home/senrsl/test/jisti/jitsi/release/linux/tmp/vber4im-2.4.2047-linux.jar
  24.    [izpack] Copying 59 files into installer
  25.    [izpack] Merging 5 jars into installer
  26.    [izpack] Writing 5 Packs into installer
  27.       [tar] Building tar: /home/senrsl/test/jisti/jitsi/release/linux/tmp/install.tar
  28.       [tar] Entry: jre/lib/desktop/icons/HighContrastInverse/16x16/mimetypes/gnome-mime-application-x-java-jnlp-file.png longer than 100 characters.
  29.       [tar] Resulting tar file can only be processed successfully by GNU compatible tar commands
  30.       [tar] Entry: jre/lib/desktop/icons/HighContrastInverse/48x48/mimetypes/gnome-mime-application-x-java-jnlp-file.png longer than 100 characters.
  31.      [gzip] Building: /home/senrsl/test/jisti/jitsi/release/linux/tmp/install.tar.gz
  32.    [delete] Deleting directory /home/senrsl/test/jisti/jitsi/release/linux/tmp
  33.    [delete] Deleting: /home/senrsl/test/jisti/jitsi/resources/install/linux/felix.client.run.properties
  34. BUILD SUCCESSFUL
  35. Total time: 16 seconds
生成一个bin文件,77.2M。。。。看起来是包含了jre的。


这样,linux的打包是可以,win的打包才是重点。
执行ant build-installation-wix-64
  1. BUILD FAILED
  2. /home/senrsl/test/jisti/jitsi/resources/install/build.xml:298: The following error occurred while executing this line:
  3. /home/senrsl/test/jisti/jitsi/resources/install/build.xml:411: Execute failed: java.io.IOException: Cannot run program "make.exe" (in directory "/home/senrsl/test/jisti/jitsi/src/native/windows/run"): error=2, 没有那个文件或目录
  4. Total time: 1 second
看这意思,是要在win下才能编译。。。。

跑到http://wix.codeplex.com /下了个wix,发现无论哪个版本都是要在win下运行。。。。。
解压版:

这是歧视!!!

看起来必须要到win下编译了。。。。好吧,回8改代码。

年后此项目暂停,搞android OS开始。
2015年04月19日14:40:44


--
senRsl
2015年02月09日19:33:51

没有评论 :

发表评论