看了看过去的博客觉得自己这一年学的真杂……这不,又开始学InstallShield了。
先简单介绍一下,InstallShield是一款打包软件,作用是把已经开发完成的应用程序打包成安装程序,实现一键安装or卸载的功能。
这款软件网上教程不多且千篇一律,大佬给我拷了几个pdf教程,我边看边记录成笔记,供自己日后查阅,也供同样学习小伙伴参考。
InstallShield脚本语言类C,写惯了面向对象稍微有点看不惯,但它毕竟只是个脚本语言,比C还是好理解多了。
#include 'ifx.h'
#include 'ShutDownApp.rul'
//自定义函数的声明 prototype 函数名(形参1,形参2,...); program //自定义函数的调用 函数名( 实际参数表 ); endprogram; //函数体 function 函数名(形参1,形参2,...) 定义函数内部使用的变量; begin 语句 end;
//if-then 结构 if(条件表达式) then 语句 endif; //if-then-else 结构 if(条件表达式) then 语句1 else 语句2 endif; //elseif 结构 if(条件表达式1) then 语句1 elseif(条件表达式2) then 语句2 elseif(条件表达式3) then 语句3 ... endif; //if和goto结构 //一旦szSrc为空字符串时,反复执行Name标号所在位置的语句。 Name: AskText('Company name:','',szSrc); ... if(szSrc = '') goto Name;
switch(表达式)
case 常量1:语句1
case 常量2:语句2
...
case 常量n:语句n
default:语句n+1
endswitch;
while(表达式)
语句
endwhile;
repeat
语句
until(表达式);
for X=A to B step C
语句
endfor;
for X=A dowmto B step C
语句
endfor;
// 以下这些写法都是正确的 BOOL bLicenseAccepted; number nResult, nLevel, nSize, nSetupType; string szTitle, szMsg, szOpt1, szOpt2, szLicenseFile; string szQuestion; STRING szKey; number nvDisk; NUMBER nType;
#define TITLE'问候' // 使程序中出现的所有TITLE都代表“问候”
function Demo(nNum1,nNum2,nNum3,bvalidEntry) NUMBER nNum1; NUMBER nNum2; NUMBER nNum3; BOOL bvalidEntry; begin ... end;
/*
* 段注释
*/
// 行注释
想要继续学习InstallShield,请查看我的后续博客《InstallShield实例(OnFirstUIBefore分析、安装导航优化)》
联系客服