unik documentation

Unik Documentation

1 Command Line Parameters List

1.1 -foldertoupk

This parameter to be used for make a upk file instaled into your unik documents folder and run unik with this upk.
Require: 4 parameters
Issue: unik.exe -foldertoupk [qml-folder-location] [any-app-id] [key]
Example: For make and run the main.qml and others qml files what exist into C:/my_folder_project/myapp/
Run: unik.exe -foldertoupk C:/my_folder_project/myapp/ v1001 ClientPayPass
Note: The user and key parameters are introduced into upk for a developer control and distribuition of the application.
Note: All unik free application has forever this pass: appid: unik-free key: free.

1.2 -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.3 -remoteFolder

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

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

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

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);


Entradas populares