Commit 14f2641c authored by Diego Giovane Pasqualin's avatar Diego Giovane Pasqualin

Merge branch 'development' into 'master'

Merge dev -> master

See merge request !103
parents a6424be7 f783a950
Pipeline #16230 failed with stages
in 5 minutes and 29 seconds
......@@ -5,3 +5,6 @@ test/docker/*/*.sh
log/*
styleguide/*
Documentation/*
.vs/
bootstrap.log
......@@ -13,13 +13,13 @@ pattern:
- apt-get update && apt-get install -y git python
- git clone https://github.com/google/styleguide
- cd styleguide/cpplint
- ./cpplint.py --filter=-whitespace/blank_line,-build/include_what_you_use ../../src/agent/!(jsoncpp).cpp
- ./cpplint.py --filter=-whitespace/blank_line,-build/include_what_you_use,-readability/casting ../../src/agent/!(jsoncpp).cpp
compile:
compileUnix:
stage: build
artifacts:
paths:
- bin/
- agent-1234.run
tags:
- regular
- debian
......@@ -34,9 +34,29 @@ compile:
- cmake -DCURL_STATICLIB=ON ..
- make
- cd ..
- makeself --notemp --noprogress bin/ agent.run "" ./agent-v0.0 --once --print
- chmod +x agent.run
- mv agent.run bin/
- chmod +x generate_agent.sh
- ./generate_agent.sh -idp=1234 -ws=www.C3Sl.ufpr.br -pch=mumm -pcp=6666 -pcu=ninguem -pcpasswd=123mudar -prj=simmc
- chmod +x agent-1234.run
compileWin:
stage: build
artifacts:
paths:
- agent-1234.exe
tags:
- windows
script:
- set PATH=%PATH%;C:\Program Files\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
- call vcvarsall.bat x86
- git submodule init
- git submodule update --init --recursive
- rd /s /q build
- call mkdir build
- cd build
- cmake .. -G "NMake Makefiles"
- nmake
- cd ..
- iscc generate_agent.iss /Didp=1234 /Dws=www.C3Sl.ufpr.br /Dpch=mumm /Dpcp=6666 /Dpcu=ninguem /Dpcpasswd=123mudar /Dprj=simmc /Dversion=1.0.0
testDebian:
stage: test
......@@ -44,16 +64,17 @@ testDebian:
- regular
- debian
script:
- apt-get update && apt-get install -y git jq faketime expect
- apt-get update && apt-get install -y git jq faketime expect cron
- git clone https://github.com/sstephenson/bats.git
- cd bats
- ./install.sh /usr
- ./agent-1234.run --quiet
- cd bats
- ./install.sh /usr
- cd ../test
- ./create_users.sh
- last -F
- ./returnTest.bats
dependencies:
- compile
- compileUnix
testUbuntu:
stage: test
......@@ -61,13 +82,14 @@ testUbuntu:
- ubuntu
- regular
script:
- apt-get update && apt-get install -y bats jq faketime expect
- apt-get update && apt-get install -y bats jq faketime expect cron
- ./agent-1234.run --quiet
- cd test
- ./create_users.sh
- last -F
- ./returnTest.bats
dependencies:
- compile
- compileUnix
testOpensuse:
stage: test
......@@ -75,13 +97,33 @@ testOpensuse:
- opensuse
script:
- zypper -n update
- zypper -n install bats jq libfaketime expect tar
- zypper -n install bats jq libfaketime expect tar cron
- touch /var/log/wtmp
- chown root.tty /var/log/wtmp
- chmod 664 /var/log/wtmp
- ./agent-1234.run --quiet
- cd test
- ./create_users.sh
- last -F
- ./returnTest.bats
dependencies:
- compile
- compileUnix
testWin7:
stage: test
tags:
- windows
script:
- if exist C:\agentC3SL rmdir C:\agentC3SL /s /q
- agent-1234.exe /SILENT /VERYSILENT
- if not exist C:\agentC3SL exit 1;
- copy C:\jq-win32.exe .\test
- cd .\test
- C:\agentC3SL\bin\agent-v0.0.exe --once --print > test.json
- testWin.bat
- C:\agentC3SL\uninstall_agent.exe /SILENT /VERYSILENT
- dir /b /a "C:\agentC3SL\*" | >nul findstr "^" && (echo Agent has been uninstalled) || (exit 1);
dependencies:
- compileWin
......@@ -8,6 +8,13 @@ set ( VERSION_MINOR 0 )
# cpr requires c++11
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
if(WIN32)
add_definitions( -DBOOST_ALL_NO_LIB )
set(Boost_USE_STATIC_LIBS ON)
add_definitions(-DCURL_STATICLIB)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-D_WIN32_WINNT=0x0501)
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc")
......@@ -33,16 +40,12 @@ add_subdirectory ( lib/cpr )
include_directories ( ${CPR_INCLUDE_DIRS} )
include_directories ( ${CURL_INCLUDE_DIRS} )
# src : DtWinVer - Windows Version/Edition class
if ( WIN32 )
add_subdirectory ( lib/dtwinver )
endif ()
# headers
include_directories ( "include" )
# include headers from boost lib
include_directories ( "${CMAKE_BINARY_DIR}/include" )
include_directories ( "${CMAKE_BINARY_DIR}/Boost/src/Boost" )
# scr = libboost
include ( "modules/boost.cmake" )
......@@ -50,13 +53,11 @@ include ( "modules/boost.cmake" )
# compile
set ( CMAKE_RUNTIME_OUTPUT_DIRECTORY "../bin" )
add_executable ( agent-v${VERSION_MAJOR}.${VERSION_MINOR} ${SOURCES} )
target_link_libraries ( agent-v${VERSION_MAJOR}.${VERSION_MINOR} ${CPR_LIBRARIES} ${CURL_LIBRARIES} ${FILESYSTEM_LIB} ${SYSTEM_LIB} ${REGEX_LIB} ${PROGRAM_OPTIONS_LIB})
target_link_libraries ( agent-v${VERSION_MAJOR}.${VERSION_MINOR} ${CPR_LIBRARIES} ${CURL_LIBRARIES} ${FILESYSTEM_LIB} ${SYSTEM_LIB} ${REGEX_LIB} ${PROGRAM_OPTIONS_LIB} ${CROSS_STATIC} )
add_dependencies ( agent-v${VERSION_MAJOR}.${VERSION_MINOR} Boost)
if ( WIN32 )
target_link_libraries ( agent-v${VERSION_MAJOR}.${VERSION_MINOR} dtwinver )
else ()
if ( UNIX )
# libudev
target_link_libraries ( agent-v${VERSION_MAJOR}.${VERSION_MINOR} udev )
endif ()
......@@ -806,25 +806,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
INPUT = src/agent/ src/agent/linux/ src/agent/windows/ include/agent/ include/agent/linux/ include/agent/windows/
=======
INPUT = src/agent/ src/agent/linux/ src/agent/windows/
include/agent/ include/agent/linux/ include/agent/windows/
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
INPUT = src/agent/ src/agent/linux/ src/agent/windows/ include/agent/ include/agent/linux/ include/agent/windows/
>>>>>>> 7b3a2fe... SCRUM$30 - Starting the documentation from simmc-agent using doxygen
=======
INPUT = src/agent/ src/agent/linux/ src/agent/windows/
include/agent/ include/agent/linux/ include/agent/windows/
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
INPUT = src/agent/ src/agent/linux/ src/agent/windows/ include/agent/ include/agent/linux/ include/agent/windows/
>>>>>>> ca8ed79... SCRUM#30 - Documentation from agent e conf file's
INPUT = src/agent/ include/agent/
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
......@@ -849,27 +831,7 @@ INPUT_ENCODING = UTF-8
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
FILE_PATTERNS = *.c \ *.cpp \ *.h \
=======
FILE_PATTERNS = *.c \
*.cpp \
*.h \
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
FILE_PATTERNS = *.c \ *.cpp \ *.h \
>>>>>>> 7b3a2fe... SCRUM$30 - Starting the documentation from simmc-agent using doxygen
=======
FILE_PATTERNS = *.c \
*.cpp \
*.h \
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
FILE_PATTERNS = *.c \ *.cpp \ *.h \
>>>>>>> ca8ed79... SCRUM#30 - Documentation from agent e conf file's
# The RECURSIVE tag can be used to specify whether or not subdirectories should
......@@ -885,27 +847,7 @@ RECURSIVE = NO
# Note that relative paths are relative to the directory from which doxygen is
# run.
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
EXCLUDE = src/agent/jsoncpp.cpp
=======
EXCLUDE =
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
EXCLUDE = src/agent/jsoncpp.cpp
>>>>>>> 1717824... SCRUM#30 - Documentation from get, rotate_log_file, curl, common, post, open_files, get_date, get_time sources files
=======
EXCLUDE = src/agent/jsoncpp.cpp
>>>>>>> 7b3a2fe... SCRUM$30 - Starting the documentation from simmc-agent using doxygen
=======
EXCLUDE =
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
EXCLUDE = src/agent/jsoncpp.cpp
>>>>>>> 1717824... SCRUM#30 - Documentation from get, rotate_log_file, curl, common, post, open_files, get_date, get_time sources files
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
......@@ -1027,27 +969,8 @@ USE_MDFILE_AS_MAINPAGE =
# also VERBATIM_HEADERS is set to NO.
# The default value is: NO.
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
SOURCE_BROWSER = YES
=======
SOURCE_BROWSER = NO
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
SOURCE_BROWSER = YES
>>>>>>> 1717824... SCRUM#30 - Documentation from get, rotate_log_file, curl, common, post, open_files, get_date, get_time sources files
=======
SOURCE_BROWSER = YES
>>>>>>> 7b3a2fe... SCRUM$30 - Starting the documentation from simmc-agent using doxygen
=======
SOURCE_BROWSER = NO
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
SOURCE_BROWSER = YES
>>>>>>> 1717824... SCRUM#30 - Documentation from get, rotate_log_file, curl, common, post, open_files, get_date, get_time sources files
# Setting the INLINE_SOURCES tag to YES will include the body of functions,
# classes and enums directly into the documentation.
......@@ -1163,23 +1086,7 @@ GENERATE_HTML = YES
# The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES.
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
HTML_OUTPUT = Documentation
=======
HTML_OUTPUT = html
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
HTML_OUTPUT = Documentation
>>>>>>> 7b3a2fe... SCRUM$30 - Starting the documentation from simmc-agent using doxygen
=======
HTML_OUTPUT = html
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
HTML_OUTPUT = Documentation
>>>>>>> ca8ed79... SCRUM#30 - Documentation from agent e conf file's
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
# generated HTML page (for example: .htm, .php, .asp).
......@@ -1726,23 +1633,7 @@ EXTRA_SEARCH_MAPPINGS =
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
# The default value is: YES.
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
GENERATE_LATEX = NO
=======
GENERATE_LATEX = YES
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
GENERATE_LATEX = NO
>>>>>>> 7b3a2fe... SCRUM$30 - Starting the documentation from simmc-agent using doxygen
=======
GENERATE_LATEX = YES
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
GENERATE_LATEX = NO
>>>>>>> ca8ed79... SCRUM#30 - Documentation from agent e conf file's
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
......@@ -2135,23 +2026,7 @@ ENABLE_PREPROCESSING = YES
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
MACRO_EXPANSION = YES
=======
MACRO_EXPANSION = NO
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
MACRO_EXPANSION = YES
>>>>>>> 7b3a2fe... SCRUM$30 - Starting the documentation from simmc-agent using doxygen
=======
MACRO_EXPANSION = NO
>>>>>>> a9cf478... Starting the documentation from simmc-agent using doxygen
=======
MACRO_EXPANSION = YES
>>>>>>> ca8ed79... SCRUM#30 - Documentation from agent e conf file's
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
# the macro expansion is limited to the macros specified with the PREDEFINED and
......
......@@ -3,35 +3,134 @@ simmc-agent
The agent for the SIMMC - Sistema de Monitoramento do Ministério das Comunicações project.
requirements
Requirements
------------
c++ compiler
cmake
libudev
obtaining repository
--------------------
$ git clone --recursive git@gitlab.c3sl.ufpr.br:simmc/agent.git
Using *Linux* as default
the `--recursive` will download the repository and the submodles
- c++ compiler
- cmake
- libudev
- make-self
building and compiling
<a name="HeaderBuildingAndCompiling"></a>
Building and compiling
----------------------
Run
Run the follow steps to compile
$ mkdir build && cd build
$ cmake ..
to generate a `Makefile`, library objects and misterious CMake files, then
$ make
to compile. The resulting executable `agent-vx.x` will be in `agent/bin`.
To run the resulting executable `agent-vx.x` go to directory `agent/bin`.
Run it with
$ ./agent-vx.x
```sh
$ ./agent-vx.x
```
***********************************************************************
***********************************************************************
Building and compiling (on Windows)
-----------------------------------
To build and compile on Windows follow these steps:
- Install [.NET Framework] 4.6 or higher
- Install [Visual Studio] Community 2017 or higher
- Select: Desktop development with C++
- Select: Data storage and processing (for latter)
- Install [Cmake]
- Download .msi
- Select option: Add CMake to the system PATH for all users
- Install [Git for Windows]
- Bash only
- Default settings
- Config your user
- Clone git project repository
> git clone git@gitlab.c3sl.ufpr.br:simmc/agent.git
- Change to the correct branch
- Configurate accordly with project README
- Run Developer Command Prompt for VS 2017
- Go to project directory
- Run:
```sh
$ mkdir build
$ cd build
$ cmake .. -G "NMake Makefiles"
$ nmake
```
Building and compiling (cross compiling Linux Host/ Windows target)
-------------------------------------------------------------------
### requirements ###
- i685-w64-mingw32-gcc compiler for Windows 32-bit target
- x86_64-w64-mingw32-gcc compiler for Windows 64-bit target
### building and compiling ###
Follow the steps from the regular [`Building and compiling`](#HeaderBuildingAndCompiling), changing the command `cmake ..` by
```sh
$ cmake -D CMAKE_TOOLCHAIN_FILE=mingw_cross_toolchain_32-bit.cmake ..
```
to generate a `Makefile` for crosscompiling with a Linux Host/ W32 target
or
development
```sh
$ cmake -D CMAKE_TOOLCHAIN_FILE=mingw_cross_toolchain_64-bit.cmake ..
```
to generate a `Makefile` for crosscompiling with a Linux Host/ W64 target
Generate agent.exe (for Windows) on Linux machine
-------------------------------------------------
Creates package similar to the `.run` created on Linux from the file `generate_agent.sh` .
- Install wine
```sh
$ dpkg --add-architecture i386 - multiarch
$ apt update
$ apt install wine
```
- Install inno setup
```sh
$ wget http://www.jrsoftware.org/download.php/is.exe
$ wine ./is.exe
```
- Add inno setup compiler at environment variable at wine. Run:
```sh
$ wine regedit (this will open a window from wine)
```
- Go to - HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment and set the following path at PATH environment variable: C:/Program Files\Inno Setup
- Compile generate_agent.iss
```sh
$ wine iscc generate_agent.iss
```
***********************************************************************
***********************************************************************
Development
-----------
### submodules ###
......@@ -47,12 +146,13 @@ Also mongoose and googletest.
To get them working, run
$ git submodule init
$ git submodule update --init --recursive
```sh
$ git submodule init
$ git submodule update --init --recursive
```
Any editions made to such modules must be commited inside the submodule,
to a branch of our own, and further commited in the superior module. Check
[https://git-scm.com/book/en/v2/Git-Tools-Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
to a branch of our own, and further commited in the superior module. Check [Git-Tools-Submodules] .
TODO: when packing the version for download, make sure these modules are regular directories.
......@@ -60,46 +160,83 @@ TODO: when packing the version for download, make sure these modules are regular
Current `CMakeLists.txt` is not mature, so if you find that building fails
at something that was already corrected, run
$ rm -rf *
```sh
$ rm -rf *
```
inside the `build` directory and cmake again.
### building and compiling ###
You may also set the `Debug` flag if using gdb
```sh
$ cmake -DCMAKE_BUILD_TYPE=Debug ..
```
### parameters ###
When compiling and executing the agent locally, in order to see the resulting
JSON objects, run cmake with the option `PRINT_JSON`
JSON objects, run the executable with the option `--print`
$ cmake -DPRINT_JSON=ON ..
```sh
$ ./agent-vx.x --print
```
You may also set the `Debug` flag if using gdb
If you want to run just once, add the option `--once`
```sh
$ ./agent-vx.x --print --once
```
For all options run with `--help`.
$ cmake -DCMAKE_BUILD_TYPE=Debug -DPRINT_JSON=ON ..
***********************************************************************
***********************************************************************
documentation
Documentation
-------------
Clone doxygen project from github
```sh
$ git clone https://github.com/doxygen/doxygen
```
$ git clone https://github.com/doxygen/doxygen
### requirements - flex lib ###
requirements - flex lib and bison
-----------------------
# apt-get install flex bison
Building and compiling
----------------------
```sh
$ cd doxygen
$ mkdir build
$ cmake -G "Unix Makefiles" ..
$ make
```
$ cd doxygen
$ mkdir build && cd build
$ cmake -G "Unix Makefiles" ..
$ make
Testing
-------
Execute doxygen to generate the simmc-agent documentation
$ doxygen Doxyfile
```sh
$ doxygen Doxyfile
```
Will be generated a Documentation directory that contains HTML pages for each file from agent
[//]: # (These are reference links used in the body of this note and get stripped pout when the markdown processor does its job)
[Git-Tools-Submodules]: <https://git-scm.com/book/en/v2/Git-Tools-Submodules>
[.NET Framework]: <https://www.microsoft.com/pt-br/download/details.aspx?id=49981>
[Visual Studio]: <https://www.visualstudio.com/pt-br/downloads/>
[Cmake]: <https://cmake.org/download/>
[Git for Windows]: <https://git-scm.com/download/win>
{
"idPoint" : "1",
"proxyConf" : "/conf/proxy.json",
"webService": "http://simmc.c3sl.ufpr.br/axis2/services/DataSID"
}
"idPoint" : "%d",
"project" : "%s",
"proxyConf" : "%s",
"version" : "%s",
"webService" : "%s"
}
\ No newline at end of file
{
"host" : "%s",
"port" : "%d",
"usr" : "%s",
"password" : "%s"
}
\ No newline at end of file
#!/bin/bash
# Copyright (C) 2016-2017 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of simmc-agent
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
echo "using gcc : 5.3 : ${1} ;" > tools/build/src/user-config.jam
; Copyright (C) 2017 Centro de Computacao Cientifica e Software Livre
; Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
;
; This file is part of simmc-agent
;
; This program is free software; you can redistribute it and/or
; modify it under the terms of the GNU General Public License
; as published by the Free Software Foundation; either version 2
; of the License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
; USA.
; idpoint proxyConf( host port usr passwd ) webService
; Macros
; Example:
; if not send from command line idp value, exists default idp value = "0";
#ifndef idp
#define idp '0'
#endif
#ifndef version
#define version "0.0.0"
#endif
#ifndef ws
#define ws "http://localhost"
#endif
#ifndef pch
#define pch " "
#endif
#ifndef pcp
#define pcp " "
#endif
#ifndef pcu
#define pcu " "
#endif
#ifndef pcpasswd
#define pcpasswd " "
#endif
#ifndef dest
#define dest "."
#endif
#ifndef prj
#define prj 'simmc'
#endif
#ifndef outputName
#define outputName 'agent-1234'
#endif
[Setup]
AppName=simmc-agent
AppVersion=0.0.0
; Create agentC3SL folder at C:\Programs Files\
DefaultDirName=C:\agentC3SL
ArchitecturesInstallIn64BitMode=x64
; OutputDir = local where agent-1234.exe will be saved
OutputDir={#dest}
OutputBaseFilename={#outputName}
PrivilegesRequired=admin
[Files]
Source: "conf\datasid-conf.json"; DestDir: "{app}\conf"; DestName : "datasid-conf.json"; AfterInstall: change_config_file;
Source: "conf\proxy-conf.json"; DestDir: "{app}\conf"; DestName : "proxy-conf.json"; AfterInstall: change_proxy_file;
Source: "bin\agent-v0.0.exe"; DestDir : "{app}\bin"; DestName : "agent-v0.0.exe"; Check: Is64BitInstallMode;
Source: "bin\agent-v0.0.exe"; DestDir: "{app}\bin"; DestName : "agent-v0.0.exe"; Check: not Is64BitInstallMode; Flags: solidbreak;
Source: "README.md"; DestDir: "{app}";
Source: "LICENSE"; DestDir: "{app}"
[Dirs]
Name: "{app}\tmp"
[Run]
; After install agent on windows machine, schedule a task to run every login
Filename: "schtasks.exe"; \
Parameters : "/Create /SC ONLOGON /TN Start_agent /TR ""'{app}\bin\agent-v0.0.exe'"""; \
Flags: runascurrentuser nowait;
; Rename uninstall .exe file
Filename: {cmd}; Parameters: "/C Move ""{app}\unins000.exe"" ""{app}\uninstall_agent.exe"""; Flags: RunHidden WaitUntilTerminated;