1234567891011121314151617181920 |
- #include "acq_vendor.h"
- int main(int argc, char *argv[])
- {
- HTELINK_LOG_ENABLE(true);
- HTELINK_LOG_INFO("check env set");
- if (getenv(VENDOR_RUN_PATH_ENV) == nullptr) {
- HTELINK_LOG_INFO("execute env not set");
- std::string exe_dir = utils::get_executable_directory();
- setenv(VENDOR_RUN_PATH_ENV, exe_dir.c_str(), 1);
- }
- HTELINK_LOG_INFO("execute directory is %s", getenv(VENDOR_RUN_PATH_ENV));
- vendor::VendorBase *vdor = new iot_acq::AcqVendor();
- if (vendor::VendorBase::ParseOptionArgs(vdor, argc, argv) != 0) {
- exit(-1);
- }
- return vdor->Exec();
- }
|