Unik Documentation - nextsigner/unik GitHub Wiki

Unik Download Page

Go to the Unik Download Page

1 Command Line Parameters List

  • 1.1 -folder
  • 1.2 -remoteFolder
  • 1.3 -git

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

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

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 cfg.json and file location is [system documents][unik documents folder]/cfg.json. Example: /home/nextsigner/Documents/unik/cfg.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.

OS Functions

int getScreenWidth();

int getScreenHeight();

Unik System Functions

QString getUnikProperty(const QByteArray propertyName);

void setUnikStartSettings(const QString params);

QList<QString> getUnikStartSetting();

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 runAppFromZip(QByteArray url, QByteArray localFolder);

bool downloadRemoteFolder(QString urlFolder, QString list, QString dirDestination);

//bool extraerUpk(QString appName, QString origen, QString dirDestino, QString user, QString key);

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 writeRun(QString data);

bool ejecutarLineaDeComandoAparte(QString lineaDeComando);

void salidaRun();

void salidaRunError();

void finalizaRun(int e);

void log(QByteArray d);

void sleep(int ms);

QString getPath(int path);

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

Network Functions

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

bool startWSS(QByteArray ip, int port, QByteArray serverName);

Sqlite Function

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

void sqliteClose();

File Systems Funcions

void cd(QString folder);

QString currentFolderPath();

QString currentFolderName();

void deleteFile(QByteArray f);

bool setFile(QByteArray n, QByteArray d);

QString getFile(QByteArray n);

bool mkdir(const QString path);

QList<QString> getFolderFileList(const QByteArray folder);

QString getUpkTempPath();

QString getUpksLocalPath();

bool fileExist(QByteArray fileName);

QByteArray base64ToByteArray(const QByteArray data);

QByteArray byteArrayToBase64(const QByteArray data);

QByteArray uCompressed(const QByteArray data);

⚠️ **GitHub.com Fallback** ⚠️