Skip to content
Snippets Groups Projects
Commit 9ee56be1 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

Update github upload script for ubuntu build

parent e1f4b9b0
No related branches found
No related tags found
No related merge requests found
## Building Cesium for Ubuntu
## Ubuntu Builds
Ionic allow to build native unbuntu application. Using the `click` tool, and the Cordova `ubuntu` platform.
Cesium can be build as desktop application for Ubuntu, or as App on Ubuntu phone. Such builds use cross-architecture [click targets](https://developer.ubuntu.com/en/phone/apps/sdk/tutorials/click-targets-and-device-kits/) and the specific Apache Cordova platform `ubuntu`.
## Install Ubuntu SDK
Source documentation [here](https://developer.ubuntu.com/en/phone/platform/sdk/installing-the-sdk/) and [here](https://cordova.apache.org/docs/en/latest/guide/platforms/ubuntu/index.html)
Install SDK :
Install the SDK :
```bash
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
......@@ -14,18 +14,18 @@ sudo apt update
sudo apt install ubuntu-sdk
```
Install "click" packaging and dev tools:
Install "click" packaging tools:
```bash
sudo apt-get install click cmake libicu-dev pkg-config devscripts qtbase5-dev qtchooser qtdeclarative5-dev qtfeedback5-dev qtlocation5-dev qtmultimedia5-dev qtpim5-dev libqt5sensors5-dev qtsystems5-dev
```
> ou alternativement (à tester) :
> Alternatively (not tested):
> `sudo click chroot -a armhf -f ubuntu-sdk-15.04 install cmake libicu-dev:armhf pkg-config qtbase5-dev:armhf qtchooser qtdeclarative5-dev:armhf qtfeedback5-dev:armhf qtlocation5-dev:armhf qtmultimedia5-dev:armhf qtpim5-dev:armhf libqt5sensors5-dev:armhf qtsystems5-dev:armhf`
## Add Ubuntu platform to Ionic project
## Add Ubuntu platform to the Ionic project
```bash
cd cesium
......@@ -34,32 +34,37 @@ ionic platform add ubuntu
## Running Ubuntu SDK IDE (optional)
To be able to launch Ubuntu SDK IDE, make sure your user has the unix group 'lxd'.
To debug or configure the Ubuntu builds easily, you can use the Ubuntu SDK IDE.
`sudo usermod -a -G lxd mon_user`
```bash
ubuntu-sdk-ide
```
> Note: Before launching the IDE, make sure your user has the unix group `lxd`. If not, simply execute this command:
> `sudo usermod -a -G lxd mon_user`
Then launch the command `ubuntu-sdk-ide &`
## Build Debian package (.deb)
Generate the `click` source code:
1. Generate the `click` source code:
```bash
cd cesium
ionic build ubuntu --release
```
Then build the DEB package:
2. Then build the project:
```bash
cd platforms/ubuntu/native/fr.duniter.cesium
cd platforms/ubuntu/native/cesium
debuild
```
This should generate `.deb` and description files.
> This step requires a valid GPG key, to sign the `.deb` file.
This should generate the `.deb` in directory `<cesium>/platforms/ubuntu/native`.
> This step will required a valid (and installed) GPG key, to sign the `.deb` file.
> The key should match the `author` field of the file `<cesium>/config.xml`.
> To be able to your own GPG key, change the author.
### Testing on an Ubuntu phone
......
......@@ -56,7 +56,7 @@ case "$1" in
curl -i -u $2 -H 'Content-Type: application/zip' -T $dirname/platforms/web/build/cesium-web-$current.zip $upload_url?name=cesium-v$current-web.zip
curl -i -u $2 -H 'Content-Type: application/zip' -T $dirname/platforms/firefoxos/build/package.zip $upload_url?name=cesium-v$current-firefoxos.zip
curl -i -u $2 -H 'Content-Type: application/vnd.android.package-archive' -T $dirname/platforms/android/build/outputs/apk/android-release.apk $upload_url?name=cesium-v$current-android.apk
curl -i -u $2 -H 'Content-Type: application/x-debian-package' -T $dirname/platforms/ubuntu/native/cesium_$current_amd64.deb $upload_url?name=cesium-v$current-ubuntu_x64.deb
curl -i -u $2 -H 'Content-Type: application/x-debian-package' -T $dirname/platforms/ubuntu/native/cesium_${current}_amd64.deb $upload_url?name=cesium-v${current}-ubuntu-amd64.deb
echo "Successfully uploading files"
release_url=`echo "$result" | grep -P "\"url\": \"[^\"]+" | grep -oP "https://api.github.com/repos/[a-z0-9/.]+"`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment