⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filedeal.4gl

📁 开发工具 Informix-4gl
💻 4GL
字号:

##############################################################
#/--@CLASS
#@DESC 拷贝安装文件到用户目录 
#@AUTHOR yanshu 
#@CREATEDATE 2002/04/23
#@MODIFYLIST
# NAME     DATE          REASON
#-/
##############################################################

##############################################################
#/--@METHOD
#@DESC    拷贝安装文件到用户目录 
#@RETURN  
##############################################################

FUNCTION file_cp()
 
DEFINE lv_install_path  char(256)
DEFINE lv_object_path   char(256)

    LET lv_install_path=fgl_getenv("INSTALL_PATH")
    LET lv_install_path=lv_install_path CLIPPED,"/install/"

    LET lv_object_path=fgl_getenv("PROPDIR")
    LET lv_object_path=lv_object_path CLIPPED,"/"
    
    DISPLAY "文件拷贝开始" AT 11,12
    
    Call  cp_every_dir(lv_install_path,lv_object_path,"dbs")
    Call  cp_every_dir(lv_install_path,lv_object_path,"log")
    DISPLAY "20% has completed" AT 12,12
    
    Call  cp_every_dir(lv_install_path,lv_object_path,"lib")
    Call  cp_every_dir(lv_install_path,lv_object_path,"shell")
    DISPLAY "30% has completed" AT 12,12

    Call  cp_every_dir(lv_install_path,lv_object_path,"ui")
    DISPLAY "50% has completed" AT 12,12

    Call  cp_every_dir(lv_install_path,lv_object_path,"prt")
    DISPLAY "70% has completed" AT 12,12

    Call  cp_every_dir(lv_install_path,lv_object_path,"de")
    DISPLAY "80% has completed" AT 12,12
    
    Call  cp_every_dir(lv_install_path,lv_object_path,"blsvr")
    DISPLAY "90% has completed" AT 12,12

    Call  cp_every_dir(lv_install_path,lv_object_path,"dbsvr")
    DISPLAY "100% has completed" AT 12,12
    
    display "拷贝文件结束                  " AT 11,12
    DISPLAY "                              " AT 12,12

END FUNCTION


##############################################################
#/--@METHOD
#@DESC    补丁拷贝:拷贝prt
#@RETURN  
##############################################################
FUNCTION file_cp_patch(iv_projectversion)
 
DEFINE iv_projectversion char(6)
DEFINE lv_install_path  char(256)
DEFINE lv_object_path   char(256)

    LET lv_install_path=fgl_getenv("INSTALL_PATH")
    LET lv_install_path=lv_install_path CLIPPED,"/install/"

    LET lv_object_path=fgl_getenv("PROPDIR")
    LET lv_object_path=lv_object_path CLIPPED,"/"
    
    DISPLAY "文件拷贝开始..." AT 11,12 
    RUN "sleep 2"
    
    Call  cp_every_dir(lv_install_path,lv_object_path,"lib")
    DISPLAY "10% has completed" AT 12,12
    
    Call  cp_every_dir(lv_install_path,lv_object_path,"ui")
    DISPLAY "30% has completed" AT 12,12
    
    Call  cp_every_dir(lv_install_path,lv_object_path,"log")
    Call  cp_every_dir(lv_install_path,lv_object_path,"shell")
    DISPLAY "40% has completed" AT 12,12

    Call  cp_every_dir(lv_install_path,lv_object_path,"de")
    DISPLAY "60% has completed" AT 12,12
 
    Call  cp_every_dir(lv_install_path,lv_object_path,"blsvr")
    DISPLAY "80% has completed" AT 12,12

    Call  cp_every_dir(lv_install_path,lv_object_path,"dbsvr")
    CASE iv_projectversion 
        WHEN "v4.5.0"
           RUN "rm $PROPDIR/ui/form/TmainE*.frm"
           RUN "rm $PROPDIR/ui/form/CmainE*.frm"
           RUN "rm $PROPDIR/ui/form/TmainLDD.frm"
           RUN "rm $PROPDIR/ui/form/TmainLEE.frm"
           RUN "rm $PROPDIR/ui/form/CmainLDD.frm"
           RUN "rm $PROPDIR/ui/form/CmainLEE.frm"
    END CASE
    DISPLAY "100% has completed" AT 12,12

    RUN "clear"
    DISPLAY "拷贝文件结束           " AT 11,12
    DISPLAY "                       " AT 12,12

END FUNCTION

##############################################################
#/--@METHOD
#@DESC    补丁拷贝:不拷贝prt
#@RETURN  
##############################################################
FUNCTION file_cp_patch1()
 
DEFINE lv_install_path  char(256)
DEFINE lv_object_path   char(256)

    LET lv_install_path=fgl_getenv("INSTALL_PATH")
    LET lv_install_path=lv_install_path CLIPPED,"/install/"

    LET lv_object_path=fgl_getenv("PROPDIR")
    LET lv_object_path=lv_object_path CLIPPED,"/"
    
    DISPLAY "文件拷贝开始..." AT 11,12 
    RUN "sleep 2"
    
    Call  cp_every_dir(lv_install_path,lv_object_path,"dbs")
    Call  cp_every_dir(lv_install_path,lv_object_path,"log")
    DISPLAY "10% has completed" AT 12,12
    Call  cp_every_dir(lv_install_path,lv_object_path,"workflow")
    DISPLAY "20% has completed" AT 12,12
    
    Call  cp_every_dir(lv_install_path,lv_object_path,"ui")
    DISPLAY "60% has completed" AT 12,12

    Call  cp_every_dir(lv_install_path,lv_object_path,"pubfun")
    DISPLAY "70% has completed" AT 12,12

    Call  cp_every_dir(lv_install_path,lv_object_path,"de")
    DISPLAY "80% has completed" AT 12,12
    
    Call  cp_every_dir(lv_install_path,lv_object_path,"blsvr")
    DISPLAY "90% has completed" AT 12,12

    Call  cp_every_dir(lv_install_path,lv_object_path,"dbsvr")
    DISPLAY "100% has completed" AT 12,12

    RUN "clear"
    DISPLAY "补丁拷贝文件结束           " AT 11,12
    SLEEP 2
    DISPLAY "                           " AT 12,12

END FUNCTION



##############################################################
#/--@METHOD
#@DESC    拷贝指定文件到指定目录 
#@RETURN  
##############################################################
    
FUNCTION cp_every_dir(iv_install_path,iv_object_path,iv_filedir)
#--/@PARAMETER
DEFINE iv_install_path char(256)
DEFINE iv_object_path  char(256)
DEFINE iv_filedir        char(20)
#-/
DEFINE lv_runstring      char(256)
DEFINE lv_result       SMALLINT

    LET lv_result=0
 
    LET lv_runstring="cp -r ",iv_install_path CLIPPED,iv_filedir CLIPPED
    LET lv_runstring=lv_runstring CLIPPED," ",
                   iv_object_path CLIPPED
    RUN lv_runstring
    
END FUNCTION

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -