diff --git a/.gitignore b/.gitignore index fcff337..48f5e8e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,7 @@ *.smod # Executables -*.exe +# *.exe *.out *.app diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..8a97d12 --- /dev/null +++ b/build.bat @@ -0,0 +1,16 @@ +::echo off +set url="https://api.powerbi.com/beta/72f988bf-86f1-41af-91ab-2d7cd011db47/datasets/f56a3240-7d0c-45aa-a694-65ebf6a04cc2/rows?key=RHtUJLk6Vi7QIlOBAPENJuCHOT6WbVdBi%%2Fa%%2BhwoDFpaOFhTsPH8zXWE%%2F%%2FFSjPdxF7Lmkf%%2Fl1q2nLgBYk7HYqUQ%%3D%%3D" +set date= +for /f "tokens=2-4 delims=/ " %%a in ("%date%") do (set MM=%%a& set DD=%%b& set YYYY=%%c) +set datetime=%YYYY%-%MM%-%DD%T%time% +set devie_info=Windows-%USERNAME% + +set raw_data=[{^ +\"Build time\" :\"%datetime%\",^ +\"Device info\" :\"%devie_info%\",^ +\"Project info\" :\"%1\",^ +\"Weight\" : 1^ +}] + +curl --include --request POST --header "Content-Type: application/json" --data-binary^ + "%raw_data%" "%url%" diff --git a/connect.sh b/build.sh similarity index 100% rename from connect.sh rename to build.sh diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 950513d..1610694 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -22,5 +22,5 @@ TARGET_LINK_LIBRARIES(core sample) execute_process( - COMMAND ${CMAKE_SOURCE_DIR}/connect.sh Core + COMMAND ${CMAKE_SOURCE_DIR}/build.sh Core ) diff --git a/core/core.vcxproj b/core/core.vcxproj index 2996153..cc42e52 100644 --- a/core/core.vcxproj +++ b/core/core.vcxproj @@ -1,4 +1,4 @@ - + @@ -90,8 +90,7 @@ Windows - - + call "$(SolutionDir)build.bat" "Core" @@ -106,6 +105,9 @@ Windows + + call "$(SolutionDir)build.bat" "Core" + @@ -123,6 +125,9 @@ true true + + call "$(SolutionDir)build.bat" "Core" + @@ -140,6 +145,9 @@ true true + + call "$(SolutionDir)build.bat" "Core" + diff --git a/core/curl.exe b/core/curl.exe new file mode 100644 index 0000000..7b11cd8 Binary files /dev/null and b/core/curl.exe differ diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 486d2ef..0f28473 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -14,5 +14,5 @@ ADD_LIBRARY(gui ${SRC}) TARGET_LINK_LIBRARIES(gui core sample) execute_process( - COMMAND ${CMAKE_SOURCE_DIR}/connect.sh Gui + COMMAND ${CMAKE_SOURCE_DIR}/build.sh Gui ) diff --git a/gui/curl.exe b/gui/curl.exe new file mode 100644 index 0000000..7b11cd8 Binary files /dev/null and b/gui/curl.exe differ diff --git a/gui/gui.vcxproj b/gui/gui.vcxproj index 2c10453..e58b9cd 100644 --- a/gui/gui.vcxproj +++ b/gui/gui.vcxproj @@ -1,4 +1,4 @@ - + @@ -104,8 +104,7 @@ Windows - - + call "$(SolutionDir)build.bat" "Gui" @@ -120,6 +119,9 @@ Windows + + call "$(SolutionDir)build.bat" "Gui" + @@ -137,6 +139,9 @@ true true + + call "$(SolutionDir)build.bat" "Gui" + @@ -154,6 +159,9 @@ true true + + call "$(SolutionDir)build.bat" "Gui" +