mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:06:30 +00:00
add list files for autoupdate feature
put new Versioning fix bugs
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionDate>$([System.DateTime]::UtcNow.ToString("yyyy.MM.dd"))</VersionDate>
|
<VersionDate>$([System.DateTime]::UtcNow.ToString("yyyy.MM.dd"))</VersionDate>
|
||||||
<VersionSeconds>$([System.Convert]::ToInt32($([System.DateTime]::UtcNow.TimeOfDay.TotalSeconds)))</VersionSeconds>
|
<VersionSeconds>$([System.Convert]::ToInt32($([System.DateTime]::UtcNow.TimeOfDay.TotalMinutes)))</VersionSeconds>
|
||||||
|
|
||||||
<AssemblyVersion>$(VersionDate).$(VersionSeconds)</AssemblyVersion>
|
<AssemblyVersion>$(VersionDate).$(VersionSeconds)</AssemblyVersion>
|
||||||
<FileVersion>$(AssemblyVersion)</FileVersion>
|
<FileVersion>$(AssemblyVersion)</FileVersion>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class InferenceClient : IInferenceClient
|
|||||||
|
|
||||||
process.OutputDataReceived += (_, e) => { if (e.Data != null) Console.WriteLine(e.Data); };
|
process.OutputDataReceived += (_, e) => { if (e.Data != null) Console.WriteLine(e.Data); };
|
||||||
process.ErrorDataReceived += (_, e) => { if (e.Data != null) Console.WriteLine(e.Data); };
|
process.ErrorDataReceived += (_, e) => { if (e.Data != null) Console.WriteLine(e.Data); };
|
||||||
// process.Start();
|
process.Start();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class LoaderClient(LoaderClientConfig config, ILogger logger, Cancellatio
|
|||||||
return new MemoryStream(result.Data!);
|
return new MemoryStream(result.Data!);
|
||||||
}
|
}
|
||||||
|
|
||||||
private RemoteCommand SendCommand(RemoteCommand command, int retryCount = 15, int retryDelayMs = 400)
|
private RemoteCommand SendCommand(RemoteCommand command, int retryCount = 50, int retryDelayMs = 800)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -82,7 +82,7 @@ public class LoaderClient(LoaderClientConfig config, ILogger logger, Cancellatio
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Exception($"Sent {command} {retryCount} times. No response from client.");
|
throw new Exception($"Sent {command} {retryCount} times, with wait time {retryDelayMs}ms for each call. No response from client.");
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionDate>$([System.DateTime]::UtcNow.ToString("yyyy.MM.dd"))</VersionDate>
|
<VersionDate>$([System.DateTime]::UtcNow.ToString("yyyy.MM.dd"))</VersionDate>
|
||||||
<VersionSeconds>$([System.Convert]::ToInt32($([System.DateTime]::UtcNow.TimeOfDay.TotalSeconds)))</VersionSeconds>
|
<VersionSeconds>$([System.Convert]::ToInt32($([System.DateTime]::UtcNow.TimeOfDay.TotalMinutes)))</VersionSeconds>
|
||||||
|
|
||||||
<AssemblyVersion>$(VersionDate).$(VersionSeconds)</AssemblyVersion>
|
<AssemblyVersion>$(VersionDate).$(VersionSeconds)</AssemblyVersion>
|
||||||
<FileVersion>$(AssemblyVersion)</FileVersion>
|
<FileVersion>$(AssemblyVersion)</FileVersion>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from PyInstaller.utils.hooks import collect_all
|
|||||||
|
|
||||||
datas = [('venv\\Lib\\site-packages\\cv2', 'cv2')]
|
datas = [('venv\\Lib\\site-packages\\cv2', 'cv2')]
|
||||||
binaries = []
|
binaries = []
|
||||||
hiddenimports = ['constants', 'file_data', 'remote_command', 'remote_command_handler', 'annotation', 'loader_client', 'ai_config', 'tensorrt_engine', 'onnx_engine', 'inference_engine', 'inference', 'main-inf']
|
hiddenimports = ['constants', 'file_data', 'loader_client', 'remote_command', 'remote_command_handler', 'annotation', 'loader_client', 'ai_config', 'tensorrt_engine', 'onnx_engine', 'inference_engine', 'inference', 'main-inf']
|
||||||
hiddenimports += collect_submodules('cv2')
|
hiddenimports += collect_submodules('cv2')
|
||||||
tmp_ret = collect_all('psutil')
|
tmp_ret = collect_all('psutil')
|
||||||
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
|
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
|
||||||
|
|||||||
@@ -51,12 +51,10 @@ robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "ai_config
|
|||||||
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "constants.cp312-win_amd64.pyd" "file_data.cp312-win_amd64.pyd"
|
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "constants.cp312-win_amd64.pyd" "file_data.cp312-win_amd64.pyd"
|
||||||
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "remote_command.cp312-win_amd64.pyd" "remote_command_handler.cp312-win_amd64.pyd"
|
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "remote_command.cp312-win_amd64.pyd" "remote_command_handler.cp312-win_amd64.pyd"
|
||||||
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "inference.cp312-win_amd64.pyd" "inference_engine.cp312-win_amd64.pyd"
|
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "inference.cp312-win_amd64.pyd" "inference_engine.cp312-win_amd64.pyd"
|
||||||
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "tensorrt_engine.cp312-win_amd64.pyd" "onnx_engine.cp312-win_amd64.pyd" "main_inference.cp312-win_amd64.pyd"
|
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "loader_client.cp312-win_amd64.pyd" "tensorrt_engine.cp312-win_amd64.pyd"
|
||||||
|
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "onnx_engine.cp312-win_amd64.pyd" "main_inference.cp312-win_amd64.pyd"
|
||||||
|
|
||||||
robocopy "dist\azaion-inference\_internal" "..\dist-dlls\_internal" /E
|
robocopy "dist\azaion-inference\_internal" "..\dist-dlls\_internal" /E
|
||||||
robocopy "dist\azaion-inference" "..\dist-azaion" "azaion-inference.exe" /E
|
robocopy "dist\azaion-inference" "..\dist-azaion" "azaion-inference.exe"
|
||||||
|
|
||||||
REM copy for local run
|
|
||||||
robocopy "c:\share\" "dist\azaion-inference\_internal /E
|
|
||||||
|
|
||||||
cd /d %CURRENT_DIR%
|
cd /d %CURRENT_DIR%
|
||||||
|
|||||||
@@ -14,3 +14,11 @@ cdef class UploadFileData(FileData):
|
|||||||
cdef from_msgpack(bytes data)
|
cdef from_msgpack(bytes data)
|
||||||
|
|
||||||
cdef bytes serialize(self)
|
cdef bytes serialize(self)
|
||||||
|
|
||||||
|
cdef class FileList:
|
||||||
|
cdef public list[str] files
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
cdef from_msgpack(bytes data)
|
||||||
|
|
||||||
|
cdef bytes serialize(self)
|
||||||
@@ -38,3 +38,15 @@ cdef class UploadFileData(FileData):
|
|||||||
"Folder": self.folder,
|
"Folder": self.folder,
|
||||||
"Filename": self.filename
|
"Filename": self.filename
|
||||||
})
|
})
|
||||||
|
|
||||||
|
cdef class FileList:
|
||||||
|
def __init__(self, list[str] files):
|
||||||
|
self.files = files
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
cdef from_msgpack(bytes data):
|
||||||
|
unpacked = unpackb(data, strict_map_key=False)
|
||||||
|
return FileList(unpacked.get("files"))
|
||||||
|
|
||||||
|
cdef bytes serialize(self):
|
||||||
|
return packb({ "files": self.files })
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ cdef class LoaderClient:
|
|||||||
return LoadResult(f"Unexpected response command type: {response.command_type}")
|
return LoadResult(f"Unexpected response command type: {response.command_type}")
|
||||||
|
|
||||||
cdef upload_big_small_resource(self, bytes content, str filename, str directory):
|
cdef upload_big_small_resource(self, bytes content, str filename, str directory):
|
||||||
cdef UploadFileData upload_file_data = UploadFileData(content, filename, directory)
|
cdef UploadFileData upload_file_data = UploadFileData(content, folder=directory, filename=filename)
|
||||||
cdef RemoteCommand upload_resp = self._send_receive_command(RemoteCommand(CommandType.UPLOAD_BIG_SMALL, data=upload_file_data.serialize()))
|
cdef RemoteCommand upload_resp = self._send_receive_command(RemoteCommand(CommandType.UPLOAD_BIG_SMALL, data=upload_file_data.serialize()))
|
||||||
if upload_resp.command_type == CommandType.OK:
|
if upload_resp.command_type == CommandType.OK:
|
||||||
return LoadResult(None, None)
|
return LoadResult(None, None)
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
cdef enum CommandType:
|
cdef enum CommandType:
|
||||||
OK = 3
|
OK = 3
|
||||||
LOGIN = 10
|
LOGIN = 10
|
||||||
|
LIST_REQUEST = 15
|
||||||
|
LIST_FILES = 18
|
||||||
LOAD = 20
|
LOAD = 20
|
||||||
LOAD_BIG_SMALL = 22
|
LOAD_BIG_SMALL = 22
|
||||||
UPLOAD_BIG_SMALL = 24
|
UPLOAD_BIG_SMALL = 24
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import msgpack
|
import msgpack
|
||||||
|
|
||||||
cdef class RemoteCommand:
|
cdef class RemoteCommand:
|
||||||
def __init__(self, CommandType command_type, bytes data, str message=None):
|
def __init__(self, CommandType command_type, bytes data=None, str message=None):
|
||||||
self.command_type = command_type
|
self.command_type = command_type
|
||||||
self.data = data
|
self.data = data
|
||||||
self.message = message
|
self.message = message
|
||||||
@@ -10,6 +10,8 @@ cdef class RemoteCommand:
|
|||||||
command_type_names = {
|
command_type_names = {
|
||||||
3: "OK",
|
3: "OK",
|
||||||
10: "LOGIN",
|
10: "LOGIN",
|
||||||
|
15: "LIST_REQUEST",
|
||||||
|
18: "LIST_FILES",
|
||||||
20: "LOAD",
|
20: "LOAD",
|
||||||
22: "LOAD_BIG_SMALL",
|
22: "LOAD_BIG_SMALL",
|
||||||
24: "UPLOAD_BIG_SMALL",
|
24: "UPLOAD_BIG_SMALL",
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ cdef class ApiClient:
|
|||||||
cdef set_token(self, str token)
|
cdef set_token(self, str token)
|
||||||
cdef get_user(self)
|
cdef get_user(self)
|
||||||
|
|
||||||
|
cdef post(self, url, json)
|
||||||
|
cdef list_files(self, str folder, str search_file)
|
||||||
cdef load_bytes(self, str filename, str folder)
|
cdef load_bytes(self, str filename, str folder)
|
||||||
cdef upload_file(self, str filename, bytes resource, str folder)
|
cdef upload_file(self, str filename, bytes resource, str folder)
|
||||||
cdef load_big_file_cdn(self, str folder, str big_part)
|
cdef load_big_file_cdn(self, str folder, str big_part)
|
||||||
|
|||||||
@@ -97,25 +97,38 @@ cdef class ApiClient:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
constants.log(f"Upload fail: {e}")
|
constants.log(f"Upload fail: {e}")
|
||||||
|
|
||||||
|
cdef list_files(self, str folder, str search_file):
|
||||||
|
response = self.post(f'{self.api_url}/resources/list/{folder}', {
|
||||||
|
"search": search_file
|
||||||
|
})
|
||||||
|
constants.log(<str> f'Get files list by {folder}')
|
||||||
|
return response.json()
|
||||||
|
|
||||||
cdef load_bytes(self, str filename, str folder):
|
cdef load_bytes(self, str filename, str folder):
|
||||||
cdef str hardware = HardwareService.get_hardware_info()
|
cdef str hardware = HardwareService.get_hardware_info()
|
||||||
hw_hash = Security.get_hw_hash(hardware)
|
hw_hash = Security.get_hw_hash(hardware)
|
||||||
key = Security.get_api_encryption_key(self.credentials, hw_hash)
|
key = Security.get_api_encryption_key(self.credentials, hw_hash)
|
||||||
|
|
||||||
if self.token is None:
|
|
||||||
self.login()
|
|
||||||
url = f"{self.api_url}/resources/get/{folder}"
|
|
||||||
headers = {
|
|
||||||
"Authorization": f"Bearer {self.token}",
|
|
||||||
"Content-Type": "application/json"
|
|
||||||
}
|
|
||||||
|
|
||||||
payload = json.dumps(
|
payload = json.dumps(
|
||||||
{
|
{
|
||||||
"password": self.credentials.password,
|
"password": self.credentials.password,
|
||||||
"hardware": hardware,
|
"hardware": hardware,
|
||||||
"fileName": filename
|
"fileName": filename
|
||||||
}, indent=4)
|
}, indent=4)
|
||||||
|
response = self.post(f'{self.api_url}/resources/get/{folder}', payload)
|
||||||
|
|
||||||
|
resp_bytes = response.raw.read()
|
||||||
|
data = Security.decrypt_to(resp_bytes, key)
|
||||||
|
constants.log(<str>f'Downloaded file: {filename}, {len(data)} bytes')
|
||||||
|
return data
|
||||||
|
|
||||||
|
cdef post(self, url, payload):
|
||||||
|
if self.token is None:
|
||||||
|
self.login()
|
||||||
|
headers = {
|
||||||
|
"Authorization": f"Bearer {self.token}",
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
}
|
||||||
|
|
||||||
response = requests.post(url, data=payload, headers=headers, stream=True)
|
response = requests.post(url, data=payload, headers=headers, stream=True)
|
||||||
if response.status_code == HTTPStatus.UNAUTHORIZED or response.status_code == HTTPStatus.FORBIDDEN:
|
if response.status_code == HTTPStatus.UNAUTHORIZED or response.status_code == HTTPStatus.FORBIDDEN:
|
||||||
self.login()
|
self.login()
|
||||||
@@ -132,18 +145,14 @@ cdef class ApiClient:
|
|||||||
err_code = res['ErrorCode']
|
err_code = res['ErrorCode']
|
||||||
err_msg = res['Message']
|
err_msg = res['Message']
|
||||||
raise Exception(f"Error {err_code}: {err_msg}")
|
raise Exception(f"Error {err_code}: {err_msg}")
|
||||||
|
return response
|
||||||
resp_bytes = response.raw.read()
|
|
||||||
data = Security.decrypt_to(resp_bytes, key)
|
|
||||||
constants.log(<str>f'Downloaded file: {filename}, {len(data)} bytes')
|
|
||||||
return data
|
|
||||||
|
|
||||||
cdef load_big_file_cdn(self, str folder, str big_part):
|
cdef load_big_file_cdn(self, str folder, str big_part):
|
||||||
print(f'downloading file {folder}\\{big_part} from cdn...')
|
print(f'downloading file {folder}\\{big_part} from cdn...')
|
||||||
if self.cdn_manager.download(folder, big_part):
|
if self.cdn_manager.download(folder, big_part):
|
||||||
with open(path.join(<str> folder, big_part), 'rb') as binary_file:
|
with open(path.join(<str> folder, big_part), 'rb') as binary_file:
|
||||||
encrypted_bytes_big = binary_file.read()
|
encrypted_bytes_big = binary_file.read()
|
||||||
# return encrypted_bytes_big
|
return encrypted_bytes_big
|
||||||
else:
|
else:
|
||||||
raise Exception(f'Cannot download file {folder}\\{big_part} from CDN!')
|
raise Exception(f'Cannot download file {folder}\\{big_part} from CDN!')
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,6 @@ robocopy "dist\azaion-loader\_internal" "..\dist-azaion\_internal" "hardware_ser
|
|||||||
robocopy "dist\azaion-loader\_internal" "..\dist-azaion\_internal" "main_loader.cp312-win_amd64.pyd"
|
robocopy "dist\azaion-loader\_internal" "..\dist-azaion\_internal" "main_loader.cp312-win_amd64.pyd"
|
||||||
|
|
||||||
robocopy "dist\azaion-loader\_internal" "..\dist-dlls\_internal" /E
|
robocopy "dist\azaion-loader\_internal" "..\dist-dlls\_internal" /E
|
||||||
robocopy "dist\azaion-loader" "..\dist-azaion" "azaion-loader.exe" /E
|
robocopy "dist\azaion-loader" "..\dist-azaion" "azaion-loader.exe"
|
||||||
|
|
||||||
cd /d %CURRENT_DIR%
|
cd /d %CURRENT_DIR%
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import io
|
import io
|
||||||
import os
|
import os
|
||||||
|
cimport constants
|
||||||
import boto3
|
import boto3
|
||||||
|
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ cdef class CDNManager:
|
|||||||
cdef upload(self, str bucket, str filename, bytes file_bytes):
|
cdef upload(self, str bucket, str filename, bytes file_bytes):
|
||||||
try:
|
try:
|
||||||
self.upload_client.upload_fileobj(io.BytesIO(file_bytes), bucket, filename)
|
self.upload_client.upload_fileobj(io.BytesIO(file_bytes), bucket, filename)
|
||||||
print(f'uploaded {filename} ({len(file_bytes)} bytes) to the {bucket}')
|
constants.log(f'uploaded {filename} ({len(file_bytes)} bytes) to the {bucket}')
|
||||||
return True
|
return True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
@@ -37,7 +37,7 @@ cdef class CDNManager:
|
|||||||
try:
|
try:
|
||||||
os.makedirs(folder, exist_ok=True)
|
os.makedirs(folder, exist_ok=True)
|
||||||
self.download_client.download_file(folder, filename, f'{folder}\\{filename}')
|
self.download_client.download_file(folder, filename, f'{folder}\\{filename}')
|
||||||
print(f'downloaded {filename} from the {folder}')
|
constants.log(f'downloaded {filename} from the {folder}')
|
||||||
return True
|
return True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|||||||
@@ -14,3 +14,11 @@ cdef class UploadFileData(FileData):
|
|||||||
cdef from_msgpack(bytes data)
|
cdef from_msgpack(bytes data)
|
||||||
|
|
||||||
cdef bytes serialize(self)
|
cdef bytes serialize(self)
|
||||||
|
|
||||||
|
cdef class FileList:
|
||||||
|
cdef public list[str] files
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
cdef from_msgpack(bytes data)
|
||||||
|
|
||||||
|
cdef bytes serialize(self)
|
||||||
@@ -38,3 +38,15 @@ cdef class UploadFileData(FileData):
|
|||||||
"Folder": self.folder,
|
"Folder": self.folder,
|
||||||
"Filename": self.filename
|
"Filename": self.filename
|
||||||
})
|
})
|
||||||
|
|
||||||
|
cdef class FileList:
|
||||||
|
def __init__(self, list[str] files):
|
||||||
|
self.files = files
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
cdef from_msgpack(bytes data):
|
||||||
|
unpacked = unpackb(data, strict_map_key=False)
|
||||||
|
return FileList(unpacked.get("files"))
|
||||||
|
|
||||||
|
cdef bytes serialize(self):
|
||||||
|
return packb({ "files": self.files })
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import traceback
|
|||||||
from credentials cimport Credentials
|
from credentials cimport Credentials
|
||||||
from remote_command cimport RemoteCommand, CommandType
|
from remote_command cimport RemoteCommand, CommandType
|
||||||
from remote_command_handler cimport RemoteCommandHandler
|
from remote_command_handler cimport RemoteCommandHandler
|
||||||
from file_data cimport FileData, UploadFileData
|
from file_data cimport FileData, UploadFileData, FileList
|
||||||
from api_client cimport ApiClient
|
from api_client cimport ApiClient
|
||||||
|
|
||||||
cdef class CommandProcessor:
|
cdef class CommandProcessor:
|
||||||
@@ -47,6 +47,11 @@ cdef class CommandProcessor:
|
|||||||
file_data = FileData.from_msgpack(command.data)
|
file_data = FileData.from_msgpack(command.data)
|
||||||
file_bytes = self.api_client.load_bytes(file_data.filename, file_data.folder)
|
file_bytes = self.api_client.load_bytes(file_data.filename, file_data.folder)
|
||||||
self.remote_handler.send(command.client_id, RemoteCommand(CommandType.DATA_BYTES, file_bytes).serialize())
|
self.remote_handler.send(command.client_id, RemoteCommand(CommandType.DATA_BYTES, file_bytes).serialize())
|
||||||
|
elif command.command_type == CommandType.LIST_REQUEST:
|
||||||
|
search_data = FileData.from_msgpack(command.data)
|
||||||
|
list_files = self.api_client.load_bytes(search_data.folder, search_data.filename)
|
||||||
|
file_list_bytes = FileList(list_files).serialize()
|
||||||
|
self.remote_handler.send(command.client_id, RemoteCommand(CommandType.LIST_FILES, file_list_bytes).serialize())
|
||||||
elif command.command_type == CommandType.LOAD_BIG_SMALL:
|
elif command.command_type == CommandType.LOAD_BIG_SMALL:
|
||||||
data = FileData.from_msgpack(command.data)
|
data = FileData.from_msgpack(command.data)
|
||||||
file_bytes = self.api_client.load_big_small_resource(data.filename, data.folder)
|
file_bytes = self.api_client.load_big_small_resource(data.filename, data.folder)
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
cdef enum CommandType:
|
cdef enum CommandType:
|
||||||
OK = 3
|
OK = 3
|
||||||
LOGIN = 10
|
LOGIN = 10
|
||||||
|
LIST_REQUEST = 15
|
||||||
|
LIST_FILES = 18
|
||||||
LOAD = 20
|
LOAD = 20
|
||||||
LOAD_BIG_SMALL = 22
|
LOAD_BIG_SMALL = 22
|
||||||
UPLOAD_BIG_SMALL = 24
|
UPLOAD_BIG_SMALL = 24
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ cdef class RemoteCommand:
|
|||||||
command_type_names = {
|
command_type_names = {
|
||||||
3: "OK",
|
3: "OK",
|
||||||
10: "LOGIN",
|
10: "LOGIN",
|
||||||
|
15: "LIST_REQUEST",
|
||||||
|
18: "LIST_FILES",
|
||||||
20: "LOAD",
|
20: "LOAD",
|
||||||
22: "LOAD_BIG_SMALL",
|
22: "LOAD_BIG_SMALL",
|
||||||
24: "UPLOAD_BIG_SMALL",
|
24: "UPLOAD_BIG_SMALL",
|
||||||
|
|||||||
@@ -105,15 +105,15 @@ public partial class App
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void Start(ApiCredentials credentials)
|
private void Start(ApiCredentials credentials)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
new ConfigUpdater().CheckConfig();
|
new ConfigUpdater().CheckConfig();
|
||||||
var initConfig = SecurityConstants.ReadInitConfig();
|
var initConfig = SecurityConstants.ReadInitConfig();
|
||||||
var apiDir = initConfig.DirectoriesConfig.ApiResourcesDirectory;
|
var apiDir = initConfig.DirectoriesConfig.ApiResourcesDirectory;
|
||||||
_loaderClient = new LoaderClient(initConfig.LoaderClientConfig, Log.Logger, _mainCTokenSource.Token);
|
_loaderClient = new LoaderClient(initConfig.LoaderClientConfig, Log.Logger, _mainCTokenSource.Token);
|
||||||
|
|
||||||
#if DEBUG
|
|
||||||
_loaderClient.StartClient();
|
_loaderClient.StartClient();
|
||||||
#endif
|
|
||||||
_loaderClient.Connect(); //Client app should be already started by LoaderUI
|
_loaderClient.Connect(); //Client app should be already started by LoaderUI
|
||||||
_loaderClient.Login(credentials);
|
_loaderClient.Login(credentials);
|
||||||
|
|
||||||
@@ -201,6 +201,12 @@ public partial class App
|
|||||||
EventManager.RegisterClassHandler(typeof(UIElement), UIElement.PreviewKeyDownEvent, new RoutedEventHandler(GlobalKeyHandler));
|
EventManager.RegisterClassHandler(typeof(UIElement), UIElement.PreviewKeyDownEvent, new RoutedEventHandler(GlobalKeyHandler));
|
||||||
_host.Services.GetRequiredService<MainSuite>().Show();
|
_host.Services.GetRequiredService<MainSuite>().Show();
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Log.Logger.Error(e, e.Message);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void GlobalKeyHandler(object sender, RoutedEventArgs e)
|
private void GlobalKeyHandler(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionDate>$([System.DateTime]::UtcNow.ToString("yyyy.MM.dd"))</VersionDate>
|
<VersionDate>$([System.DateTime]::UtcNow.ToString("yyyy.MM.dd"))</VersionDate>
|
||||||
<VersionSeconds>$([System.Convert]::ToInt32($([System.DateTime]::UtcNow.TimeOfDay.TotalSeconds)))</VersionSeconds>
|
<VersionSeconds>$([System.Convert]::ToInt32($([System.DateTime]::UtcNow.TimeOfDay.TotalMinutes)))</VersionSeconds>
|
||||||
|
|
||||||
<AssemblyVersion>$(VersionDate).$(VersionSeconds)</AssemblyVersion>
|
<AssemblyVersion>$(VersionDate).$(VersionSeconds)</AssemblyVersion>
|
||||||
<FileVersion>$(AssemblyVersion)</FileVersion>
|
<FileVersion>$(AssemblyVersion)</FileVersion>
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
{
|
{
|
||||||
|
"LoaderClientConfig": {
|
||||||
|
"ZeroMqHost": "127.0.0.1",
|
||||||
|
"ZeroMqPort": 5025,
|
||||||
|
"ApiUrl": "https://api.azaion.com"
|
||||||
|
},
|
||||||
"InferenceClientConfig": {
|
"InferenceClientConfig": {
|
||||||
"ZeroMqHost": "127.0.0.1",
|
"ZeroMqHost": "127.0.0.1",
|
||||||
"ZeroMqPort": 5131,
|
"ZeroMqPort": 5127,
|
||||||
"RetryCount": 25,
|
|
||||||
"TimeoutSeconds": 5,
|
|
||||||
"ApiUrl": "https://api.azaion.com"
|
"ApiUrl": "https://api.azaion.com"
|
||||||
},
|
},
|
||||||
"GpsDeniedClientConfig": {
|
"GpsDeniedClientConfig": {
|
||||||
"ZeroMqHost": "127.0.0.1",
|
"ZeroMqHost": "127.0.0.1",
|
||||||
"ZeroMqPort": 5555,
|
"ZeroMqPort": 5555,
|
||||||
"ZeroMqReceiverPort": 5556,
|
"ZeroMqReceiverPort": 5556
|
||||||
"RetryCount": 25,
|
|
||||||
"TimeoutSeconds": 5
|
|
||||||
},
|
},
|
||||||
"DirectoriesConfig": {
|
"DirectoriesConfig": {
|
||||||
"ApiResourcesDirectory": "",
|
"ApiResourcesDirectory": "",
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ if exist dist-dlls rmdir dist-dlls /s /q
|
|||||||
mkdir dist-dlls
|
mkdir dist-dlls
|
||||||
if exist dist-azaion rmdir dist-azaion /s /q
|
if exist dist-azaion rmdir dist-azaion /s /q
|
||||||
mkdir dist-azaion
|
mkdir dist-azaion
|
||||||
|
if exist dist rmdir dist /s /q
|
||||||
|
mkdir dist
|
||||||
|
|
||||||
echo Copying shared libs
|
echo Copying shared libs
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
|
#define MyAppVersion GetFileVersion("..\dist-azaion\Azaion.Suite.exe")
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
AppId={{CCFEC8E2-0FCC-4B03-8EEA-00AF20D265E5}}
|
AppId={{CCFEC8E2-0FCC-4B03-8EEA-00AF20D265E5}}
|
||||||
AppName=Azaion Suite
|
AppName=Azaion Suite
|
||||||
AppVersion=1.5.0
|
AppVersion={#MyAppVersion}
|
||||||
AppPublisher=Azaion Ukraine
|
VersionInfoVersion={#MyAppVersion}
|
||||||
|
AppPublisher=Azaion LLC
|
||||||
DefaultDirName={localappdata}\Azaion\Azaion Suite
|
DefaultDirName={localappdata}\Azaion\Azaion Suite
|
||||||
DefaultGroupName=Azaion Suite
|
DefaultGroupName=Azaion Suite
|
||||||
OutputDir=..\
|
OutputDir=..\
|
||||||
OutputBaseFilename=AzaionSuite.Iterative.1.5.0
|
OutputBaseFilename=AzaionSuite.Iterative.{#MyAppVersion}
|
||||||
SetupIconFile=..\dist-azaion\logo.ico
|
SetupIconFile=..\dist-azaion\logo.ico
|
||||||
UninstallDisplayName=Azaion Suite
|
UninstallDisplayName=Azaion Suite
|
||||||
UninstallDisplayIcon={app}\Azaion.Suite.exe
|
UninstallDisplayIcon={app}\Azaion.Suite.exe
|
||||||
|
|||||||
+4
-1
@@ -1,10 +1,13 @@
|
|||||||
@echo off
|
rem
|
||||||
|
@echo off
|
||||||
pushd %~dp0..
|
pushd %~dp0..
|
||||||
|
|
||||||
call build\init
|
call build\init
|
||||||
|
|
||||||
call build\build_dotnet
|
call build\build_dotnet
|
||||||
|
|
||||||
|
call Azaion.Loader\build_loader
|
||||||
|
|
||||||
call Azaion.Inference\build_inference
|
call Azaion.Inference\build_inference
|
||||||
|
|
||||||
call ..\gps-denied\image-matcher\build_gps
|
call ..\gps-denied\image-matcher\build_gps
|
||||||
|
|||||||
Reference in New Issue
Block a user