Unik Documentation
1 Command Line Parameters List
1.1 -folder
This parameter to be used for run your app from a local folder with qmls files.
Require: 2 parameters
Issue: unik.exe -folder=[local-qml-folder-location]
Example: For run the main.qml and others qml files from a local folder, this command line load all qml files from the dir location.
Run: unik.exe -folder=C:/remoteFolder
Require: 2 parameters
Issue: unik.exe -folder=[local-qml-folder-location]
Example: For run the main.qml and others qml files from a local folder, this command line load all qml files from the dir location.
Run: unik.exe -folder=C:/remoteFolder
1.2 -remoteFolder in reparation
This parameter to be used for download and make a qml folder files and run your app downloaded if main.qml exist into this remote folder.Require: 3 parameters
Issue: unik.exe -remoteFolder [remote-qml-folder-location] [string array files split by "main.qml|file2.qml|file3.qml"] [local-qml-folder-location-to-make-if-not-exist]
Example: For run the main.qml and others qml files from a remote folder, this command line download all qml files to the dir destination.
Run: unik.exe -remoteFolder=http://unikdev.net/unik/unik-bot-1 -fileList="main.qml|MyQmlItem.qml|logo.png|README.md" -folderTo="C:/remoteFolder"
The -fileList parameter need a string list separated with the "|" character between file names. All files of the string list will downloaded.
The -folderTo parameter is not necessary. If this parameter is not seted or defined, Unik will download all file list into a temp forder.
Note: This parameters is will implemented for a next version of unik 4.04 or later.
Note: If you use only one parameter, for example -remoteFolder=http://XXXXX:xxx without -fileList, else Unik will intent download the http://XXXXX:xxx/main.qml. The main.qml every is required normaly.
1.3 -git
This parameter to be used for run your app downloading a git project.
Require: 1 parameters
Issue: unik.exe -git=[url of git project]
Example: For run the semitimes-m1 from Github.com. Semitimes-M1 is a Qml Clock developed by @nextsigner. More info https://github.com/nextsigner/semitimes-m1.
Run: unik.exe -git=https://github.com/nextsigner/semitimes-m1.git
Require: 1 parameters
Issue: unik.exe -git=[url of git project]
Example: For run the semitimes-m1 from Github.com. Semitimes-M1 is a Qml Clock developed by @nextsigner. More info https://github.com/nextsigner/semitimes-m1.
Run: unik.exe -git=https://github.com/nextsigner/semitimes-m1.git
Set unik Configuration
Note: When the cfg.json file not exists unik run the unik-laucher loading all *.ukl files from the unik work space.unik when is starting load a config file. The config file is config.json and file location is [system documents][unik documents folder]/cfg.json. Example: /home/nextsigner/Documents/unik/config.json
Note: This file cfg.json change the unik start state while this file exists. You can start the unik application on normal or standar mode cleaning the cfg.json file.
Set cfg.json for -folder
Json Struct:{"arg0":"-folder=[folder]"}Json Example:{"arg":"-folder=/home/nextsigner/Desktop/app"}
Set cfg.json for -remoteFolder
Json Struct:{"arg0":"-remoteFolder=[remote folder]", "arg1": "[source code file list]", "arg2":"[local folder to save remote files]"}Json Example:{"arg0":"-remoteFolder=http://yourdomain.com/qml-app-folder/", "arg1": "main.qml|Form.qml|View.qml", "arg2": "/home/nextsigner/Desktop/my-remote-app"}
Set UKL file links for launch apps
A UKL file is a link for launch a Unik Qml Application. You can make files with ukl extension for launch you app from the unik-launcher. The ukl file should has your unik params separated with space character. For example its a ukl content for launch the ritme qml app.-git=https://github.com/nextsigner/ritme.git -folder=/home/nextsigner/Documentos/unik/ritme
This ukl file when is launched from the unik-launcher, first update ritme from github then run ritme from the ritme folder.
2 Unik Functions
This function data description and all detaills, will published with a correctly way when @nextsigner will have free time or is receibing any colaboration or donation. This project does not have a lot help. After the publication of de unik qml engine in release version, this documentarion will be updated.
void setUnikLog(QString l);
void ukClose(QQuickCloseEvent *close);
void engineExited(int n);
void engineQuited(QObject*);
//Funciones del OS
int getScreenWidth();
//Funciones del Sistema Unik
void setWorkSpace(QString ws);
void definirCarpetaTrabajo(QString et);
bool folderToUpk(QString folder, QString upkName, QString user, QString key, QString folderDestination);
bool carpetaAUpk(QString carpeta, QString nombreUpk, QString usuario, QString clave, QString carpetaDestino);
bool downloadRemoteFolder(QString urlFolder, QString list, QString dirDestination);
bool mkUpk(QByteArray folder, QByteArray upkName, QByteArray user, QByteArray key, QByteArray folderDestination);
bool upkToFolder(QByteArray upk, QByteArray user, QByteArray key, QByteArray folderDestination);
bool isFree(QString upk);
bool loadUpk(QString upkLocation, bool closeAppLauncher, QString user, QString key);
bool downloadGit(QByteArray url, QByteArray localFolder);
void restartApp();
void restartApp(QString args);
bool run(QString commandLine);
void salidaRun();
void salidaRunError();
void finalizaRun(int e);
void log(QByteArray d);
void sleep(int ms);
QString getPath(int path);
0= Return the App Executable File Name
1= Return the App Executable Path Location
2= Return the Location of Temp OS Folder
3= Return the Location of Documents OS Folder
4= Return the Location of App Data Folder
5= Return the App Current Folder / Working Directory / Current Path
6= Return the Current Desktop OS Folder
7= Return the Current Home OS Folder
QString encData(QByteArray d, QString user, QString key);
QString decData(QByteArray d0, QString user, QString key);
QQuickWindow *mainWindow(int n);
void setProperty(const QString name, const QVariant &value);
QVariant getProperty(const QString name);
bool isRPI();
//Funciones Network
QByteArray getHttpFile(QByteArray url);
void httpReadyRead();
bool downloadZipFile(QByteArray url, QByteArray ubicacion);
void sendFile(QString file, QString phpReceiver);
void uploadProgress(qint64 bytesSend, qint64 bytesTotal);
void downloadProgress(qint64 bytesSend, qint64 bytesTotal);
void sendFinished();
//Funciones Sqlite
bool sqliteInit(QString pathName);
bool sqlQuery(QString query);
QList<QObject *> getSqlData(QString query);
bool mysqlInit(QString hostName, QString dataBaseName, QString userName, QString password, int firtOrSecondDB);
void setMySqlDatabase(QString databaseName, int firtOrSecondDB);
//Funciones de Sistema de Archivos
void cd(QString folder);
void deleteFile(QByteArray f);
bool setFile(QByteArray n, QByteArray d);
QString getFile(QByteArray n);
bool mkdir(const QString path);
QString getUpkTempPath();
QString getUpksLocalPath();
bool fileExist(QByteArray fileName);
bool createLink(QString execString, QString arguments, QString lnkLocationFileName, QString description, QString workingDirectory);
//Funciones Varias
QString toHtmlEscaped(QString htmlCode);
void crearPDF(QString captura, QString url, int orientacion);
int frameHeight(QObject *window);
int frameWidth(QObject *window);
No hay comentarios:
Publicar un comentario