* tables/appdb_tables.sql,prefs_list.sql, user_list.sql,user_prefs.sql,
user_privs.sql, app_category.sql, session_list.sql, create_tables, README,
include/config.php.sample
Chris Morgan <[EMAIL PROTECTED]>
Add appdb/tables/create_tables script to run the sql necessary to create and
setup appdb tables. Add app_category.sql and session_list.sql from Jeremy,
without these the database wasn't handling logins correctly and had no
categories. README now has some instructions on how to setup a local appdb.
Modified config.php.sample to point to apidb to match what is in the sql in
appdb/tables. Sql for table creation to use "if exists" to prevent database
errors on trying to drop tables that don't exist.
Index: include/config.php.sample
===================================================================
RCS file: /home/wine/appdb/include/config.php.sample,v
retrieving revision 1.1
diff -u -r1.1 config.php.sample
--- include/config.php.sample 15 Mar 2004 16:51:04 -0000 1.1
+++ include/config.php.sample 17 Mar 2004 18:14:48 -0000
@@ -13,7 +13,7 @@
$apidb_dbuser = "wineowner";
$apidb_dbpass = "lemonade";
$apidb_dbhost = "localhost";
-$apidb_db = "winehq_appdb";
+$apidb_db = "apidb";
/*
@@ -22,6 +22,6 @@
$userdb_dbuser = "wineowner";
$userdb_dbpass = "lemonade";
$userdb_dbhost = "localhost";
-$userdb_db = "winehq_appdb";
+$userdb_db = "apidb";
?>
Index: tables/appdb_tables.sql
===================================================================
RCS file: /home/wine/appdb/tables/appdb_tables.sql,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 appdb_tables.sql
--- tables/appdb_tables.sql 15 Mar 2004 16:22:03 -0000 1.1.1.1
+++ tables/appdb_tables.sql 17 Mar 2004 18:14:49 -0000
@@ -1,16 +1,25 @@
+create database if not exists apidb;
+
use apidb;
-drop table vendor;
-drop table appFamily;
-drop table appVersion;
-drop table userExperience;
-drop table apiUsage;
-drop table appCategory;
-drop table appHitStats;
-drop table catHitStats;
-drop table appOwners;
-drop table appComments;
-drop table appData;
+drop table if exists vendor;
+drop table if exists appFamily;
+drop table if exists appVersion;
+drop table if exists userExperience;
+drop table if exists apiUsage;
+drop table if exists appCategory;
+drop table if exists appHitStats;
+drop table if exists catHitStats;
+drop table if exists appOwners;
+drop table if exists appComments;
+drop table if exists appData;
+drop table if exists appQueue;
+drop table if exists appCrosslink;
+drop table if exists appBundle;
+drop table if exists appVotes;
+drop table if exists appRating;
+drop table if exists appNotes;
+drop table if exists sessionMessages;
/*
Index: tables/prefs_list.sql
===================================================================
RCS file: /home/wine/appdb/tables/prefs_list.sql,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 prefs_list.sql
--- tables/prefs_list.sql 15 Mar 2004 16:22:03 -0000 1.1.1.1
+++ tables/prefs_list.sql 17 Mar 2004 18:14:49 -0000
@@ -1,3 +1,7 @@
+use apidb;
+
+drop table if exists prefs_list;
+
CREATE TABLE prefs_list (
id int auto_increment not null,
name varchar(32),
Index: tables/user_list.sql
===================================================================
RCS file: /home/wine/appdb/tables/user_list.sql,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 user_list.sql
--- tables/user_list.sql 15 Mar 2004 16:22:03 -0000 1.1.1.1
+++ tables/user_list.sql 17 Mar 2004 18:14:49 -0000
@@ -1,3 +1,6 @@
+use apidb;
+
+drop table if exists user_list;
create table user_list (
stamp timestamp not null,
Index: tables/user_prefs.sql
===================================================================
RCS file: /home/wine/appdb/tables/user_prefs.sql,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 user_prefs.sql
--- tables/user_prefs.sql 15 Mar 2004 16:22:03 -0000 1.1.1.1
+++ tables/user_prefs.sql 17 Mar 2004 18:14:50 -0000
@@ -1,3 +1,7 @@
+use apidb;
+
+drop table if exists user_prefs;
+
CREATE TABLE user_prefs (
userid int not null,
name varchar(64) not null,
Index: tables/user_privs.sql
===================================================================
RCS file: /home/wine/appdb/tables/user_privs.sql,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 user_privs.sql
--- tables/user_privs.sql 15 Mar 2004 16:22:03 -0000 1.1.1.1
+++ tables/user_privs.sql 17 Mar 2004 18:14:50 -0000
@@ -1,3 +1,7 @@
+use apidb;
+
+drop table if exists user_privs;
+
CREATE TABLE user_privs (
userid int not null,
priv varchar(64) not null,
Index: README
===================================================================
RCS file: /home/wine/appdb/README,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 README
--- README 15 Mar 2004 16:22:00 -0000 1.1.1.1
+++ README 17 Mar 2004 18:14:50 -0000
@@ -3,3 +3,16 @@
Authors:
Jeremy Newman <[EMAIL PROTECTED]>
Charles Leop <[EMAIL PROTECTED]>
+
+To install locally for testing/hacking:
+- Symlink from /var/www to the appdb directory
+- Copy include/config.php.sample to include/config.php
+- Edit include/config.php as you see fit, the default name of the database
+ used in the table creation step below is "apidb", you'll have to modify
+ these files if you change this in config.php
+- cd tables, run ./create_tables to create the database tables
+- Try to open up localhost/appdb, if you get a directory listing
+ Edit your /etc/apache/httpd.conf "DirectoryIndex" to include index.php
+ so apache will open index.php after not finding index.html/index.htm etc
+- Check your /etc/php/php.ini to ensure that 'register_globals = On' as the
+ appdb uses globals and won't work correctly without this
--- /dev/null 2004-02-07 00:41:28.000000000 -0500
+++ tables/app_category.sql 2004-03-17 12:11:17.000000000 -0500
@@ -0,0 +1,64 @@
+use apidb;
+
+INSERT INTO appCategory VALUES (1, 'Audio', 'Audio related applications', 29);
+INSERT INTO appCategory VALUES (2, 'Games', 'Games', 0);
+INSERT INTO appCategory VALUES (3, 'Graphics', 'Graphics viewers, editors, graphics demos, screensavers etc.', 29);
+INSERT INTO appCategory VALUES (4, 'Productivity', 'Productivity applications', 0);
+INSERT INTO appCategory VALUES (5, 'Networking & Communication', 'Network, Internet related programs and comm stuff', 0);
+INSERT INTO appCategory VALUES (6, 'Programming / Software Engineering', 'Languages, Compilers, IDEs, CASE tools etc.', 0);
+INSERT INTO appCategory VALUES (7, 'Utilities', 'Misc. Utilities', 0);
+INSERT INTO appCategory VALUES (8, 'Scientific/Technical/Math', 'Scientific and mathematic applications', 0);
+INSERT INTO appCategory VALUES (10, 'File System', 'File System Utilities (e.g. CD writer stuff, file managers, shells, ...)', 7);
+INSERT INTO appCategory VALUES (11, 'Compression', 'Compression Tools', 7);
+INSERT INTO appCategory VALUES (13, 'Sound Editing', 'Sound editing suites, recorders, mixing and sampling.', 1);
+INSERT INTO appCategory VALUES (14, 'Audio Players', 'MP3, WAV, and other format audio players.', 1);
+INSERT INTO appCategory VALUES (16, '1st Person Shooter', 'Games such as Doom, Quake, Half-Life.', 2);
+INSERT INTO appCategory VALUES (18, 'Graphics Viewer', 'Image viewing', 3);
+INSERT INTO appCategory VALUES (19, 'Graphics Editing', 'Image editing/vector drawing software', 3);
+INSERT INTO appCategory VALUES (21, 'Animation/Rendering/3D', 'Image animation for multimedia or web', 3);
+INSERT INTO appCategory VALUES (23, 'Word Processing', 'Type, edit, print, OCR!', 4);
+INSERT INTO appCategory VALUES (24, 'Spreadsheet', 'Do it yourself Number crunching', 4);
+INSERT INTO appCategory VALUES (25, 'Database', 'Relational Database', 4);
+INSERT INTO appCategory VALUES (26, 'Presentation', 'Slide Shows with animation and sound and flowchart tools', 4);
+INSERT INTO appCategory VALUES (27, 'Web Design', 'Create your own web page', 4);
+INSERT INTO appCategory VALUES (29, 'Multimedia', 'Graphics, Audio and Video', 0);
+INSERT INTO appCategory VALUES (31, 'Video', 'Video players, editors and codecs', 29);
+INSERT INTO appCategory VALUES (33, 'Browsers', 'Netscape, Opera, Mozilla, Mosaic, IE, ...', 5);
+INSERT INTO appCategory VALUES (35, 'Email, news and Groupware', 'Email and related programs.', 5);
+INSERT INTO appCategory VALUES (37, 'Chat, Instant Messaging, Telephony', 'AIM, ICQ, NetMeeting, Speak Freely, ...', 5);
+INSERT INTO appCategory VALUES (45, 'Net Tools', 'Tools such as proxies, web crawlers, search engines, ...', 5);
+INSERT INTO appCategory VALUES (43, 'Office Suites', 'Productivity apps that contain bundles of applications.', 4);
+INSERT INTO appCategory VALUES (47, 'Reference/Documentation/Info', 'Encyclopedias, information resources, data tracking, ...', 0);
+INSERT INTO appCategory VALUES (49, 'EDA/Measurement', 'Electronics design tools, measurement and stuff', 8);
+INSERT INTO appCategory VALUES (51, 'Mathematics', 'Mathematical and Statistical software.', 8);
+INSERT INTO appCategory VALUES (53, 'Text Editors', 'Multipurpose text editing tool. No formatting just text.', 4);
+INSERT INTO appCategory VALUES (55, 'Role Playing Games', 'Games where you build up your characters through battle and experience.', 2);
+INSERT INTO appCategory VALUES (57, 'Strategy Games', 'Build your army, conquer the world', 2);
+INSERT INTO appCategory VALUES (59, 'CAD/CAE', 'Computer Aided Design, Computer Aided Engineering', 8);
+INSERT INTO appCategory VALUES (61, 'Office Utilities', 'Misc Office tools that usually work in conjunction with other Office software.', 4);
+INSERT INTO appCategory VALUES (63, 'Finance/Accounting/Project/CRM', 'Personal and Business Finance Software and project planning, CRM (Customer Relationship Management).', 4);
+INSERT INTO appCategory VALUES (65, 'Emulators', 'Software that emulates game hardware.', 2);
+INSERT INTO appCategory VALUES (71, 'Flowchart/Diagraming/graphs', 'Software to design flowcharts and diagrams', 8);
+INSERT INTO appCategory VALUES (69, 'Adventures', 'Graphical Adventure Games', 2);
+INSERT INTO appCategory VALUES (74, 'File transfer/sharing', 'FTP, NFS, document sharing, Samba, scp, ...', 5);
+INSERT INTO appCategory VALUES (76, 'Educational games / children', 'Games that encourage learning.', 2);
+INSERT INTO appCategory VALUES (78, 'Card, Puzzle and Board Games', 'Card Games, mind puzzles and \\"traditional\\" stuff.', 2);
+INSERT INTO appCategory VALUES (82, 'Educational Software, CBT', 'Educational tools, Computer Based Training', 0);
+INSERT INTO appCategory VALUES (84, 'Action Games', 'Arcade and platform action games', 2);
+INSERT INTO appCategory VALUES (86, 'Sports Games', 'Professional sports, car racing, and more.', 2);
+INSERT INTO appCategory VALUES (88, 'Simulation Games', 'Flight and other real life simulators.', 2);
+INSERT INTO appCategory VALUES (90, 'Remote Access', 'SSH, Telnet, VNC, Terminal Services, ...', 5);
+INSERT INTO appCategory VALUES (92, 'Desktop Publishing', 'Various page layout, print, and publishing applications.', 4);
+INSERT INTO appCategory VALUES (95, 'Graphics demos', '', 3);
+INSERT INTO appCategory VALUES (97, 'Game Tools', 'Misc. tools related to games.', 2);
+INSERT INTO appCategory VALUES (99, 'Astronomy', 'An endless (almost) empty space... ;-)', 8);
+INSERT INTO appCategory VALUES (101, 'Screensavers', 'Run via \\"wine -- ssaver.scr /s\\" to setup', 3);
+INSERT INTO appCategory VALUES (103, 'Online (MMORPG) Games', 'Massively Multiplayer Online Role Playing Games.', 2);
+INSERT INTO appCategory VALUES (105, 'Special Purpose', 'Very special programs that whole businesses might rely on', 0);
+INSERT INTO appCategory VALUES (107, 'Legal/law', '', 4);
+INSERT INTO appCategory VALUES (110, 'Biology', 'All kinds of natural things.', 8);
+INSERT INTO appCategory VALUES (112, 'Fun stuff', '', 2);
+INSERT INTO appCategory VALUES (116, 'Chemistry', 'All kinds of application used for chemistry in science.', 8);
+INSERT INTO appCategory VALUES (123, 'Installers', 'Program installers like installshield, windows installer etc.', 0);
+INSERT INTO appCategory VALUES (124, 'Electronics design', '', 0);
+INSERT INTO appCategory VALUES (125, 'Religious', 'Bible research software, tours of the holy land...', 0);
--- /dev/null 2004-02-07 00:41:28.000000000 -0500
+++ tables/session_list.sql 2004-03-17 11:31:37.000000000 -0500
@@ -0,0 +1,13 @@
+use apidb;
+
+DROP TABLE IF EXISTS session_list;
+
+CREATE TABLE session_list (
+� session_id varchar(64) NOT NULL default '',
+� userid int(11) default NULL,
+� ip varchar(64) default NULL,
+� data text,
+� messages text,
+� stamp timestamp(14) NOT NULL,
+� PRIMARY KEY �(session_id)
+) TYPE=MyISAM;
--- /dev/null 2004-02-07 00:41:28.000000000 -0500
+++ tables/create_tables 2004-03-17 12:11:30.000000000 -0500
@@ -0,0 +1,20 @@
+echo Creating appdb tables
+mysql -u root < appdb_tables.sql
+
+echo Creating preferences list
+mysql -u root < prefs_list.sql
+
+echo Creating user list
+mysql -u root < user_list.sql
+
+echo Creating user preferences
+mysql -u root < user_prefs.sql
+
+echo Creating user privilages
+mysql -u root < user_privs.sql
+
+echo Creating session table
+mysql -u root < session_list.sql
+
+echo Adding categories
+mysql -u root < app_category.sql