1. 程式人生 > >BigBlueButton-設置自己的開發環境

BigBlueButton-設置自己的開發環境

選中 取消 source 如果 hat 下載 自動 mkdir -p line

設置開發環境

歡迎來到BigBlueButton 1.1的BigBlueButton開發人員指南。

在設置開發環境之前,您需要安裝一個工作的BigBlueButton 1.1服務器(請參閱安裝步驟)。

概觀

BigBlueButton服務器是從與Ubuntu軟件包相對應的許多組件構建的。這些組件中的一些是

  • bbb-web - 實現BigBlueButton API和轉換文檔以進行演示
  • bbb-client - 在瀏覽器中加載的基於Flash的客戶端
  • bbb-apps - 使用Flash客戶端發送和接收郵件的服務器端應用程序
  • akka-bbb-apps - 處理服務器上會議狀態的服務器端應用程序
  • bbb-deskshare - 桌面共享服務器

您不需要了解每個組件的所有內容,但您需要了解整體架構以及組件的組合方式。

本文檔介紹如何使用現有的BigBlueButton 1.1服務器設置開發環境。一旦設置了環境,您將能夠對BigBlueButton源進行自定義更改,編譯源代碼,並替換服務器上的相應組件(例如更新BigBlueButton客戶端)。

本指南中的說明是逐步的,因此您可以了解修改組件所需的每個步驟。如果您在任何部分遇到問題或錯誤,請勿忽略錯誤。停止並仔細檢查您是否正確完成了該步驟。如果您無法確定錯誤的原因,請執行以下操作

  • 首先,使用Google搜索錯誤。bigbluebutton-dev中有
    大量信息已被Google索引。
  • 嘗試在不同的BigBlueButton服務器上執行相同的步驟。
  • 向bigbluebutton-dev發送一個問題,並說明問題和重現步驟。發布日誌和錯誤消息到Pastebin鏈接他們在你的帖子。

在你開始之前

本節確保您已準備好設置BigBlueButton開發環境。

你有一個工作BigBlueButton服務器

在BigBlueButton開始開發之前,您必須安裝BigBlueButton 1.1(請參閱安裝步驟)並確保其正常工作。確保在安裝期間沒有錯誤,並且您可以成功加入會話。

我們強調,開始設置開發環境之前,您的BigBlueButton服務器必須正常工作

確保您可以登錄,啟動會話,加入音頻橋,共享您的網絡攝像頭,並記錄和回放會話 - 所有這些都使用內置的API演示。

通過從工作的BigBlueButton服務器開始,您可以在默認打包的組件和您所做的任何修改之間進行切換。

例如,假設您修改BigBlueButton客戶端並且某些工作不正常(例如客戶端未完全加載),則可以輕松地切換回默認打包客戶端,並檢查其是否正常工作(從而排除任何環境問題這也可能阻止您修改的客戶端加載)。

另一個註意:這些說明假設您已bbb-demo安裝軟件包,因此您可以運行任何API演示來測試您的設置。

在Windows上開發

要從Windows開發BigBlueButton,請使用VMWare Player或VirtualBox創建一個Ubuntu 16.04 64位虛擬機(VM)。VMWare Player和VirtualBox的相關文檔將指導您設置新的16.04 64位虛擬機。

設置虛擬機時,如果您設置Ubuntu 16.04服務器或桌面,BigBlueButton無關緊要。如果您安裝桌面,您可以選擇使用圖形界面來編輯文件。運行虛擬機時,您將需要能夠運行64位虛擬機的主機操作系統

根特權

重要提示:確保創建另一個用戶,例如“firstuser”,以避免出現諸如Nginx 403 Forbidden錯誤或error-null-while-compiling-resource-bundles-under-linux-with-hudson之類的權限錯誤

不要以root用戶身份運行命令,只能在指示時使用sudo。

這些說明是為一個名為“firstuser”的帳戶編寫的,但它們將適用於具有root用戶執行命令權限的任何帳戶,例如

sudo ls

wget的

您將需要使用wget在這些說明中下載一些文件。如果服務器上沒有安裝,可以使用以下命令安裝軟件包

sudo apt-get install wget

有一個GitHub帳戶

BigBlueButton 源代碼位於GitHub上您需要一個GitHub帳戶。此外,您需要非常熟悉git的工作原理。具體來說,你需要知道如何

  • 克隆資源庫
  • 創建一個分支
  • 將更改推回到存儲庫

如果您以前沒有使用git,或者如果克隆分支提交的術語不熟悉,請立即停止。這些是git的基本概念,您需要在BigBlueButton嘗試開發之前才能勝任。要成為勝任,一個好的開始是免費的書GitHub幫助頁面

使用GitHub可以輕松地處理您自己的BigBlueButton源代碼,將您的更新存儲在GitHub帳戶的源文件中,使您可以輕松地為BigBlueButton做出貢獻

訂閱bigbluebutton-dev

我們建議您訂閱bigbluebutton-dev郵件列表,以跟蹤BigBlueButton的開發更新,並與其他開發人員協作。

設置開發環境

首先,您需要安裝核心開發工具。

sudo apt-get install git-core ant openjdk-8-jdk-headless

安裝JDK後,需要設置JAVA_HOME變量。編輯~/.profile(這裏我們使用vim編輯文件)

vi ~/.profile

在文件的末尾添加以下行

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

重新加載您的個人資料(這將在您下次登錄時自動發生,但我們將明確地在此處加載新的環境變量)。

source ~/.profile

做一個快速測試來確保設置JAVA_HOME。

$ echo $JAVA_HOME
/usr/lib/jvm/java-8-openjdk-amd64

接下來,您需要創建一個目錄來保存BigBlueButton開發所需的工具。

mkdir -p ~/dev/tools
cd ~/dev/tools

您需要使用wget下載一些工具,然後在以上目錄中解壓縮這些工具。

wget http://services.gradle.org/distributions/gradle-2.12-bin.zip
unzip gradle-2.12-bin.zip
ln -s gradle-2.12 gradle

wget https://github.com/grails/grails-core/releases/download/v2.5.2/grails-2.5.2.zip
unzip grails-2.5.2.zip
ln -s grails-2.5.2 grails

wget https://dl.bintray.com/sbt/native-packages/sbt/0.13.9/sbt-0.13.9.tgz
tar zxvf sbt-0.13.9.tgz

wget https://archive.apache.org/dist/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
tar zxvf apache-maven-3.3.3-bin.tar.gz
ln -s apache-maven-3.3.3 maven

在下一步中,您需要獲得Apache Flex 4.13.0 SDK包。

註意:即使我們正在下載Apache Flex 4.13.0 SDK,BigBlueButton也是使用Flex 3兼容模式開發和構建的。

首先,您需要從Apache鏡像站點下載SDK壓縮包,然後解壓縮。

wget https://archive.apache.org/dist/flex/4.13.0/binaries/apache-flex-sdk-4.13.0-bin.tar.gz
tar xvfz apache-flex-sdk-4.13.0-bin.tar.gz

一旦Apache Flex SDK被解包,您需要手動下載其中一個依賴項,因為該文件已從原始URL中移出。

wget --content-disposition https://github.com/swfobject/swfobject/archive/2.2.tar.gz
tar xvfz swfobject-2.2.tar.gz
cp -r swfobject-2.2/swfobject apache-flex-sdk-4.13.0-bin/templates/

現在我們已經完成了第一個依賴關系,我們需要下載Adobe Flex SDK。我們將手動執行此步驟,以防下載失敗(如果有的話,刪除不完整的文件並wget再次發出命令)。

cd apache-flex-sdk-4.13.0-bin/
mkdir -p in/
wget http://download.macromedia.com/pub/flex/sdk/builds/flex4.6/flex_sdk_4.6.0.23201B.zip -P in/

補充SDK下載後,我們可以使用其build.xml腳本自動下載其余的第三方工具。

ant -f frameworks/build.xml thirdparty-downloads

在Flex下載剩余的第三方工具後,您需要修改其權限。

find ~/dev/tools/apache-flex-sdk-4.13.0-bin -type d -exec chmod o+rx ‘{}‘ \;
chmod 755 ~/dev/tools/apache-flex-sdk-4.13.0-bin/bin/*
chmod -R +r ~/dev/tools/apache-flex-sdk-4.13.0-bin

接下來,創建一個縮寫名稱的鏈接目錄,以方便引用。

ln -s ~/dev/tools/apache-flex-sdk-4.13.0-bin ~/dev/tools/flex

設置Flex SDK環境的下一步是下載一個用於視頻的Flex庫。

mkdir -p ~/dev/tools/apache-flex-sdk-4.13.0-bin/frameworks/libs/player/11.2
cd ~/dev/tools/apache-flex-sdk-4.13.0-bin/frameworks/libs/player/11.2
wget http://fpdownload.macromedia.com/get/flashplayer/installers/archive/playerglobal/playerglobal11_2.swc
mv -f playerglobal11_2.swc playerglobal.swc

有一個工作的Flex SDK的最後一步是配置它與playerglobal 11.2

cd ~/dev/tools/apache-flex-sdk-4.13.0-bin
sed -i "s/11.1/11.2/g" frameworks/flex-config.xml
sed -i "s/<swf-version>14<\/swf-version>/<swf-version>15<\/swf-version>/g" frameworks/flex-config.xml
sed -i "s/{playerglobalHome}\/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}/libs\/player\/11.2/g" frameworks/flex-config.xml

安裝工具後,您需要添加一組環境變量.profile來訪問這些工具。

vi ~/.profile

將以下文本復制並粘貼到底部.profile


export GRAILS_HOME=$HOME/dev/tools/grails
export PATH=$PATH:$GRAILS_HOME/bin

export GRADLE_HOME=$HOME/dev/tools/gradle
export PATH=$PATH:$GRADLE_HOME/bin

export FLEX_HOME=$HOME/dev/tools/flex
export PATH=$PATH:$FLEX_HOME/bin

export SBT_HOME=$HOME/dev/tools/sbt
export PATH=$PATH:$SBT_HOME/bin

export MAVEN_HOME=:$HOME/dev/tools/maven
export PATH=$PATH:$MAVEN_HOME/bin

export ANT_OPTS="-Xmx512m -XX:MaxPermSize=512m"

重新加載您的個人資料以使用這些工具(這將在您下次登錄時自動發生)。

source ~/.profile

通過運行以下命令,檢查工具是否在您的路徑中。

$ mxmlc -version
Version 4.13.0 build 20140701

檢出來源

安裝開發工具後,我們將在以下目錄中克隆源:

/home/firstuser/dev

使用您的GitHub帳戶,執行以下操作

  1. 用叉子將BigBlueButton倉庫到你的GitHub帳戶
  2. 將您的存儲庫克隆到您的~/dev文件夾中

克隆後,您將具有以下目錄(確保bigbluebutton目錄在您的dev目錄中)。

/home/firstuser/dev/bigbluebutton

確認您正在主分支上工作。

cd /home/firstuser/dev/bigbluebutton
git status

你應該會看到

# On branch master
nothing to commit (working directory clean)

當您首次克隆BigBlueButton Git存儲庫時,git將默認放置在master分支上,這是BigBlueButton的最新代碼。1.1的發布分支是v1.1.x-release分支機構。

我們需要做的第一件事是將遠程存儲庫添加到本地克隆中。

git remote add upstream https://github.com/bigbluebutton/bigbluebutton.git

您現在可以檢查您的本地列表的跟蹤的存儲庫,以驗證添加是否有效。您應該看到至少兩個結果(來源和上遊)。名為“origin”的鏈接應鏈接到您的個人分支,是您克隆的資源庫。第二個結果“上遊”應鏈接到主要的BigBlueButton存儲庫。

git remote -v

之後,我們需要獲取最新版本的遠程存儲庫。

git fetch upstream

您現在可以創建一個新的分支來啟動您的工作,並將新的分支基於V1.1.x版本。

git checkout -b my-1.1-work upstream/v1.1.x-release

“結帳”開關分支

“-b”是在切換之前創建新分支的選項

“我的1.1工作”將是新分支的名稱

“upstream / v1.1.x-release”是您要啟動新分支的地方

你現在應該確認你在正確的分支。

git status

# On branch my-1.1-work
nothing to commit (working directory clean)

生產環境

好的。我們暫停一分鐘。

您已經設置了必要的工具並克隆了源代碼,但是如果要開始更改BigBlueButton代碼,則需要了解這些部件的交互方式。

以下是生產設置中不同組件的概述。開發中您想要更改配置設置以加載新的更改,而不是部署為生產的更改。

技術分享

您可以看到,nginx配置為從/var/www/bigbluebutton/client目錄加載客戶端,並將調用轉發到tomcat7上的web-api。在開發過程中,您需要告訴nginx從您的開發目錄中加載(/home/firstuser/dev/bigbluebutton

經過以下步驟後,您將最終完成以下設置。

技術分享

當您將bbb-apps,bbb-voice,bbb-video和bbb-deskshare的開發文件部署到時,Red5中運行的組件不會更改/usr/share/red5但是,請註意,客戶端和web-api是從不同的地方提供的。

客戶開發

隨著開發環境檢查和代碼克隆,我們準備開始開發!

本節將引導您對BigBlueButton客戶端進行簡單更改。

建立環境

The first thing you need to do is to copy the template config.xml file to the build directory for the client.

cd ~/dev/bigbluebutton/
cp bigbluebutton-client/resources/config.xml.template bigbluebutton-client/src/conf/config.xml

The config.xml file is one of the first files loaded by the BigBlueButton client when it connects to the server. The config.xml file tells BigBlueButton client how to load the remaining components (such as chat module, deskshare module, video conf module, etc.) and sets a number of configuration parameters for each component. The config.xmlspecifies the hostname (or IP address) for loading each component.

Let’s look at the first ten lines of the config.xml file you just copied.

$ head -n 10 bigbluebutton-client/src/conf/config.xml
<?xml version="1.0" ?>
<config>
    <localeversion suppressWarning="false">0.9.0</localeversion>
    <version>VERSION</version>
    <help url="http://HOST/help.html"/>
    <javaTest url="http://HOST/testjava.html"/>
    <porttest host="HOST" application="video/portTest" timeout="10000"/>    
    <bwMon server="HOST" application="video/bwTest"/>
    <application uri="rtmp://HOST/bigbluebutton" host="http://HOST/bigbluebutton/api/enter"/>
    <language userSelectionEnabled="true" />

You will see the word HOST where there would be configured hostname/IP address. You need to change the text HOST to the IP address (or hostname) of your BigBlueButton server. For example, if the IP address of your BigBlueButton server is 192.168.1.145, then using the following command you can easily substitute all occurrences of HOST with 192.168.1.145.

Note: Don’t copy-and-paste the following command as-is: the address 192.168.1.145 is likely not the correct IP address (or hostname) for your BigBlueButton server. Substitute the IP address (or hostname) for your BigBlueButton server.

sed -i s/HOST/192.168.1.145/g bigbluebutton-client/src/conf/config.xml

After you’ve done the above command, take a quick look at the file and ensure all instances of HOST are properly replaced with the IP address (or hostname) of your BigBlueButton server.

The config.xml is ultimately loaded by the BigBlueButton client when a user joins a session on the server.

Later on, when you deploy your modified client to the BigBlueButton server, there will be two BigBlueButton clients on your server: your modified BigBlueButton client and the default BigBlueButton packaged client (again, this is good as you can switch back and forth). However, the BigBlueButton configuration command sudo bbb-conf only modifies the packaged BigBlueButton client and you will need to mirror any changes to the packaged config.xml to the secondary client’s config.xml.

Next, you need to setup nginx to redirect calls to the client towards your development version. If you don’t already have an nginx client development file at /etc/bigbluebutton/nginx/client_dev, create one with the following command.

註意:如果不同,請務必將“firstuser”替換為您自己的用戶名。

echo "
location /client/BigBlueButton.html {
	root /home/firstuser/dev/bigbluebutton/bigbluebutton-client;
	index index.html index.htm;
	expires 1m;
}

# BigBlueButton Flash client.
location /client {
	root /home/firstuser/dev/bigbluebutton/bigbluebutton-client;
	index index.html index.htm;
}
" | sudo tee /etc/bigbluebutton/nginx/client_dev 

檢查內容以確保它在下面匹配。

同樣,請確保您更改/home/firstuser以匹配您的主目錄。

$ cat /etc/bigbluebutton/nginx/client_dev

location /client/BigBlueButton.html {
	root /home/firstuser/dev/bigbluebutton/bigbluebutton-client;
	index index.html index.htm;
	expires 1m;
}

# BigBlueButton Flash client.
location /client {
	root /home/firstuser/dev/bigbluebutton/bigbluebutton-client;
	index index.html index.htm;
}

這些規則告訴nginx在哪裏可以找到BigBlueButton客戶端。目前,nginx正在使用帶有默認BigBlueButton客戶端的規則,通過一個符號鏈接。

$ ls -al /etc/bigbluebutton/nginx/client.nginx
lrwxrwxrwx 1 root root 31 2013-05-05 15:44 /etc/bigbluebutton/nginx/client.nginx -> /etc/bigbluebutton/nginx/client

修改此符號鏈接,使其指向您的BigBlueButton客戶端的開發目錄。

sudo ln -f -s /etc/bigbluebutton/nginx/client_dev /etc/bigbluebutton/nginx/client.nginx

檢查修改是否到位。

$ ls -al /etc/bigbluebutton/nginx/client.nginx
lrwxrwxrwx 1 root root 35 2013-05-05 21:07 /etc/bigbluebutton/nginx/client.nginx -> /etc/bigbluebutton/nginx/client_dev

現在我們需要重新啟動nginx,所以我們的更改生效。

$ sudo systemctl restart nginx
$ sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2017-01-15 22:43:31 UTC; 9s ago
  Process: 14264 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
  Process: 14266 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
  Process: 14265 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
 Main PID: 14267 (nginx)
    Tasks: 9
   Memory: 5.6M
      CPU: 37ms
   CGroup: /system.slice/nginx.service
           ├─14267 nginx: master process /usr/sbin/nginx -g daemon on; master_process on
           ├─14268 nginx: worker process
           ├─14269 nginx: worker process
           ├─14270 nginx: worker process
           ├─14271 nginx: worker process
           ├─14272 nginx: worker process
           ├─14273 nginx: worker process
           ├─14274 nginx: worker process
           └─14275 nginx: worker process

Jan 15 22:43:31 t4 systemd[1]: Starting A high performance web server and a reverse proxy server...
Jan 15 22:43:31 t4 systemd[1]: Started A high performance web server and a reverse proxy server.

現在,當您啟動BigBlueButton客戶端時,nginx將從您的開發目錄為客戶端提供服務。接下來,我們需要重建客戶端。

建立客戶端

Let’s now build the client. Note we’re going to build and run the client to make sure it works before making any changes to the source.

First, we’ll build the locales (language translation files). If you are not modifying the locales, you only need to do this once.

cd ~/dev/bigbluebutton/bigbluebutton-client
ant locales

This will take about 10 minutes (depending on the speed of your computer). Next, let’s build the client

ant

This will create a build of the BigBlueButton client in the /home/firstuser/dev/bigbluebutton/bigbluebutton-client/clientdirectory.

Note: The BigBlueButton server will cache the config.xml for a given meetingID. To ensure you load the new config.xml you must restart your BigBlueButton server after making a change to the config.xml.

上述說明很重要。很容易對您進行快速更改,config.xml並想知道為什麽在加載客戶端時不會反映更改。你需要重新啟動BigBlueButton

sudo bbb-conf --clean

之後,將您的瀏覽器指向您的BigBlueButton服務器並登錄到演示頁面。客戶端應該正常啟動

註意:您也可以使用重新啟動BigBlueButton sudo bbb-conf --restart,但它是一個好主意,--clean因為它會清除重新啟動之間的所有日誌文件,從而擦除以前的任何錯誤。

註意:在客戶端的底部,您會看到“VERSION”,但沒關系。當包裝完成時,通常會被最新版本號替換。如果您看到“VERSION”,這是很好的,因為BigBlueButton正在加載您自己的客戶端副本(而不是打包版本)。

如果你執行sudo bbb-conf --check,你會註意到它發出警告

** Potential problems described below **
# Warning: nginx is not serving the client from /var/www/bigbluebutton/.
# Instead, it‘s being served from
#
#    /home/firstuser/dev/bigbluebutton/bigbluebutton-client
#
# (This is OK if you have setup a development environment.)

這是很好的 - 這是另一個確認,BigBlueButton服務器正在為您的開發客戶端(而不是打包版本)提供服務。

做出改變

現在我們已經從開發環境成功地構建和加載了客戶端,讓我們對接口進行一個小的可見的更改。我們正在使用vi編輯客戶端,但當然可以使用任何Unix文本編輯器。

註意:如果您在Windows上使用虛擬機進行開發,您可能會更容易地設置Samba,以便您可以通過Windows資源管理器訪問您的文件並使用Windows編輯器。要設置Samba,請鍵入命令bbb-conf --setup-samba然後,您可以從Windows計算機瀏覽網絡並查找共享卷。一旦安裝在Windows(通常使用驅動器號,如d:或e :),您可以直接在Windows上使用編輯器訪問文件。

cd ~/dev/bigbluebutton/bigbluebutton-client
vi src/org/bigbluebutton/main/views/MainApplicationShell.mxml

一旦您MainApplicationShell.mxml打開,請轉到第680行,您會看到以下文字

<mx:Text htmlText="{ResourceUtil.getInstance().getString(‘bbb.mainshell.copyrightLabel2‘,[appVersion])}" id="copyrightLabel2"/>

插入文字‘ - BigBlueButton Rocks !!‘ 如下所示。

<mx:Text htmlText="{ResourceUtil.getInstance().getString(‘bbb.mainshell.copyrightLabel2‘,[appVersion])} -- BigBlueButton Rocks!!!" id="copyrightLabel2"/>

現在,重新生成BigBlueButton客戶端。

ant

完成後,使用客戶端加入演示會議。您將看到-- BigBlueButton Rocks!添加到版權行的消息

技術分享

如果沒有看到您的更改,請嘗試清除瀏覽器的緩存,然後重新加載客戶端使用Firefox也可能更容易,因為它很可能不會緩存這個。

切換回打包客戶端

要隨時切換回使用打包的BigBlueButton客戶端,您只需要更改nginx的符號鏈接,然後重新啟動BigBlueButton(再次,這將重新加載config.xml客戶端文件)。

sudo ln -s -f /etc/bigbluebutton/nginx/client /etc/bigbluebutton/nginx/client.nginx
sudo bbb-conf --clean

要切換回您的開發設置,只需重新創建符號鏈接並重新啟動nginx。

sudo ln -s -f /etc/bigbluebutton/nginx/client_dev /etc/bigbluebutton/nginx/client.nginx
sudo bbb-conf --clean

使用Flex / Flash Builder

這些步驟假設您的網絡(或虛擬機)中有一個本地BigBlueButton開發服務器。這些步驟將讓您在服務器上安裝Samba,讓您的Windows / Mac訪問文件系統直接進行代碼編輯。

不要在互聯網上的BigBlueButton服務器上安裝samba。相反,如果要使用Flex / Flash Builder,請首先在網絡(或虛擬機)上設置本地BigBlueButton服務器,然後在本地進行更改。更新本地BigBlueButton服務器後,將其復制到修改後的文件(並更新任何必要的配置更改)到遠程BigBlueButton服務器。

要在本地BigBlueButton服務器上使用Flash Builder開發客戶端(我們將本地服務器稱為BigBlueButton VM,但不一定是您要開發的虛擬機),請按照下列步驟操作:

  1. 在Windows / Mac機器上安裝Flash Builder。

  2. 在BigBlueButton VM上安裝samba(使用命令sudo bbb-conf --setup-samba)並按照本文檔前面所述安裝VM驅動器。

  3. 在Flash Builder中,轉到文件 - > 導入 - > Flash Builder項目導入項目

    1. 選擇項目文件夾電臺

    2. 單擊瀏覽並在BigBlueButton VM中選擇bigbluebutton-client目錄。例如W:\ dev \ source \ bigbluebutton \ bigbluebutton-client

    3. 單擊完成

  4. 從BigBlueButton VM,將Flex SDK從?/ dev / tools復制到Flash Builder SDK目錄中。您可以在下面的圖像上看到位置。然後,在Flash Builder中,單擊窗口 - > 首選項 - > 安裝的Flex SDK添加您剛剛復制的SDK。

技術分享

  1. 右鍵單擊項目,轉到屬性 - > Flex編譯器,然後將Flex版本更改為4.13。確保Flash Player特定版本設置為至少11.2.0。另外,檢查Flex 3兼容模式選項(BigBlueButton客戶端使用Flex 3組件)。單擊應用

技術分享

  1. 右鍵單擊項目,單擊屬性 - > Flex構建路徑單擊僅MX組件集。確保庫路徑中存在libs目錄

技術分享

使用Flash Builder調試

首先我們將設置我們的Flash Builder項目進行調試。

  1. 右鍵單擊該項目,轉到Debug As - > Debug Configurations ...。

  2. 右鍵單擊Web應用程序 - > 新建

  3. 確保BigBlueButton客戶端在項目部分,src / BigBlueButton.mxml在應用程序文件中

  4. 取消選擇使用默認值並將路徑更改為about:blank

  5. 選擇應用關閉

Flash Builder現在設置為與遠程運行的客戶機(即,在您的VM上)進行調試。請務必註意,您仍然必須使用ant虛擬機構建客戶端,因為Flash Builder不會構建完整的客戶端。

在您能夠進行調試之前,您必須安裝Firefox並安裝適用於Firefox的Flash Player 調試版本

要開始調試:

  1. 開始一個BigBlueButton會話。

  2. 在Flash Builder中,打開Debug Configurations ...,選擇您先前創建的配置,選擇Debug

  3. 返回Firefox並右鍵單擊Flash內容,選擇Debugger,選擇Localhost

  4. 在Flash Builder中,等待發射進度達到50%以上

  5. 返回Firefox並選擇連接

現在應該調試器連接,您應該在Flash Builder控制臺中看到輸出,並且斷點將激活。步驟3-5的替代方法是等待進度達到50%以上,然後在Firefox中重新加載BigBlueButton.html頁面。當Flash內容加載時,調試器應自動連接。

如果您可以在Flash Builder控制臺中看到消息,但斷點不起作用,則需要確保Flash Builder中客戶端的版本與服務器上的版本相同。為此,請ant在服務器上完成客戶端的構建,並在Flash Builder中刷新項目(右鍵單擊項目 - > Refesh),然後再次運行調試器。有時調試器在刷新後仍然無法工作,您必須重新啟動Flash Builder才能再次運行。

從Transifex推出本地化

要從Transifex拉取本地化,請執行以下步驟

  1. 為Ubuntu安裝Transifex客戶端
sudo apt-get install python-pip -y
sudo pip install transifex-client
  1. 轉到語言環境文件夾
cd /home/firstuser/dev/bigbluebutton/bigbluebutton-client/locale 
  1. 初始化Transifex項目
tx init

# Insert your transifex user and password
  1. 設置BigBlueButton transifex資源
tx set --auto-remote https://www.transifex.com/projects/p/bigbluebutton/resource/bbbresourcesproperties/
  1. 編輯Transifex配置文件以過濾語言以匹配BBB存儲庫
vi .tx/config

file_filter = <lang>/bbbResources.properties 
  1. 從Transifex更新所有語言(僅更新執行命令的當前目錄中現有的語言)
tx pull -f
Pull all the languages from Transifex (download also languages which don‘t exist in the local directory where the command is executed, may download undesired language directories [lt, es_429])
tx pull -a --mode=onlytranslated
  1. 有時Transifex下載es_419而不是es_LA(拉丁美洲西班牙語),在這種情況下,我們需要手動更新es_LA與es_419中的內容
rm -r es_LA
cp es_419 es_LA
  1. 添加gitignore以忽略.tx文件夾或刪除隱藏的.tx文件夾
nano .gitignore
.tx

要麽

rm -r .tx
  1. 編譯檢查你沒有破壞任何東西
cd /home/firstuser/dev/bigbluebutton/bigbluebutton-client
ant locales

開發BBB客戶端檢查

首先,我們來瀏覽組件的源代碼

cd ~/dev/bigbluebutton/bbb-client-check

然後修改配置文件以將您的IP或域名替換為HOST。

sed -i s/HOST/<IP or domain name>/g resources/config.xml.template

接下來,我們來構建組件

ant

這將創建/home/firstuser/dev/bigbluebutton/bbb-client-check/check目錄中的bbb-client-check組件的構建

接下來,我們需要創建一個nginx文件,將呼叫重定向到您的開發bbb-client-check。

echo "
location /check {
	root /home/firstuser/dev/bigbluebutton/bbb-client-check;
	index index.html index.htm;
}
" | sudo tee /etc/bigbluebutton/nginx/check.nginx > /dev/null 2>&1

現在重新啟動nginx並測試配置:

sudo /etc/init.d/nginx restart
sudo nginx -t

此時您應該可以瀏覽瀏覽器中的檢查客戶頁面並使用它。(ex http://demo.bigbluebutton.org/check)

當您進行更改時,您將需要重新運行ant以重建模塊。

開發BBB-Web

首先,我們需要根據您的設置更新最新的bigbluebutton.properties文件。基本上,您將不得不更改URL和安全性鹽。如果你不知道你的鹽,跑吧sudo bbb-conf --salt

cd /home/firstuser/dev/bigbluebutton/

# Edit the file and change the values of bigbluebutton.web.serverURL and securitySalt. 
vi bigbluebutton-web/grails-app/conf/bigbluebutton.properties

現在,您需要讓用戶帳戶訪問上傳幻燈片到演示文稿目錄,並且還可以訪問寫入日誌文件。

sudo chmod -R ugo+rwx /var/bigbluebutton
sudo chmod -R ugo+rwx /var/log/bigbluebutton

現在,您需要創建將重定向到您的開發bbb-web的調用的nginx文件。

echo "
# Handle request to bbb-web running within Tomcat. This is for
# the BBB-API and Presentation.
location /bigbluebutton {
	proxy_pass http://127.0.0.1:8888;
	proxy_redirect default;
	proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;

	# Allow 30M uploaded presentation document.
	client_max_body_size 30m;
	client_body_buffer_size 128k;

	proxy_connect_timeout 90;
	proxy_send_timeout 90;
	proxy_read_timeout 90;

	proxy_buffer_size 4k;
	proxy_buffers 4 32k;
	proxy_busy_buffers_size 64k;
	proxy_temp_file_write_size 64k;

	include fastcgi_params;
}
" | sudo tee /etc/bigbluebutton/nginx/web_dev > /dev/null 2>&1

現在我們只需要創建一個鏈接,以確保請求被正確重定向,然後重新啟動nginx。

sudo ln -s -f /etc/bigbluebutton/nginx/web_dev /etc/bigbluebutton/nginx/web.nginx
sudo /etc/init.d/nginx restart

將以下內容添加到?/ .sbt / 0.13 / global.sbt中

resolvers += "Artima Maven Repository" at "http://repo.artima.com/releases"

構建bbb-common-web

cd ~/dev/bigbluebutton/bbb-common-web
sbt publish publishLocal

現在讓我們開始grapp webapp。

cd /home/firstuser/dev/bigbluebutton/bigbluebutton-web/

下載必需的庫。

gradle resolveDeps

告訴grails在8888端口上聽

grails -Dserver.port=8888 run-war

要麽

grails -reloading -Dserver.port=8888 run-app

如果您收到錯誤Could not resolve placeholder ‘apiVersion‘,請grails -Dserver.port=8888 run-war再次運行錯誤是grails沒有拿起“bigbluebutton.properties”第一次。

如果您可以加入演示會議,請再次測試。

以上命令將運行bbb-web的開發版本,但如果要部署自定義的bbb-web,則需要打包一個war文件。

grails war

這將創建一個名為bigbluebuttonv0.7dev.war的文件。該文件的版本號無關緊要,但您應該將war文件重命名為bigbluebutton.war。然後,您需要將存檔部署到tomcat。您可以通過簡單地將其復制到tomcat7 webapps目錄中來實現。

sudo cp target/bigbluebutton-0.9.0.war /var/lib/tomcat7/webapps/bigbluebutton.war

現在只需重新啟動tomcat。

systemctl restart tomcat7 

如果您按照上述指示更改了web.nginx的鏈接,則還需要將其還原到bbb-web的打包位置。

sudo ln -s -f /etc/bigbluebutton/nginx/web /etc/bigbluebutton/nginx/web.nginx
systemctl restart nginx

開發Red5應用程序

你需要做red5/webapps可寫。否則,當您嘗試部署到Red5時,您將收到權限錯誤。

sudo chmod -R 777 /usr/share/red5/webapps

開發BBB應用程序

在構建和部署bbb-apps之前,您需要確保red5服務已停止。

sudo systemctl stop red5

現在您可以編譯和部署bigbluebutton-apps。

cd /home/firstuser/dev/bigbluebutton/bigbluebutton-apps
gradle resolveDeps
gradle clean war deploy

最後,您可以再次啟動red5服務。

sudo systemctl start red5

開發BBB視頻

首先,你需要停止red5。

sudo systemctl stop red5

然後可以編譯和部署應用程序。

cd /home/firstuser/dev/bigbluebutton/bbb-video
gradle resolveDeps
gradle war deploy

最後,再次啟動red5。

sudo systemctl start red5 

開發Akka-Apps

首先你需要停止bbb-apps-akka服務。

sudo systemctl stop bbb-apps-akka 

然後可以手動運行應用程序。

cd /home/firstuser/dev/bigbluebutton/akka-bbb-apps
sbt clean
sbt run

開發Akka-FSESL

首先,您需要停止bbb-fsesl-akka服務。

sudo systemctl stop bbb-fsesl-akka

然後可以運行應用程序。

cd /home/firstuser/dev/bigbluebutton/akka-bbb-fsesl
sbt clean
sbt run

開發BBB通用消息

如果要修改現有消息或添加新消息,則需要重新構建bbb-common消息。

BBB公共消息被用作幾個BigBlueButton核心組件的依賴。當您更新它時,您將需要增加版本號並重新發布,以便其他核心組件拾取新版本的bbb-common-messages並開始使用它們。

例如:在文件中/home/firstuser/dev/bigbluebutton/bbb-common-message/build.sbt 更改version := "0.0.18"version := "0.0.19-SNAPSHOT"我們建議您將名稱保留為“... -SNAPSHOT”,直到您對更改感到滿意,並且您可以將bbb-common-messages發布到sonatype。還要暫時註釋推送到sonatype的代碼:

// publishTo := {
//   val nexus = "https://oss.sonatype.org/"
//   if (isSnapshot.value)
//     Some("snapshots" at nexus + "content/repositories/snapshots")
//   else
//     Some("releases"  at nexus + "service/local/staging/deploy/maven2")
// }

然後取消將代碼發布到本地的maven repo:

publishTo := Some(Resolver.file("file",  new File(Path.userHome.absolutePath+"/.m2/repository")))

保存文件。您現在可以編譯bbb-common-messages:

cd /home/firstuser/dev/bigbluebutton/bbb-common-message
sbt clean
sbt compile

一旦編譯成功完成,您可以在本地發布bbb-common-messages:

sbt publish
sbt publishLocal

更改組件akka-bbb-apps和akka-bbb-fsesl中所需的bbb-common-messages版本。在文件/home/firstuser/dev/bigbluebutton/akka-bbb-apps/build.sbt/home/firstuser/dev/bigbluebutton/akka-bbb-fsesl/build.sbt替代的行"org.bigbluebutton" % "bbb-common-message" % "0.0.18""org.bigbluebutton" % "bbb-common-message" % "0.0.19-SNAPSHOT"現在重新啟動兩個進程:

cd /home/firstuser/dev/bigbluebutton/akka-bbb-apps
sbt clean
sbt run

cd /home/firstuser/dev/bigbluebutton/akka-bbb-fsesl
sbt clean
sbt run

您正在使用更新的bbb公共消息。每當你對結果感到滿意,你可以從版本中刪除“-SNAPSHOT”。

開發BBB語音

首先,你需要停止red5。

sudo systemctl stop bbb-red5 

然後可以編譯和部署應用程序。

cd /home/firstuser/dev/bigbluebutton/bbb-voice
gradle resolveDeps
gradle war deploy

最後,再次啟動red5。

sudo systemctl start bbb-red5 

開發屏幕共享

有關如何編譯和簽名屏幕分享小程序的詳細信息,請參閱目錄中README文件bbb-screenshare

故障排除

連接到服務器

當BigBlueButton客戶端加載時,它運行了許多模塊:聊天,語音,桌面共享和演示。這些模塊中的每一個都連接到相應的BigBlueButton服務器組件。

每個連接的URL在config.xml中指定

為客戶端設置開發環境時,config.xmlBigBlueButton客戶端文件現在從中加載~/dev/bigbluebutton/bigbluebutton-client/client/conf/config.xml這意味著,默認所做的任何更改config.xml通過sudo bbb-conf --setip <hostname>不會影響到config.xml你的開發環境。因此,如果您更改BigBlueButton服務器的主機名或IP地址,則需要手動更改config.xml開發環境。

歡迎來到Nginx頁面

如果您收到“歡迎使用Nginx”頁面。檢查是否在nginx中啟用了bigbluebutton。您應該看到bigbluebutton/etc/nginx/sites-enabled

如果沒有,啟用它。

sudo ln -s /etc/nginx/sites-available/bigbluebutton /etc/nginx/sites-enabled/bigbluebutton

sudo /etc/init.d/nginx restart

舊翻譯

如果您在啟動客戶端時收到“舊翻譯”警告,請/var/www/bigbluebutton/client/conf/config.xml更改

<localeversion suppressWarning="false">0.71</localeversion>

<localeversion suppressWarning="false">0.9.0</localeversion>

警告:嘗試增加代碼緩存大小

如果在構建bbb-client時收到編譯器警告,例如

build-polling:
    [mxmlc] Loading configuration file /home/dwelch/dev/tools/flex-4.5.0.20967/frameworks/flex-config.xml
OpenJDK 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled.
OpenJDK 64-Bit Server VM warning: Try increasing the code cache size using -XX:ReservedCodeCacheSize=
    [mxmlc] /home/dwelch/dev/bigbluebutton/bigbluebutton-client/client/PollingModule.swf (232039 bytes)

添加以下內容 ~/.profile

export ANT_OPTS="-Xmx512m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=1024m"

然後使用該命令重新加載.profile source ~/.profile

暫停/重新啟動VM提交錯誤的日期

如果您正在開發使用虛擬機,並且暫停了虛擬機並稍後重新啟動,那麽虛擬機上的時間將不正確。錯誤的時間會影響您在GitHub中執行的任何提交。

為了確保您的虛擬機具有正確的時間,可以使用ntp進行安裝

sudo apt-get install ntp
sudo /etc/init.d/ntp restart

然後在從暫停狀態啟動VM後執行以下操作

sudo /etc/init.d/ntp restart

以上將重新同步您的時鐘。

使用Eclipse開發

這些說明假設您正在使用在Windows計算機上運行的VM進行開發。

設置Samba

bbb-conf --setup-samba 

現在將虛擬機映射為網絡驅動器。

對於每個項目,您需要生成Eclipse項目文件。因此,在bbb-app中,運行以下命令生成項目文件。

gradle eclipse

然後,您可以通過單擊File-> New-> Java Project將項目導入Eclipse。取消選中“使用默認位置”,然後瀏覽到要導入的項目。

©2017 BigBlueButton Inc. · 商標 · 許可證

BigBlueButton-設置自己的開發環境