|
|
我把要加密的代碼替換成生成出來的set cam_post_dir [MOM_ask_env_var UGII_CAM_POST_DIR]) e! t" \1 I2 L, c* h, S" ?
set this_post_dir "[file dirname [info script]]"0 |8 F7 m& N0 y8 }
set encrypted_post_file "[file rootname [info script]]ab_crypt.txt"
% S r1 `) C. Y& F" w8 w7 uif { ![file exists $encrypted_post_file] } {) `- i( H i3 t$ M' @+ g+ }! F
set __msg "ERROR in[info script] :"$encrypted_post_file" is not found."
" H4 h7 [$ u! h3 ?& _ MOM_abort $__msg
7 v. H8 a* N# V6 J5 _}
6 ]7 P( y. c# t9 j4 _ o2 X8 V$ I% G( i7 X
########################################################################
9 R) r( O0 g# p! ^; ]) N* A- G set x64 0 ; set path "" ;7 ~5 g9 t5 [5 m; L
set root_dir [MOM_ask_env_var UGII_ROOT_DIR] ;1 F2 J( |1 Q1 K* Z1 h5 L3 L- H
set os_64 ${root_dir}ugtcl.dll
( I+ ?0 @7 r$ m- o% \9 ^3 r' A" C% L if { [file exists $os_64] } {5 Q) m' |$ }" a; A; I/ B# V
set sz [ file size $os_64 ] ; set sz [ expr double($sz) ]* o# Y# e* q% G3 p7 t# m
if {$sz>600000.} { set x64 1 ; } else { set x64 0 ; }0 x& }( c; `5 T' d4 P" m+ w
} else { set x64 1 ; }, G; T& \: \3 O. l
if {$x64} { set encload_dll ${path}encload_x64.dll ; } else { set encload_dll ${path}encload_x32.dll ; }
5 ^' j3 Z' B$ c n! A' y if { ![file exists ${cam_post_dir}$encload_dll] } {
/ k Z2 R6 _( k7 S1 C1 N set __msg "ERROR in[info script] :Shared library "Encload" is not found in ${cam_post_dir}."
9 X1 @4 {5 I* r5 X9 f& o; p MOM_abort $__msg& \" Z, L3 {* Y6 E- C
}
, ^' ^ E- W3 I5 C : T+ j. } g( C6 t5 k2 d
########################################################################3 a/ d8 m; o. ]3 Z: ~- m! q
catch {8 o) f+ C2 t( i0 @# t
MOM_run_user_function ${cam_post_dir}$encload_dll ufusr* Y) o- `9 e. L# K
encload [file nativename $encrypted_post_file]0 y5 q& `+ m2 s6 L
}
; k ^6 [9 o6 X% [# ~8 l% ~' T 但是不成功! 還請大佬教一下 |
|