Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.utilities.radio71Installer
<<Changes
<<12/9/01; 11:38:22 PM by JES
<<Don't start threads back up at the end. The user needs to restart the app when this script is done, so the threads will be started up when they launch after replacing the app with the new version.
<<11/21/01; 6:32:01 PM by JES
<<Changed references to Smurf Turf, to Radio UserLand 7.1.
if dialog.confirm ("Install the Radio UserLand 7.1 development tools?") {
temp.update = rootUpdates.update;
if not temp.update (@system) {
dialog.alert ("You must update Radio.root before installing Radio 7.1. Installation aborted.");
return (false)};
local (adroutline = @scratchpad.radio71Install);
new (outlinetype, adroutline);
edit (adroutline);
target.set (adroutline);
op.setlinetext ("Installing Radio UserLand 7.1 on " + clock.now () + ".");
local (insertdir = right);
on comment (s) {
op.insert (s, insertdir);
insertdir = down};
local (folderurl);
bundle { //set folderurl
folderurl = "http://static.userland.com/xmlStorageSystem/users/smurfette@braincase.net/"};
local (downloadfolder);
bundle { //set downloadfolder
local (pc = file.getPathChar ());
local (prefsfolder = file.getSpecialFolderPath ("", "Preferences", true));
local (userlandfolder = prefsfolder + "UserLand" + pc);
file.sureFolder (userlandfolder);
downloadfolder = userlandfolder + "Radio 7.1 Download" + pc;
if not file.exists (downloadfolder) {
file.sureFolder (downloadfolder);
comment ("Created \"" + downloadfolder + "\"")}};
bundle { //download parts
on downloadpart (fname) {
local (s = tcp.httpReadUrl (folderurl + fname));
local (f = downloadfolder + fname);
file.writewholefile (f, s);
fatpages.importfatfile (f);
comment ("Installed \"" + fname + "\"")};
try {
downloadpart ("playlist.init.ftsc")};
downloadpart ("agents.statusMessage.ftsc");
downloadpart ("callbacks.opInsert.ftsc");
downloadpart ("apps.weblogsCom.fttb");
downloadpart ("apps.xmlStorageSystem.fttb");
downloadpart ("builtins.bookmarksMenu.fttb");
downloadpart ("builtins.chatClient.fttb");
downloadpart ("builtins.radio.fttb");
downloadpart ("clickers.typeOPML.ftsc");
downloadpart ("clickers.typeTEXT.ftsc");
downloadPart ("file.getSpecialFolderPath.ftsc");
downloadpart ("html.prefs.fttb");
downloadpart ("html.editor.fttb");
downloadpart ("apps.manila.fttb");
downloadpart ("op.rssToOutline.ftsc");
downloadpart ("pike.init.ftsc");
downloadpart ("pike.runFileMenuScript.ftsc");
downloadpart ("pike.runEditMenuScript.ftsc");
downloadPart ("scheduler.monitorThreads.ftsc");
downloadPart ("startup.startupScript.ftsc");
downloadPart ("tcp.httpClient.ftsc");
downloadpart ("xml.aggregator.fttb");
downloadpart ("xml.rpc.ftsc");
downloadpart ("Frontier.tools.fttb")};
bundle { //initialize and finish installation
filemenu.save ();
user.rootUpdates.servers.Radio.lastUpdate = "Tue, 18 Sep 2001 07:00:00 GMT";
user.rootUpdates.servers.Radio.server = "updates.braincase.net";
dialog.alert ("Radio UserLand will now contact the beta-root-updates server for the latest beta updates. Click OK to continue.");
temp.update = rootUpdates.update;
try {
temp.update (@system, true)};
user.scheduler.prefs.runThreads = false; scheduler.monitorThreads ();
Frontier.tools.init ();
radio.init ();
system.verbs.builtins.radio.data.flInstall = true;
weblogsCom.init ();
xml.aggregator.init ();
op.firstsummit ();
radio.utilities.radio71FinishInstall ();
fileMenu.saveMyRoot (@root);
user.scheduler.prefs.runThreads = true; //; scheduler.monitorThreads ()
msg ("");
dialog.alert ("Radio UserLand 7.1 upgrade complete. Please exit Radio, install the Radio UserLand 7.1 application, and re-launch to complete the installation.")}}
<<bundle //original code
<<if dialog.confirm ("Install the Smurf Turf development tools?")
<<local (adroutline = @scratchpad.smurfTurfInstall)
<<new (outlinetype, adroutline)
<<edit (adroutline)
<<target.set (adroutline)
<<op.setlinetext ("Installing Smurf Turf on " + clock.now () + ".")
<<local (insertdir = right)
<<on comment (s)
<<op.insert (s, insertdir)
<<insertdir = down
<<local (folderurl = "http://pebbles.userland.com/downloads/")
<<local (downloadfolder)
<<bundle //set downloadfolder
<<local (pc = file.getPathChar ())
<<local (prefsfolder = file.getSpecialFolderPath ("", "Preferences", true))
<<local (userlandfolder = prefsfolder + "UserLand" + pc)
<<file.sureFolder (userlandfolder)
<<downloadfolder = userlandfolder + "Smurf Turf Download" + pc
<<file.sureFolder (downloadfolder)
<<comment ("Created \"" + downloadfolder + "\"")
<<on downloadpart (fname)
<<local (s = tcp.httpReadUrl (folderurl + fname))
<<local (f = downloadfolder + fname)
<<file.writewholefile (f, s)
<<fatpages.importfatfile (f)
<<comment ("Installed \"" + fname + "\"")
<<bundle //html.prefs is on Brent's server
<<local (s = tcp.httpReadUrl ("http://static2.userland.com/downloads/html.prefs.fttb"))
<<local (f = downloadfolder + "html.prefs.fttb")
<<file.writewholefile (f, s)
<<fatpages.importfatfile (f)
<<comment ("Installed \"" + "html.prefs.fttb" + "\"")
<<bundle //builtins.chatclient is on Jake's server
<<local (s = tcp.httpReadUrl ("http://static.userland.com/xmlStorageSystem/users/smurfette@braincase.net/builtins.chatClient.fttb"))
<<local (f = downloadfolder + "builtins.chatClient.fttb")
<<file.writewholefile (f, s)
<<fatpages.importfatfile (f)
<<comment ("Installed \"" + "builtins.chatClient.fttb" + "\"")
<<downloadpart ("apps.weblogsCom.fttb")
<<downloadpart ("builtins.html.prefs.fttb")
<<downloadpart ("builtins.radio.fttb")
<<downloadpart ("builtins.xml.aggregator.fttb")
<<filemenu.save ()
<<radio.init ()
<<weblogsCom.init ()
<<xml.aggregator.init ()
<<op.firstsummit ()
<<radio.utilities.smurfTurffinishInstall ()
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.