Browse Source

master Fixed the problem with mono installer

Mike Smith 11 years ago
parent
commit
371e7a270c
2 changed files with 57 additions and 6 deletions
  1. 51 0
      config/create.sql
  2. 6 6
      toolset/setup/linux/installer.py

+ 51 - 0
config/create.sql

@@ -57,3 +57,54 @@ INSERT INTO Fortune (message) VALUES ('Feature: A bug with seniority.');
 INSERT INTO Fortune (message) VALUES ('Computers make very fast, very accurate mistakes.');
 INSERT INTO Fortune (message) VALUES ('<script>alert("This should not be displayed in a browser alert box.");</script>');
 INSERT INTO Fortune (message) VALUES ('フレームワークのベンチマーク');
+
+DROP TABLE IF EXISTS world;
+CREATE TABLE  world (
+  id int(10) unsigned NOT NULL auto_increment,
+  randomNumber int NOT NULL default 0,
+  PRIMARY KEY  (id)
+)
+ENGINE=INNODB;
+
+DROP PROCEDURE IF EXISTS load_data;
+
+DELIMITER #
+CREATE PROCEDURE load_data()
+BEGIN
+
+declare v_max int unsigned default 10000;
+declare v_counter int unsigned default 0;
+
+  TRUNCATE TABLE world;
+  START TRANSACTION;
+  while v_counter < v_max do
+    INSERT INTO world (randomNumber) VALUES ( floor(0 + (rand() * 10000)) );
+    SET v_counter=v_counter+1;
+  end while;
+  commit;
+END #
+
+DELIMITER ;
+
+CALL load_data();
+
+DROP TABLE IF EXISTS fortune;
+CREATE TABLE  fortune (
+  id int(10) unsigned NOT NULL auto_increment,
+  message varchar(2048) CHARACTER SET 'utf8' NOT NULL,
+  PRIMARY KEY  (id)
+)
+ENGINE=INNODB;
+
+INSERT INTO fortune (message) VALUES ('fortune: No such file or directory');
+INSERT INTO fortune (message) VALUES ('A computer scientist is someone who fixes things that aren''t broken.');
+INSERT INTO fortune (message) VALUES ('After enough decimal places, nobody gives a damn.');
+INSERT INTO fortune (message) VALUES ('A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1');
+INSERT INTO fortune (message) VALUES ('A computer program does what you tell it to do, not what you want it to do.');
+INSERT INTO fortune (message) VALUES ('Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen');
+INSERT INTO fortune (message) VALUES ('Any program that runs right is obsolete.');
+INSERT INTO fortune (message) VALUES ('A list is only as strong as its weakest link. — Donald Knuth');
+INSERT INTO fortune (message) VALUES ('Feature: A bug with seniority.');
+INSERT INTO fortune (message) VALUES ('Computers make very fast, very accurate mistakes.');
+INSERT INTO fortune (message) VALUES ('<script>alert("This should not be displayed in a browser alert box.");</script>');
+INSERT INTO fortune (message) VALUES ('フレームワークのベンチマーク');

+ 6 - 6
toolset/setup/linux/installer.py

@@ -158,14 +158,14 @@ class Installer:
     self.__run_command("rm ringojs_0.9-1_all.deb")
 
     #
-    # Mono - TODO - this install script doesn't work.
+    # Mono
     #
-    #self.__run_command("git clone git://github.com/mono/mono", retry=True)
+    self.__run_command("git clone git://github.com/mono/mono", retry=True)
     #self.__run_command("git checkout mono-3.2.3", cwd="mono")
-    #self.__run_command("./autogen.sh --prefix=/usr/local", cwd="mono")
-    #self.__run_command("make get-monolite-latest", cwd="mono")
-    #self.__run_command("make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/gmcs.exe", cwd="mono")
-    #self.__run_command("sudo make install", cwd="mono")
+    self.__run_command("./autogen.sh --prefix=/usr/local", cwd="mono")
+    self.__run_command("make get-monolite-latest", cwd="mono")
+    self.__run_command("make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/basic.exe", cwd="mono")
+    self.__run_command("sudo make install", cwd="mono")
 
     self.__run_command("mozroots --import --sync", retry=True)