sábado, 3 de febrero de 2018

unik documentation

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

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 "main.qml" "C:/remoteFolder"
Note: This parameters is will implemented for a next version of unik 1.49

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

Set unik Configuration

unik when is starting load a config file. The config file is config.json and file location is [system documents][unik documents folder]/config.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 config.json for -folder

Json Struct:{"mode":"-folder", "arg1":"[local folder]"}
Json Example:{"mode":"-folder", "arg1":"/home/nextsigner/Desktop/app"}

Set config.json for -remoteFolder

Json Struct:{"mode":"-remoteFolder", "arg1":"[remote folder]", "arg2": "[source code file list]", "arg3":"[local folder to save remote files]"}
Json Example:{"mode":"-remoteFolder", "arg1":"http://yourdomain.com/qml-app-folder/", "arg2": "main.qml|Form.qml|View.qml", "arg3": "/home/nextsigner/Desktop/my-remote-app"}

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

Entrada destacada

Para Desarrollo de Apps Android recomendamos Framework Qt

Como todos sabemos, este universo de la informàtica va en constante expansiòn, a veces a una velocidad que nos supera. Por momentos es difìc...