Search Unity

Setting up the Tizen CLI Environment

Discussion in 'Tizen' started by moonjump, Aug 25, 2016.

  1. moonjump

    moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,293
    I am having trouble with setting up the Tizen CLI Environment.

    On OS X I type the following into Terminal:

    Code (CSharp):
    1. /tizensdk-path/tools/ide/bin/tizen.sh cli-config default.profiles.path=/Users/andycowe/workspace/.metadata/.plugins/org.tizen.common.sign/profiles.xml
    And Terminal replies with:

    Code (CSharp):
    1. -bash: /tizensdk-path/tools/ide/bin/tizen.sh: No such file or directory
    I am not used to using Terminal, so am I doing it wrong? Or do I have a previous step wrong?
     
  2. moonjump

    moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,293
    No luck with that, so trying a different tack.

    I have tried just doing a build in Unity.

    I get halfway through and "Building Player" says it is at the "Postprocessing Player" stage with the progress bar at halfway. It brings up a Finder window open at my user folder. I see folders including "tizen-sdk", "tizen-sdk-data" and "workspace". What is this window for (it isn't labelled, nor is there a dialogue box)? What do I set it to?

    I first did this on an external drive that I have set up for testing new version of OS X, Unity, etc. On there I selected "workspace" and it gave me a message "Default profile path is not set in the Tizen CLI configuration.". I tried again and it gave the message again, but with no chance to change the location.

    Now I have updated my Mac itself so that I can set it again, but I am reluctant to set a location if it is wrong and I cannot change it. Can anyone help please?

    EDIT: Latest try at setting up the Tizen CLI Environment. Any idea?

    Code (CSharp):
    1. AC15:~ andycowe$ cd tizen-sdk
    2. AC15:tizen-sdk andycowe$ cd tools
    3. AC15:tools andycowe$ cd ide
    4. AC15:ide andycowe$ cd bin
    5. AC15:bin andycowe$ tizen.sh cli-config default.profiles.path = /users/andycowe/workspace/metadata/
    6. -bash: tizen.sh: command not found
     
    Last edited: Aug 25, 2016
  3. moonjump

    moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,293
    EDIT AGAIN: Success on one level, I have got the Tizen CLI Environment set up. I did "cd workspace", then ran the full line from the guide with the correct paths for both tizensdk-path and workspace. And got this:

    Code (CSharp):
    1. -----------------------------------------------------
    2. Starting cli-config
    3. -----------------------------------------------------
    4.  
    5. Setting configuration is succeeded....
    6.  
    7. -----------------------------------------------------
    8. Finished cli-config
    But I am still stuck on the Finder window that appears. "workspace" appear to be empty, so that is one option out.

    EDIT: I must be tired, I pressed Reply instead of Edit and didn't notice, sorry.

    EDIT AGAIN: Really tired, I never noticed in my original line I had left in org.tizen.common.sign and to EDIT that again, it is under org.tizen.common.sign

    I have now changed this (and back again). When selecting different things in the Finder window halfway through the Unity build it would keep resetting, but then accepted the tizen-sdk folder. It is no longer asking for a folder, so I cannot change it.

    I'm now getting the following error (trying different combinations of Tizen CLI Environment set ups has made no difference):

    Code (CSharp):
    1. UnityException: Signing failure!
    2. Profiles path in Tizen CLI configuration does not exist.
     
    Last edited: Aug 25, 2016
  4. moonjump

    moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,293
    So latest (separate message for clarity):

    I have tried lots of different options. I don't know if they have cluttered the cli-config.

    Half way through a Build in Unity, I get an error (it had previously had a Finder window appear without any message as it why it was there. I couldn't select anything, and eventually it allowed me to select tizen-sdk, it now doesn't ask and gives me no option to change it).

    The error has a comment before it:
    Code (CSharp):
    1. /Users/andycowe/tizen-sdk/tools/ide/bin/tizen.sh  cli-config -l
    2. -----------------------------------------------------
    3. Starting cli-config
    4. -----------------------------------------------------
    5.  
    6. ShootStormSurvival.profiles.path=/AC15hd/Users/andycowe/workspace/.metadata/.plugins/org.tizen.common.sign/profiles.xml
    7. default.build.architecture=x86
    8. default.build.compiler=llvm
    9. default.build.configuration=Debug
    10. default.profiles.path=/AC15hd/Users/andycowe/workspace/.metadata/.plugins/org.tizen.common.sign/profiles.xml
    11. default.sdb.timeout=60000
    12. sst.profiles.path=/AC15hd/Users/andycowe/workspace/.metadata/.plugins/org.tizen.common.sign/profiles.xml
    13. -----------------------------------------------------
    14. Finished cli-config
    And is followed by the error:
    Code (CSharp):
    1. UnityException: Signing failure!
    2. Profiles path in Tizen CLI configuration does not exist.
    3. UnityEditor.Tizen.TizenUtilities.ShowErrDlgAndThrow (System.String title, System.String message, System.Exception ex) (at /Users/builduser/buildslave/unity/build/PlatformDependent/TizenPlayer/Extensions/Managed/TizenUtilities.cs:64)
    4. UnityEditor.Tizen.TizenUtilities.ShowErrDlgAndThrow (System.String title, System.String message) (at /Users/builduser/buildslave/unity/build/PlatformDependent/TizenPlayer/Extensions/Managed/TizenUtilities.cs:58)
    5. UnityEditor.Tizen.TizenUtilities.ValidateSigningProfile (System.String stagingArea) (at /Users/builduser/buildslave/unity/build/PlatformDependent/TizenPlayer/Extensions/Managed/TizenUtilities.cs:114)
    6. UnityEditor.Tizen.PostProcessTizenPlayer.PostProcess (BuildTarget target, System.String stagingAreaDataUpperCase, System.String stagingArea, System.String stagingAreaDataManaged, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options) (at /Users/builduser/buildslave/unity/build/PlatformDependent/TizenPlayer/Extensions/Managed/BuildPostProcess.cs:90)
    7. UnityEditor.Tizen.TizenBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/TizenPlayer/Extensions/Managed/ExtensionModule.cs:48)
    8. UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:176)
    9. UnityEditor.HostView:OnGUI()
    I have multiple profiles, I'm not sure which is right, or if any of them are. The path does lead to a profiles.xml with the following content:
    Code (CSharp):
    1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    2. <profiles version="3.0">
    3. <profile name="ShootStormSurvival">
    4. <profileitem ca="" distributor="0" key="/Users/andycowe/tizen-sdk-data/keystore/ShootStormSurvival/author.p12" password="Ivu/SZOHtLw/LMWcnlWC0w==" rootca=""/>
    5. <profileitem ca="" distributor="1" key="/Users/andycowe/tizen-sdk-data/keystore/ShootStormSurvival/distributor.p12" password="Ivu/SZOHtLw/LMWcnlWC0w==" rootca=""/>
    6. </profile>
    7. <profile name="sst">
    8. <profileitem ca="" distributor="0" key="/Users/andycowe/tizen-sdk-data/keystore/sst/author.p12" password="Ivu/SZOHtLw/LMWcnlWC0w==" rootca=""/>
    9. <profileitem ca="" distributor="1" key="/Users/andycowe/tizen-sdk-data/keystore/sst/distributor.p12" password="Ivu/SZOHtLw/LMWcnlWC0w==" rootca=""/>
    10. </profile>
    11. </profiles>
    Any suggestions are most welcome.

    EDIT: Set up a brand new installation of OS X 10.11.6 El Capitan (as were the other installations), using Unity 5.4.0f3 and Tizen SDK Version 2.4.0_Rev8 (all same again). Created a Signing Certificate and set up the Tizen CLI Environment. Still the same problem: "UnityException: Signing failure! Profiles path in Tizen CLI configuration does not exist." Everything worked first time until then, so I haven't created any multiple configurations or anything. I am totally lost.
     
    Last edited: Aug 25, 2016
  5. greasedlightning

    greasedlightning

    Official Samsung Employee

    Joined:
    Aug 26, 2016
    Posts:
    5
    Hi,

    Could you please check the profile path by $tizen cli-confil –l

    Profile path shown is

    ShootStormSurvival.profiles.path=/AC15hd/Users/andycowe/workspace/.metadata/.plugins/org.tizen.common.sign/profiles.xml

    I am not sure if /AC15hd is needed.


    Secondly, could you try directly package using

    tizen package -t tpk --sign sst -- ${PathofProject}/Debug/


    If you are getting exception like below, you would need to set default.profile.path


    Signing... java.io.FileNotFoundException: ...tizen-sdk-data/keystore/profiles.xml
     
    moonjump likes this.
  6. moonjump

    moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,293
    Thank you for replying greasedlightning.

    I am getting "tizen: command not found" for both those first 2 commands. Does that tell you anything?

    I used /AC15hd as I had to different drives with OS X on, I specified which drive to make sure I was getting the right one It didn't seem to make a difference if I added that bit or not.

    I am totally new to Tizen, could you explain more about setting default.profile.path?
     
  7. greasedlightning

    greasedlightning

    Official Samsung Employee

    Joined:
    Aug 26, 2016
    Posts:
    5
    Seems like a path issue, Could you please confirm path environment variable in the command line and check if Tizen binary is in the path?
    If not in path, please add path of Tizen binary into your path environment variable.
     
    moonjump likes this.
  8. moonjump

    moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,293
    Sorry, I am struggling to understand what you are talking about. What Tizen binary? Where do I find the path environment variable?
     
  9. greasedlightning

    greasedlightning

    Official Samsung Employee

    Joined:
    Aug 26, 2016
    Posts:
    5
    Could you try
    export PATH=$PATH:/tizensdk-path/tools/ide/bin/

    Add your Tizen SDK path in the above command.

    you can then try executing

    tizen package -t tpk --sign sst -- ${PathofProject}/Debug/

    Hope this would resolve Tizen: command not found issue
     
    moonjump likes this.
  10. moonjump

    moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,293
    Thank you again greasedlightning.

    I have done both those lines, and they appeared to work, but I still cannot build my project in Unity, I get the same error: "UnityException: Signing failure! Profiles path in Tizen CLI configuration does not exist."

    EDIT: One thing I forgot to mention. I have not used a Tizen device. I just got the DUID of a device from a Samsung test site so that I could create a Signing Certificate. I would be surprised if I have to build to a device to create a tpk file, but I thought I should mention it anyway.
     
    Last edited: Aug 31, 2016
  11. GlobalTechApps

    GlobalTechApps

    Official Samsung Employee

    Joined:
    Sep 1, 2016
    Posts:
    4
    Hi,
    I feel there shouldn't be multiple profiles in profiles.xml file.
    Please try to create a new workspace and create a new signing certificate for that workspace. (Open the Tizen IDE with newly created workspace and create the signing certificate). Then setup the CLI config. Only the default profile path has to be set. Check this link for setting up CLI config https://docs.unity3d.com/Manual/tizen-setup.html
    Check whether CLI config is set correctly or not. For this enter following cmd in the terminal
    /Users/andycowe/tizen-sdk/tools/ide/bin/tizen.sh cli-config -l
    This lists all the defaults set, check whether default.profiles.path correctly points to the profiles.xml in the newly created workspace.
    Then goto Unity IDE, here first check whether tizen-sdk path is correctly or not. For this, goto Unity IDE->Edit->Preferences->External Tools here check whether Tizen sdk path is correctly pointed to tizen-sdk
    Then while building for Tizen specify the Signing profile name in the Publishing settings. For this, in the Unity IDE->File->Build Settings->Select Tizen->Player settings->Publishing settings(in player settings panel)->Enter the signing profile name(profile name entered while creating the signing certificate from the Tizen IDE)->Build
     
    moonjump likes this.
  12. moonjump

    moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,293
    Thank you for all the help (and to greasedlightning). I had set up a new installation of OS X on an external drive so that I could start fresh. I had done all the steps you suggested (except the CLI check).

    But I set up another installation to try fresh again and noticed something when installing the Tizen SDK. There was a message about rebooting after installation as some components might not be working yet. I did that this time, and followed your notes carefully as well as the Tizen_Porting_Guides.pdf. It worked. Thank you again.
     
  13. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    540
    Hi,

    I am trying to pass the Validation at Tizen Store with my Unity game,
    I can compile and test in the emulator and is fine.
    I can build for mobile and this is the config log (Shouldn't be Release instead Debug ?)

    /Users/master/tizen-sdk/tools/ide/bin/tizen.sh cli-config -l
    -----------------------------------------------------
    Starting cli-config
    -----------------------------------------------------

    default.build.architecture=x86
    default.build.compiler=llvm
    default.build.configuration=Debug
    default.profiles.path=/Users/master/tizenworkspace/.metadata/.plugins/org.tizen.common.sign/profiles.xml
    default.sdb.timeout=60000
    -----------------------------------------------------
    Finished cli-config


    This is the compile log (ripped the middle part with files)

    Initialize... OK
    Copying files... OK
    Signing... OK

    adding: shared/res/data/unity default resources (in=-1) (file)
    adding: shared/trusted/ (in=0) (directory)
    adding: signature1.xml (in=-1) (file)
    adding: tizen-manifest.xml (in=-1) (file)
    Zipping... OK

    I unchecked "development build" in Unity build settings.
    The app fails validation because: "Application do not execute"
    I'm stuck. Can you help with this greasedlightning?

     
  14. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    811
    issues abound as well