文档章节

CREATING AN INSTALLER FOR JITSI

xiaobao36
 xiaobao36
发布于 2015/01/20 17:25
字数 1160
阅读 46
收藏 0
点赞 1
评论 0

CREATING AN INSTALLER FOR JITSI

Creating an OS specific installer for Jitsi (or any other Java application for that matter) consists in packaging all necessary binaries in a single installation package, which could be an archive, an executable, or both. The task also includes defining a set of steps (often in a script) that would need to be executed on a host machine when the application is installed so that it is properly configured for its first launch. These steps generally include things like setting the classpath, choosing a Java virtual machine or making sure that the executable is in the OS $PATH variable.

This tutorial goes over details that one would need to know in order to build an installation package for Jitsi by only using its sources. It tells you how you should be executing it, which libs and bundles you should be including in your distribution package and indicates those that you should not.

The tutorial assumes that before trying to build the installer, the user would have succeeded to build that application (by executing “ant build” in the project directory).

1. FILES YOU SHOULD INCLUDE (AND FILES YOU SHOULD NOT)

We’ve tried to keep the task of determining the necessary file set relatively simple, so that package maintainers don’t have to update there installer generator scripts all too often.

Basically there are three types of files that you have to get. Bundles (these are the Jitsi modules), library jars, and native libs. The first two (bundles and library jars), although containin java code only, may in some cases be suitable for a single operating system.

Let’s see this in more detail:

    1. First of all. you’d need to get all jars located inside sip-communicator/sc-bundles (except the *-slick.jar files as they only contain unit tests) and place them in a directory their own inside your destination install dir (if this directory is not named sc-bundles, you’d have to modify “felix.client.run.properties” and update their corresponding bundle locations).

    2. Retrieve all bundles located in sip-communicator/sc-bundles/os-specific/osname, where osname is the name of the operating system that your installer is targeting. Bundles that get built in these directories are meant to only run on the corresponding operating system.

    3. All jars located in sip-communicator/lib correspond to libraries that should ship with the installer and that should be added to the classpath when the application is being run.

    4. All jars in sip-communicator/lib/os-specific/osname represent libs that should ship with installers for the corresponding operating system. ATTN!! be careful not to include jars located in sip-communicator/lib/os-specific/osname/installer-exclude since they are most probably included in the bundles that use them

    5. All files under sip-communicator/lib/native/osname represent native libs for a particular operating system. You should include in your installer those that correspond to your target OS and make sure that they are in the right location when the application is being launched (e.g. on Linux, the directory that contains them has to be added to the LD_LIBRARY_PATH variable, on Windows - the PATH variable, and on MAC - DYLD_LIBRARY_PATH)

2. EXECUTING

A somehow unusual thing about Jitsi, is the fact that it doesn’t have its own main() method. In order to run it, one needs to launch the Felix OSGi implementation and tell it to load all Jitsi modules.

One of the ways to run Felix itself is by calling the main() method of org.apache.felix.main.Main. This gives you:

 #java org.apache.felix.main.Main

That alone would only run Felix but it would do nothing to start Jitsi. For that you need to set a Java system property and make it point to our felix.client.run.properties file that you can find in the lib directory of the sip-communicator project. The file, among other things, contains the list of all OSGi bundles that Felix needs to load in order to start Jitsi. Here’s how you tell Felix where to look for this file:

 #java -Dfelix.config.properties=file:/usr/share/sip-communicator/lib/felix.client.run.properties \
       org.apache.felix.main.Main

The above line assumes, of course, that felix.client.run.properties is located under the /usr/share/sip-communicator/lib directory at the time you are launching the application.

One other property that you would have to pass to the virtual machine upon launch is the logging configuration. Like felix.client.run.properties, our log config file is also in the lib directory of the sip-communicator project and its name is logging.properties. This means you’d need to add the following to your launch command:

 #java -Dfelix.config.properties=file:/usr/share/sip-communicator/lib/felix.client.run.properties \
       -Djava.util.logging.config.file=/usr/share/sip-communicator/lib/logging.properties \
       org.apache.felix.main.Main

You should also add to the classpath all library jars that Jitsi needs and does not include in the OSGi bundles. We mentioned these jars in the previous section. You would have to enumerate all of them in the classpath property of your run command:

#java -Dfelix.config.properties=file:/usr/share/sip-communicator/lib/felix.client.run.properties \ -Djava.util.logging.config.file=/usr/share/sip-communicator/lib/logging.properties \ -classpath "/usr/share/lib/jdic_stub.jar:/usr/.../util.jar" org.apache.felix.main.Main

Note that the exact location of the libraries depends on the location where your installer would place them.

You may of course have to add other properties (e.g. java.library.path) in order to tune the installation package and make it work on the destination operating system, but these depend on the cases and are outside the scope of this tutorial (and besides it’s getting late here and I want to go to bed).

6. JAVA VM DEPENDENCIES

In order to run Jitsi, users would need a locally installed Java Runtime Environment, and it is the responsibility of the installer to make sure that a compatible JRE exists on the user machine. There are three approaches you may choose when dealing with this issue:

    1. Dependency - If the packaging system that you are using allows it (e.g. like Debian’s dpkg and apt-get do), then this is probably the best option, as it only consists in indicating that installing your package requires installation of the package containing SUN’s JRE.

    2. Include the JRE in the Jitsi installation package. This is what we do in the Windows and generic Linux installers. The solution is quite clumsy since it implies adding a hefty amount of binaries to your installer but it is far better than simply dropping our application and risking lack of any JRE on the host machine.

    3. Try to detect an installed JRE and point the user to a download URL in case detection fails. This should be a last resort since requiring a user to install a JRE on their own would be quite an obstacle for quite many people.

7. REFERENCES

Hope the tutorial has been clear enough to at least get you started with your installer. In case you could find a lot of examples in the existing installers and the project build.xml:

© 著作权归作者所有

共有 人打赏支持
xiaobao36
粉丝 0
博文 8
码字总数 3450
作品 0
乌鲁木齐
程序员
Ignite Realtime 发布 Openfire Meetings 插件

Ignite Realtime 很高兴的宣布 "Openfire Meeting",这是一个 Openfire 的全新插件,延续之前已经被废弃的 Jitsi-videobridge plugin 的开发。 Openfire Meetings 是一个完全独立的插件,由 ...

oschina
2014/12/01
5.2K
6
Openfire 的插件 Openfire Meetings 发布更新

Openfire 的插件 Openfire Meetings 发布了更新。 Chrome 57 版本对 webrtc 进行了重大更改,并给 Openfire Meetings 带去了重大改变。有关详细信息,请点此阅读。 您可以通过使用 Meetings...

局长
2017/03/20
1K
0
视频通话和聊天工具--Jitsi

Jitsi是一个开源的,安全(ZRTP加密),高质量的SIP/XMPP视频通话、会议、聊天、桌面共享、文件传传输。可以安装在你喜欢的操作系统中并且支持多种IM网络。Jitsi是当最功能最完整的高级通信工...

匿名
2012/03/25
28.8K
5
Atlassian 收购开源视频会议服务公司 BlueJimp

Atlassian 今天宣布收购视频会议服务 BlueJimp。BlueJimp 是一个流行的开源聊天和视频会议工具,它的总部设在法国的 Strasbourg,是紧随 Jitsi 之后的开源会议工具。BlueJimp 的技术将取代 ...

oschina
2015/04/22
2.6K
9
Nginx 初始安装后, 无法访问 welcome page

通过 sudo apt-get install nginx 安装在 Ubuntu 17 下,防火墙也关了,telnet 80 口也是通的,服务也是启用的,所有都是默认配置,但就是不弹出 welcome page。。具体如下,各位有什么 trou...

tomi3
02/21
14
0
Hyperic HQ 4.6.6 安装问题报错

Loading install configuration... Install configuration loaded. Preparing to install... Validating server install configuration... Checking server webapp port... Checking server ......

Devil_kobe
2014/07/30
447
1
java程序如果打包为exe安装程序

下载了jitsi的源码,编译通过,想打包为exe或者msi的安装程序,按下面的教程做的,总是不成功,求大侠指导 http://blog.csdn.net/nomousewch/article/details/7012392...

qhboy
2014/01/10
312
2
Apache Syncope 1.2.0 发布,引入密码重置功能

Apache Syncope 1.2.0 发布,该版本引入了密码重置功能,主要改进包括: Sub-task [SYNCOPE-529] - Install through HTTP proxy [SYNCOPE-552] - Provide Activiti modeler installation fe......

oschina
2014/10/08
1K
0
编译通过,运行ClassNotFoundException,什么原因

我在对jitsi进行二次开发,整在做一个通过网络导入联系人的功能,但是保class not found异常,编译可以通过,这是原因啊 Caused by: java.lang.ClassNotFoundException: javax.xml.parsers.D...

qhboy
2014/01/21
2.2K
8
关于xgcalendar的技术问题

@假正经哥哥 你好,想跟你请教个问题:你好,我是一个大四实习生,我目前所在公司让我们几个人一起在Jitsi上面做一个日程管理的插件,刚好网上有找到您开发的xgcalendar,感觉非常不错,可惜...

曾小姿
2013/10/06
66
1

没有更多内容

加载失败,请刷新页面

加载更多

下一页

Java基础——异常

声明:本栏目所使用的素材都是凯哥学堂VIP学员所写,学员有权匿名,对文章有最终解释权;凯哥学堂旨在促进VIP学员互相学习的基础上公开笔记。 异常处理: 可以挖很多个陷阱,但是不要都是一样...

凯哥学堂
26分钟前
0
0
180723-Quick-Task 动态脚本支持框架之结构设计篇

文章链接:https://liuyueyi.github.io/hexblog/2018/07/23/180723-Quick-Task-动态脚本支持框架之结构设计篇/ Quick-Task 动态脚本支持框架之结构设计篇 相关博文: 180702-QuickTask动态脚本...

小灰灰Blog
29分钟前
0
0
SBT 常用开发技巧

SBT 一直以来都是 Scala 开发者不可言说的痛,最主要的原因就是官方文档维护质量较差,没有经过系统的、循序渐进式的整理,导致初学者入门门槛较高。虽然也有其它构建工具可以选择(例如 Mill...

joymufeng
34分钟前
0
0
HBase in Practice - 性能、监控及问题解决

李钰(社区ID:Yu Li),阿里巴巴计算平台事业部高级技术专家,HBase开源社区PMC&committer。开源技术爱好者,主要关注分布式系统设计、大数据基础平台建设等领域。连续4年基于HBase/HDFS设计和...

中国HBase技术社区
35分钟前
1
0
ES18-JAVA API 批量操作

1.批量查询 Multi Get API public static void multiGet() {// 批量查询MultiGetResponse response = getClient().prepareMultiGet().add("my_person", "my_index", "1")// 查......

贾峰uk
39分钟前
0
0
SpringBoot2.0使用health

1,引入actuator <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency> 2,application.properties ......

暗中观察
46分钟前
0
0
阿里巴巴Java开发规约

###编程规约 命名风格 【强制】代码中的命名均不能以下划线或美元符号开始,也不能以下划线或美元符号结束 【强制】代码中的命名严禁使用拼音与英文混合的方式,更不允许直接使用中文的方式。...

简心
51分钟前
0
0
如何用TypeScript来创建一个简单的Web应用

转载地址 如何用TypeScript来创建一个简单的Web应用 安装TypeScript 获取TypeScript工具的方式: 通过npm(Node.js包管理器) npm install -g typescript 构建你的第一个TypeScript文件 创建...

durban
55分钟前
0
0
分享好友,朋友圈自定义分享链接无效

这个问题是微信6.5.6版本以后,修改了分享规则:分享的连接必须在公众号后台设定的js安全域名内

LM_Mike
今天
0
0
2018年7月23日课程

一、LVS-DR介绍 director分配请求到不同的real server。real server 处理请求后直接回应给用户,这样director负载均衡器仅处理客户机与服务器的一半连接。负载均衡器仅处理一半的连接,避免了...

人在艹木中
今天
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部