📄 makesis.php
字号:
<?
/*
This file will create an sis file with a main swf file you specify
and all swf files of a subfolder you specify for installation on symbian 2nd edition
and symbian 3rd edition devices
*/
/*** SIS Settings ****************************************/
$appInfo = array (
"appName" => "Arcade1", // The name of your application
"vendor" => "Sprite", // The name of your company
"player" => "2", // The version of the flash lite player your application is for (1.1 or 2)
"appUID_2nd" => "0x10207F05", // The UID of the application for 2nd Edition platform (get your block of id磗 at the symbian website)
"appUID_3rd" => "0xA0000001", // The UID of the application for 3rd Edition platform (get your block of id磗 at the symbian website)
"flashFolder_2nd" => "!:\\Nokia\\Others\\", // the folder where the swf files will be installed
"flashFolder_3rd" => "!:\\Others\\", // the folder where the swf files will be installed
"S60ProductID" => "0x200005F9", // see the ID磗 at http://www.newlc.com/Common-products-UIDs.html
"sign_password" => "yourpassword" // the password you used with makekeys
);
$subFolder = "games"; // that磗 the name of the subfolder which contains additional swf files
$MainSWF = "ArcadeHeroes.swf"; // that磗 your main swf file
/*********************************************************/
echo "\nCreating ".$appInfo["appName"]."_2nd_edition.pkg ...\n";
$dev_path = $appInfo["flashFolder_2nd"];
// first let磗 create a 2nd edition sis file
$str = ";
; Install file for ".$appInfo["appName"]." - 2nd edition
;
; Installation header
; Only one component name as we only support English
; UID is the app's UID
; Languages
; none - English only by default
#{\"".$appInfo["appName"]."\"},(".$appInfo["appUID_2nd"]."),1,0,0
\"$MainSWF\"-\"".$dev_path."$MainSWF\"
";
// Add content from the subfolder
if (is_dir($subFolder)) {
$handle = opendir ($subFolder); // name of the subfolder
while (false !== ($file = readdir ($handle))) {
$check = explode(".", $file);
if ($check[1] == "swf"){
echo " Including ".$subFolder."/".$file."\n";
$str .= "\n\"".$subFolder."\\".$file."\"-\"".$dev_path."".$subFolder."\\".$file."\"";
}
}
closedir($handle);
}
$str .= "
; Required files
; None
; Component .sis files
; None";
// write .pkg file
$file = fopen($appInfo["appName"]."_2nd_edition.pkg", "w");
fwrite($file, $str);
fclose($file);
passthru("makesis1 ".$appInfo["appName"]."_2nd_edition.pkg")."\n";
// now let磗 create a 3rd edition sis file
echo "\nCreating ".$appInfo["appName"]."_3rd_edition.pkg ...\n";
$dev_path = $appInfo["flashFolder_3rd"];
$str = "
;
; Install file for ".$appInfo["appName"]." - 3rd edition
;
; Languages
; none - English only by default
#{\"".$appInfo["appName"]."\"},(".$appInfo["appUID_3rd"]."),2,0,0
;Localised vendor
%{\"".$appInfo["vendor"]."\"}
;Non-localised vendor
:\"".$appInfo["vendor"]."\"
; Product/Platform Compatibility
; N80 UID
[".$appInfo["S60ProductID"]."], 0, 0, 0, {\"S60ProductID\"}
\"$MainSWF\"-\"".$dev_path."$MainSWF\"
";
// Add content
if (is_dir($subFolder)) {
$handle = opendir ($subFolder); // name of the subfolder
while (false !== ($file = readdir ($handle))) {
$check = explode(".", $file);
if ($check[1] == "swf"){
echo " Including ".$subFolder."/".$file."\n";
$str .= "\n\"".$subFolder."\\".$file."\"-\"".$dev_path."".$subFolder."\\".$file."\"";
}
}
closedir($handle);
}
// write .pkg file
$file = fopen($appInfo["appName"]."_3rd_edition.pkg", "w");
fwrite($file, $str);
fclose($file);
passthru("makesis2 ".$appInfo["appName"]."_3rd_edition.pkg")."\n";
passthru("SignSIS -o -s -v ".$appInfo["appName"]."_3rd_edition.sis ".$appInfo["appName"]."_3rd_edition_signed.sis mycert.cer mykey.key ".$appInfo['sign_password']);
echo "Done!\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -