Sfoglia il codice sorgente

将客户个性化配置集中在cfg.h中,准备删除客户配置文件

guohui 2 anni fa
parent
commit
a77af7adb7

+ 4 - 4
cust_data/cfg/cfg_anderson.h

@@ -5,14 +5,14 @@
 #define VERSION                         "V0.0.1"
 
 
-#define PROD_ID                         1
+#define PROD_ID                         0
 #define PROD_TYPE                       1
 #define PROD_POWER_TYPE                 1
 
 
-#define LANGUAGE                        0
-#define SMPLE_TIME                      100         //ms
-#define SAVE_TIME                       1000        //ms
+#define LANGUAGE                        1
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
 #define CASCADE_CNT                     5
 
 #define MAX_CHN_COUNT                   16

+ 3 - 3
cust_data/cfg/cfg_general.h

@@ -5,14 +5,14 @@
 #define VERSION                         "V0.0.1"
 
 
-#define PROD_ID                         1
+#define PROD_ID                         0
 #define PROD_TYPE                       1
 #define PROD_POWER_TYPE                 1
 
 
 #define LANGUAGE                        0
-#define SMPLE_TIME                      100         //ms
-#define SAVE_TIME                       1000        //ms
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
 #define CASCADE_CNT                     5
 
 #define MAX_CHN_COUNT                   16

+ 3 - 3
cust_data/cfg/cfg_hypertec.h

@@ -5,14 +5,14 @@
 #define VERSION                         "V0.0.1"
 
 
-#define PROD_ID                         1
+#define PROD_ID                         0
 #define PROD_TYPE                       1
 #define PROD_POWER_TYPE                 1
 
 
 #define LANGUAGE                        0
-#define SMPLE_TIME                      100         //ms
-#define SAVE_TIME                       1000        //ms
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
 #define CASCADE_CNT                     5
 
 #define MAX_CHN_COUNT                   16

+ 3 - 3
cust_data/cfg/cfg_inspur.h

@@ -5,14 +5,14 @@
 #define VERSION                         "V0.0.1"
 
 
-#define PROD_ID                         1
+#define PROD_ID                         0
 #define PROD_TYPE                       1
 #define PROD_POWER_TYPE                 1
 
 
 #define LANGUAGE                        0
-#define SMPLE_TIME                      100         //ms
-#define SAVE_TIME                       1000        //ms
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
 #define CASCADE_CNT                     5
 
 #define MAX_CHN_COUNT                   16

+ 3 - 3
cust_data/cfg/cfg_litech.h

@@ -5,14 +5,14 @@
 #define VERSION                         "V0.0.1"
 
 
-#define PROD_ID                         1
+#define PROD_ID                         0
 #define PROD_TYPE                       1
 #define PROD_POWER_TYPE                 1
 
 
 #define LANGUAGE                        0
-#define SMPLE_TIME                      100         //ms
-#define SAVE_TIME                       1000        //ms
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
 #define CASCADE_CNT                     5
 
 #define MAX_CHN_COUNT                   16

+ 4 - 4
cust_data/cfg/cfg_russia_itk.h

@@ -5,15 +5,15 @@
 #define VERSION                         "V0.0.1"
 
 
-#define PROD_ID                         1
+#define PROD_ID                         0
 #define PROD_TYPE                       1
 #define PROD_POWER_TYPE                 1
 
 
 #define LANGUAGE                        0
-#define SMPLE_TIME                      100         //ms
-#define SAVE_TIME                       1000        //ms
-#define CASCADE_CNT                     5
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
+
 
 #define MAX_CHN_COUNT                   16
 #define PHASE_GROUP_CNT                 8

+ 3 - 3
cust_data/cfg/cfg_stsc.h

@@ -5,14 +5,14 @@
 #define VERSION                         "V0.0.1"
 
 
-#define PROD_ID                         1
+#define PROD_ID                         0
 #define PROD_TYPE                       1
 #define PROD_POWER_TYPE                 1
 
 
 #define LANGUAGE                        0
-#define SMPLE_TIME                      100         //ms
-#define SAVE_TIME                       1000        //ms
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
 #define CASCADE_CNT                     5
 
 #define MAX_CHN_COUNT                   16

+ 3 - 3
cust_data/cfg/cfg_test.h

@@ -5,14 +5,14 @@
 #define VERSION                         "V0.0.1"
 
 
-#define PROD_ID                         1
+#define PROD_ID                         0
 #define PROD_TYPE                       1
 #define PROD_POWER_TYPE                 1
 
 
 #define LANGUAGE                        0
-#define SMPLE_TIME                      100         //ms
-#define SAVE_TIME                       1000        //ms
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
 #define CASCADE_CNT                     5
 
 #define MAX_CHN_COUNT                   16

+ 4 - 4
cust_data/cfg/cfg_usa_sl.h

@@ -5,14 +5,14 @@
 #define VERSION                         "V0.0.1"
 
 
-#define PROD_ID                         1
+#define PROD_ID                         0
 #define PROD_TYPE                       1
 #define PROD_POWER_TYPE                 1
 
 
-#define LANGUAGE                        0
-#define SMPLE_TIME                      100         //ms
-#define SAVE_TIME                       1000        //ms
+#define LANGUAGE                        1
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
 #define CASCADE_CNT                     5
 
 #define MAX_CHN_COUNT                   16

+ 3 - 3
cust_data/cfg/cfg_xian_p4.h

@@ -5,14 +5,14 @@
 #define VERSION                         "V0.0.1"
 
 
-#define PROD_ID                         1
+#define PROD_ID                         0
 #define PROD_TYPE                       1
 #define PROD_POWER_TYPE                 1
 
 
 #define LANGUAGE                        0
-#define SMPLE_TIME                      100         //ms
-#define SAVE_TIME                       1000        //ms
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
 #define CASCADE_CNT                     5
 
 #define MAX_CHN_COUNT                   16

+ 3 - 3
cust_data/cfg/cfg_xian_p8.h

@@ -5,14 +5,14 @@
 #define VERSION                         "V0.0.1"
 
 
-#define PROD_ID                         1
+#define PROD_ID                         0
 #define PROD_TYPE                       1
 #define PROD_POWER_TYPE                 1
 
 
 #define LANGUAGE                        0
-#define SMPLE_TIME                      100         //ms
-#define SAVE_TIME                       1000        //ms
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
 #define CASCADE_CNT                     5
 
 #define MAX_CHN_COUNT                   16

+ 121 - 72
pro/config/cfg.h

@@ -5,115 +5,164 @@
 #define VERSION                         "V0.0.1"
 
 
-#define PROD_ID                         1
+#define PROD_ID                         0
 #define PROD_TYPE                       1
-#define PROD_POWER_TYPE                 1
 
 
-#define LANGUAGE                        0
-#define SMPLE_TIME                      100         //ms
-#define SAVE_TIME                       1000        //ms
+/////////////customer demannd//////////////////////
+//#define PRJ_XIAN_AC_I1_O1_P4
+//#define PRJ_XIAN_AC_I1_O1_P8
+//#define PRJ_USASL_AC_I3_O1
+//#define PRJ_USASL_AC_I3_O3
+//#define PRJ_ITK_AC_I1_O1
+//#define PRJ_ITK_AC_I3_O1
+#define PRJ_STSC_I3_O3
+//#define PRJ_INSPUR_DC_I_DC_O
+//#define PRJ_ANDERSON_AC_I3_O3
+//#define PRJ_HYPERTEC_AC_I3_O1
+//#define PRJ_TEST
+
+
+#if (defined PRJ_XIAN_AC_I1_O1_P4) || (defined PRJ_XIAN_AC_I1_O1_P8)  //GOM037
+#define LANGUAGE                        0           //chinese
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
 #define CASCADE_CNT                     5
 
 #define MAX_CHN_COUNT                   16
 #define PHASE_GROUP_CNT                 8
+
+
+#ifdef PRJ_XIAN_AC_I1_O1_P4
+//#define GOM037PDU_GC20_04K_125H        //ac_in1_out1_40a_p4_5ch_nologo_cn
+#define CHANNEL_DELAY_SEC               5
+#else
+//#define GOM037_PDU_GC10_08K_80H        //ac_in1_out1_40a_p8_5ch_nologo_cn
 #define CHANNEL_DELAY_SEC               8
+#endif
 
 #define USE_SMTP
 #define SMTP_SEND_BUILTIN
 
-/////////////customer demannd//////////////////////
-//#define PRJ_XIAN_GOM037
-//#define PRJ_USA_SL
-#define PRJ_ANDERSON
-//#define PRJ_HYPERTEC
-//#define PRJ_RUSSIA_ITK
-//#define PRJ_TEST
+#define PROD_POWER_TYPE                 0
+#define IN_INDEX_MAP                    {3,2,0,1}
+#elif (defined PRJ_USASL_AC_I3_O1) || (defined PRJ_USASL_AC_I3_O3)
+
+#define LANGUAGE                        1           //english
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
+#define CASCADE_CNT                     5
 
+#define MAX_CHN_COUNT                   16
+#define PHASE_GROUP_CNT                 8
+
+#define USE_SMTP
+#define SMTP_SEND_BUILTIN
 
-#ifdef PRJ_TEST
-    #undef MAX_CHN_COUNT
-    #define MAX_CHN_COUNT               24
+//#define PDU_GC40_03K_125H           //ac_in3_out3_40a_p8_12ch_nologo_en
+//#define PDU_GC60_04K_125H           //ac_in3_out1_40a_p4_24ch_nologo_en
+#ifdef PRJ_USASL_AC_I3_O1
+#define PROD_POWER_TYPE                 5
+#else
+#define PROD_POWER_TYPE                 3
 #endif
+#elif (defined PRJ_ITK_AC_I1_O1) || (defined PRJ_ITK_AC_I3_O1)
+
+#define LANGUAGE                        2           //russia
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
+#define CASCADE_CNT                     5
 
+#define MAX_CHN_COUNT                   16
+#define PHASE_GROUP_CNT                 8
 
-#ifdef PRJ_XIAN_GOM037
-    //#define GOM037_PDU_GC10_08K_80H        //ac_in1_out1_40a_p8_5ch_nologo_cn
-    #define GOM037PDU_GC20_04K_125H        //ac_in1_out1_40a_p4_5ch_nologo_cn
-  
+#define USE_SMTP
+#define SMTP_SEND_BUILTIN
 
-    #ifdef GOM037PDU_GC20_04K_125H
-        #undef CHANNEL_DELAY_SEC
-        #define CHANNEL_DELAY_SEC        5
-    #endif
+#ifdef PRJ_ITK_AC_I1_O1
+#define PROD_POWER_TYPE                 0
+#else
+#define PROD_POWER_TYPE                 5
 #endif
 
-#ifdef PRJ_USA_SL
-    #define PDU_GC40_03K_125H           //ac_in3_out3_40a_p8_12ch_nologo_en
+#elif (defined PRJ_LITECH_AC_I1_O1) || (defined PRJ_LITECH_AC_I3_O1)
 
-    //#define PDU_GC60_04K_125H         //ac_in3_out1_40a_p4_24ch_nologo_en
-#endif
+#define LANGUAGE                        1           //english
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
+#define CASCADE_CNT                     5
+
+#define MAX_CHN_COUNT                   16
+#define PHASE_GROUP_CNT                 8
 
+#define USE_SMTP
+#define SMTP_SEND_BUILTIN
 
-#ifdef PRJ_RUSSIA_ITK
-    #define SMTP_SEND_BUILTIN
+#ifdef PRJ_LITECH_AC_I1_O1
+#define PROD_POWER_TYPE                 0
+#else
+#define PROD_POWER_TYPE                 5
 #endif
+#elif defined PRJ_STSC_I3_O3
+#define LANGUAGE                        1           //english
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
+#define CASCADE_CNT                     5
 
+#define MAX_CHN_COUNT                   24
+#define PHASE_GROUP_CNT                 8
 
-#ifdef PRJ_ANDERSON
-    #define USE_MQTT
-    //#define MQTT_SERVER_BUILTIN
+#define USE_SMTP
+#define SMTP_SEND_BUILTIN
 
-    #define SMTP_SEND_BUILTIN
+#define PROD_POWER_TYPE                 3
+#elif defined PRJ_ANDERSON_AC_I3_O3
 
+#define LANGUAGE                        1           //english
+#define SMPLE_TIME                      30          //ms
+#define SAVE_TIME                       60000       //ms
+#define CASCADE_CNT                     5
 
-    //#define USE_NETSWITCH
+#define MAX_CHN_COUNT                   24
+#define PHASE_GROUP_CNT                 8
 
-    #define SW_STATIC_PORT_START
-    #define SW_PORT_INDEX_START         0
-    #define SW_PORT_INDEX_END           21
+#define USE_SMTP
+#define SMTP_SEND_BUILTIN
 
-    //#define SW_STATIC_IP
-    #ifdef SW_STATIC_IP
-        #define SW_HOST_IP              "192.168.234.1"
-        #define SW_PDU_IP               "192.168.234.132"
-    #endif
-    
-    #undef MAX_CHN_COUNT
-    #define MAX_CHN_COUNT               24
-#endif
+#define SW_STATIC_PORT_START
+#define SW_PORT_INDEX_START             0
+#define SW_PORT_INDEX_END               21
+#elif defined PRJ_HYPERTEC_AC_I3_O1
+//ac_in3_out1_36ch_nologo_en_hypertec
+#define USE_SMTP
+#define SMTP_SEND_BUILTIN
+
+#undef PHASE_GROUP_CNT
+#undef CHANNEL_DELAY_SEC
+
+#define PHASE_GROUP_CNT                 6
+#define CHANNEL_DELAY_SEC               6
+#elif defined PRJ_INSPUR_DC_I_DC_O
+#define USE_SMTP
+#define SMTP_SEND_BUILTIN
+
+#define PROD_POWER_TYPE                 1
+#elif defined PRJ_TEST
+//#define USE_SMTP
+//#define SMTP_SEND_BUILTIN
 
+//#define USE_MQTT
+//#define MQTT_SERVER_BUILTIN
 
-#ifdef PRJ_HYPERTEC
-    //ac_in3_out1_36ch_nologo_en_hypertec
-    
-    #undef PHASE_GROUP_CNT
-    #undef CHANNEL_DELAY_SEC
+#undef MAX_CHN_COUNT
+#define MAX_CHN_COUNT                   2//4
 
-    #define PHASE_GROUP_CNT             6
-    #define CHANNEL_DELAY_SEC           6
+#define PROD_POWER_TYPE                 3
+#else
+#error define a PRJ_XXXX please!
 #endif
 
 
 #endif
 
 
-//¸É½Úµã˳ÐòÅäÖÃ
-//-[]-[][]-[][]-[0][1]
-//---------[][]-[3][2]
-
-//-[]-[][]-[][]-[IN3][IN4]
-//---------[][]-[IN1][IN2]
-#define IN1_Map_Index  3
-#define IN2_Map_Index  2
-#define IN3_Map_Index  0
-#define IN4_Map_Index  1
-
-/*
-//-[]-[][]-[][]-[IN1][IN2]
-//---------[][]-[IN3][IN4]
-#define IN1_Map_Index  0
-#define IN2_Map_Index  1
-#define IN3_Map_Index  3
-#define IN4_Map_Index  2
-*/

+ 55 - 67
pub

@@ -1,25 +1,25 @@
 
-#PRJS="PRJ_XIAN_P4"
-#PRJS="PRJ_XIAN_P8"
+#PRJS="PRJ_XIAN_AC_I1_O1_P4"
+#PRJS="PRJ_XIAN_AC_I1_O1_P8"
 #PRJS="PRJ_ITK_AC_I1_O1"
 #PRJS="PRJ_ITK_AC_I3_O1"
 #PRJS="PRJ_LITECH_AC_I1_O1"
 #PRJS="PRJ_LITECH_AC_I3_O1"
-#PRJS="PRJ_ANDERSON"
+#PRJS="PRJ_ANDERSON_AC_I3_O3"
 #PRJS="PRJ_USASL_AC_I3_O1"
 #PRJS="PRJ_USASL_AC_I3_O3"
-#PRJS="PRJ_HYPERTEC"
-#PRJS="PRJ_INSPUR"
+#PRJS="PRJ_HYPERTEC_AC_I3_O1"
+#PRJS="PRJ_INSPUR_DC_I_DC_O"
 #PRJS="PRJ_RELEASE_DC_I_DC_O"
 #PRJS="PRJ_RELEASE_AC_I1_O1"
 #PRJS="PRJ_RELEASE_AC_I3_O1"
 #PRJS="PRJ_RELEASE_AC_I3_O3"
-#PRJS="PRJ_STSC_I3_O3"
+PRJS="PRJ_STSC_I3_O3"
 #PRJS="PRJ_TEST"
 
 #PRJS="PRJ_USASL_AC_I3_O1 PRJ_USASL_AC_I3_O3"
-#PRJS="PRJ_XIAN_P4 PRJ_XIAN_P8"
-PRJS="PRJ_ITK_AC_I1_O1 PRJ_ITK_AC_I3_O1"
+#PRJS="PRJ_XIAN_AC_I1_O1_P4 PRJ_XIAN_AC_I1_O1_P8"
+#PRJS="PRJ_ITK_AC_I1_O1 PRJ_ITK_AC_I3_O1"
 #PRJS="PRJ_LITECH_AC_I1_O1 PRJ_LITECH_AC_I3_O1"
 #PRJS="PRJ_RELEASE_DC_I_DC_O PRJ_RELEASE_AC_I1_O1 PRJ_RELEASE_AC_I3_O1 PRJ_RELEASE_AC_I3_O3"
 
@@ -30,135 +30,119 @@ curdir=$(dirname $fulldir)
 custdir=$curdir/cust_data
 name=null
 
+
+function prj_enable()
+{
+    fcfg=$curdir/pro/config/cfg.h
+
+    #clear space
+    sed -i 's|^[[:space:]]*||g' $fcfg
+
+    #mask all PRJ_XXX define
+    sed -i 's|^\(.*\)\(#define PRJ_*\)|//\2|g' $fcfg
+
+    #enable the needed PRJ_XXX define
+    
+    sed -i "s|^//\(#define $1*\)|\1|g" $fcfg
+}
+function prj_unmask()
+{
+    prj=$1
+
+}
+
 function do_copy()
 {
     echo do_copy ...
     
-    PRJ=$1
+    flag=1
     
     rm -f $curdir/output/t113i/etc/network/interfaces
     mkdir -p $curdir/output/t113i/root/run/app/image
-    rm -rf  $curdir/output/t113i/root/run/web
+    cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
     
-    if [ "$PRJ" = "PRJ_XIAN_P4" ]; then
+    if [ "$1" = "PRJ_XIAN_AC_I1_O1_P4" ]; then
         name=ac_in1_out1_p4_xian
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_xian_p4.h  $curdir/pro/config/cfg.h
 
         cp -f $custdir/db/ac_i1_o1_chinese_xian.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_XIAN_P8" ]; then
+    elif [ "$1" = "PRJ_XIAN_AC_I1_O1_P8" ]; then
         name=ac_in1_out1_p8_xian
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_xian_p8.h  $curdir/pro/config/cfg.h
         
         cp -f $custdir/db/ac_i1_o1_chinese_xian.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_ITK_AC_I1_O1" ]; then
+    elif [ "$1" = "PRJ_ITK_AC_I1_O1" ]; then
         name=ac_in1_out1_russia_itk
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_russia_itk.h  $curdir/pro/config/cfg.h
 
         cp -f $custdir/db/ac_i1_o1_russian.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_itk.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_ITK_AC_I3_O1" ]; then
+    elif [ "$1" = "PRJ_ITK_AC_I3_O1" ]; then
         name=ac_in3_out1_russia_itk
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_russia_itk.h  $curdir/pro/config/cfg.h
 
         cp -f $custdir/db/ac_i3_o1_russian.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_itk.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_RELEASE_DC_I_DC_O" ]; then
+    elif [ "$1" = "PRJ_RELEASE_DC_I_DC_O" ]; then
         name=dc_in_dc_out_release
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_general.h  $curdir/pro/config/cfg.h
-
+        
         cp -f $custdir/db/dc_i_dc_o_chinese.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_RELEASE_AC_I1_O1" ]; then
+    elif [ "$1" = "PRJ_RELEASE_AC_I1_O1" ]; then
         name=ac_in1_out1_release
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_general.h  $curdir/pro/config/cfg.h
 
         cp -f $custdir/db/ac_i1_o1_chinese.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_RELEASE_AC_I3_O1" ]; then
+    elif [ "$1" = "PRJ_RELEASE_AC_I3_O1" ]; then
         name=ac_in3_out1_release
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_general.h  $curdir/pro/config/cfg.h
 
         cp -f $custdir/db/ac_i3_o1_chinese.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_RELEASE_AC_I3_O3" ]; then
+    elif [ "$1" = "PRJ_RELEASE_AC_I3_O3" ]; then
         name=ac_in3_out3_release
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_general.h  $curdir/pro/config/cfg.h
 
         cp -f $custdir/db/ac_i3_o3_chinese.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
     elif [ "$PRJ" = "PRJ_LITECH_AC_I1_O1" ]; then
         name=ac_in1_out1_litech
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_litech.h  $curdir/pro/config/cfg.h
 
         cp -f $custdir/db/ac_i1_o1_english.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_litech.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_LITECH_AC_I3_O1" ]; then
+    elif [ "$1" = "PRJ_LITECH_AC_I3_O1" ]; then
         name=ac_in3_out1_litech
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_litech.h  $curdir/pro/config/cfg.h
 
         cp -f $custdir/db/ac_i3_o1_english.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_litech.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_ANDERSON" ]; then
+    elif [ "$1" = "PRJ_ANDERSON_AC_I3_O3" ]; then
         name=ac_in3_out3_anderson
-        cp -rf $custdir/web/anderson  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_anderson.h  $curdir/pro/config/cfg.h
-        
-        #cp -f $custdir/etc/interfaces $curdir/output/t113i/etc/network/
+
         cp -f $custdir/db/ac_i3_o3_english.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_USASL_AC_I3_O1" ]; then
+    elif [ "$1" = "PRJ_USASL_AC_I3_O1" ]; then
         name=ac_in3_out1_usa_sl
-        #cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/web816/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_usa_sl.h  $curdir/pro/config/cfg.h
         
         cp -f $custdir/db/ac_i3_o1_english.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
     elif [ "$PRJ" = "PRJ_USASL_AC_I3_O3" ]; then
         name=ac_in3_out3_usa_sl
-        #cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/web816/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_hypertec.h  $curdir/pro/config/cfg.h
         
         cp -f $custdir/db/ac_i3_o3_english.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_HYPERTEC" ]; then
+    elif [ "$1" = "PRJ_HYPERTEC" ]; then
         name=ac_in3_out1_hypertec
-        cp -rf $custdir/cfg/cfg_hypertec.h  $curdir/pro/config/cfg.h
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
         
         cp -f $custdir/db/ac_i3_o1_english.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_hypertec.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_INSPUR" ]; then
+    elif [ "$1" = "PRJ_INSPUR_DC_I_DC_O" ]; then
         name=dc_in1_out1_inspur
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_inspur.h  $curdir/pro/config/cfg.h
         
         cp -f $custdir/db/dc_i_dc_o_chinese.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_TEST" ]; then
+    elif [ "$1" = "PRJ_TEST" ]; then
         name=ac_in3_out1_test
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_test.h  $curdir/pro/config/cfg.h
         
         cp -f $custdir/db/ac_i3_o1_english.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_STSC_I3_O3" ]; then
+    elif [ "$1" = "PRJ_STSC_I3_O3" ]; then
         name=ac_in3_out3_stsc
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_stsc.h  $curdir/pro/config/cfg.h
         
         cp -f $custdir/db/ac_i3_o3_english.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
@@ -166,6 +150,8 @@ function do_copy()
         echo error! $RPJ not define!!!
         exit 1
     fi
+
+    prj_enable $1
 }
 
 function do_compile()
@@ -173,9 +159,11 @@ function do_compile()
     echo do_compile ...
 
     cd $curdir/pro
-    rm -rf build && mkdir build
-    cd build && cmake ..
-    make
+    rm -rf build; mkdir build; cd build
+    cmake .. && make
+    if [ $? -gt 0 ]; then
+        exit 1
+    fi
 }
 
 function do_pack()