This article shows how to build a sample application using command line tools. The sample application uses Tizen Sockets Extension APIs and is based on the url2file cURL demo.
Before you can build the sample application:
To build the sample application:
Download url2file.c.
Download CA certificates extracted from Mozilla:
curl -O https://curl.haxx.se/ca/cacert.pem
Compile the url2file.c demo:
emcc -o url2file.html -Os -s ENVIRONMENT_MAY_BE_TIZEN -s USE_CURL=1 --proxy-to-worker --preload-file cacert.pem url2file.c
-Os
-o url2file.html
-s ENVIRONMENT_MAY_BE_TIZEN
-s USE_CURL=1
--proxy-to-worker
main()
--preload-file cacert.pem
fopen(./cacert.pem)
Table 1: Compilation flags
-s USE_SSL=1
-s USE_CRYPTO=1
-s USE_ZLIB=1
Table 2: Implicitly enabled compilation flags
Further information regarding Emscripten build options can be found on Emscripten Compiler Frontend (emcc)
Download config.xml to the same directory where the demo was compiled.
http://tizen.org/privilege/internet
index.html
For more information regarding the config.xml file format, see Tizen Developers
Sign and pack the application using the Tizen CLI interface:
tizen package -t wgt -s <YOUR_CERTIFICATE_PROFILE_NAME> -- .
For instructions on creating a certificate profile, see Creating Certificates
For more information regarding the Tizen CLI interface, see Command Line Interface Commands
Set your device into developer mode as described in Target Device.
Connect to the device using SDB:
sdb connect <TV_IP>
For the SDB command and its options, see Connecting Devices over Smart Development Bridge.
List the connected devices to determine the device number:
sdb devices
Sample output (the device number is 0):
List of devices attached 192.168.13.2:26101 device 0
Install the application on the device:
tizen install -n url2file.wgt -t 0
-t 0
0
Run the application on the device:
tizen run -p url2file00.curl -t 0