ZMC_CFILE.pl
4.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
my $param_num = $#ARGV;
if ($ARGV[0] == 1){
system "copy /Y Projects\\$ARGV[5]\\$ARGV[6]\\TOPWELL_RES.mak make\\TOPWELL_RES.mak";
system "copy /Y Projects\\$ARGV[5]\\$ARGV[6]\\codegen.dws custom\\codegen\\KEYTAK61D_GB_11C_BB\\codegen.dws";
system "copy /Y Projects\\$ARGV[5]\\$ARGV[6]\\TOPWELL_GPRS.mak make\\KEYTAK61D_GB_11C_GPRS.mak";
system "copy /Y Projects\\Themes\\LCD$ARGV[3]\\$ARGV[8]_image.zip plutommi\\Customer\\Images\\$ARGV[1]$ARGV[3]\\image.zip";
system "copy /Y Projects\\Themes\\LCD$ARGV[3]\\$ARGV[8]_Theme.h plutommi\\Customer\\LcdResource\\MainLcd$ARGV[3]\\$ARGV[2]\\Themecomponents.h";
system "copy /Y Projects\\Themes\\LCD$ARGV[3]\\$ARGV[8]_Theme.c plutommi\\Customer\\LcdResource\\MainLcd$ARGV[3]\\$ARGV[2]\\ThemeRes.c";
system "copy /Y Projects\\\Themes\\LCD$ARGV[3]\\$ARGV[9]_ref_list.txt plutommi\\Customer\\CustResource\\PLUTO_MMI\\ref_list.txt";
system "copy /Y Projects\\\Themes\\Topwell_Resouces.h plutommi\\Customer\\CustomerInc\\TopwellResDef.h";
system "copy /Y Projects\\Devices\\MemoryDevice_$ARGV[4].h custom\\system\\KEYTAK61D_GB_11C_BB\\custom_MemoryDevice.h";
system "copy /Y Projects\\$ARGV[5]\\$ARGV[6]\\TOPWELL_FEATURES.h plutommi\\mmi\\Inc\\TOPWELL_FEATURES.h";
open MyFile, ">topwell_readme.txt";
my $echo="; ";
my $strno="BD:".$ARGV[5].$echo."MD:".$ARGV[6].$echo."LG:".$ARGV[7].$echo."IM:".$ARGV[8].$echo."RF:".$ARGV[9].$echo;
my $len=length($strno);
my $i;
for($i=0;$i<$len;$i++){
$ch = substr($strno,$i,1);
$num = ord($ch);
$hex=sprintf("%x", $num);
print MyFile "$hex" ;
}
close MyFile;
}elsif ($ARGV[0] == 2){
system "copy /Y Projects\\$ARGV[5]\\$ARGV[6]\\codegen.dws custom\\codegen\\KEYTAK61D_GB_11C_BB\\codegen.dws";
system "copy /Y Projects\\Themes\\LCD$ARGV[3]\\$ARGV[8]_image.zip plutommi\\Customer\\Images\\$ARGV[1]$ARGV[3]\\image.zip";
system "copy /Y Projects\\Themes\\LCD$ARGV[3]\\$ARGV[8]_Theme.h plutommi\\Customer\\LcdResource\\MainLcd$ARGV[3]\\$ARGV[2]\\Themecomponents.h";
system "copy /Y Projects\\Themes\\LCD$ARGV[3]\\$ARGV[8]_Theme.c plutommi\\Customer\\LcdResource\\MainLcd$ARGV[3]\\$ARGV[2]\\ThemeRes.c";
system "copy /Y Projects\\\Themes\\LCD$ARGV[3]\\$ARGV[9]_ref_list.txt plutommi\\Customer\\CustResource\\PLUTO_MMI\\ref_list.txt";
}elsif ($ARGV[0] == 3){
open MyFile, ">make\\TOPWELL_USER.mak";
print MyFile "TOPWELL_SW_CONFIG=$ARGV[1]";
close MyFile;
}elsif ($ARGV[0] == 4){
open MyFile, ">plutommi\\mmi\\Inc\\TopwellVerno.h";
print MyFile "#define VER_NO_HW \"$ARGV[1]\"\n#define VER_NO_PX \"$ARGV[2]\"\n#define VER_NO_IN \"$ARGV[3]\"\n#define VER_NO_SW \"$ARGV[4]\"\n#define VER_NO2_SW \"$ARGV[5]\"";
close MyFile;
}elsif ($ARGV[0] == 5){
open MyFile, ">topwell_verno.bat";
my $echo="_";
my $echo2="(";
my $echo3=")";
if ($ARGV[1] == 1){
print MyFile "set ZIP_VERNO_NAME=$ARGV[5]";
}elsif ($ARGV[1] == 2){
print MyFile "set ZIP_VERNO_NAME=$ARGV[5]$echo2$ARGV[6]$echo3";
}elsif ($ARGV[1] == 3){
print MyFile "set ZIP_VERNO_NAME=$ARGV[2]$echo$ARGV[3]$echo$ARGV[4]$echo$ARGV[5]$echo2$ARGV[6]$echo3";
}else{
print MyFile "set ZIP_VERNO_NAME=$ARGV[2]$echo$ARGV[3]$echo$ARGV[4]$echo$ARGV[5]";
}
close MyFile;
}else{
$fileForm = "tst\\database_classb\\";
$fileTo = "build\\KEYTAK61D_GB_11C\\KEYTAK61D_GB_11C_PCB01_gprs_MT6261_S00.T2014_VERSION.bin\\";
$filePub1 = "BPLGUInfoCustomApp";
$filePub2 = "SrcP";
$filePub3 = "_";
$filePub4 = ".check";
$fileExist1 = "MT6261_S00_T2014_VERSION";
$fileExist2 = "MT6261_S00_T2014_VERSIONX";
if ($ARGV[0] == 6){
if ( -e $fileForm.$filePub1.$filePub2.$filePub3.$fileExist1 ) {
system "copy /Y $fileForm$filePub1$filePub2$filePub3$fileExist1 $fileTo$filePub1$filePub2$filePub3$fileExist1";
}elsif ( -e $fileForm.$filePub1.$filePub2.$filePub3.$fileExist2 ) {
system "copy /Y $fileForm$filePub1$filePub2$filePub3$fileExist2 $fileTo$filePub1$filePub2$filePub3$fileExist2";;
}
system "copy /Y topwell_readme.txt $fileTo.\\readme.txt";
system "Rar a -ep $ARGV[1].rar $fileTo.\\*";
}
elsif ($ARGV[0] == 7){
if ( -e $fileForm.$filePub1.$filePub2.$filePub3.$fileExist1 ) {
unlink($fileForm.$filePub3.$filePub1.$filePub3.$fileExist1.$filePub4);
unlink($fileForm.$filePub1.$filePub2.$filePub3.$fileExist1);
}elsif ( -e $fileForm.$filePub1.$filePub2.$filePub3.$fileExist2 ) {
unlink($fileForm.$filePub3.$filePub1.$filePub3.$fileExist2.$filePub4);
unlink($fileForm.$filePub1.$filePub2.$filePub3.$fileExist2);
}
}
}