Compare commits

..

435 Commits

Author SHA1 Message Date
mscott%netscape.com
cd58da3735 Quite useless assertion.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89625 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-14 06:49:41 +00:00
sspitzer%netscape.com
679b4eae07 fix cancel (so it removes the message from the thread pane after successful cancel.)
clean up more code.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89618 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-14 06:25:06 +00:00
sspitzer%netscape.com
11c6982b0e more clean up. do more work in ConstructNntpUrl. get view message source to work for news again.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89611 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-14 05:34:59 +00:00
bienvenu%netscape.com
8fd67994e0 mark messages read that get added to ignored threads
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89603 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-14 04:56:55 +00:00
sspitzer%netscape.com
6bfc332a47 changes to get authenticated news to work again.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89600 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-14 04:01:34 +00:00
sspitzer%netscape.com
1d3a5444b7 update a comment.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89588 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-14 03:02:53 +00:00
bienvenu%netscape.com
51306bc7eb fix collapse of thread w/ no children
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89569 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-14 02:30:01 +00:00
sspitzer%netscape.com
d91d2f550c change to get copy and display both working correctly.
clean up some more code.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89568 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-14 02:08:55 +00:00
sspitzer%netscape.com
2f459e573e back out my unnessary changes.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89566 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-14 02:01:55 +00:00
mscott%netscape.com
46fe1783ac Make the mac look like windows for now with regards to the new outliner widget. we'll skin it later.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89548 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-14 00:06:20 +00:00
bienvenu%netscape.com
3a90e93072 start generic filing cabinet work for imap servers
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89527 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 21:47:54 +00:00
mscott%netscape.com
d2ca9eec7f untested changes to get mac classic working with the outliner widget in the thread pane.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89525 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 21:25:56 +00:00
mscott%netscape.com
a2d412c109 Add support for the new outliner widget to win\classic for the thread pane.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89524 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 21:23:00 +00:00
sspitzer%netscape.com
92be10c0e7 more minor cleanup.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89515 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 17:50:34 +00:00
bienvenu%netscape.com
bc1c5a8a76 fix default for getting server defaults for download settings
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89514 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 17:39:03 +00:00
bienvenu%netscape.com
184765adf3 fix age search specification when downloading news for offline, handle case where there are 0 msgs to download
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89513 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 17:35:24 +00:00
bienvenu%netscape.com
2488d3f6c6 when download settings are set, echo them to prefs
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89512 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 17:34:33 +00:00
bienvenu%netscape.com
c712c04f33 fix handling of age term
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89511 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 17:33:52 +00:00
bienvenu%netscape.com
b84d4aec78 more tweaks to downloading imap msgs for offline use
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89510 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 17:32:31 +00:00
bienvenu%netscape.com
9e74a09332 fix search/filter by status ui widget's handling of unread/replied status
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89504 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 15:03:47 +00:00
sspitzer%netscape.com
6dbe150c4d add back some code I turned off, add some comments.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89485 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 08:52:59 +00:00
sspitzer%netscape.com
f4abe8ea51 remove a debugging printf.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89484 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 08:48:40 +00:00
sspitzer%netscape.com
c49e63966f update a comment.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89483 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 08:48:17 +00:00
sspitzer%netscape.com
ca5ad0372d these are gone.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89482 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 08:47:08 +00:00
sspitzer%netscape.com
28cd8fb0f5 more cleanup changes.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89437 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 02:53:38 +00:00
mscott%netscape.com
c2be7c3b5e Remove obsolete tree based style rules for the thread pane.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89410 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 00:44:26 +00:00
mscott%netscape.com
4f1fc30c25 use gDBView.reloadMessage to reload a message.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89409 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 00:44:00 +00:00
mscott%netscape.com
94da49dc6b remove the old tree widget.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89408 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 00:43:38 +00:00
mscott%netscape.com
f72a13b7f7 implment reload message
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89407 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 00:42:57 +00:00
mscott%netscape.com
2fbe7ac87d add a method for re-loading the currently displayed message
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89406 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 00:42:44 +00:00
mscott%netscape.com
e69b769824 Add localization support for the thread pane using the outliner widget.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89402 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 00:11:07 +00:00
ducarroz%netscape.com
347aedc768 Add nsMsgKeyArray to the project
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89373 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-12 22:29:22 +00:00
sspitzer%netscape.com
1742240c59 add some more logging stuff, to debug the "too many connections" problem.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89368 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-12 21:45:33 +00:00
bienvenu%netscape.com
5b5b126b41 export non-virtual methods
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89366 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-12 21:37:08 +00:00
sspitzer%netscape.com
999068f42f move nsMsgKeyArray.cpp / nsMsgKeyArray.h from base/src to base/util, where it belongs.
it was working all this time because we were only using the inline methods.  get list-ids urls to work.
more cleanup.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89364 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-12 21:13:21 +00:00
sspitzer%netscape.com
3b394dd774 get reply to news messages working again.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89346 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-12 18:40:41 +00:00
sspitzer%netscape.com
10e37f5430 remove some of my debug printfs.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89316 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-12 04:00:46 +00:00
sspitzer%netscape.com
6da6744d00 bullet proof for skin switching
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89315 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-12 03:44:36 +00:00
sspitzer%netscape.com
f2cb404eb5 more fixes to support the news_message:// protocol
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89313 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-12 02:59:52 +00:00
sspitzer%netscape.com
60f1b79cba add comment about blinding add "?header=src" to the url.
it is something we can fix later.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89311 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-12 02:51:37 +00:00
sspitzer%netscape.com
af95258171 more changes to support news_message:// urls (for message display)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89309 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-12 02:38:42 +00:00
bienvenu%netscape.com
8deb607af9 more work on offline imap and news downloading/synchronization
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89297 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-11 19:55:38 +00:00
sspitzer%netscape.com
c2901fde84 more cleanup. fix a problem with autosubscribe when you don't have a msg window.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89283 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-11 12:24:14 +00:00
sspitzer%netscape.com
fc910e5c7a finish fixing cancel. now it behaves like the trunk.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89280 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-11 11:24:44 +00:00
sspitzer%netscape.com
087ff9b4a2 get cancel to work. (again)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89279 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-11 11:13:34 +00:00
sspitzer%netscape.com
bc595726be more cleanup.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89278 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-11 11:04:29 +00:00
sspitzer%netscape.com
9cedc4d5ed more cleanup.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89277 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-11 10:03:27 +00:00
sspitzer%netscape.com
553d36919d more cleanup. get search working again.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89271 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-11 07:34:54 +00:00
sspitzer%netscape.com
edfe732530 fix needed for cancel.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89260 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-11 00:42:38 +00:00
sspitzer%netscape.com
65382fae7e more cleanup.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89259 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-11 00:34:24 +00:00
sspitzer%netscape.com
74c9ffa52c more cleanup. get cancel working. implement more of "?list-ids".
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89255 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-10 23:45:20 +00:00
sspitzer%netscape.com
fb65936d18 some work to get cancel working.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89224 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-10 04:27:13 +00:00
sspitzer%netscape.com
d0f4e72b21 assert here, until I fix this.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89223 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-10 03:55:11 +00:00
sspitzer%netscape.com
829a007e46 fix some issues with the mark button and redo.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89222 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-10 03:52:47 +00:00
sspitzer%netscape.com
fecf7ba636 get message id urls (news://host/message-id) to work again in the new world, with out asserting.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89209 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-10 03:23:06 +00:00
ducarroz%netscape.com
044c42ba85 Removed nsNNTPCategoryContainer.cpp, nsNNTPHost.cpp and nsINNTPNewsgroup.cpp
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89197 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-10 02:18:28 +00:00
ducarroz%netscape.com
dd91b18bae Removed nsINNTPCategory.idl, nsINNTPCategoryContainer.idl, nsINNTPHost and nsINNTPNewsgroup
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89196 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-10 02:17:19 +00:00
sspitzer%netscape.com
fa0f9b20ea fix bustage.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89194 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-10 02:08:28 +00:00
sspitzer%netscape.com
21009b76df fix bustage
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89190 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-10 01:55:41 +00:00
sspitzer%netscape.com
3e9a5b629d get copy of news message to work. take off my belt and give the news code the beating it deserves.
remove some of the 4.x bloat.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89189 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-10 01:49:01 +00:00
bienvenu%netscape.com
6ba8571302 more work on offline news (including adding back offline news search)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89062 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-09 02:46:42 +00:00
bienvenu%netscape.com
9f0c9ea9f3 more fun,non perf-related changes (more work on downloading news msgs for offline)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@89061 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-09 02:45:10 +00:00
bienvenu%netscape.com
7e7324484b fix watched thread and all / unread msg check mark status
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88995 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 22:38:52 +00:00
bienvenu%netscape.com
68070fcfa0 fix problems with unread only msgs view
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88985 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 21:59:11 +00:00
bienvenu%netscape.com
e2e313e614 get rid of duplicated first message in unread messages threaded view
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88975 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 17:53:54 +00:00
mscott%netscape.com
492fd924f8 apply the focus ring to the outline-body-box instead of applying it to the outliner body. This will get
rid of the "line" effect when scrolling. Hyatt has this fixed on the tip and it will "just work" with this new
class name when we land on the tip.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88917 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 04:04:11 +00:00
mscott%netscape.com
e84e153144 Rewrite key commands to no longer be observers on the commands. Instead directly add the oncommand methods to the key
binding. This is part of the perf re-org for command handling. Since the key binding can be invoked even when the command
may really be disabled, all of our controllers must redefine doCommand to check if the command is enabled first!


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88915 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 04:02:31 +00:00
mscott%netscape.com
8e32823980 clear the message pane when we switch folders.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88912 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 03:59:50 +00:00
mscott%netscape.com
664cd61f9f set gHaveLoadedMessage when we display a message. This helps us clear the message pane when we switch folders.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88911 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 03:59:18 +00:00
ducarroz%netscape.com
638188db95 Added nsNewsDownloader.cpp
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88891 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 02:31:22 +00:00
bienvenu%netscape.com
c90fa7f6fb more work on downloading news articles
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88879 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 01:26:46 +00:00
mscott%netscape.com
de0eb443a8 only listen to delete notifications which involve the message the stand alone is currently showing.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88852 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 00:32:34 +00:00
bryner%uiuc.edu
82eabaf7b4 Syncing the branch to the changes from the tip yesterday that makes this work with all supported GTK+ versions.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88849 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 23:42:51 +00:00
mscott%netscape.com
ad87b4766f Various changes to get deleting messages from the stand alone message window to work.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88839 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 22:30:10 +00:00
mscott%netscape.com
3d997400a9 implement getSelectedIndices to work in stand alone mode.
some small changes to get the delete command to work in stand alone mode when there is no outliner selection.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88838 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 22:24:24 +00:00
sspitzer%netscape.com
1deed94a07 fix some js errors I introduced. we need to see if the dbview exists
before seeing if the command is enabled.  the dbview doesn't exist if we are viewing account central.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88829 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 19:45:59 +00:00
sspitzer%netscape.com
16de97e0b8 simply IsSpecialFolderSelected() to not go through the folder
datasource, do string allocations and string compares.  use the almighty
bitwise operations in JS.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88814 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 09:06:28 +00:00
sspitzer%netscape.com
793e5572a8 remove nsIMsgFolder from the Navigate interface. we determine
the next folder to land on from JS.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88813 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 08:44:06 +00:00
mscott%netscape.com
479f46fe80 make get uri for first selected message work if there is no outliner selection (i.e. stand alone mode).
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88783 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 03:28:57 +00:00
mscott%netscape.com
6d63264111 Update gCurrentMessageUri in the stand alone message pane after we navigate to a new message.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88782 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 03:28:29 +00:00
mscott%netscape.com
f56b572fc2 Add support for View Navigation in the stand alone message window!!
doesn't span folders yet but it soon will.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88772 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 03:01:40 +00:00
mscott%netscape.com
192394fea9 Split goViewNavigate into two methods where one handles just the cross folder navigation. This will enable
navigation from the stand alone message window to span folders.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88771 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 03:00:53 +00:00
mscott%netscape.com
b55fb8ac81 Move declaration of nsMsgViewNavigation
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88770 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 02:59:58 +00:00
mscott%netscape.com
facb0d00e1 move definition of nsMsgViewNavigation
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88769 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 02:59:23 +00:00
mscott%netscape.com
cafd74c452 If we don't have mOutlinerSelection, assume we are in stand alone mode and use m_currentlyDisplayedMsgKey
for view navigation and get key for for first selected message.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88768 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 02:58:40 +00:00
bienvenu%netscape.com
deceab6fc0 fix selection of next msg after multiple delete
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88761 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 02:30:57 +00:00
bienvenu%netscape.com
15a8b392cf fix promotion of second msg in expanded thread when top level msg is deleted
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88742 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 01:27:14 +00:00
bryner%uiuc.edu
16cd5ef106 Fix the build for GTK+ >= 1.2.7. r=pavlov.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88741 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 01:19:58 +00:00
mscott%netscape.com
e40253d92f Create a nsMsgDBView and associate it with the stand alone message window.
Update the window title on the stand alone message window.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88737 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 01:14:56 +00:00
mscott%netscape.com
7b7310d02d When creating a stand alone message window, pass in gDBView as an argument to window.open
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88736 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 01:13:18 +00:00
mscott%netscape.com
0fb96fdbf8 Break CreateDBView into two separate methods, the inner one is separate from any knowledge of the outliner. This allows
the stand alone message window to call the inner method.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88734 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 01:11:52 +00:00
bienvenu%netscape.com
7acefeada2 make offline msgs show up in italic until we have icons
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88723 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 00:40:34 +00:00
bienvenu%netscape.com
bfc5cbc8d3 get selected and flagged for offline use working with new view
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88721 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 00:37:34 +00:00
mscott%netscape.com
49392fec99 Add a method to the updater interface for handling changes to the displayed message. This will allow the
front end to set the window title.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88719 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 00:02:07 +00:00
mscott%netscape.com
fcd8e8323a When loading a new message, call into the updater with the notification. This will allow the
front end to set the window title.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88718 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 00:01:42 +00:00
mscott%netscape.com
491b03427f Add style rules for showing a focus ring in the outlinerbody of the thread pane.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88714 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 23:14:11 +00:00
mscott%netscape.com
0c01d70bf5 Setting focus on the message pane should mean setting it on the message pane box (the headers + the iframe) and not just the
iframe.

When determining if the message pane has focus, check to see if the message pane box has focus OR if the frame with focus
is a subframe of the message pane iframe.

This fixes various tabbing issues where focus wasn't properly being moved to the message pane on both the tip and
the branch. In addition on the tip, you couldn't reverse tab out of the message pane because of these problems. This fixes that
too.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88713 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 23:13:26 +00:00
bienvenu%netscape.com
6a494b6621 fix flag state on view msg window, get rid of flat flag, since it's just the opposite of threaded
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88703 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 22:28:38 +00:00
mscott%netscape.com
3aaded97ae Make tabbing properly cycle focus through the 3 panes again.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88702 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 22:27:41 +00:00
bienvenu%netscape.com
28755c1944 fix mark all read, work on view messages menu state updating
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88668 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 18:30:46 +00:00
bienvenu%netscape.com
ddf92d76cc attempt to fix some crashes switching folders or shutting down with dbs deleted out from under msghdrs
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88665 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 16:58:32 +00:00
bienvenu%netscape.com
f780cb693e fix toggle read, updating thread counts when children marked read/unread
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88663 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 16:31:50 +00:00
sspitzer%netscape.com
feed56f245 more dumps() to make sure we don't forget stuff.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88644 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 05:40:11 +00:00
sspitzer%netscape.com
0dbb34d84c more cleanup.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88642 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 05:31:07 +00:00
sspitzer%netscape.com
7a3667dd51 add back "cross folder" navigation on next unread.
still a little more to do on this.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88641 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 05:26:03 +00:00
sspitzer%netscape.com
50c9820bcb select next message after you do a drop (that is a move)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88607 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 02:03:32 +00:00
mscott%netscape.com
c341e47958 Fix the account central problem where once account central has been brought up you can't display messages anymore. The
fix is to use the "collapsed" attribute instead of the hidden attribute. The collapsed attribute doesn't actually teard down
the content (hidden does). apparently when we unhid the message pane, that box wasn't getting inserted back into the content
model correctly.

This also fixes the assertin on startup complaining about a null content viewer.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88588 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 00:40:09 +00:00
bienvenu%netscape.com
e584486b05 give addr db a chance to call compress commit if mork says it should
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88586 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 00:29:55 +00:00
sspitzer%netscape.com
4b2df31bdd remove files from the linux build.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88582 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 23:44:45 +00:00
sspitzer%netscape.com
ad7bd90a62 remove unused files from the linux Makefiles.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88581 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 23:43:34 +00:00
ducarroz%netscape.com
3d102c45e0 Use PRLog for the timeStamp feature, like on the trunk!
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88579 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 23:35:18 +00:00
sspitzer%netscape.com
dc9e145235 get drag and drop from thread pane to folder pane to work again.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88576 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 23:26:03 +00:00
mscott%netscape.com
e10f9fc8f5 get rid of old threadpane select handler
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88573 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 22:42:16 +00:00
mscott%netscape.com
193746f435 remove reference to obsolete method
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88572 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 22:41:41 +00:00
mscott%netscape.com
722f2592f6 When a special folder is selected, change the Sender column to a recipients column.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88571 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 22:41:14 +00:00
mscott%netscape.com
2302e5125f If the folder is a special folder (sent, unsent, drafts) the show the recipient instead of the author in
::FetchAuthor. Same trick for sorting so we sort by recipients instead of author.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88570 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 22:40:30 +00:00
mscott%netscape.com
ee787fc77e supress message display when the thred/message pane splitter is disabled.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88563 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 21:40:42 +00:00
mscott%netscape.com
ba0ed87180 When we are told to stop suppressing message display, display the currently selected message.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88562 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 21:39:43 +00:00
mscott%netscape.com
47a30116e7 Add a method for displaying a message given a message key.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88560 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 21:39:13 +00:00
bienvenu%netscape.com
6262041ea9 get rid of asserts when opening local mail messages
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88552 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 19:36:53 +00:00
bienvenu%netscape.com
e6a5e44a3f fix mark thread read, set flags on parent when only child in thread is deleted
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88551 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 19:13:31 +00:00
bienvenu%netscape.com
7bcc2b3683 used cached mime converter when sorting by address
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88549 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 17:46:21 +00:00
bienvenu%netscape.com
1c3482a3a4 get rid of one more use of nsMessage
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88528 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 02:58:35 +00:00
bienvenu%netscape.com
2c2e3039d6 fix collapse all
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88519 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-04 22:05:52 +00:00
bienvenu%netscape.com
3be5db5224 fix search sorting, mark read/unread
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88518 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-04 21:47:58 +00:00
sspitzer%netscape.com
3b4470a3ec hook up expand / collapse all. get "select all" to work in threaded mode.
(the view will expand all before selecing all.  having the view do it
allows me to only invalidate once, instead of twice.) remove some obsolete JS.
add some "fix me" dumps to catch things we need to fix.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88505 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-04 10:23:57 +00:00
sspitzer%netscape.com
dad39a4bd2 get "Open Message In New Window" thread pane context menu item to work.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88504 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-04 09:29:36 +00:00
sspitzer%netscape.com
1e34d3f743 get MsgDeleteMessage() working again, and use it.
fix the implementation of GetLoadedMessage() to get the message pane
context menu working again.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88503 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-04 09:10:17 +00:00
sspitzer%netscape.com
c6118cc0e3 remove the test harness from the .jar.
remove dumpView from the interface and remove the implementation.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88502 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-04 07:57:37 +00:00
sspitzer%netscape.com
dd793713f1 get edit as draft to work from the menu and from the "Edit as draft" button in the
message pane when viewing a draft.  get select all to work, for flat mode.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88469 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-03 03:30:58 +00:00
ducarroz%netscape.com
5caa6fba8b Remove Search DataSource from the project
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88363 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 01:43:53 +00:00
mscott%netscape.com
9c19e9af19 Add an attribute for disabling message display (i.e. if the message pane is collapsed)
make sure this attribute is set when the search view is created.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88361 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 01:37:05 +00:00
mscott%netscape.com
ef14c8f2e9 Add an attribute for disabling message display (i.e. if the message pane is collapsed)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88360 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 01:36:15 +00:00
bienvenu%netscape.com
b97590e5bf clear out parser when done with a msg so it won't hold onto a header
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88359 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 01:29:17 +00:00
bienvenu%netscape.com
e3902aa2d5 don't show unread thread count if it's 0, add GetViewName method, remove db listener when db goes away
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88358 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 01:28:51 +00:00
mscott%netscape.com
a86fd6bc7b changes to get command update status working for the stand alone message window
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88356 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 01:12:44 +00:00
mscott%netscape.com
c0fe5ecffc Fix command updating for search.
fix a couple JS exceptions when performing a search.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88355 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 01:08:39 +00:00
bienvenu%netscape.com
6d4fb7dbce fix crash when outliner asks about cell at index -1
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88334 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 00:02:49 +00:00
bienvenu%netscape.com
206b0872d2 fix crash in reflow with 0 rowHeight
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88333 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 23:55:27 +00:00
mscott%netscape.com
707a81dfab Add support for alternate 3-pane configuration.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88332 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 23:50:44 +00:00
mscott%netscape.com
c0373d3c34 Command update re-org. Group all our commands in command sets which are associated with each menu (file, edit, view, etc)
and a toolbar command set.

When a menu is created, fire the specific command update event for that command set.

Re-write how we handle command updating on focus changes. Don't do anything if the focus for a given pane hasn't
really changed. Otherwise, just update the toolbar and nothing else.

Reduce command updating when deleting and selecting the next message by making sure the # of selected items
stays constant during the operation.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88330 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 23:40:33 +00:00
mscott%netscape.com
58337a1cca manually fire a 'mail-toolbar' command update event when we change the selected folder.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88329 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 23:40:06 +00:00
mscott%netscape.com
f376a0da9f Get rid of the folder tree select call.
Manually fire the update mail-toolbar event when we change the folder selection.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88328 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 23:39:45 +00:00
mscott%netscape.com
8b3a237222 Add new interface for command updating to allow the view to push command update notifications to the UI.
This interface is implemented in JS and fires a 'mail-toolbars' command update event.

Get rid of the onselect handler on the outliner widget. We don't need this anymore.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88327 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 23:36:13 +00:00
mscott%netscape.com
72a4dd52c9 Add new interface for command updating to allow the view to push command update notifications to the UI.
Only push cmd update notifications if the # of selected items changed.
Turn back on ::SelectionChanged code.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88326 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 23:35:14 +00:00
mscott%netscape.com
7d6af453de Add new interface for command updating to allow the view to push command update notifications to the UI.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88325 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 23:34:28 +00:00
bienvenu%netscape.com
f74a0892c7 remove search data source from build
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88322 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 22:33:49 +00:00
bienvenu%netscape.com
6e8c0d6b5d fix assertion on startup if you have special local folders
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88319 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 22:20:33 +00:00
varga%utcru.sk
c5491df661 Resizing fix for outliner. Invalidate scrollbar and update scroll position when needed.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88311 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 20:31:06 +00:00
bienvenu%netscape.com
361a6dce96 fix insertion sort when sorted by sender/subject
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88297 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 16:29:29 +00:00
sspitzer%netscape.com
ccaa38a315 some changes I had for helping to fix the false "cross posting" blocking.
this isn't the whole fix, but it is part of it.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88274 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 04:09:59 +00:00
sspitzer%netscape.com
668f4f68e3 some of the back end stuff needed for select all.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88273 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 04:07:35 +00:00
sspitzer%netscape.com
15dddfd610 get "search by green dot column" to work.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88268 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 03:21:39 +00:00
bienvenu%netscape.com
1aea10f22f whoops, missed an nsMessage instance
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88253 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 01:22:07 +00:00
bienvenu%netscape.com
7d050f05cd remove nsIMessage, fix initial flags when headers are added to existing view
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88246 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 00:58:06 +00:00
sspitzer%netscape.com
341e44565b get save as template and save as file to work.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88241 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 00:43:33 +00:00
sspitzer%netscape.com
92156dd6db re-implement GetURIForFirstSelectedMessage() so that it returns the uri for the displayed message, not the
first message in the selection.  (thanks to mscott for the tip.)
fix it so open (and double clicking to open) work from search.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88232 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 00:31:39 +00:00
ducarroz%netscape.com
847f1c8fd6 replace nsIMessage by nsIMsgDBHdr and remove nsIMessage.idl/.cpp from the Mac build
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88230 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 00:24:47 +00:00
bienvenu%netscape.com
1bf603af15 remove nsIMessage useage
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88199 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 21:19:59 +00:00
bienvenu%netscape.com
67be53de22 remove a couple nsIMessage useages
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88196 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 19:43:06 +00:00
sspitzer%netscape.com
3e7c42d46f fix some whitespace issues. get sortOrder to persist.
the attribute comes as a string, I need it as an int.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88194 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 19:10:13 +00:00
sspitzer%netscape.com
66d31660c5 really make news threaded by default.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88191 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 18:39:06 +00:00
bienvenu%netscape.com
54b6c46c8e get local delete working
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88188 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 16:57:31 +00:00
sspitzer%netscape.com
d024bd0fe0 more fixes for persisting view type, view flags, sort order, sort type.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88182 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 09:25:25 +00:00
sspitzer%netscape.com
fcff2ea73b slap things around to get persisting of view type, view flags, sort order and sort type working.
(or, closer to working)  hide the thread only columns on start.  news is threaded by default.
ascend by default (instead of descend, sorry mscott.)   remove some dead code.  remove the dump view
button.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88179 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 06:17:42 +00:00
sspitzer%netscape.com
c7d4a47c04 the start of the persisting work. also, kOutlineDisplay is now kThreadedDisplay.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88161 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 03:40:24 +00:00
bienvenu%netscape.com
6120489f81 add ability to get folder from selected index, more work on move/copy
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88156 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 02:00:56 +00:00
sspitzer%netscape.com
28f0630af7 hide the thread specific columns when not in threaded mode.
I still need to get it set up correctly when we start up in threaded mode,
but that is next.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88153 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 01:57:04 +00:00
ducarroz%netscape.com
1838afd15b Remove unused function SendWebPage
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88142 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 00:50:43 +00:00
ducarroz%netscape.com
92f0f813dd Implement a timestamp function that allow to get some metrics when creating a compose window. You can activate this feature by setting to true the pref "mail.compose.trace_to_console" and/or "mail.compose.trace_to_file"
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88140 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 00:41:48 +00:00
ducarroz%netscape.com
290b15547a Removed nsIMessageView and nsMsgNavigationService from the Mac project
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88134 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 00:06:54 +00:00
sspitzer%netscape.com
109482bb0c implement sort by "unread button", "flagged". (flagged seems to work, unread button doesn't, I'll investigate)
make it so sorting on "unread thread count" won't do a sort on "threaded".
make it so sorting on "unread total count" won't do a sort on "unread button".


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88128 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 23:53:59 +00:00
bienvenu%netscape.com
b7b452733a fix fcc to imap folder
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88124 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 23:32:57 +00:00
bienvenu%netscape.com
e9d654e8c7 remove nsIMessageView
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88121 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 23:27:13 +00:00
bienvenu%netscape.com
e9dadb8f07 remove nsIMessageView
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88117 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 23:18:04 +00:00
bienvenu%netscape.com
9ad8380bea remove message view and navigation service idl files from build
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88113 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 23:11:53 +00:00
bienvenu%netscape.com
2dcabcbb4b more removing of nsIMessageView
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88111 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 22:56:53 +00:00
bienvenu%netscape.com
03343d0b54 remove nsIMessageView.h from nsMsgWindow.h
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88110 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 22:46:34 +00:00
sspitzer%netscape.com
f94c5a589a more fixage for build bustage (convert nsIMessage -> nsIMsgDBHdr)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88104 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 21:02:31 +00:00
sspitzer%netscape.com
67b06ac5fe more conversion to nsIMsgDBHdr (to fix bustage)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88101 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 19:44:12 +00:00
sspitzer%netscape.com
8292e9a074 pull NSPR by date. the nspr tip has changed to use autoconf / gmake.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88099 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 19:25:52 +00:00
bienvenu%netscape.com
7661a48f61 more work on getting delete of local msgs working
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88096 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 18:47:37 +00:00
bienvenu%netscape.com
17d70b9bcb add unread and total columns for thread counts (should hide in non-threaded view)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88092 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 17:42:02 +00:00
sspitzer%netscape.com
12d9a56fe4 make it so we don't assert when nothing is selected.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88052 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 03:19:19 +00:00
sspitzer%netscape.com
62ad92450a fix the implementation of GetKeyForFirstSelectedMessage(). this will get the
move / copy menu to enable during multiple selection.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88050 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 03:09:43 +00:00
sspitzer%netscape.com
338671a4de remove dump statement.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88049 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 02:55:11 +00:00
sspitzer%netscape.com
29159adb43 watch and kill threads only when reading news.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88048 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 02:51:16 +00:00
bienvenu%netscape.com
388b0ccb56 little more work on hooking up views
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88032 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 00:14:52 +00:00
sspitzer%netscape.com
459d498be4 get file & copy working.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88029 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-26 23:38:17 +00:00
sspitzer%netscape.com
d4475fcffb fix warning.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88027 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-26 23:28:50 +00:00
bienvenu%netscape.com
6d0c224eb0 get rid of msg view and view navigation service, start reworking view type
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88021 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-26 22:51:53 +00:00
sspitzer%netscape.com
91e56f4cf8 first step to getting "file" & "copy" working.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88012 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-26 21:50:25 +00:00
sspitzer%netscape.com
41e31a02a7 fix the "double click on the scroll bar button opens a stand alone message window" problem.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88008 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-26 20:29:09 +00:00
sspitzer%netscape.com
30f773429c more clean up.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@88001 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-26 18:56:36 +00:00
sspitzer%netscape.com
29ba97a797 get "View | Message Source" to work again.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87999 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-26 18:11:49 +00:00
bienvenu%netscape.com
f664b1cc8e more work on offline manager, including some reworking of send later so I can use it in offline manager
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87964 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-26 01:24:16 +00:00
sspitzer%netscape.com
6db0dffc76 patch from jan varga. update the outliner when the row count changes.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87945 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-25 20:08:47 +00:00
sspitzer%netscape.com
7f6bbc2125 get thread pane context menus working. thanks to jan varga for the patch.
(nothing needed from hyatt or pinkerton on the outliner!)


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87944 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-25 19:59:38 +00:00
varga%utcru.sk
4126106fcf Classic skin for outliner.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87914 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-24 19:40:44 +00:00
bienvenu%netscape.com
49749f54cc disable our onselectionchanged method since outliner is doing selection for us
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87913 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-24 17:33:48 +00:00
sspitzer%netscape.com
8fd2c2eb3c fix the JS to do mark read / mark unread, flag / unflag
through the db view, instead of the message datasource.
add to the nsIMsgDBView interface and nsIMsgHdr interface
to allow me to fix more of the JS, and to do things
more efficiently.  also, so clean up.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87878 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-24 03:26:51 +00:00
ducarroz%netscape.com
530072ff5a any newsgroups url, chrome url, file url or charset use now char* instead or PRUnichar* in Message Compose. Remove any remaining "Fix this" put by Seth.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87863 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-24 01:12:55 +00:00
sspitzer%netscape.com
fadec8b6fc get context menus to work for the message pane.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87843 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 22:55:20 +00:00
ducarroz%netscape.com
848fd16e06 Add nsIMsgOfflineManager.idl & nsMsgOfflineManager.cpp to the project
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87838 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 22:03:28 +00:00
bienvenu%netscape.com
aac2558803 fix linux makefile problem with last checkin
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87831 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 21:17:54 +00:00
bienvenu%netscape.com
09671ed1e1 add offline manager to the build
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87829 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 21:04:09 +00:00
sspitzer%netscape.com
a27b6eadd3 cool. mscott handles marking read / unread and flagging in the
db view.  so all we need to worry about here is the double click.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87791 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 07:24:56 +00:00
sspitzer%netscape.com
0d8b5a2814 more build bustage fixage.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87788 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 07:09:32 +00:00
sspitzer%netscape.com
1fe3e4d863 patch to get things to compile, after the changes to nsIMsgCompFields
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87787 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 07:04:24 +00:00
sspitzer%netscape.com
cd4c511f1d get double clicking on a message to do the right thing.
(open in new window if normal message, bring up compose if
a draft or template.)  some work for "View | Sort By | ...".
fix that exception that happens on a stand alone message
window by bringing over chuang's fix for #68000.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87785 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 06:56:22 +00:00
varga%utcru.sk
db3aafb49d Styles for -moz-outliner-line pseudo element
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87776 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 04:22:54 +00:00
varga%utcru.sk
24beb40ded Initial implementation for new nsIOutlinerView methods.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87770 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 03:11:11 +00:00
ducarroz%netscape.com
bb03200f3c Cleanup nsMsgCompFields and remove old factory stuff. Also fix some warning. For msgCompose.mcp, I removed nsMsgZapIt.cpp
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87762 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 02:43:09 +00:00
varga%utcru.sk
33665b469d Support for vertical lines connecting rows in same lavel.
Pretty cool !


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87760 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 02:41:10 +00:00
varga%utcru.sk
1a3bff44fc New pseudo element for outliner.
This element is used for obtaining style of lines in outliner


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87759 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 02:37:14 +00:00
varga%utcru.sk
685c7f14d7 fix dashed and dotted lines on linux
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87758 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 02:33:06 +00:00
sspitzer%netscape.com
410340b7c6 get reply to work in the stand alone message window.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87747 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 01:16:31 +00:00
sspitzer%netscape.com
a81942ac91 get "open message in new window" to work.
there is an exception, but chuang has already fixed it on the trunk.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87738 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 00:42:28 +00:00
bienvenu%netscape.com
73faa38fb6 fix some thread flag handling, and deleting top message in a collapsed thead
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87735 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 00:28:36 +00:00
sspitzer%netscape.com
3c4e077dd0 stubbed, so we compile. real implementations coming...
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87719 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 23:58:55 +00:00
hyatt%netscape.com
57c186eb72 Real APIs.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87712 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 23:43:23 +00:00
hyatt%netscape.com
b1feb674b8 Never mind. Backing out APIs.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87710 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 23:40:36 +00:00
hyatt%netscape.com
abfbec06a1 Never mind. Backing out APIs.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87709 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 23:40:35 +00:00
hyatt%netscape.com
5a50831683 Never mind. Backing out APIs.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87708 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 23:39:28 +00:00
hyatt%netscape.com
0061983531 Never mind. Backing out APIs.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87702 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 23:36:48 +00:00
hyatt%netscape.com
4e59e5ab45 Added APIs for drawing vertical lines to view.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87691 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 23:15:30 +00:00
bienvenu%netscape.com
239cdf631e add m_folder to db so msg hdr can get its folder
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87690 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 22:23:09 +00:00
bienvenu%netscape.com
7980f83bd6 add m_folder to db so msg hdr can get its folder
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87684 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 20:26:20 +00:00
varga%utcru.sk
7ab25e7e54 More keyboard selection goodness.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87657 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 09:38:32 +00:00
varga%utcru.sk
2e085d6353 New method clearRange.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87656 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 09:36:07 +00:00
sspitzer%netscape.com
2e5b3d06c1 more minor change, on the way to getting more commands to work.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87634 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 04:31:06 +00:00
sspitzer%netscape.com
081b17d343 part of the fix to get "open message in stand alone window" working.
I need a way to turn a message uri (like imap_message://sspitzer@nsmail-1/INBOX#32423) into a nsIMsgFolder.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87627 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 03:04:35 +00:00
sspitzer%netscape.com
84b8a6dddf getting more of our our UI to work with the outliner and DB view.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87622 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 02:21:18 +00:00
mscott%netscape.com
ab51f38e57 Preserve the currently displayed message key as the currentView in the selection when restoring selection. Also, modify
::OnSelectionChanged so we don't try to redisplay the message we are currently displaying.

this prevents us from both reloading the same message and from changing the loaded message when sorting or changing the sort order.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87617 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 01:34:13 +00:00
ducarroz%netscape.com
1ac5042974 Two small improvements that are more visual than timesaving: 1) The addressing widget will appears almost at the same time that the message body, no more delay (200ms). Also the different operations to insert text into editor are now batched. The result is that the whole message body appears at the same time.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87615 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 01:08:21 +00:00
mscott%netscape.com
a4b1f059b0 Fill in the flagged column and implment cycle cell for the flag column as well. Until we can load images, we are just going to
put ' for unflagged and * for flagged.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87614 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 00:55:01 +00:00
mscott%netscape.com
3c9a1e472d Add a FetchSubject method for fetching the subject for a cell. Add the "Re: " before outgoing subject fields if appropriate.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87613 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 00:26:52 +00:00
varga%utcru.sk
0834d9704a Break selection range when removing within row.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87612 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 00:23:19 +00:00
bienvenu%netscape.com
86f7a32530 fix insert sort when sorting by date
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87611 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 00:04:17 +00:00
varga%utcru.sk
f8975edb0e Initial keyboard selection code and cleanup.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87610 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-22 00:00:53 +00:00
mscott%netscape.com
2169b3f060 Add atoms for the priority styles.
Modify GetCellProperties to check for the priority field and pass in the right attribute based on the priority (i.e. so
high priority shows up in red, etc.).


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87608 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 23:46:53 +00:00
mscott%netscape.com
eba59153fc For now, go ahead and get the text on column cyclers (only until we can load images)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87607 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 23:45:55 +00:00
mscott%netscape.com
ce48b3742e Properly classify all moz-outliner-cell and -outliner-row styles with a outlinerbody prefix. This reduces the name space
of the styles (they were global before).

Add styles for changing the font color based on the priority status.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87606 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 23:36:44 +00:00
mscott%netscape.com
515fdf1d79 Add a null ptr check.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87605 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 23:35:43 +00:00
mscott%netscape.com
48871a9b59 make sure the column picker has a fixed="true" attribute.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87604 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 23:34:00 +00:00
mscott%netscape.com
55b7b60ff5 Add the priority and flag columns (flag is currently not implmented yet)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87600 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 22:27:21 +00:00
sspitzer%netscape.com
c9f69a19da changes to get news reply to work.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87594 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 21:48:06 +00:00
sspitzer%netscape.com
b99c7dbb88 remove my silly printfs.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87593 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 21:30:19 +00:00
ducarroz%netscape.com
52607dbfd7 despite Mac use a 128 bits processor (G4), the compiler still not supports native 64bits integers.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87592 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 21:07:31 +00:00
ducarroz%netscape.com
56b68172b7 Add new files to the project
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87591 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 21:04:27 +00:00
ducarroz%netscape.com
9a74a9eae2 change it to pull the MailNews_Performance_20010208_BRANCH branch
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87590 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 21:02:49 +00:00
bienvenu%netscape.com
11fcec2240 get getURIsForSelection working for search view
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87589 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 21:01:55 +00:00
sspitzer%netscape.com
a2c63c5659 whoops, remove the extra addref.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87586 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 20:18:36 +00:00
bienvenu%netscape.com
163cd83d15 get search results using outliner widget
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87584 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 19:55:49 +00:00
varga%utcru.sk
be611becfe Fix for not updating currentIndex in case when row is already selected.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87583 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 19:55:07 +00:00
sspitzer%netscape.com
462efca0e4 get reply to work for local messages. (pop, movemail, local folders.)
fix nsParseLocalMessageURI to return a valid folder URI (mailbox://) instead
of folder URI with "mailbox_message" for the scheme.  next stop, news_message.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87580 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 18:40:47 +00:00
bienvenu%netscape.com
b12f6864b4 add search view to build
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87579 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 18:09:22 +00:00
sspitzer%netscape.com
02562943bd reply to an imap message works. news_message and mailbox_message are next.
leaving some temporary string hacks in there, which will
be cleaned up later.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87560 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 06:03:37 +00:00
varga%utcru.sk
96dccbd35b correctness
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87540 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 03:11:58 +00:00
varga%utcru.sk
2e050fac15 New handlers for page scrolling.
PAGE UP, PAGE DOWN
CTRL+PAGE UP, CTRL+PAGE_DOWN


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87539 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 02:52:13 +00:00
varga%utcru.sk
3965e415fe support for mousewheel scrolling
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87538 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 02:50:03 +00:00
varga%utcru.sk
7f2d34ea8c added new methods for scrolling
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87537 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 02:45:21 +00:00
bienvenu%netscape.com
31249e480a abstract out GetMsgHdrForViewIndex for search view to override
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87536 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 02:22:59 +00:00
bienvenu%netscape.com
74b3d59c46 fix deleting from threaded views, add helper routine to get thread hdr from view index
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87528 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 01:07:12 +00:00
sspitzer%netscape.com
52f68c7778 one step closer to getting reply to work
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87526 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 00:54:14 +00:00
hyatt%netscape.com
2ab5f22331 Fix a border jiggling problem.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87519 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-21 00:22:44 +00:00
hyatt%netscape.com
8a32496e94 Support for col show/hide.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87517 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 23:54:45 +00:00
varga%utcru.sk
1a870d68ca - getIndexOfVisibleRow -> getFirstVisibleRow
- new public method getLastVisibleRow
|


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87500 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 23:11:51 +00:00
varga%utcru.sk
a85d9e4035 adding new line at end of file
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87495 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 22:59:32 +00:00
hyatt%netscape.com
d3faa042ed om
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87494 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 22:56:37 +00:00
hyatt%netscape.com
0a9839559c Don't paint the hidden columns.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87491 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 22:52:56 +00:00
hyatt%netscape.com
2b349c58f8 Making sure you can attach a background image. A fluffy goody.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87490 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 22:47:33 +00:00
varga%utcru.sk
dfd103c8ce CTRL + HOME - move focus/currentIndex to top
CTRL + END    - move focus/currentIndex to bottom


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87489 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 22:47:13 +00:00
varga%utcru.sk
563085b762 scroll up only when scrollbar position really changed
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87476 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 21:56:06 +00:00
bienvenu%netscape.com
412cb6078d fix crash when m_path is null (occurred at shutdown for me)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87470 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 21:29:52 +00:00
bienvenu%netscape.com
0a8a9003ee do db work for watch and ignore thread
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87469 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 21:29:19 +00:00
bienvenu%netscape.com
799dc6b1e7 send notification on end change
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87467 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 21:05:03 +00:00
hyatt%netscape.com
e1f8b87dbe More patching of notification code.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87464 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 20:22:21 +00:00
sspitzer%netscape.com
dd4fc9af49 more work for reply. almost there...
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87460 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 19:44:09 +00:00
bienvenu%netscape.com
7407690105 fix inserting of rows after top not to scroll to top
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87458 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 18:16:09 +00:00
bienvenu%netscape.com
badb72566a fix expand/collapse notifications
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87457 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 18:15:40 +00:00
bienvenu%netscape.com
bb4969d905 change navigation interfaces not to take selection since view knows selection
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87456 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 17:50:08 +00:00
sspitzer%netscape.com
1391bfd756 fix warning
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87454 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 16:34:21 +00:00
bienvenu%netscape.com
009a19a524 fix NoteChange, remove explicit call to InvalidateRow
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87453 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 16:31:09 +00:00
sspitzer%netscape.com
6ee5f3b6a1 first part of getting reply to work...
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87452 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 16:24:11 +00:00
mscott%netscape.com
4c50b3ddaa ToggleExpansion always returns a postive # even if we are collapsing. multiply by -1 if we are collapsing
so we properly tell the outliner that we removed rows.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87438 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 04:49:31 +00:00
bienvenu%netscape.com
c06b724d7d fix has children flag after expanding thread
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87437 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 04:36:08 +00:00
mscott%netscape.com
34b82993e0 Make the thread column a cycler so clicking on it will expand/collapse containers.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87436 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 04:29:54 +00:00
sspitzer%netscape.com
d11b99c3d0 after delete, if we select another message, ensure that the message is visible in the
outliner.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87435 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 04:26:42 +00:00
mscott%netscape.com
a83145ccd3 Add some code to support expanding / collapsing of threads. If you are in threaded mode, put a "+" in the thread column for
entries which are closed containers and a "-" for entries which are open containers. clicking on the thread column for containers
now toggles the expansion for that thread.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87434 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 04:21:37 +00:00
sspitzer%netscape.com
542739595c add EnsureRowInThreadOutlinerIsVisible() helper function (which uses hyatt's ensureRowIsVisible() method in
the outliner box object) to ensure a row is visible.  then, call it from view navigation so that if you hit
next and the selected message is off screen, we go to it.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87432 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 04:16:42 +00:00
sspitzer%netscape.com
4bcc3671b2 fix the way we do sorting. the collation keys are PRUint8 *, so we treat them
like that from creation to comparison.  (no more exploding into PRUnichar *).
I've broken the nsMsgMessageDataSource, but that's ok since it is only used
by search and is going away soon.  there is still more perf work and allocations / copies
to remove, but this is a step in the right direction.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87425 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 01:59:42 +00:00
bienvenu%netscape.com
38a097c191 fix thead sorting, start kill and watch
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87423 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 01:52:11 +00:00
mscott%netscape.com
40ee955af8 fix build breakage, synch RowsAdded/RowsRemoved to the new API: rowCountChanged
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87421 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 01:49:13 +00:00
bienvenu%netscape.com
35a45bee91 fix moving of rows around when reply comes in before original msg
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87419 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 01:34:14 +00:00
mscott%netscape.com
ef214e8865 #ifdef an assertion for david b.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87417 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 01:33:05 +00:00
mscott%netscape.com
596997bf27 We are going to treat the threaded column like 4.x did for now. Clicking it moves you to threaded mode and clicking it again
just changes the ascending/descending order of the threads.

adding some whacky style rules to support this behavior.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87416 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 01:26:28 +00:00
hyatt%netscape.com
541274bfbe Respond to notifications.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87407 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 01:00:57 +00:00
hyatt%netscape.com
303939f3e1 Fix row height.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87406 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 01:00:35 +00:00
mscott%netscape.com
396d8b509e trying sorting byThread when the thread column is selected.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87404 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 00:46:53 +00:00
mscott%netscape.com
bfbc207dbf invliadate the row after changing the read/unread status. For some reason relying on ::NoteChange wasn't working all the time.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87400 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 00:19:36 +00:00
mscott%netscape.com
897ffa4eda make the unread column a cycler and implement ::CycleCell to toggle between read and unread for a message.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87397 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 00:02:07 +00:00
mscott%netscape.com
4236f3b7e7 Use a ' for read messages and a * for unread messages in the unread column
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87396 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-20 00:00:59 +00:00
mscott%netscape.com
297b6dbdfa add support for the size column.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87394 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 23:30:39 +00:00
mscott%netscape.com
38a557e06b Add support for the Size column.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87393 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 23:30:17 +00:00
mscott%netscape.com
b90e39c5c2 Add support for the status column.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87390 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 22:58:37 +00:00
mscott%netscape.com
9e23e28b2e Add support for a "Status" column in the outliner widget.
Rename nsThreadedDBView::Init to InitDBThreadedView since this was coliding with an init method on nsIMsgDBview that
was more generic.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87389 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 22:58:01 +00:00
bienvenu%netscape.com
569b6f0672 override Sort in threadeddbview so we can go to threaded mode
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87386 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 22:30:30 +00:00
bienvenu%netscape.com
71eb8cb441 fix handling delete of last msg in view when loading the next message when done
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87377 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 20:17:40 +00:00
bienvenu%netscape.com
63cb996655 make deleting a msg load the next message when done
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87373 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 19:56:31 +00:00
sspitzer%netscape.com
2e8e3f9fd8 more basic view navigation. "next unread" works, but we aren't scrolling
to show it yet.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87367 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 17:19:44 +00:00
bienvenu%netscape.com
c88d6f72a6 get intial sort working
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87366 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 17:14:33 +00:00
sspitzer%netscape.com
989aa1de74 hook up some basics for navigation.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87365 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 16:50:33 +00:00
bienvenu%netscape.com
52a1b41a4b show thread level nesting in subject column for now
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87364 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 15:57:59 +00:00
bienvenu%netscape.com
6ca783ba7e hookup toggle expansion, isemptycontainer
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87363 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 15:31:23 +00:00
varga%utcru.sk
0890390461 HOME and END keys
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87350 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 11:41:37 +00:00
hyatt%netscape.com
af172f8e37 CTRL+UP and DOwn arrow and space select added.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87342 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 08:17:37 +00:00
hyatt%netscape.com
b7f50f9ba2 Updated sample.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87341 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 07:52:18 +00:00
hyatt%netscape.com
919fe11fcd Fix padding on rows.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87340 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 07:47:41 +00:00
hyatt%netscape.com
065456b58d Fix scrollbar updating problems.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87339 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 07:47:28 +00:00
hyatt%netscape.com
ed88651603 Column resizing in real-time, finally honoring border/padding on rows and cells and cell text
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87337 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 07:40:42 +00:00
hyatt%netscape.com
8f1b699413 Clean up column skin rules.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87336 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 07:22:27 +00:00
hyatt%netscape.com
dc29186385 Arrowing up and down.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87334 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 07:04:48 +00:00
hyatt%netscape.com
f5a9d3831b Arrowing up and down.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87333 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 06:53:38 +00:00
hyatt%netscape.com
fc6caf193d UPdating samples.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87322 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 03:27:15 +00:00
hyatt%netscape.com
87d9bda55f Make this fast on Linux too.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87320 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 03:18:13 +00:00
hyatt%netscape.com
6dece231e4 Adding support for cyclers.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87317 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 03:01:18 +00:00
hyatt%netscape.com
869a9407a7 La.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87316 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 02:45:35 +00:00
hyatt%netscape.com
44c1d3c352 la
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87315 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 02:29:46 +00:00
sspitzer%netscape.com
15e828bdf7 fix crasher when sorting while you have a selection.
also, add new files to the linux build.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87314 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 01:59:44 +00:00
hyatt%netscape.com
94b8f684b7 Speed scrolling up.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87311 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-19 00:22:24 +00:00
mscott%netscape.com
98298b0b6a Preserve the selection when sorting!
Implement SaveSelection and RestoreSelection methods to accomplish this.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87301 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-18 06:59:01 +00:00
mscott%netscape.com
f172b1075e Implement ::GetCellProperties to make unread messages show up
as bold in the thread pane.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87300 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-18 05:01:52 +00:00
mscott%netscape.com
d01b5f8333 add style rule for marking unread messages with bold fonts
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87299 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-18 05:00:20 +00:00
bienvenu%netscape.com
05c6b28cfe hook up delete command to new view
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87295 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 22:21:11 +00:00
mscott%netscape.com
321f0b25ac give the outliner more flex. (flex=2)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87282 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 06:15:45 +00:00
mscott%netscape.com
93f0f67859 Mass landing of changes to make the outliner widget THE ONLY TREE WIDGET in the thread pane.
Basically commented out or in some cases removed (if I knew that part was going to be obsoleted) any code
that tried to do anything with the thread pane.

Don't expect much: focus, commands, etc. are all disabled now. All you can do is sort, scroll, load folders, and display messages.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87281 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 06:11:18 +00:00
mscott%netscape.com
a218c186c8 assert if this data source gets created. We shouldn't be creating it anymore!!!
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87280 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 06:09:37 +00:00
mscott%netscape.com
b4eab4b7bb Add onselect command to call into the view when the selection changes. This enables message display.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87270 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 04:05:29 +00:00
mscott%netscape.com
6e9e0a3c75 Add a helper method GenerateURIFromMsgKey which we can use to throw together a message uri for operations.
Hook up SelectionChanged --> if only one message is selected then display it!!! (yes we can display messages now)


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87269 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 04:04:58 +00:00
mscott%netscape.com
63004f6a60 port naving's fix to expose the base URI for a folder
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87268 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 04:04:00 +00:00
mscott%netscape.com
47f3cf9b76 port naving's fix to expose the base URI for a folder. We need this so we can generate our own message uri's
since rdf won't be doing it for us.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87267 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 04:03:45 +00:00
mscott%netscape.com
9907abe2a1 fix a JS exception on isContainer
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87266 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 02:55:30 +00:00
mscott%netscape.com
54d3846030 Properly intiialize the view with a message window and messenger instance.
Set the currently sorted column when we create a new view.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87251 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 01:58:27 +00:00
mscott%netscape.com
b29532b488 properly initialize the sort column on creation of the view.
store a message window and messenger instance.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87250 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 01:57:31 +00:00
mscott%netscape.com
b569765e4c initialize a view with a msg window and a messenger instance
add ability to set the sort column.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87249 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 01:57:22 +00:00
mscott%netscape.com
4238953580 fix a JS assertion on shift select.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87247 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 01:54:37 +00:00
mscott%netscape.com
88269253fb Add style rule for the current selection (give it a border)
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87243 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-17 00:57:05 +00:00
mscott%netscape.com
a64d4574f4 Store the last sort column dom element so we can properly remove the sort attribute when we switch to another column to sort.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87204 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-16 08:02:23 +00:00
mscott%netscape.com
bab631b7bb Remove my test sortDirection attribute on the subject column.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87203 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-16 08:01:52 +00:00
mscott%netscape.com
3c644d3864 Add styles to make selection show up. Right now, the selection color doesn't change if the widget doesn't have focus
(like it should). We'll fix that later.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87202 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-16 07:48:55 +00:00
mscott%netscape.com
3edd12bd2c Synching API changes to nsIOutlinerView including CycleHeader and Get/SetSelection.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87197 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-16 05:00:27 +00:00
mscott%netscape.com
33dab148e6 code drop from hyatt. API change to cycle header and laying foundation for selection.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87196 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-16 04:59:45 +00:00
mscott%netscape.com
a34952ad84 Merging a couple code drops from hyatt onto the branch. Laying the groundwork for implementing
selection.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87195 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-16 04:58:34 +00:00
bienvenu%netscape.com
b1fe7fe68d add support for delete msgs from view
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87183 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-16 03:33:45 +00:00
(no author)
53fbb679dd This commit was manufactured by cvs2svn to create branch
'MailNews_Performance_20010208_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87172 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-16 02:21:35 +00:00
mscott%netscape.com
ebf78554cf Updated patch from hyatt
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87130 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 21:17:44 +00:00
mscott%netscape.com
fe0310dc06 hook up cycleheader to work with the
threaded column. this just toggles the icon
 i still have to hook up code to change to a
threaded view.I may end up moving this out into JS with a onclick
handler where it will be easier to switch the view.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87120 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 21:08:11 +00:00
bienvenu%netscape.com
7a8d04046e work on implementing delete command
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87102 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 18:26:32 +00:00
bienvenu%netscape.com
0758aa174c fix level and hasChildren for flat view
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87101 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 16:28:48 +00:00
mscott%netscape.com
c5a360d904 More work to make the outliner widget look like the tree widget.
add a threaded/unthreaded column header & icon. Add a unread button
column header. Tweak the styles on sortable columns.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87095 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 09:34:50 +00:00
mscott%netscape.com
14d2a4e125 Add style rules to the thread pane to show threaded/unthreaded
mode and the Unread column button.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87094 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 09:33:09 +00:00
mscott%netscape.com
8f16617c6b wrap an outlinercol with a box in order to get images in the
column headers to line up and get spaced properly.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87093 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 09:32:36 +00:00
mscott%netscape.com
2137ff35e1 Adding more style rules to make sorting icons work
and images in column headers work.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87092 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 09:31:44 +00:00
mscott%netscape.com
795e5f249b Display the date field.
Set the sorting order on the column we are currently sorted by (not clearing the old
column yet though).
parse the author string from the db and extract just the name field.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87091 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 09:30:58 +00:00
mscott%netscape.com
be011cf882 get rid of a nasty width style on outlinercol. this was
preventing column headers which contain an image from showing
up correctly.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87090 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 09:29:28 +00:00
sspitzer%netscape.com
b286de5368 add author to printf for dump view. fix warnings.
get sorting working again.  for some reason, the collation key is
really a char *, instead of a prunichar *.  I need to investigate.
but at least for now, sorting works again.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87075 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 04:59:44 +00:00
bienvenu%netscape.com
1b5e345c6d work on watch and ignore support, promotion of thread child when root msg is deleted
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87071 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 04:19:42 +00:00
bienvenu%netscape.com
5676f47982 fix for insert sort
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87061 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 01:18:22 +00:00
sspitzer%netscape.com
c75c90b282 fix it so we are dealing with PRUnichars properly.
it was working before, but at least now I know why it works.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87056 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-15 00:46:04 +00:00
bienvenu%netscape.com
ada46119af work on getting msgs added to open views correctly
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87023 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-14 21:15:26 +00:00
mscott%netscape.com
73b3805ae2 fix mouse event stuff in a tree cell. fix came from hyatt
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@87009 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-14 19:56:52 +00:00
sspitzer%netscape.com
5ac1bc84cc more work on navigation. allow "Next" to drive the new navigation code.
allow for testing of navigateStatus() and viewNavigate().


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86980 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-14 04:19:30 +00:00
mscott%netscape.com
fda1cb4de2 Implement CycleHeaders so clicking on an outliner column will properly toggle the sort (including the sort order).
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86976 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-14 03:28:31 +00:00
mscott%netscape.com
78426abd7c Add new CSS styles so the outliner columns look like tree columns
hook up sorting (CycleHeader) to columns.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86975 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-14 03:27:18 +00:00
mscott%netscape.com
3fb5a2a4f4 moving styles out to outliner.css
adding new mail specific styles for the outliner widget.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86974 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-14 03:24:44 +00:00
mscott%netscape.com
b11c88656c include outliner.css
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86972 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-14 03:23:54 +00:00
mscott%netscape.com
955829c37c Add an outliner.css file which contains generic style informaton for the outliner widget.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86971 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-14 03:18:33 +00:00
bienvenu%netscape.com
d367dec167 fix linux bustage
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86965 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-14 02:13:43 +00:00
bienvenu%netscape.com
7cc72dda1f work on view command handling
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86964 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-14 02:05:16 +00:00
mscott%netscape.com
764fde8602 Add cycleHeader call
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86955 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-14 00:58:54 +00:00
sspitzer%netscape.com
805adaa5c1 fix crasher with outliner.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86930 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 19:54:59 +00:00
sspitzer%netscape.com
3aff39836a port over the navigation code from 4.x. a work in progress.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86927 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 18:50:07 +00:00
bienvenu%netscape.com
470cbb21e0 cache most recently asked for msg hdr and key
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86926 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 15:59:30 +00:00
mscott%netscape.com
66ef887429 Add some style rules for the new outliner thread pane
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86913 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 08:40:04 +00:00
mscott%netscape.com
f0abdb6370 Begin hooking up the dbview class as an implementation of nsIOutlinerView. Invalid rows after changing the sorting or the
sort order. Basic implementation of GetCellText for subject and sender.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86912 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 08:39:43 +00:00
mscott%netscape.com
7ba987d1b3 Add GetThreadOutliner method.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86911 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 08:38:53 +00:00
mscott%netscape.com
6ac15635d8 add the outliner widget version of the thread pane. Add a GetThreadOutliner method for getting the outliner.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86910 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 08:38:38 +00:00
mscott%netscape.com
b67b9aa739 invoke the outliner widget along with the thread pane
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86909 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 08:38:12 +00:00
mscott%netscape.com
bc8e083f29 commandglue.js --> set the view on the outliner widget when we re-root the thread pane
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86908 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 08:37:54 +00:00
mscott%netscape.com
8a028d68ca add null ptr check to mView
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86905 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 06:49:34 +00:00
sspitzer%netscape.com
09465a81d3 initial crack at the view navigation methods. thanks for bienvenu
for the pointers.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86887 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 03:11:11 +00:00
sspitzer%netscape.com
58b1f7d5cb more linux build changes.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86886 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 03:09:24 +00:00
sspitzer%netscape.com
988e4701b8 initial pass at getting the outliner code to build on Linux.
mac changes coming next...psych. as if!  I leave it to some poor
mac zealot to worry about that platform.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86873 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 02:11:54 +00:00
mscott%netscape.com
6b2a8aff2e link against xul outliner library
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86870 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 01:59:23 +00:00
mscott%netscape.com
87cf6e95c2 link againt xul outliner library.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86867 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 01:24:51 +00:00
mscott%netscape.com
9931dc87b5 Land changes to build the outliner widget on windows. Add some changes hyatt sent me too.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86865 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 01:17:27 +00:00
mscott%netscape.com
ffdeee17c6 Land stub implementation methods of nsIOutlinerView
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86851 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 22:36:00 +00:00
bienvenu%netscape.com
3b43f5f968 fix crash on shutdown
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86847 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 21:58:28 +00:00
sspitzer%netscape.com
1bf4cd1f2c use the view type to create different views. eventually, eShow* will go away
but for now it gives bienvenu a way to test his code and makes it so
our db view mirrors the current thread pane.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86846 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 21:56:17 +00:00
sspitzer%netscape.com
3994d11832 fix Open() take flags, sort type, sort order
fix DumpView() to do the right thing when in threaded mode
when we switch to threaded mode, set the view flags in the db view


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86836 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 21:17:46 +00:00
bienvenu%netscape.com
a40b379b76 add threads with unread and watched threads with unread views
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86834 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 20:31:18 +00:00
bienvenu%netscape.com
d66883020f add threads with unread and watchd threads with unread views
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86833 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 20:28:30 +00:00
sspitzer%netscape.com
a18faec684 add nsMsgViewFlagsType to nsIMsgDBView.idl, and add Get/Set for m_viewFlags.
remove nsMsgDBViewFlags from nsMsgDBView.h


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86832 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 20:01:06 +00:00
sspitzer%netscape.com
3696e42cd3 hook up the db view to the real thread pane.
now, the real thread pane and the db view are in sync.
add the "Dump View" button to the 3 pane, for debugging.
if you see difference between the dumped view and the thread pane,
it might be due to secondary sorts.  in 6,x we use dates as the secondary
sorts, going forward, we will use the message key, like 4.x did.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86831 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 18:31:05 +00:00
bienvenu%netscape.com
edf05f3bd0 add command interfaces
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86830 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 17:10:24 +00:00
(no author)
08e9de3ff9 This commit was manufactured by cvs2svn to create branch
'MailNews_Performance_20010208_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86820 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 08:25:25 +00:00
(no author)
3ad6c19841 This commit was manufactured by cvs2svn to create branch
'MailNews_Performance_20010208_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86817 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 08:16:21 +00:00
sspitzer%netscape.com
72e6500850 more hacking...
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86800 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 05:01:22 +00:00
sspitzer%netscape.com
8633fee780 more refinements to DumpView()
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86799 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 04:58:05 +00:00
sspitzer%netscape.com
14fef23faf port over ReverseThreads(), and improve DumpView()
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86797 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 04:27:40 +00:00
sspitzer%netscape.com
6eaabdbd09 take a crack at sorting. so far so good. but I need to test like a mo-fo.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86790 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 03:06:58 +00:00
bienvenu%netscape.com
1758f40282 some changes for offline imap, especially iterating over folders
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86789 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 02:10:58 +00:00
sspitzer%netscape.com
631b00ecd7 free the memory we allocate, bring over the ptrs array from the 4.x code.
work my way closer to actually sorting.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86788 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 01:36:05 +00:00
sspitzer%netscape.com
089f4c16a4 gee, davey.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86787 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 00:33:52 +00:00
sspitzer%netscape.com
906028efc9 remove some bloat. rename msg_StripRE() to NS_MsgStripRE() and put in nsMsgUtils. then remove the implementations in msglocal and msgnews. also fix a warning.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86786 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-12 00:26:46 +00:00
bienvenu%netscape.com
082e0dd415 more work on threading, especially expand and collapse
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86781 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-11 21:39:51 +00:00
bienvenu%netscape.com
69d155b7ce get expand thread to work
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86727 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-10 01:26:16 +00:00
bienvenu%netscape.com
777a48d4de get ::Open and ::Init working
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86714 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-10 00:00:53 +00:00
sspitzer%netscape.com
b34568640c open the view when you hit enter in the text field
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86712 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 23:41:27 +00:00
sspitzer%netscape.com
aa94e32f5d more changes for the harness
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86711 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 23:35:33 +00:00
sspitzer%netscape.com
07664b981a fix test harness to work with bienvenu's code.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86708 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 23:29:51 +00:00
bienvenu%netscape.com
96d4831cde change open to take an nsIMsgFolder
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86706 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 23:18:40 +00:00
bienvenu%netscape.com
6b42f61a96 more work on db views, fix view flags especially
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86695 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 20:46:58 +00:00
sspitzer%netscape.com
fcdc4c5ba1 more work on the harness. get it so Populate() will populate
the key and flags array from the Trash folder on Local Folders.
this requires the three pane to be open to that folder.


git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86692 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 19:54:13 +00:00
sspitzer%netscape.com
ddb5a80a80 more changes for the test harness. now to go work on the code...
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86688 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 18:24:33 +00:00
bienvenu%netscape.com
3a9f43ad1a add nsUintArray8 to the build
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86687 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 18:00:19 +00:00
bienvenu%netscape.com
2242fd9023 replace MIN with PR_MIN
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86685 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 15:52:28 +00:00
(no author)
0e9e715246 This commit was manufactured by cvs2svn to create branch
'MailNews_Performance_20010208_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86682 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 12:12:54 +00:00
sspitzer%netscape.com
8864e200b3 storming the beaches of normandy
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86666 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 07:28:20 +00:00
sspitzer%netscape.com
a332cc39f0 fix for 59581. sr=bienvenu
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86664 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 06:37:29 +00:00
sspitzer%netscape.com
9347e04542 warnings fix. r/sr=brendan,waterson #68036
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86662 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 06:23:06 +00:00
mscott%netscape.com
9193031422 set branch tag.
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86654 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 04:08:09 +00:00
mscott%netscape.com
712097b4c9 set the mail news perf branch tag
git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86653 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 04:07:02 +00:00
(no author)
dba25c706c This commit was manufactured by cvs2svn to create branch
'MailNews_Performance_20010208_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MailNews_Performance_20010208_BRANCH@86612 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-08 17:46:55 +00:00
22441 changed files with 4542019 additions and 106011 deletions

43
mozilla/LEGAL Normal file
View File

@@ -0,0 +1,43 @@
Please be apprised of the following Legal Notices:
A) The U.S. District Court for the Eastern District of Virginia has
ruled that the Netscape Navigator code does not infringe Wang's U.S.
Patent No. 4,751,669 ("the '669 Patent") because: 1) HTML is not
Videotex as defined by the '669 patent; 2) web servers are not central
suppliers; and 3) Navigator does not "connect," as defined by the '669
Patent, to web servers on the Internet. Wang may appeal this decision to
the Federal Circuit. Wang contended that its Patent disclosing a
"Videotext" system, is infringed by the following functionality in the
Netscape Navigator code: 1) the animated logo and status line indicators
--See Claims 1,8 and 9; 2) the "File Save As" function --See Claims
23-27; 3) Bookmarks and Rename Bookmarks in the Properties window --See
Claims 20-22; 4) storing HTML, GIF, and JPEG files and adding filename
extensions --See Claim 38
B) Intermind owns pending U.S. patent applications on communications
systems which employ metadata ("channel objects") to define a control
structure for information transfer. The Netscape code does not infringe
as released; however, modifications which utilize channel objects as
described by Intermind should be considered carefully. The following is
a statement from Intermind: "Intermind's claims fundamentally involve
the use of a control structure to automate communications. ...The
essence of Intermind's top claim is that two devices sender and
receiver have persistent storage, communicate over a network,
and exchange a control structure including metadata which describes: 1)
what information is to be updated, 2) when to update this information,
and 3) how to transfer the updated information. In addition, at least
the receiving device must be able to process the metadata in order to
perform the update determination and transfer. Any digital
communications system which incorporates all of these elements will be
covered by Intermind's patents." See Intermind.com.
C) Stac, Inc., and its licensing agent Hi/fn, own several patents which
disclose data compression methods implementing an LZS compression
algorithm, including U.S. Patent Nos. 4,701,745 and 5,016, 009 ("the
Stac Patents"). The Netscape Communicator code does not perform
compression. If you modify the Netscape source code to perform
compression, please take notice of the Stac Patents.
D) Netscape Communications Corporation ("Netscape") does not guarantee
that any source code or executable code available from the mozilla.org
domain is Year 2000 compliant.

567
mozilla/LICENSE Normal file
View File

@@ -0,0 +1,567 @@
MOZILLA PUBLIC LICENSE
Version 1.1
---------------
1. Definitions.
1.0.1. "Commercial Use" means distribution or otherwise making the
Covered Code available to a third party.
1.1. "Contributor" means each entity that creates or contributes to
the creation of Modifications.
1.2. "Contributor Version" means the combination of the Original
Code, prior Modifications used by a Contributor, and the Modifications
made by that particular Contributor.
1.3. "Covered Code" means the Original Code or Modifications or the
combination of the Original Code and Modifications, in each case
including portions thereof.
1.4. "Electronic Distribution Mechanism" means a mechanism generally
accepted in the software development community for the electronic
transfer of data.
1.5. "Executable" means Covered Code in any form other than Source
Code.
1.6. "Initial Developer" means the individual or entity identified
as the Initial Developer in the Source Code notice required by Exhibit
A.
1.7. "Larger Work" means a work which combines Covered Code or
portions thereof with code not governed by the terms of this License.
1.8. "License" means this document.
1.8.1. "Licensable" means having the right to grant, to the maximum
extent possible, whether at the time of the initial grant or
subsequently acquired, any and all of the rights conveyed herein.
1.9. "Modifications" means any addition to or deletion from the
substance or structure of either the Original Code or any previous
Modifications. When Covered Code is released as a series of files, a
Modification is:
A. Any addition to or deletion from the contents of a file
containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or
previous Modifications.
1.10. "Original Code" means Source Code of computer software code
which is described in the Source Code notice required by Exhibit A as
Original Code, and which, at the time of its release under this
License is not already Covered Code governed by this License.
1.10.1. "Patent Claims" means any patent claim(s), now owned or
hereafter acquired, including without limitation, method, process,
and apparatus claims, in any patent Licensable by grantor.
1.11. "Source Code" means the preferred form of the Covered Code for
making modifications to it, including all modules it contains, plus
any associated interface definition files, scripts used to control
compilation and installation of an Executable, or source code
differential comparisons against either the Original Code or another
well known, available Covered Code of the Contributor's choice. The
Source Code can be in a compressed or archival form, provided the
appropriate decompression or de-archiving software is widely available
for no charge.
1.12. "You" (or "Your") means an individual or a legal entity
exercising rights under, and complying with all of the terms of, this
License or a future version of this License issued under Section 6.1.
For legal entities, "You" includes any entity which controls, is
controlled by, or is under common control with You. For purposes of
this definition, "control" means (a) the power, direct or indirect,
to cause the direction or management of such entity, whether by
contract or otherwise, or (b) ownership of more than fifty percent
(50%) of the outstanding shares or beneficial ownership of such
entity.
2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) under intellectual property rights (other than patent or
trademark) Licensable by Initial Developer to use, reproduce,
modify, display, perform, sublicense and distribute the Original
Code (or portions thereof) with or without Modifications, and/or
as part of a Larger Work; and
(b) under Patents Claims infringed by the making, using or
selling of Original Code, to make, have made, use, practice,
sell, and offer for sale, and/or otherwise dispose of the
Original Code (or portions thereof).
(c) the licenses granted in this Section 2.1(a) and (b) are
effective on the date Initial Developer first distributes
Original Code under the terms of this License.
(d) Notwithstanding Section 2.1(b) above, no patent license is
granted: 1) for code that You delete from the Original Code; 2)
separate from the Original Code; or 3) for infringements caused
by: i) the modification of the Original Code or ii) the
combination of the Original Code with other software or devices.
2.2. Contributor Grant.
Subject to third party intellectual property claims, each Contributor
hereby grants You a world-wide, royalty-free, non-exclusive license
(a) under intellectual property rights (other than patent or
trademark) Licensable by Contributor, to use, reproduce, modify,
display, perform, sublicense and distribute the Modifications
created by such Contributor (or portions thereof) either on an
unmodified basis, with other Modifications, as Covered Code
and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making, using, or
selling of Modifications made by that Contributor either alone
and/or in combination with its Contributor Version (or portions
of such combination), to make, use, sell, offer for sale, have
made, and/or otherwise dispose of: 1) Modifications made by that
Contributor (or portions thereof); and 2) the combination of
Modifications made by that Contributor with its Contributor
Version (or portions of such combination).
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
effective on the date Contributor first makes Commercial Use of
the Covered Code.
(d) Notwithstanding Section 2.2(b) above, no patent license is
granted: 1) for any code that Contributor has deleted from the
Contributor Version; 2) separate from the Contributor Version;
3) for infringements caused by: i) third party modifications of
Contributor Version or ii) the combination of Modifications made
by that Contributor with other software (except as part of the
Contributor Version) or other devices; or 4) under Patent Claims
infringed by Covered Code in the absence of Modifications made by
that Contributor.
3. Distribution Obligations.
3.1. Application of License.
The Modifications which You create or to which You contribute are
governed by the terms of this License, including without limitation
Section 2.2. The Source Code version of Covered Code may be
distributed only under the terms of this License or a future version
of this License released under Section 6.1, and You must include a
copy of this License with every copy of the Source Code You
distribute. You may not offer or impose any terms on any Source Code
version that alters or restricts the applicable version of this
License or the recipients' rights hereunder. However, You may include
an additional document offering the additional rights described in
Section 3.5.
3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be
made available in Source Code form under the terms of this License
either on the same media as an Executable version or via an accepted
Electronic Distribution Mechanism to anyone to whom you made an
Executable version available; and if made available via Electronic
Distribution Mechanism, must remain available for at least twelve (12)
months after the date it initially became available, or at least six
(6) months after a subsequent version of that particular Modification
has been made available to such recipients. You are responsible for
ensuring that the Source Code version remains available even if the
Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications.
You must cause all Covered Code to which You contribute to contain a
file documenting the changes You made to create that Covered Code and
the date of any change. You must include a prominent statement that
the Modification is derived, directly or indirectly, from Original
Code provided by the Initial Developer and including the name of the
Initial Developer in (a) the Source Code, and (b) in any notice in an
Executable version or related documentation in which You describe the
origin or ownership of the Covered Code.
3.4. Intellectual Property Matters
(a) Third Party Claims.
If Contributor has knowledge that a license under a third party's
intellectual property rights is required to exercise the rights
granted by such Contributor under Sections 2.1 or 2.2,
Contributor must include a text file with the Source Code
distribution titled "LEGAL" which describes the claim and the
party making the claim in sufficient detail that a recipient will
know whom to contact. If Contributor obtains such knowledge after
the Modification is made available as described in Section 3.2,
Contributor shall promptly modify the LEGAL file in all copies
Contributor makes available thereafter and shall take other steps
(such as notifying appropriate mailing lists or newsgroups)
reasonably calculated to inform those who received the Covered
Code that new knowledge has been obtained.
(b) Contributor APIs.
If Contributor's Modifications include an application programming
interface and Contributor has knowledge of patent licenses which
are reasonably necessary to implement that API, Contributor must
also include this information in the LEGAL file.
(c) Representations.
Contributor represents that, except as disclosed pursuant to
Section 3.4(a) above, Contributor believes that Contributor's
Modifications are Contributor's original creation(s) and/or
Contributor has sufficient rights to grant the rights conveyed by
this License.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code. If it is not possible to put such notice in a particular Source
Code file due to its structure, then You must include such notice in a
location (such as a relevant directory) where a user would be likely
to look for such a notice. If You created one or more Modification(s)
You may add your name as a Contributor to the notice described in
Exhibit A. You must also duplicate this License in any documentation
for the Source Code where You describe recipients' rights or ownership
rights relating to Covered Code. You may choose to offer, and to
charge a fee for, warranty, support, indemnity or liability
obligations to one or more recipients of Covered Code. However, You
may do so only on Your own behalf, and not on behalf of the Initial
Developer or any Contributor. You must make it absolutely clear than
any such warranty, support, indemnity or liability obligation is
offered by You alone, and You hereby agree to indemnify the Initial
Developer and every Contributor for any liability incurred by the
Initial Developer or such Contributor as a result of warranty,
support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the
requirements of Section 3.1-3.5 have been met for that Covered Code,
and if You include a notice stating that the Source Code version of
the Covered Code is available under the terms of this License,
including a description of how and where You have fulfilled the
obligations of Section 3.2. The notice must be conspicuously included
in any notice in an Executable version, related documentation or
collateral in which You describe recipients' rights relating to the
Covered Code. You may distribute the Executable version of Covered
Code or ownership rights under a license of Your choice, which may
contain terms different from this License, provided that You are in
compliance with the terms of this License and that the license for the
Executable version does not attempt to limit or alter the recipient's
rights in the Source Code version from the rights set forth in this
License. If You distribute the Executable version under a different
license You must make it absolutely clear that any terms which differ
from this License are offered by You alone, not by the Initial
Developer or any Contributor. You hereby agree to indemnify the
Initial Developer and every Contributor for any liability incurred by
the Initial Developer or such Contributor as a result of any such
terms You offer.
3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code
not governed by the terms of this License and distribute the Larger
Work as a single product. In such a case, You must make sure the
requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Code due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description
must be included in the LEGAL file described in Section 3.4 and must
be included with all distributions of the Source Code. Except to the
extent prohibited by statute or regulation, such description must be
sufficiently detailed for a recipient of ordinary skill to be able to
understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has
attached the notice in Exhibit A and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation ("Netscape") may publish revised
and/or new versions of the License from time to time. Each version
will be given a distinguishing version number.
6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the
License, You may always continue to use it under the terms of that
version. You may also choose to use such Covered Code under the terms
of any subsequent version of the License published by Netscape. No one
other than Netscape has the right to modify the terms applicable to
Covered Code created under this License.
6.3. Derivative Works.
If You create or use a modified version of this License (which you may
only do in order to apply it to code which is not already Covered Code
governed by this License), You must (a) rename Your license so that
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
"MPL", "NPL" or any confusingly similar phrase do not appear in your
license (except to note that your license differs from this License)
and (b) otherwise make it clear that Your version of the license
contains terms which differ from the Mozilla Public License and
Netscape Public License. (Filling in the name of the Initial
Developer, Original Code or Contributor in the notice described in
Exhibit A shall not of themselves be deemed to be modifications of
this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
8.1. This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to cure
such breach within 30 days of becoming aware of the breach. All
sublicenses to the Covered Code which are properly granted shall
survive any termination of this License. Provisions which, by their
nature, must remain in effect beyond the termination of this License
shall survive.
8.2. If You initiate litigation by asserting a patent infringement
claim (excluding declatory judgment actions) against Initial Developer
or a Contributor (the Initial Developer or Contributor against whom
You file such action is referred to as "Participant") alleging that:
(a) such Participant's Contributor Version directly or indirectly
infringes any patent, then any and all rights granted by such
Participant to You under Sections 2.1 and/or 2.2 of this License
shall, upon 60 days notice from Participant terminate prospectively,
unless if within 60 days after receipt of notice You either: (i)
agree in writing to pay Participant a mutually agreeable reasonable
royalty for Your past and future use of Modifications made by such
Participant, or (ii) withdraw Your litigation claim with respect to
the Contributor Version against such Participant. If within 60 days
of notice, a reasonable royalty and payment arrangement are not
mutually agreed upon in writing by the parties or the litigation claim
is not withdrawn, the rights granted by Participant to You under
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
the 60 day notice period specified above.
(b) any software, hardware, or device, other than such Participant's
Contributor Version, directly or indirectly infringes any patent, then
any rights granted to You by such Participant under Sections 2.1(b)
and 2.2(b) are revoked effective as of the date You first made, used,
sold, distributed, or had made, Modifications made by that
Participant.
8.3. If You assert a patent infringement claim against Participant
alleging that such Participant's Contributor Version directly or
indirectly infringes any patent where such claim is resolved (such as
by license or settlement) prior to the initiation of patent
infringement litigation, then the reasonable value of the licenses
granted by such Participant under Sections 2.1 or 2.2 shall be taken
into account in determining the amount or value of any payment or
license.
8.4. In the event of termination under Sections 8.1 or 8.2 above,
all end user license agreements (excluding distributors and resellers)
which have been validly granted by You or any distributor hereunder
prior to termination shall survive termination.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a "commercial item," as that term is defined in
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
software" and "commercial computer software documentation," as such
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
all U.S. Government End Users acquire Covered Code with only those
rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. This License shall be governed by
California law provisions (except to the extent applicable law, if
any, provides otherwise), excluding its conflict-of-law provisions.
With respect to disputes in which at least one party is a citizen of,
or an entity chartered or registered to do business in the United
States of America, any litigation relating to this License shall be
subject to the jurisdiction of the Federal Courts of the Northern
District of California, with venue lying in Santa Clara County,
California, with the losing party responsible for costs, including
without limitation, court costs and reasonable attorneys' fees and
expenses. The application of the United Nations Convention on
Contracts for the International Sale of Goods is expressly excluded.
Any law or regulation which provides that the language of a contract
shall be construed against the drafter shall not apply to this
License.
12. RESPONSIBILITY FOR CLAIMS.
As between Initial Developer and the Contributors, each party is
responsible for claims and damages arising, directly or indirectly,
out of its utilization of rights under this License and You agree to
work with Initial Developer and Contributors to distribute such
responsibility on an equitable basis. Nothing herein is intended or
shall be deemed to constitute any admission of liability.
13. MULTIPLE-LICENSED CODE.
Initial Developer may designate portions of the Covered Code as
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
Developer permits you to utilize portions of the Covered Code under
Your choice of the NPL or the alternative licenses, if any, specified
by the Initial Developer in the file described in Exhibit A.
EXHIBIT A -Mozilla Public License.
``The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
The Original Code is ______________________________________.
The Initial Developer of the Original Code is ________________________.
Portions created by ______________________ are Copyright (C) ______
_______________________. All Rights Reserved.
Contributor(s): ______________________________________.
Alternatively, the contents of this file may be used under the terms
of the _____ license (the "[___] License"), in which case the
provisions of [______] License are applicable instead of those
above. If you wish to allow use of your version of this file only
under the terms of the [____] License and not to allow others to use
your version of this file under the MPL, indicate your decision by
deleting the provisions above and replace them with the notice and
other provisions required by the [___] License. If you do not delete
the provisions above, a recipient may use your version of this file
under either the MPL or the [___] License."
[NOTE: The text of this Exhibit A may differ slightly from the text of
the notices in the Source Code files of the Original Code. You should
use the text of this Exhibit A rather than the text found in the
Original Code Source Code for Your Modifications.]
----------------------------------------------------------------------
AMENDMENTS
The Netscape Public License Version 1.1 ("NPL") consists of the
Mozilla Public License Version 1.1 with the following Amendments,
including Exhibit A-Netscape Public License. Files identified with
"Exhibit A-Netscape Public License" are governed by the Netscape
Public License Version 1.1.
Additional Terms applicable to the Netscape Public License.
I. Effect.
These additional terms described in this Netscape Public
License -- Amendments shall apply to the Mozilla Communicator
client code and to all Covered Code under this License.
II. "Netscape's Branded Code" means Covered Code that Netscape
distributes and/or permits others to distribute under one or more
trademark(s) which are controlled by Netscape but which are not
licensed for use under this License.
III. Netscape and logo.
This License does not grant any rights to use the trademarks
"Netscape", the "Netscape N and horizon" logo or the "Netscape
lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript",
"Smart Browsing" even if such marks are included in the Original
Code or Modifications.
IV. Inability to Comply Due to Contractual Obligation.
Prior to licensing the Original Code under this License, Netscape
has licensed third party code for use in Netscape's Branded Code.
To the extent that Netscape is limited contractually from making
such third party code available under this License, Netscape may
choose to reintegrate such code into Covered Code without being
required to distribute such code in Source Code form, even if
such code would otherwise be considered "Modifications" under
this License.
V. Use of Modifications and Covered Code by Initial Developer.
V.1. In General.
The obligations of Section 3 apply to Netscape, except to
the extent specified in this Amendment, Section V.2 and V.3.
V.2. Other Products.
Netscape may include Covered Code in products other than the
Netscape's Branded Code which are released by Netscape
during the two (2) years following the release date of the
Original Code, without such additional products becoming
subject to the terms of this License, and may license such
additional products on different terms from those contained
in this License.
V.3. Alternative Licensing.
Netscape may license the Source Code of Netscape's Branded
Code, including Modifications incorporated therein, without
such Netscape Branded Code becoming subject to the terms of
this License, and may license such Netscape Branded Code on
different terms from those contained in this License.
VI. Litigation.
Notwithstanding the limitations of Section 11 above, the
provisions regarding litigation in Section 11(a), (b) and (c) of
the License shall apply to all disputes relating to this License.
EXHIBIT A-Netscape Public License.
"The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s): ______________________________________.
Alternatively, the contents of this file may be used under the
terms of the _____ license (the "[___] License"), in which case
the provisions of [______] License are applicable instead of
those above. If you wish to allow use of your version of this
file only under the terms of the [____] License and not to allow
others to use your version of this file under the NPL, indicate
your decision by deleting the provisions above and replace them
with the notice and other provisions required by the [___]
License. If you do not delete the provisions above, a recipient
may use your version of this file under either the NPL or the
[___] License."

172
mozilla/Makefile.in Normal file
View File

@@ -0,0 +1,172 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = .
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/build/unix/modules.mk
ifneq ($(BUILD_MODULES),all)
DIRS = $(BUILD_MODULE_DIRS)
EXPORT_DIRS = $(BUILD_MODULE_DEP_DIRS)
else
DIRS = config build
ifdef MOZ_L10N
DIRS += l10n
endif
ifdef MOZ_JAVA_SUPPLEMENT
DIRS += \
java/util \
java/webclient \
$(NULL)
endif
# boehm needs to be built before XPCOM
ifdef GC_LEAK_DETECTOR
DIRS += gc/boehm
endif
DIRS += $(NSPRPUB_DIR)
DIRS += dbm modules/libreg js xpcom js/src/xpconnect
ifdef MOZ_OJI
DIRS += js/src/liveconnect
endif
ifndef MOZ_NATIVE_ZLIB
DIRS += modules/zlib
endif
ifndef MOZ_NATIVE_JPEG
DIRS += jpeg
endif
ifdef MOZ_ENABLE_XLIB
DIRS += gfx/src/xlibrgb widget/src/xlibxtbin
endif
ifdef MOZ_ENABLE_GTK
DIRS += widget/src/gtksuperwin widget/src/gtkxtbin
endif
# Linux and Solaris installer needs standalone libjar, hence standalone zlib
ifneq (,$(filter Linux SunOS,$(OS_ARCH)))
DIRS += modules/zlib/standalone
endif
DIRS += \
widget/timer \
include \
modules/libutil \
netwerk \
modules/mpfilelocprovider \
uriloader \
intl \
modules/libpref \
modules/libimg \
modules/oji \
modules/libjar \
caps \
expat \
htmlparser \
gfx \
modules/plugin \
dom \
view \
widget \
layout \
db \
rdf \
docshell \
webshell \
embedding \
editor \
sun-java \
profile \
themes \
$(NULL)
# This must preceed xpfe
ifdef MOZ_JPROF
DIRS += tools/jprof
endif
ifdef MOZ_BUILD_XPFE
DIRS += xpfe
endif
DIRS += xpinstall
ifdef MOZ_EXTENSIONS
DIRS += extensions
endif
ifdef MOZ_MAIL_NEWS
DIRS += mailnews
endif
ifdef MOZ_LEAKY
DIRS += tools/leaky
endif
ifdef ENABLE_TESTS
DIRS += xpcom/tests
endif
ifdef MOZ_LDAP_XPCOM
DIRS += directory/c-sdk/ldap directory/xpcom
endif
DIRS += l10n
ifdef MOZ_STATIC_COMPONENTS
DIRS += modules/staticmod
endif
endif # BUILD_MODULES == all
STATIC_MAKEFILES := $(NSPRPUB_DIR)
GARBAGE_DIRS += dist
DIST_GARBAGE = config.cache config.log config.status config-defs.h \
dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
unallmakefiles \
$(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
include $(topsrcdir)/config/rules.mk
export::
+$(LOOP_OVER_EXPORT_DIRS)
distclean::
cat unallmakefiles | $(XARGS) rm -f
rm -f unallmakefiles $(DIST_GARBAGE)

View File

@@ -0,0 +1,2 @@
Pursuant to section 3.3 of the MPL, this file will contain a list of the files
that have been modified by IBM Corporation.

View File

@@ -0,0 +1,3 @@
For mozilla-the-client build instructions, please read:
http://www.mozilla.org/build/

12
mozilla/aclocal.m4 vendored Normal file
View File

@@ -0,0 +1,12 @@
dnl
dnl Local autoconf macros used with mozilla
dnl The contents of this file are under the Public Domain.
dnl
builtin(include, build/autoconf/glib.m4)dnl
builtin(include, build/autoconf/gtk.m4)dnl
builtin(include, build/autoconf/libIDL.m4)dnl
dnl
define(MOZ_TOPSRCDIR,.)dnl MOZ_TOPSRCDIR is used in altoptions.m4
builtin(include, build/autoconf/altoptions.m4)dnl

1029
mozilla/allmakefiles.sh Executable file

File diff suppressed because it is too large Load Diff

36
mozilla/build/Makefile.in Normal file
View File

@@ -0,0 +1,36 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Mozilla Communicator client code,
# released March 31, 1998.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = unix
include $(topsrcdir)/config/rules.mk
# Install bloaturls.txt file for tinderbox Bloaty test.
install:: $(srcdir)/bloaturls.txt
$(INSTALL) $< $(DIST)/bin

View File

@@ -0,0 +1,179 @@
#! /usr/bin/env perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# acoutput-fast.pl - Quickly create makefiles that are in a common format.
#
# Most of the makefiles in mozilla only refer to two configure variables:
# @srcdir@
# @top_srcdir@
# However, configure does not know any better and it runs sed on each file
# with over 150 replacement rules (slow as molasses).
#
# This script takes a list of makefiles as input. For example,
#
# echo $MAKEFILES | acoutput-fast.pl
#
# The script creates each Makefile that only references @srcdir@ and
# @top_srcdir@. For other files, it lists them in a shell command that is
# printed to stdout:
#
# CONFIG_FILES="unhandled_files..."; export CONFIG_FILES
#
# This command can be used to have config.status create the unhandled
# files. For example,
#
# eval "echo $MAKEFILES | acoutput-fast.pl"
# AC_OUTPUT($MAKEFILES)
#
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
#use File::Basename;
sub dirname {
my $dir = $_[0];
return '.' if not $dir =~ m%/%;
$dir =~ s%/[^/][^/]*$%%;
return $dir;
}
# Create one directory. Assumes it doesn't already exist.
# Will create parent(s) if needed.
sub create_directory {
my $dir = $_[0];
my $parent = dirname($dir);
create_directory($parent) if not -d $parent;
mkdir "$dir",0777;
}
# Create all the directories at once.
# This can be much faster than calling mkdir() for each one.
sub create_directories {
my @makefiles = @_;
my @dirs = ();
my $ac_file;
foreach $ac_file (@makefiles) {
push @dirs, dirname($ac_file);
}
# Call mkdir with the directories sorted by subdir count (how many /'s)
if (@dirs) {
my $mkdir_command = "mkdir -p ". join(' ', @dirs);
if (system($mkdir_command) != 0) {
print STDERR "Creating dirs all at once failed; trying one at atime\n";
foreach $dir (@dirs) {
if (not -d $dir) {
print STDERR "Creating directory $dir\n";
create_directory($dir);
}
}
}
}
}
if ($ARGV[0] =~ /^--srcdir=/) {
$ac_given_srcdir = (split /=/, shift @ARGV)[1];
} else {
$ac_given_srcdir = $0;
$ac_given_srcdir =~ s|/?build/autoconf/.*$||;
$ac_given_srcdir = '.' if $ac_given_srcdir eq '';
}
# Read list of makefiles from the stdin or,
# from files listed on the command-line.
#
@makefiles=();
push @makefiles, split while (<>);
# Create all the directories at once.
# This can be much faster than calling mkdir() for each one.
create_directories(@makefiles);
# Output the makefiles.
#
@unhandled=();
foreach $ac_file (@makefiles) {
if (not $ac_file =~ /Makefile$/ or $ac_file =~ /:/) {
push @unhandled, $ac_file;
next;
}
$ac_file_in = "$ac_given_srcdir/$ac_file.in";
$ac_dir = dirname($ac_file);
if ($ac_dir eq '.') {
$ac_dir_suffix = '';
$ac_dots = '';
} else {
$ac_dir_suffix = "/$ac_dir";
$ac_dir_suffix =~ s%^/\./%/%;
$ac_dots = $ac_dir_suffix;
$ac_dots =~ s%/[^/]*%../%g;
}
if ($ac_given_srcdir eq '.') {
$srcdir = '.';
if ($ac_dots eq '') {
$top_srcdir = '.'
} else {
$top_srcdir = $ac_dots;
$top_srcdir =~ s%/$%%;
}
} elsif ($ac_given_srcdir =~ m%^/% or $ac_given_srcdir =~ m%^.:/%) {
$srcdir = "$ac_given_srcdir$ac_dir_suffix";
$top_srcdir = "$ac_given_srcdir";
} else {
$srcdir = "$ac_dots$ac_given_srcdir$ac_dir_suffix";
$top_srcdir = "$ac_dots$ac_given_srcdir";
}
if (-e $ac_file) {
next if -M _ < -M $ac_file_in;
print STDERR "updating $ac_file\n";
} else {
print STDERR "creating $ac_file\n";
}
open (INFILE, "<$ac_file_in")
or ( warn "can't read $ac_file_in: No such file or directory\n" and next);
open (OUTFILE, ">$ac_file")
or ( warn "Unable to create $ac_file\n" and next);
while (<INFILE>) {
#if (/\@[_a-zA-Z]*\@.*\@[_a-zA-Z]*\@/) {
# warn "Two defines on a line:$ac_file:$.:$_";
# push @unhandled, $ac_file;
# last;
#}
s/\@srcdir\@/$srcdir/g;
s/\@top_srcdir\@/$top_srcdir/g;
if (/\@[_a-zA-Z]*\@/) {
warn "Unknown variable:$ac_file:$.:$_";
push @unhandled, $ac_file;
last;
}
print OUTFILE;
}
close INFILE;
close OUTFILE;
}
# Print the shell command to be evaluated by configure.
#
print "CONFIG_FILES=\"".join(' ', @unhandled)."\"; export CONFIG_FILES\n";

View File

@@ -0,0 +1,140 @@
dnl The contents of this file are subject to the Netscape Public
dnl License Version 1.1 (the "License"); you may not use this file
dnl except in compliance with the License. You may obtain a copy of
dnl the License at http://www.mozilla.org/NPL/
dnl
dnl Software distributed under the License is distributed on an "AS
dnl IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
dnl implied. See the License for the specific language governing
dnl rights and limitations under the License.
dnl
dnl The Original Code is mozilla.org code.
dnl
dnl The Initial Developer of the Original Code is Netscape
dnl Communications Corporation. Portions created by Netscape are
dnl Copyright (C) 1999 Netscape Communications Corporation. All
dnl Rights Reserved.
dnl
dnl Contributor(s):
dnl
dnl altoptions.m4 - An alternative way of specifying command-line options.
dnl These macros are needed to support a menu-based configurator.
dnl This file also includes the macro, AM_READ_MYCONFIG, for reading
dnl the 'myconfig.m4' file.
dnl Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
dnl MOZ_ARG_ENABLE_BOOL( NAME, HELP, IF-YES [, IF-NO [, ELSE]])
dnl MOZ_ARG_DISABLE_BOOL( NAME, HELP, IF-NO [, IF-YES [, ELSE]])
dnl MOZ_ARG_ENABLE_STRING( NAME, HELP, IF-SET [, ELSE])
dnl MOZ_ARG_ENABLE_BOOL_OR_STRING( NAME, HELP, IF-YES, IF-NO, IF-SET[, ELSE]]])
dnl MOZ_ARG_WITH_BOOL( NAME, HELP, IF-YES [, IF-NO [, ELSE])
dnl MOZ_ARG_WITHOUT_BOOL( NAME, HELP, IF-NO [, IF-YES [, ELSE])
dnl MOZ_ARG_WITH_STRING( NAME, HELP, IF-SET [, ELSE])
dnl MOZ_ARG_HEADER(Comment)
dnl MOZ_CHECK_PTHREADS( NAME, IF-YES [, ELSE ])
dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
dnl MOZ_TWO_STRING_TEST(NAME, STR1, IF-STR1, STR2, IF-STR2 [, ELSE])
AC_DEFUN(MOZ_TWO_STRING_TEST,
[if test "$enableval" = "[$2]"; then
ifelse([$3], , :, [$3])
elif test "$enableval" = "[$4]"; then
ifelse([$5], , :, [$5])
else
ifelse([$6], ,
[AC_MSG_ERROR([Option, [$1], does not take an argument ($enableval).])],
[$6])
fi])
dnl MOZ_ARG_ENABLE_BOOL(NAME, HELP, IF-YES [, IF-NO [, ELSE]])
AC_DEFUN(MOZ_ARG_ENABLE_BOOL,
[AC_ARG_ENABLE([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], yes, [$3], no, [$4])],
[$5])])
dnl MOZ_ARG_DISABLE_BOOL(NAME, HELP, IF-NO [, IF-YES [, ELSE]])
AC_DEFUN(MOZ_ARG_DISABLE_BOOL,
[AC_ARG_ENABLE([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], no, [$3], yes, [$4])],
[$5])])
dnl MOZ_ARG_ENABLE_STRING(NAME, HELP, IF-SET [, ELSE])
AC_DEFUN(MOZ_ARG_ENABLE_STRING,
[AC_ARG_ENABLE([$1], [$2], [$3], [$4])])
dnl MOZ_ARG_ENABLE_BOOL_OR_STRING(NAME, HELP, IF-YES, IF-NO, IF-SET[, ELSE]]])
AC_DEFUN(MOZ_ARG_ENABLE_BOOL_OR_STRING,
[ifelse([$5], ,
[errprint([Option, $1, needs an "IF-SET" argument.
])
m4exit(1)],
[AC_ARG_ENABLE([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], yes, [$3], no, [$4], [$5])],
[$6])])])
dnl MOZ_ARG_WITH_BOOL(NAME, HELP, IF-YES [, IF-NO [, ELSE])
AC_DEFUN(MOZ_ARG_WITH_BOOL,
[AC_ARG_WITH([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], yes, [$3], no, [$4])],
[$5])])
dnl MOZ_ARG_WITHOUT_BOOL(NAME, HELP, IF-NO [, IF-YES [, ELSE])
AC_DEFUN(MOZ_ARG_WITHOUT_BOOL,
[AC_ARG_WITH([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], no, [$3], yes, [$4])],
[$5])])
dnl MOZ_ARG_WITH_STRING(NAME, HELP, IF-SET [, ELSE])
AC_DEFUN(MOZ_ARG_WITH_STRING,
[AC_ARG_WITH([$1], [$2], [$3], [$4])])
dnl MOZ_ARG_HEADER(Comment)
dnl This is used by webconfig to group options
define(MOZ_ARG_HEADER, [# $1])
dnl
dnl Apparently, some systems cannot properly check for the pthread
dnl library unless <pthread.h> is included so we need to test
dnl using it
dnl
dnl MOZ_CHECK_PTHREADS(lib, success, failure)
AC_DEFUN(MOZ_CHECK_PTHREADS,
[
AC_MSG_CHECKING([for pthread_create in -l$1])
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
int main() {
pthread_t t;
if (!pthread_create(&t, 0, &foo, 0)) {
pthread_join(t, 0);
}
exit(0);
}" > dummy.c ;
echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -l[$1] $LDFLAGS $LIBS" 1>&5;
${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -l[$1] $LDFLAGS $LIBS 2>&5;
_res=$? ;
rm -f dummy.c dummy${ac_exeext} ;
if test "$_res" = "0"; then
AC_MSG_RESULT([yes])
[$2]
else
AC_MSG_RESULT([no])
[$3]
fi
])
dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
AC_DEFUN(MOZ_READ_MOZCONFIG,
[AC_REQUIRE([AC_INIT_BINSH])dnl
# Read in '.mozconfig' script to set the initial options.
# See the mozconfig2configure script for more details.
_AUTOCONF_TOOLS_DIR=`dirname [$]0`/[$1]/build/autoconf
. $_AUTOCONF_TOOLS_DIR/mozconfig2configure])
dnl This gets inserted at the top of the configure script
MOZ_READ_MOZCONFIG(MOZ_TOPSRCDIR)

View File

@@ -0,0 +1,54 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# clean-config.sh - Removes all files generated by mozilla configure.
# Only removes files from the topsrcdir. To clean up an objdir,
# simply remove the directory and start over.
#
# Usage:
# 1. cd <topsrcdir>
# 2. build/autoconf/clean-config.sh
#
# Send comments, improvements, bugs to slamm@netscape.com
topsrcdir=`cd \`dirname $0\`/../..; pwd`
if [ ! -f configure.in ]; then
echo "clean-config.sh only cleans the source tree. To run," 2>&1
echo " cd $topsrcdir; build/autoconf/clean-config.sh" 2>&1
echo " (To clean a separate objdir, simple remove the directory.)" 2>&1
exit 1
fi
if [ -f mailnews/makefiles ]; then
MOZ_MAIL_NEWS=1
export MOZ_MAIL_NEWS
fi
. allmakefiles.sh
rm -fr $MAKEFILES \
config-defs.h \
config.cache \
config.log \
config.status \
$NULL

1195
mozilla/build/autoconf/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

1268
mozilla/build/autoconf/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,200 @@
# Configure paths for GLIB
# Owen Taylor 97-11-3
dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
dnl gthread is specified in MODULES, pass to glib-config
dnl
AC_DEFUN(AM_PATH_GLIB,
[dnl
dnl Get the cflags and libraries from the glib-config script
dnl
AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
glib_config_prefix="$withval", glib_config_prefix="")
AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX
Exec prefix where GLIB is installed (optional)],
glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
, enable_glibtest=yes)
if test x$glib_config_exec_prefix != x ; then
glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
fi
fi
if test x$glib_config_prefix != x ; then
glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_prefix/bin/glib-config
fi
fi
for module in . $4
do
case "$module" in
gmodule)
glib_config_args="$glib_config_args gmodule"
;;
gthread)
glib_config_args="$glib_config_args gthread"
;;
esac
done
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
unset ac_cv_path_GLIB_CONFIG
AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
min_glib_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
no_glib=""
if test "$GLIB_CONFIG" = "no" ; then
no_glib=yes
else
GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_glibtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS"
dnl
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
dnl checks the results of glib-config to some extent
dnl
rm -f conf.glibtest
AC_TRY_RUN([
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.glibtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_glib_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_glib_version");
exit(1);
}
if ((glib_major_version != $glib_config_major_version) ||
(glib_minor_version != $glib_config_minor_version) ||
(glib_micro_version != $glib_config_micro_version))
{
printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
printf ("*** was found! If glib-config was correct, then it is best\n");
printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
(glib_minor_version != GLIB_MINOR_VERSION) ||
(glib_micro_version != GLIB_MICRO_VERSION))
{
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
glib_major_version, glib_minor_version, glib_micro_version);
}
else
{
if ((glib_major_version > major) ||
((glib_major_version == major) && (glib_minor_version > minor)) ||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
glib_major_version, glib_minor_version, glib_micro_version);
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the glib-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
printf("*** correct copy of glib-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_glib" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GLIB_CONFIG" = "no" ; then
echo "*** The glib-config script installed by GLIB could not be found"
echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GLIB_CONFIG environment variable to the"
echo "*** full path to glib-config."
else
if test -f conf.glibtest ; then
:
else
echo "*** Could not run GLIB test program, checking why..."
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"
AC_TRY_LINK([
#include <glib.h>
#include <stdio.h>
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GLIB_CFLAGS=""
GLIB_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
rm -f conf.glibtest
])

View File

@@ -0,0 +1,191 @@
# Configure paths for GTK+
# Owen Taylor 97-11-3
# (copy of gtk.m4 (public domain))
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
dnl
AC_DEFUN(AM_PATH_GTK,
[dnl
dnl Get the cflags and libraries from the gtk-config script
dnl
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
gtk_config_prefix="$withval", gtk_config_prefix="")
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX
Exec prefix where GTK is installed (optional)],
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
, enable_gtktest=yes)
if test x$gtk_config_exec_prefix != x ; then
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
fi
fi
if test x$gtk_config_prefix != x ; then
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
fi
fi
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
unset ac_cv_path_GTK_CONFIG
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
min_gtk_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
no_gtk=""
if test "$GTK_CONFIG" = "no" ; then
no_gtk=yes
else
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_gtktest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
dnl
dnl Now check if the installed GTK is sufficiently new. (Also sanity
dnl checks the results of gtk-config to some extent
dnl
rm -f conf.gtktest
AC_TRY_RUN([
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.gtktest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_gtk_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
exit(1);
}
if ((gtk_major_version != $gtk_config_major_version) ||
(gtk_minor_version != $gtk_config_minor_version) ||
(gtk_micro_version != $gtk_config_micro_version))
{
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf ("*** was found! If gtk-config was correct, then it is best\n");
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
(gtk_minor_version != GTK_MINOR_VERSION) ||
(gtk_micro_version != GTK_MICRO_VERSION))
{
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
}
#endif /* defined (GTK_MAJOR_VERSION) ... */
else
{
if ((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_gtk" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GTK_CONFIG" = "no" ; then
echo "*** The gtk-config script installed by GTK could not be found."
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GTK_CONFIG environment variable to the"
echo "*** full path to gtk-config."
echo "*** GTK+ is available from ftp://ftp.gtk.org/pub/gtk"
else
if test -f conf.gtktest ; then
:
else
echo "*** Could not run GTK test program, checking why..."
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
AC_TRY_LINK([
#include <gtk/gtk.h>
#include <stdio.h>
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GTK or finding the wrong"
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GTK_CFLAGS=""
GTK_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
rm -f conf.gtktest
])

119
mozilla/build/autoconf/install-sh Executable file
View File

@@ -0,0 +1,119 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5; it is not part of GNU.
#
# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
instcmd="$mvprog"
chmodcmd=""
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
fi
# Make a temp file name in the proper directory.
dstdir=`dirname $dst`
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp
# and set any options; do chmod last to preserve setuid bits
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
# Now rename the file to the real destination.
$doit $rmcmd $dst
$doit $mvcmd $dsttmp $dst
exit 0

View File

@@ -0,0 +1,198 @@
# Configure paths for LIBIDL
dnl AM_PATH_LIBIDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for LIBIDL, and define LIBIDL_CFLAGS and LIBIDL_LIBS
dnl
AC_DEFUN(AM_PATH_LIBIDL,
[dnl
dnl Get the cflags and libraries from the libIDL-config script
dnl
AC_ARG_WITH(libIDL-prefix,[ --with-libIDL-prefix=PFX
Prefix where libIDL is installed (optional)],
libIDL_config_prefix="$withval", libIDL_config_prefix="")
AC_ARG_WITH(libIDL-exec-prefix,[ --with-libIDL-exec-prefix=PFX
Exec prefix where libIDL is installed (optional)],
libIDL_config_exec_prefix="$withval", libIDL_config_exec_prefix="")
AC_ARG_ENABLE(libIDLtest, [ --disable-libIDLtest Do not try to compile and run a test libIDL program],
, enable_libIDLtest=yes)
if test x$libIDL_config_exec_prefix != x ; then
libIDL_config_args="$libIDL_config_args --exec-prefix=$libIDL_config_exec_prefix"
if test x${LIBIDL_CONFIG+set} != xset ; then
LIBIDL_CONFIG=$libIDL_config_exec_prefix/bin/libIDL-config
fi
fi
if test x$libIDL_config_prefix != x ; then
libIDL_config_args="$libIDL_config_args --prefix=$libIDL_config_prefix"
if test x${LIBIDL_CONFIG+set} != xset ; then
LIBIDL_CONFIG=$libIDL_config_prefix/bin/libIDL-config
fi
fi
AM_PATH_GLIB(1.2.0)
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
unset ac_cv_path_LIBIDL_CONFIG
AC_PATH_PROG(LIBIDL_CONFIG, libIDL-config, no)
min_libIDL_version=ifelse([$1], ,0.6.0,$1)
AC_MSG_CHECKING(for libIDL - version >= $min_libIDL_version)
no_libIDL=""
if test "$LIBIDL_CONFIG" = "no" ; then
no_libIDL=yes
else
LIBIDL_CFLAGS=`$LIBIDL_CONFIG $libIDL_config_args --cflags`
LIBIDL_LIBS=`$LIBIDL_CONFIG $libIDL_config_args --libs`
# hack to allow us to keep using libIDL 0.6.3-0.6.7. Anyone may remove
# this after we start requiring libIDL 0.6.8 or anything higher
LIBIDL_CFLAGS="$GLIB_CFLAGS $LIBIDL_CFLAGS"
LIBIDL_LIBS="$GLIB_LIBS $LIBIDL_LIBS"
libIDL_config_major_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
libIDL_config_minor_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
libIDL_config_micro_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_libIDLtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
LIBS="$LIBIDL_LIBS $LIBS"
dnl
dnl Now check if the installed LIBIDL is sufficiently new.
dnl
rm -f conf.libIDLtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <libIDL/IDL.h>
int
main ()
{
int major, minor, micro;
int libIDL_major_version;
int libIDL_minor_version;
int libIDL_micro_version;
char *tmp_version;
system ("touch conf.libIDLtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup ("$min_libIDL_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_libIDL_version");
exit(1);
}
tmp_version = g_strdup (IDL_get_libver_string ());
if (sscanf(tmp_version, "%d.%d.%d",
&libIDL_major_version,
&libIDL_minor_version,
&libIDL_micro_version) != 3) {
printf("%s, bad version string\n", tmp_version);
exit(1);
}
if ((libIDL_major_version != $libIDL_config_major_version) ||
(libIDL_minor_version != $libIDL_config_minor_version) ||
(libIDL_micro_version != $libIDL_config_micro_version))
{
printf("\n*** 'libIDL-config --version' returned %d.%d.%d, but libIDL (%d.%d.%d)\n",
$libIDL_config_major_version, $libIDL_config_minor_version, $libIDL_config_micro_version,
libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
printf ("*** was found! If libIDL-config was correct, then it is best\n");
printf ("*** to remove the old version of LIBIDL. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If libIDL-config was wrong, set the environment variable LIBIDL_CONFIG\n");
printf("*** to point to the correct copy of libIDL-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else if ((libIDL_major_version != LIBIDL_MAJOR_VERSION) ||
(libIDL_minor_version != LIBIDL_MINOR_VERSION) ||
(libIDL_micro_version != LIBIDL_MICRO_VERSION))
{
printf("\n*** libIDL header files (version %d.%d.%d) do not match\n",
LIBIDL_MAJOR_VERSION, LIBIDL_MINOR_VERSION, LIBIDL_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
}
else
{
if ((libIDL_major_version > major) ||
((libIDL_major_version == major) && (libIDL_minor_version > minor)) ||
((libIDL_major_version == major) && (libIDL_minor_version == minor) && (libIDL_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of libIDL (%d.%d.%d) was found.\n",
libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
printf("*** You need at least libIDL version %d.%d.%d.\n",
major, minor, micro);
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the libIDL-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of libIDL, but you can also set the LIBIDL_CONFIG environment to point to the\n");
printf("*** correct copy of libIDL-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_libIDL=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_libIDL" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$LIBIDL_CONFIG" = "no" ; then
echo "*** The libIDL-config script installed by libIDL could not be found"
echo "*** If libIDL was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the LIBIDL_CONFIG environment variable to the"
echo "*** full path to libIDL-config."
else
if test -f conf.libIDLtest ; then
:
else
echo "*** Could not run libIDL test program, checking why..."
CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
LIBS="$LIBS $LIBIDL_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <stdlib.h>
#include <libIDL/IDL.h>
], [ return IDL_get_libver_string ? 1 : 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding libIDL or finding the wrong"
echo "*** version of LIBIDL. If it is not finding libIDL, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means libIDL was incorrectly installed"
echo "*** or that you have moved libIDL since it was installed. In the latter case, you"
echo "*** may want to edit the libIDL-config script: $LIBIDL_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
LIBIDL_CFLAGS=""
LIBIDL_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(LIBIDL_CFLAGS)
AC_SUBST(LIBIDL_LIBS)
rm -f conf.libIDLtest
])

View File

@@ -0,0 +1,280 @@
#! /usr/bin/env perl
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# make-makefiles - Quickly create Makefiles for subdirectories.
# Also, creates any needed subdirectories.
#
# usage: make-makefiles [ -t <topsrcdir> -d <depth> ] [ <subdir> | <subdir>/Makefile ] ...
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
#$debug = 1;
# Determine various tree path variables
#
($topsrcdir, $depth, @makefiles) = parse_arguments(@ARGV);
$object_fullpath = `pwd`;
chdir $depth;
$object_root = `pwd`;
chomp $object_fullpath;
chomp $object_root;
# $source_subdir is the path from the object root to where
# 'make-makefile' was called. For example, if make-makefile was
# called from "mozilla/gfx/src", then $source_subdir would be
# "gfx/src/".
$source_subdir = "$object_fullpath/";
my $quoted_object_root = quotemeta($object_root);
$source_subdir =~ s|^$quoted_object_root/||;
# Prefix makefiles with $source_subdir so that paths
# will be relative to the top of the object tree.
#
for $makefile (@makefiles) {
$makefile = "$source_subdir$makefile";
}
create_directories(@makefiles);
# Find the path to the source directory based on how 'make-makefile'
# was invoked. The path is either relative to the object directory
# or an absolute path.
$given_srcdir = find_srcdir($topsrcdir, $depth);
if ($debug) {
warn "object_fullpath = $object_fullpath\n";
warn "object_root = $object_root\n";
warn "source_subdir = $source_subdir\n";
warn "makefiles = @makefiles\n";
warn "given_srcdir = $given_srcdir\n";
}
@unhandled = update_makefiles($given_srcdir, @makefiles);
run_config_status(@unhandled);
# end of Main
############################################################
sub dirname {
return $_[0] =~ /(.*)\/.*/ ? "$1" : '.';
}
# find_depth: Pull the value of DEPTH out of a Makefile (or Makefile.in)
sub find_depth {
my $depth = '';
open(MAKEFILE, "<$_[0]") || die "Unable to open $_[0]: $!\n";
while (<MAKEFILE>) {
next unless /^DEPTH\s*=\s*(\..*)/;
$depth = $1;
last;
}
close MAKEFILE;
return $depth;
}
sub parse_arguments {
my @args = @_;
my $depth = '';
my $topsrcdir = '';
my @makefiles = ();
while (1) {
if ($args[0] eq '-d') {
$depth = $args[1];
shift @args;
shift @args;
} elsif ($args[0] eq '-t') {
$topsrcdir = $args[1];
shift @args;
shift @args;
} else {
last;
}
}
if ($topsrcdir eq '') {
$topsrcdir = $0; # Figure out topsrcdir based on program name.
$topsrcdir =~ s|/?build/autoconf/.*$||;
}
if ($depth eq '') {
# Use $(DEPTH) in the Makefile or Makefile.in to determine the depth
if (-e "Makefile.in") {
$depth = find_depth("Makefile.in");
} elsif (-e "Makefile") {
$depth = find_depth("Makefile");
} elsif (-e "../Makefile") {
$depth = "../".find_depth("../Makefile");
$depth =~ s/\/\.$//;
} else {
warn "Unable to determine depth (e.g. ../..) to root of objdir tree.\n";
die "No Makefile(.in) present. Try running with '-d <depth>'\n";
}
}
# Build the list of makefiles to generate
#
@makefiles = ();
my $makefile;
foreach $makefile (@args) {
$makefile =~ s/\.in$//;
$makefile =~ s/\/$//;
$makefile =~ /Makefile$/ or $makefile .= "/Makefile";
push @makefiles, "$makefile";
}
@makefiles = "Makefile" unless @args;
return ($topsrcdir, $depth, @makefiles);
}
# Create all the directories at once.
# This can be much faster than calling mkdir() for each one.
sub create_directories {
my @makefiles = @_;
my @dirs = ();
my $ac_file;
foreach $ac_file (@makefiles) {
push @dirs, dirname($ac_file);
}
# Call mkdir with the directories sorted by subdir count (how many /'s)
system "mkdir -p ". join(' ', @dirs) if @dirs;
}
# Find the top of the source directory
# (Assuming that the executable is in $top_srcdir/build/autoconf)
sub find_srcdir {
my ($ac_given_srcdir, $depth) = @_;
if ($debug) {
print "ac_given_srcdir = $ac_given_srcdir\n";
print "depth = $depth\n";
}
if ($ac_given_srcdir =~ /^\./ and $depth ne '.') {
my $quoted_depth = quotemeta($depth);
$ac_given_srcdir =~ s|^$quoted_depth/?||;
}
if ($debug) {
print "ac_given_srcdir = $ac_given_srcdir\n";
}
$ac_given_srcdir = '.' if $ac_given_srcdir eq '';
return $ac_given_srcdir;
}
# Output the makefiles.
#
sub update_makefiles {
my ($ac_given_srcdir, @makefiles) = @_;
my @unhandled=();
my $ac_file;
foreach $ac_file (@makefiles) {
my $ac_file_in = "$ac_given_srcdir/${ac_file}.in";
my $ac_dir = dirname($ac_file);
my $ac_dots = '';
my $ac_dir_suffix = '';
my $srcdir = '.';
my $top_srcdir = '.';
# Determine $srcdir and $top_srcdir
#
if ($ac_dir ne '.') {
$ac_dir_suffix = "/$ac_dir";
$ac_dir_suffix =~ s%^/\./%/%;
$ac_dots = $ac_dir_suffix;
$ac_dots =~ s%/[^/]*%../%g;
}
if ($ac_given_srcdir eq '.') {
if ($ac_dots ne '') {
$top_srcdir = $ac_dots;
$top_srcdir =~ s%/$%%;
}
} elsif ($ac_given_srcdir =~ m%^/% or $ac_given_srcdir =~ m%^.:/%) {
$srcdir = "$ac_given_srcdir$ac_dir_suffix";
$top_srcdir = "$ac_given_srcdir";
} else {
$srcdir = "$ac_dots$ac_given_srcdir$ac_dir_suffix";
$top_srcdir = "$ac_dots$ac_given_srcdir";
}
if ($debug) {
print "ac_dir = $ac_dir\n";
print "ac_file = $ac_file\n";
print "ac_file_in = $ac_file_in\n";
print "srcdir = $srcdir\n";
print "top_srcdir = $top_srcdir\n";
print "cwd = " . `pwd` . "\n";
}
# Copy the file and make substitutions.
# @srcdir@ -> value of $srcdir
# @top_srcdir@ -> value of $top_srcdir
#
if (-e $ac_file) {
next if -M _ < -M $ac_file_in; # Next if Makefile is up-to-date.
warn "updating $ac_file\n";
} else {
warn "creating $ac_file\n";
}
open INFILE, "<$ac_file_in" or do {
warn "$0: Cannot read $ac_file_in: No such file or directory\n";
next;
};
open OUTFILE, ">$ac_file" or do {
warn "$0: Unable to create $ac_file\n";
next;
};
while (<INFILE>) {
#if (/\@[_a-zA-Z]*\@.*\@[_a-zA-Z]*\@/) {
# #warn "Two defines on a line:$ac_file:$.:$_";
# push @unhandled, $ac_file;
# last;
#}
s/\@srcdir\@/$srcdir/g;
s/\@top_srcdir\@/$top_srcdir/g;
if (/\@[_a-zA-Z]*\@/) {
#warn "Unknown variable:$ac_file:$.:$_";
push @unhandled, $ac_file;
last;
}
print OUTFILE;
}
close INFILE;
close OUTFILE;
}
return @unhandled;
}
sub run_config_status {
my @unhandled = @_;
# Run config.status with any unhandled files.
#
if (@unhandled) {
$ENV{CONFIG_FILES}= join ' ', @unhandled;
system "./config.status";
}
}

View File

@@ -0,0 +1,85 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# This script will match a dir with a set of dirs.
#
# Usage: match-dir.sh match [dir1 dir2 ... dirn]
#
# Send comments, improvements, bugs to ramiro@netscape.com
#
if [ -f Makefile ]; then
MAKEFILE="Makefile"
else
if [ -f Makefile.in ]; then
MAKEFILE="Makefile.in"
else
echo
echo "There ain't no 'Makefile' or 'Makefile.in' over here: $pwd, dude."
echo
exit 1
fi
fi
# Use DEPTH in the Makefile.in to determine the depth
depth=`grep -w DEPTH ${MAKEFILE} | grep "\.\." | awk -F"=" '{ print $2; }'`
cwd=`pwd`
# Determine the depth count
n=`echo $depth | tr '/' ' ' | wc -w`
cd $depth
objdir=`pwd`
path=`echo $cwd | sed "s|^${objdir}/||"`
match=$path
for i in $*
do
# echo "Looking for $match in $i"
echo $i | grep -q -x $match
if [ $? -eq 0 ]
then
echo "1"
exit 0
fi
# echo "Looking for $i in $match"
echo $match | grep -q $i
if [ $? -eq 0 ]
then
echo "1"
exit 0
fi
done
echo "0"
exit 0

View File

@@ -0,0 +1,46 @@
#! /bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Stephen Lamm <slamm@netscape.com>
#
# mozconfigfind - Loads options from .mozconfig onto configure's
# command-line. The .mozconfig file is searched for in the
# order:
# if $MOZCONFIG is set, use that.
# Otherwise, use $TOPSRCDIR/.mozconfig
# Otherwise, use $HOME/.mozconfig
#
topsrcdir=$1
for _config in $MOZCONFIG \
$MOZ_MYCONFIG \
$topsrcdir/.mozconfig \
$topsrcdir/mozconfig \
$topsrcdir/mozconfig.sh \
$topsrcdir/myconfig.sh \
$HOME/.mozconfig \
$HOME/.mozconfig.sh \
$HOME/.mozmyconfig.sh
do
if test -f $_config; then
echo $_config;
exit 0
fi
done

View File

@@ -0,0 +1,94 @@
#! /bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Stephen Lamm <slamm@netscape.com>
#
# mozconfig2client-mk - Translates .mozconfig into options for client.mk.
# Prints defines to stdout.
#
# See mozconfig2configure for more details
print_header() {
_mozconfig=${MOZCONFIG:-$HOME/.mozconfig}
cat >> $tmp_file <<EOF
# gmake
# This file is automatically generated for client.mk.
# Do not edit. Edit $_mozconfig instead.
# To create a new .mozconfig file, you can visit,
# http://webtools.mozilla.org/build/config.cgi
EOF
}
ac_add_options() {
echo "# $* is used by configure (not client.mk)" >> $tmp_file
}
mk_add_options() {
for _opt
do
# Escape shell characters, space, tab, dollar, quote, backslash,
# and substitute '@<word>@' with '$(<word>)'.
_opt=`echo "$_opt" | sed -e 's/\([\"\\]\)/\\\1/g; s/@\([^@]*\)@/\$(\1)/g;'`
echo $_opt;
opts="${opts:+$opts^}$_opt";
done >> $tmp_file
}
mk_echo_options() {
echo "Adding client.mk options from $MOZCONFIG:"
IFS=^
for _opt in $opts; do
echo " $_opt"
done
}
# Main
#--------------------------------------------------
scriptdir=`dirname $0`
topsrcdir=$1
out_file=$2
tmp_file="$out_file-tmp$$"
opts=""
trap "rm -f $tmp_file; exit 1" 1 2 15
MOZCONFIG=`$scriptdir/mozconfig-find $topsrcdir`
print_header > $tmp_file
# If the path changes, configure should be rerun
echo "# PATH=$PATH" >> $tmp_file
if [ "$MOZCONFIG" ]
then
. $MOZCONFIG
fi
if [ "$opts" ]; then
mk_echo_options
fi
if test -f $out_file && cmp -s $tmp_file $out_file; then
rm $tmp_file
else
mv -f $tmp_file $out_file
fi

View File

@@ -0,0 +1,70 @@
#! /bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Stephen Lamm (slamm@netscape.com)
#
# mozconfig2configurator - Translates .mozconfig into options for
# the online configurator,
#
# http://webtools.mozilla.org/build/config.cgi
#
# This is called by the 'webconfig' target of mozilla/client.mk
#
ac_add_options() {
for _opt
do
# Escape special url characters
_opt=`echo $_opt | sed -e 's/%/%25/g;s/ /%20/g;s/&/%26/g;'`
case "$_opt" in
--*-*= ) url="$url$_opt&" ;;
--*-* ) url="$url$_opt=yes&" ;;
esac
done
}
mk_add_options() {
for _opt
do
# Escape special url characters
# Escape special url characters
_opt=`echo $_opt | sed -e 's/%/%25/g;s/ /%20/g;s/&/%26/g;'`
url="$url$_opt&"
done
}
#
# main
#
# find-mozconfig.sh
# In params: $MOZCONFIG $HOME ($MOZ_MYCONFIG)
scriptdir=`dirname $0`
MOZCONFIG=`$scriptdir/mozconfig-find $topsrcdir`
if [ "$MOZCONFIG" ]
then
url="http://webtools.mozilla.org/build/config.cgi?"
. $MOZCONFIG
# Drop the last character of $url
echo `expr "$url" : "\(.*\)."`
fi

View File

@@ -0,0 +1,99 @@
#! /bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Stephen Lamm <slamm@netscape.com>
#
# mozconfig2configure - Loads options from .mozconfig onto configure's
# command-line. See find-mozconfig.sh for how the config file is
# found
#
# The options from .mozconfig are inserted into the command-line
# before the real command-line options. This way the real options
# will override any .mozconfig options.
#
# .mozconfig is a shell script. To add an option to configure's
# command-line use the pre-defined function, ac_add_options,
#
# ac_add_options <configure-option> [<configure-option> ... ]
#
# For example,
#
# ac_add_options --with-pthreads --enable-debug
#
# ac_add_options can be called multiple times in .mozconfig.
# Each call adds more options to configure's command-line.
# Note: $_AUTOCONF_TOOLS_DIR must be defined in the script that includes this.
ac_add_options() {
for _opt
do
# Escape shell characters, space, tab, dollar, quote, backslash.
_opt=`echo $_opt | sed -e 's/\([\ \ \$\"\\]\)/\\\\\1/g;s/@\([^@]*\)@/\$\1/g;'`
_opt=`echo $_opt | sed -e 's/@\([^@]*\)@/\$(\1)/g'`
# Avoid adding duplicates
case "$ac_options" in
*"$_opt"* ) ;;
* ) mozconfig_ac_options="$mozconfig_ac_options $_opt" ;;
esac
done
}
mk_add_options() {
# These options are for client.mk
# configure can safely ignore them.
:
}
ac_echo_options() {
echo "Adding configure options from $MOZCONFIG:"
eval "set -- $mozconfig_ac_options"
for _opt
do
echo " $_opt"
done
}
# Main
#--------------------------------------------------
_topsrcdir=`dirname $0`
ac_options=
mozconfig_ac_options=
# Save the real command-line options
for _opt
do
# Escape shell characters, space, tab, dollar, quote, backslash.
_opt=`echo $_opt | sed -e 's/\([\ \ \$\"\\]\)/\\\\\1/g;'`
ac_options="$ac_options \"$_opt\""
done
MOZCONFIG=`$_AUTOCONF_TOOLS_DIR/mozconfig-find $_topsrcdir`
if [ "$MOZCONFIG" ]; then
. $MOZCONFIG
fi
if [ "$mozconfig_ac_options" ]; then
ac_echo_options 1>&2
fi
eval "set -- $mozconfig_ac_options $ac_options"

View File

@@ -0,0 +1,102 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# This script will generate a single Makefile from a Makefile.in using
# the config.status script.
#
# The config.status script is generated the first time you run
# ./configure.
#
#
# Usage: update-makefile.sh
#
# Send comments, improvements, bugs to ramiro@netscape.com
#
update_makefile_usage() {
_progname=`expr //$0 : '.*/\(.*\)'`
cat <<END_USAGE 2>&1
Usage: $_progname [-h -u] [<keyword>]
-d <dir> Subdir to update
-h Print usage
END_USAGE
}
# Parse the command-line options
#
subdir=
while getopts d:h OPT; do
case $OPT in
d) # Make sure "subdir" has exactly one ending slash
subdir=`echo $OPTARG | sed 's/\/$//;'`"/" ;;
\?|h) update_makefile_usage
exit 1
;;
esac
done
# find_depth: Pull the value of DEPTH out of Makefile (or Makefile.in)
find_depth() {
egrep '^DEPTH[ ]*=[ ]*\.' $1 | awk -F= '{ print $2; }'
}
# The Makefile to create
target_makefile=`pwd`"/${subdir}Makefile"
# Use $(DEPTH) in the Makefile or Makefile.in to determine the depth
if [ -f Makefile.in ]
then
depth=`find_depth Makefile.in`
elif [ -f Makefile ]
then
depth=`find_depth Makefile`
elif [ -f ../Makefile ]
then
depth="../"`find_depth Makefile`
else
echo
echo "There ain't no 'Makefile' or 'Makefile.in' over here: $pwd"
echo
exit
fi
# 'cd' to the root of the tree to run "config.status" there
cd $depth
# Strip the tree root off the Makefile's path
#
root_path=`pwd`
target_makefile=`expr $target_makefile : $root_path'/\(.*\)'`
# Make sure config.status exists
#
if [ -f config.status ]
then
CONFIG_FILES=$target_makefile ./config.status
else
echo
echo "There ain't no 'config.status' over here: $pwd"
echo
fi

View File

@@ -0,0 +1,5 @@
http://www.mozilla.org
resource:///res/samples/test2.html
resource:///res/samples/test8.html
resource:///res/samples/test6.html
resource:///res/samples/test8.html

View File

@@ -0,0 +1,292 @@
#!perl -w
# This script copies modified files from a source CVS tree to a destination
# tree. Modified files are detected by comparing their modification dates
# with the CVS Entries file.
#
# Modified files are copied in their entirety to the destination tree
# (no diffing is done). Files are only copied of the CVS version of the
# file is the same in both trees. If the destination file is modified
# already, it is backed up and replaced.
#
# To use this on your tree/platform, do the following:
#
# 1. Fix the !perl line, if necessary.
# 2. Fix $dirsep to be the directory separator on your platform.
# 3. Uncomment the appropriate $dst_linebreaks file specify what linebreaks
# you want for the copied files. This variable defines the *destination* linebreaks
# that you want your changes to be converted to.
# For example, if you have a linux volume
# mounted (via SAMBA perhaps) to your windows box where you've made changes to
# source files, you'd want $dst_linebreaks to be set for unix. This ensures that
# linebreaks are converted to the appropriate OS linebreak scheme for your *target* tree.
# 4. Set $src_tree and $dest_tree to point to the directories you want
# to sync up. These don't have to point to the root of the tree,
# but should be equivalent directories in the two trees.
#
# First version:
# Simon Fraser <sfraser@netscape.com>
use File::stat;
use Time::Local;
# change for your platform ('\' == windows, ':' == mac, '/' == unix)
$dirsep = "\\";
# Set this to the native OS of the *destination* tree
# $dst_linebreaks = pack("cc", 13); # Mac
#$dst_linebreaks = pack("cc", 13, 10); # DOS
$dst_linebreaks = pack("cc", 10); # UNIX
#change for your src and dest trees
$src_tree = "x:\\mozilla\\xpfe\\components";
$dest_tree = "h:\\builds\\mozilla\\xpfe\\components";
#//--------------------------------------------------------------------------------------------------
#// _copyFile. Copy file from src to dest, converting linebreaks if necessary
#//--------------------------------------------------------------------------------------------------
sub _copyFile($;$;$;$)
{
my($srcdir, $destdir, $file, $backup) = @_;
my($srcfile) = $srcdir.$dirsep.$file;
my($dstfile) = $destdir.$dirsep.$file;
if ($backup)
{
my($counter) = 0;
while (-f $dstfile."-".$counter)
{
$counter ++;
}
rename($dstfile, $dstfile."-".$counter) or die "Failed to rename file\n";
}
print "Copying $file over to dest\n";
my($newdest) = $dstfile."_temp";
open(SRCFILE, "< $srcfile") or die "Can't open source file $srcfile\n";
open(NEWDEST, "> $newdest") or die "Can't open dest file $newdest\n";
while (<SRCFILE>)
{
chomp($_);
print NEWDEST $_.$dst_linebreaks;
}
close(SRCFILE);
close(NEWDEST);
if (!$backup) {
unlink($dstfile) or die "Failed to remove $dstfile\n";
}
rename($newdest, $dstfile) or die "Failed to rename $newdest\n";
}
#//--------------------------------------------------------------------------------------------------
#// _readCVSInfo. Suck in the CVS info from the Entries file
#//--------------------------------------------------------------------------------------------------
sub _readCVSInfo($)
{
my($cvsDir) = @_;
my($entries_file_name) = $cvsDir.$dirsep."CVS".$dirsep."Entries";
# print "Reading $entries_file_name\n";
open(ENTRIES, $entries_file_name) || die "Could not open file $entries_file_name";
my(%cvs_entries);
# Read in the path if available
while (defined ($line = <ENTRIES>))
{
chomp($line);
#parse out the line. Format is:
# files: /filename/version/date/options/tag
# dirs: D/dirname////
# dir? D
# because we might be reading an entries file from another platform, with
# different linebreaks, be anal about cleaning up $line.
if ($line =~ /^?\/(.+)\/(.+)\/(.+)\/(.*)\/(.*)?$/)
{
my($filename) = $1;
my($version) = $2;
my($date) = $3;
my($options) = $4;
my($tag) = $5;
my(%cvs_file) = (
"version" => $version,
"date" => $date,
"options" => $options,
"tag" => $tag
);
# print $filename." ".$version." ".$date." ".$options." ".$tag."\n";
$cvs_entries{$filename} = \%cvs_file;
}
}
close ENTRIES;
return %cvs_entries;
}
#//--------------------------------------------------------------------------------------------------
#// _fileIsModified. compare mod date with CVS entries to see if a file is modified
#//--------------------------------------------------------------------------------------------------
sub _fileIsModified($;$;$)
{
my($entries, $dir, $file) = @_;
my($abs_file) = $dir.$dirsep.$file;
if (exists($entries->{$file}))
{
my($date) = $entries->{$file}->{"date"};
# stat the file to get its date
my($file_data) = stat($abs_file) || die "Could not stat $file\n";
my($mod_string) = scalar(gmtime($file_data->mtime));
return ($mod_string ne $date);
}
else
{
return 0;
}
}
#//--------------------------------------------------------------------------------------------------
#// _processFile. args: entries hash, dir, filename
#//--------------------------------------------------------------------------------------------------
sub _processFile($;$;$;$;$)
{
my($src_entries, $dest_entries, $srcdir, $destdir, $file) = @_;
my($abs_file) = $srcdir.$dirsep.$file;
if (exists($src_entries->{$file}))
{
my($file_entry) = $src_entries->{$file};
my($version) = $file_entry->{"version"};
if (_fileIsModified($src_entries, $srcdir, $file))
{
my($rel_file) = $abs_file;
$rel_file =~ s/^$src_tree//;
# print "¥ÊFile $rel_file is modified\n";
# check CVS version in dest
my($dest_entry) = $dest_entries->{$file};
if ($dest_entry)
{
my($dest_version) = $dest_entry->{"version"};
my($versions_match) = ($version == $dest_version);
my($dest_modified) = _fileIsModified($dest_entries, $destdir, $file);
if ($versions_match)
{
# ok, we can copy the file over now, backing up dest if it is modified
_copyFile($srcdir, $destdir, $file, $dest_modified);
}
else
{
print "File $rel_file is version $version in the src tree, but $dest_version in dest. This file will not be copied.\n";
}
}
else
{
print "No CVS entry found in destination tree for $rel_file\n";
}
}
}
else
{
print "No entry for file $file\n";
}
}
#//--------------------------------------------------------------------------------------------------
#// _traverseDir. Traverse one dir, recurse for each found dir.
#//--------------------------------------------------------------------------------------------------
sub _traverseDir($;$)
{
my($srcdir, $destdir) = @_;
opendir(DIR, $srcdir) or die "Cannot open dir $srcdir\n";
my @files = readdir(DIR);
closedir DIR;
# suck in the CVS info for this dir, if there is a CVS dir
unless (-e $srcdir.$dirsep."CVS".$dirsep."Entries" && -e $destdir.$dirsep."CVS".$dirsep."Entries") {
print "$srcdir is not a CVS directory in both source and dest\n";
return;
}
print " Doing $srcdir\n";
my(%src_entries) = _readCVSInfo($srcdir);
my(%dest_entries) = _readCVSInfo($destdir);
my $file;
foreach $file (@files)
{
my $filepath = $srcdir.$dirsep.$file;
if (-d $filepath)
{
if ($file ne "CVS") # ignore 'CVS' dirs
{
# print "Going into $filepath\n";
_traverseDir($filepath, $destdir.$dirsep.$file);
}
}
else
{
# process this file
_processFile(\%src_entries, \%dest_entries, $srcdir, $destdir, $file);
}
}
}
#//--------------------------------------------------------------------------------------------------
#// MigrateChanges
#//--------------------------------------------------------------------------------------------------
sub MigrateChanges($;$)
{
my($srcdir, $destdir) = @_;
# Check that src and dest exist
if (! -d $srcdir) {
die "Source directory $srcdir does not exist\n";
}
if (! -d $destdir) {
die "Dest directory $destdir does not exist\n";
}
print "---------------------------------------------------------\n";
print "Migrating changes from\n $srcdir\nto\n $destdir\n";
print "---------------------------------------------------------\n";
_traverseDir($srcdir, $destdir);
print "---------------------------------------------------------\n";
}
MigrateChanges($src_tree, $dest_tree);

29
mozilla/build/genrc.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DATATYPE="$1"
INFILE="$2"
echo "${DATATYPE} RCDATA"
sed 's/"/""/g' ${INFILE} | awk 'BEGIN { printf("BEGIN\n") } { printf("\"%s\\r\\n\",\n", $0) } END { printf("\"\\0\"\nEND\n") }'
exit 0

95
mozilla/build/hcc Executable file
View File

@@ -0,0 +1,95 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# Fix brain-damaged compilers that don't understand -o and -c together
#
CC=`echo $1 | sed -e "s|'||g" -e 's|"||g'`
shift
DASH_C=0
DASH_O=0
DUMMY="XxxXxxX"
GET_OBJECT=0
OBJ="${DUMMY}"
OBJECT="${DUMMY}"
for i in $*
do
[ "${CHECK_O}" = yes ] && {
case $i in
./*/*.o) OBJECT="$i"
OPTS="${OPTS} -o"
DASH_O=1
;;
./*.o) OBJECT="`basename $i`"
i=""
DASH_O=1
;;
*.o) if [ $i = `basename $i` ]
then
OBJECT="$i"
i=""
else
OPTS="${OPTS} -o"
fi
DASH_O=1
;;
*) OPTS="${OPTS} -o $i"
DASH_O=1
i=""
;;
esac
CHECK_O=no
}
case $i in
-c) DASH_C=1
OPTS="${OPTS} -c"
;;
-o) CHECK_O=yes
;;
*.c) C_SRC=$i
OPTS="${OPTS} $i"
# cc always creates the .o from the .c name
OBJ=`basename $C_SRC .c`.o
;;
*.s) S_SRC=$i
OPTS="${OPTS} $i"
# or the .o from the .s name
OBJ=`basename $S_SRC .s`.o
;;
*.o) OBJECT=$i
OPTS="${OPTS} $i"
;;
*) OPTS="${OPTS} $i"
;;
esac
done
${CC} ${OPTS} || exit $?
# if there was no -c and -o we're done
[ $DASH_C = 1 -a $DASH_O = 1 ] || exit 0
# if $OBJ and $OBJECT are the same we're done
[ $OBJ = $OBJECT ] && exit 0
[ -f $OBJ ] && mv -f $OBJ $OBJECT

139
mozilla/build/hcpp Executable file
View File

@@ -0,0 +1,139 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# Wrapper for brain-damaged compilers that don't understand -o and -c together.
#
CXX=`echo $1 | sed -e "s|'||g" -e 's|"||g'`
shift
DUMMY="XxxXxxX"
DASH_C=0
DASH_O=0
GET_OBJECT=0
C_SRC="${DUMMY}"
CC_SRC="${DUMMY}"
CPP_SRC="${DUMMY}"
S_SRC="${DUMMY}"
OBJECT="${DUMMY}"
NEW_i="${DUMMY}"
PLATFORM=`uname -s`
for i in $*
do
[ ${GET_OBJECT} -eq 1 ] && {
case $i in
./*/*.o) OBJECT="$i"
OPTS="${OPTS} -o"
DASH_O=1
;;
./*.o) OBJECT="`basename $i`"
i=""
DASH_O=1
;;
*.o) if [ $i = `basename $i` ]
then
i=""
else
OPTS="${OPTS} -o"
DASH_O=1
fi
;;
*) OPTS="${OPTS} -o $i"
DASH_O=1
i=""
;;
esac
GET_OBJECT=0
}
case $i in
-c)
DASH_C=1
OPTS="${OPTS} -c"
;;
-o)
GET_OBJECT=1
;;
*.c)
C_SRC="$i"
OPTS="${OPTS} $i"
# cc always creates the .o from the .c name
OBJ=`basename ${C_SRC} .c`.o
;;
+.*)
OPTS="${OPTS} $i"
;;
*.cpp)
CPP_SRC="$i"
if [ "${PLATFORM}" = "SCO_SV" ]; then
OPTS="${OPTS} +.cpp $i"
elif [ "${PLATFORM}" = "IRIX" ]; then
NEW_i=`basename ${CPP_SRC} .cpp`.C
rm -f ${NEW_i}
cp $i ${NEW_i}
OPTS="${OPTS} ${NEW_i}"
else
OPTS="${OPTS} $i"
fi
# cc always creates the .o from the .cpp name
OBJ=`basename ${CPP_SRC} .cpp`.o
;;
*.cc)
CC_SRC="$i"
OPTS="${OPTS} $i"
# cc always creates the .o from the .cc name
OBJ=`basename ${CC_SRC} .cc`.o
;;
*.s)
S_SRC="$i"
OPTS="${OPTS} $i"
# cc always creates the .o from the .s name
OBJ=`basename ${S_SRC} .s`.o
;;
*.o) OBJECT=$i
OPTS="${OPTS} $i"
;;
*) OPTS="${OPTS} $i"
;;
esac
done
${CXX} ${OPTS} || exit $?
rm -f ${NEW_i}
# Really only needed for NSPR now.
if [ "${PLATFORM}" = "IRIX" -a "$OBJ" != "$OBJECT" ]; then
OBJ=$OBJECT
fi
# LAME!!!
if [ -f -O ]; then
mv -f -- -O ${OBJECT}
fi
# if there was no -c and -o we're done
[ ${DASH_C} -eq 1 -a ${DASH_O} -eq 1 ] || exit 0
# if $OBJ and $OBJECT are the same we're done
[ $OBJ = $OBJECT ] && exit 0
[ -f $OBJ ] && mv -f $OBJ $OBJECT

View File

@@ -0,0 +1,110 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/*
This file overrides all option settings in the IDE. It is an attempt to allow all builds
to have the same options.
Note: We can't use ConditionalMacros.h in this file because it will conflict with
the PowerPlant precompiled headers.
*/
/* warning pragmas */
#pragma warn_hidevirtual on
#pragma warn_emptydecl on
#pragma warn_unusedvar on
#pragma warn_extracomma on
#pragma warn_illpragma on
#pragma warn_possunwant on
#pragma warn_unusedarg off /* turned off to reduce warnings */
#pragma check_header_flags on
/* Language features that must be the same across libraries... */
#pragma enumsalwaysint on
#pragma unsigned_char off
#pragma exceptions on
#pragma bool on
#pragma wchar_type on
#pragma RTTI on
/* Save as much space as possible with strings... */
#pragma pool_strings on
#pragma dont_reuse_strings off
#pragma options align=native
#pragma sym on /* Takes no memory. OK in non-debug. */
#ifdef powerc /* ...generating PowerPC */
#pragma toc_data on
#pragma fp_contract on
#pragma readonly_strings on
#ifdef DEBUG
#pragma profile off /* Turn this on to profile the application. */
/* Look for more details about profiling in nsMacMessagePump.cpp. */
#pragma traceback on
#pragma global_optimizer off
#pragma scheduling off
#pragma peephole off
#pragma optimize_for_size off
#else
#pragma traceback on /* leave on until the final release, so MacsBug logs are interpretable */
#pragma global_optimizer on
#pragma optimization_level 4
#pragma scheduling 603
#pragma peephole on
#pragma optimize_for_size on
#pragma opt_strength_reduction on
#pragma opt_propagation on
#pragma opt_loop_invariants on
#pragma opt_lifetimes on
#pragma opt_dead_code on
#pragma opt_dead_assignments on
#pragma opt_common_subs on
#endif
#else /* ...generating 68k */
#pragma code68020 on
#pragma code68881 off
/* Far everything... */
#pragma far_code
#pragma far_data on
#pragma far_strings on
#pragma far_vtables on
#pragma fourbyteints on /* 4-byte ints */
#pragma IEEEdoubles on /* 8-byte doubles (as required by Java and NSPR) */
#ifdef DEBUG
#pragma macsbug on
#pragma oldstyle_symbols off
#else
#pragma macsbug off
#endif
#endif

View File

@@ -0,0 +1,5 @@
#
# This is a list of local files which get copied to the mozilla:dist directory
#
IDE_Options.h

View File

@@ -0,0 +1,43 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#error "DonÕt use me!"
#define OLDROUTINELOCATIONS 0
#define XP_MAC 1
#define NSPR20 1
#define _NO_FAST_STRING_INLINES_ 1
#define HAVE_BOOLEAN 1
#define NETSCAPE 1
#define OTUNIXERRORS 1 /* We want OpenTransport error codes */
#define OJI 1
/*
This compiles in heap dumping utilities and other good stuff
for developers -- maybe we only want it in for a special SDK
nspr/java runtime(?):
*/
#define DEVELOPER_DEBUG 1
#define MAX(_a,_b) ((_a) < (_b) ? (_b) : (_a))
#define MIN(_a,_b) ((_a) < (_b) ? (_a) : (_b))

Binary file not shown.

View File

@@ -0,0 +1,78 @@
#!perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Simon Fraser <sfraser@netscape.com>
#
require 5.004;
use strict;
use Cwd;
use Moz::BuildUtils;
use Moz::BuildCore;
#-------------------------------------------------------------
# Where have the build options gone?
#
# The various build flags have been centralized into one place.
# The master list of options is in MozBuildFlags.txt. However,
# you should never need to edit that file, or this one.
#
# To customize what gets built, or where to start the build,
# edit the $prefs_file_name file in
# System Folder:Preferences:Mozilla build prefs:
# Documentation is provided in that file.
#-------------------------------------------------------------
my($prefs_file_name) = "Mozilla opt build prefs";
#-------------------------------------------------------------
# hashes to hold build options
#-------------------------------------------------------------
my(%build);
my(%options);
my(%filepaths);
my(%optiondefines);
# Hash of input files for this build. Eventually, there will be
# input files for manifests, and projects too.
my(%inputfiles) = (
"buildflags", "MozillaBuildFlags.txt",
"checkoutdata", "MozillaCheckoutList.txt",
"buildprogress", "¥ Mozilla opt progress",
"buildmodule", "MozillaBuildList.pm"
);
#-------------------------------------------------------------
# end build hashes
#-------------------------------------------------------------
# set the build root directory, which is the the dir above mozilla
SetupBuildRootDir(":mozilla:build:mac:build_scripts");
# Set up all the flags on $main::, like DEBUG, CARBON etc.
# Override the defaults using the preferences files.
SetupDefaultBuildOptions(0, ":mozilla:dist:viewer:");
my($do_checkout) = 0;
my($do_build) = 1;
RunBuild($do_checkout, $do_build, \%inputfiles, $prefs_file_name);

View File

@@ -0,0 +1,78 @@
#!perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Simon Fraser <sfraser@netscape.com>
#
require 5.004;
use strict;
use Cwd;
use Moz::BuildUtils;
use Moz::BuildCore;
#-------------------------------------------------------------
# Where have the build options gone?
#
# The various build flags have been centralized into one place.
# The master list of options is in MozBuildFlags.txt. However,
# you should never need to edit that file, or this one.
#
# To customize what gets built, or where to start the build,
# edit the $prefs_file_name file in
# System Folder:Preferences:Mozilla build prefs:
# Documentation is provided in that file.
#-------------------------------------------------------------
my($prefs_file_name) = "Mozilla debug build prefs";
#-------------------------------------------------------------
# hashes to hold build options
#-------------------------------------------------------------
my(%build);
my(%options);
my(%filepaths);
my(%optiondefines);
# Hash of input files for this build. Eventually, there will be
# input files for manifests, and projects too.
my(%inputfiles) = (
"buildflags", "MozillaBuildFlags.txt",
"checkoutdata", "MozillaCheckoutList.txt",
"buildprogress", "¥ Mozilla debug progress",
"buildmodule", "MozillaBuildList.pm"
);
#-------------------------------------------------------------
# end build hashes
#-------------------------------------------------------------
# set the build root directory, which is the the dir above mozilla
SetupBuildRootDir(":mozilla:build:mac:build_scripts");
# Set up all the flags on $main::, like DEBUG, CARBON etc.
# Override the defaults using the preferences files.
SetupDefaultBuildOptions(1, ":mozilla:dist:viewer_debug:");
my($do_pull) = 0; # overridden by flags and prefs
my($do_build) = 1;
RunBuild($do_pull, $do_build, \%inputfiles, $prefs_file_name);

View File

@@ -0,0 +1,485 @@
#!perl -w
package Moz::BuildCore;
require 5.004;
require Exporter;
use strict;
use vars qw( @ISA @EXPORT );
# perl includes
use Cwd;
use File::Basename;
use LWP::Simple;
# homegrown
use Moz::Moz;
use Moz::Jar;
use Moz::BuildFlags;
use Moz::BuildUtils;
use Moz::CodeWarriorLib;
# use MozillaBuildList; # eventually, this should go away, and be replaced by data input
@ISA = qw(Exporter);
@EXPORT = qw(
RunBuild
);
#//--------------------------------------------------------------------------------------------------
#// DoPrebuildCheck
#//
#// Check the build tools etc before running the build.
#//--------------------------------------------------------------------------------------------------
sub DoPrebuildCheck()
{
SanityCheckJarOptions();
# launch codewarrior and persist its location. Have to call this before first
# call to getCodeWarriorPath().
my($ide_path_file) = $main::filepaths{"idepath"};
$ide_path_file = full_path_to($ide_path_file);
LaunchCodeWarrior($ide_path_file);
}
#//--------------------------------------------------------------------------------------------------
#// Configure Build System
#//--------------------------------------------------------------------------------------------------
sub GenBuildSystemInfo()
{
# always rebuild the configuration program.
BuildProjectClean(":mozilla:build:mac:tools:BuildSystemInfo:BuildSystemInfo.mcp", "BuildSystemInfo");
# delete the configuration file.
unlink(":mozilla:build:mac:BuildSystemInfo.pm");
# run the program.
system(":mozilla:build:mac:BuildSystemInfo");
# wait for the file to be created.
while (!(-e ":mozilla:build:mac:BuildSystemInfo.pm")) { WaitNextEvent(); }
# wait for BuildSystemInfo to finish, so that we see correct results.
while (IsProcessRunning("BuildSystemInfo")) { WaitNextEvent(); }
# now, evaluate the contents of the file.
open(F, ":mozilla:build:mac:BuildSystemInfo.pm");
while (<F>) { eval; }
close(F);
}
#//--------------------------------------------------------------------------------------------------
#// Make library aliases
#//--------------------------------------------------------------------------------------------------
sub MakeLibAliases()
{
my($dist_dir) = GetBinDirectory();
#// ProfilerLib
if ($main::PROFILE)
{
my($profilerlibpath) = Moz::CodeWarriorLib::getCodeWarriorPath("MacOS Support:Profiler:Profiler Common:ProfilerLib");
MakeAlias("$profilerlibpath", "$dist_dir"."Essential Files:");
}
}
#//--------------------------------------------------------------------------------------------------
#// Regenerate DefinesOptions.h if necessary
#//
#//--------------------------------------------------------------------------------------------------
sub UpdateConfigHeader($)
{
my($config_path) = @_;
my($config, $oldconfig) = ("", "");
my($define, $definevalue, $defines);
my($k, $l,);
foreach $k (keys(%main::options))
{
if ($main::options{$k})
{
foreach $l (keys(%{$main::optiondefines{$k}}))
{
$my::defines{$l} = $main::optiondefines{$k}{$l};
print "Setting up my::defines{$l}\n";
}
}
}
my $config_headerfile = current_directory().$config_path;
if (-e $config_headerfile)
{
open(CONFIG_HEADER, "< $config_headerfile") || die "$config_headerfile: $!\n";
my($line);
while ($line = <CONFIG_HEADER>)
{
$oldconfig .= $line;
if ($line =~ m/#define (.*) (.*)\n/)
{
$define = $1;
$definevalue = $2;
if (exists ($my::defines{$define}) and ($my::defines{$define} == $definevalue))
{
delete $my::defines{$define};
$config .= $line;
}
}
}
close(CONFIG_HEADER);
}
if (%my::defines)
{
foreach $k (keys(%my::defines))
{
$config .= "#define " . $k . " " . $my::defines{$k} . "\n";
}
}
if (($config ne $oldconfig) || (!-e $config_headerfile))
{
printf("Writing new DefinesOptions.h\n");
open(CONFIG_HEADER, "> $config_headerfile") || die "$config_headerfile: $!\n";
MacPerl::SetFileInfo("CWIE", "TEXT", $config_headerfile);
print CONFIG_HEADER ($config);
close(CONFIG_HEADER);
}
}
#//--------------------------------------------------------------------------------------------------
#// ConfigureBuildSystem
#//
#// defines some build-system configuration variables.
#//--------------------------------------------------------------------------------------------------
sub ConfigureBuildSystem()
{
#// In the future, we may want to do configurations based on the actual build system itself.
#// GenBuildSystemInfo();
#// For now, if we discover a newer header file than existed in Universal Interfaces 3.2,
#// we'll assume that 3.3 or later is in use.
my($universal_interfaces) = Moz::CodeWarriorLib::getCodeWarriorPath("MacOS Support:Universal:Interfaces:CIncludes:");
if (-e ($universal_interfaces . "ControlDefinitions.h")) {
$main::UNIVERSAL_INTERFACES_VERSION = 0x0330;
}
#// Rename IC SDK folder in the Mac OS Support folder
my($ic_sdk_folder) = Moz::CodeWarriorLib::getCodeWarriorPath("MacOS Support:ICProgKit2.0.2");
if( -e $ic_sdk_folder)
{
my($new_ic_folder_name) = Moz::CodeWarriorLib::getCodeWarriorPath("MacOS Support:(ICProgKit2.0.2)");
rename ($ic_sdk_folder, $new_ic_folder_name);
# note that CodeWarrior doesn't descnet into folders with () the name
print "Mozilla no longer needs the Internet Config SDK to build:\n Renaming the 'ICProgKit2.0.2' folder to '(ICProgKit2.0.2)'\n";
}
printf("UNIVERSAL_INTERFACES_VERSION = 0x%04X\n", $main::UNIVERSAL_INTERFACES_VERSION);
UpdateConfigHeader(":mozilla:config:mac:DefinesOptions.h");
# alias required CodeWarrior libs into the Essential Files folder (only the Profiler lib now)
MakeLibAliases();
}
#//--------------------------------------------------------------------------------------------------
#// CheckOutModule. Takes variable number of args; first two are required
#//--------------------------------------------------------------------------------------------------
sub CheckOutModule($$$$)
{
my($session, $module, $revision, $date) = @_;
my($result) = $session->checkout($module, $revision, $date);
# result of 1 is success
if ($result) { return; }
my($checkout_err) = $session->getLastError();
if ($checkout_err == 708) {
die "Error: Checkout was cancelled.\n";
} elsif ($checkout_err == 911) {
die "Error: CVS session settings are incorrect. Check your password, and the CVS root settings.\n";
} elsif ($checkout_err == 703) {
die "Error: CVS checkout failed. Unknown module, unknown tag, bad username, or other CVS error.\n";
} elsif ($checkout_err == 711) {
print "Checkout of '$module' failed.\n";
}
}
#//--------------------------------------------------------------------------------------------------
#// getScriptFolder
#//--------------------------------------------------------------------------------------------------
sub getScriptFolder()
{
return dirname($0);
}
#//--------------------------------------------------------------------------------------------------
#// getScriptFolder
#//--------------------------------------------------------------------------------------------------
sub get_url_contents($)
{
my($url) = @_;
my($url_contents) = LWP::Simple::get($url);
$url_contents =~ s/\r\n/\n/g; # normalize linebreaks
$url_contents =~ s/\r/\n/g; # normalize linebreaks
return $url_contents;
}
#//--------------------------------------------------------------------------------------------------
#// get_files_from_content
#//--------------------------------------------------------------------------------------------------
sub uniq
{
my $lastval;
grep(($_ ne $lastval, $lastval = $_)[$[], @_);
}
#//--------------------------------------------------------------------------------------------------
#// get_files_from_content
#//--------------------------------------------------------------------------------------------------
sub get_files_from_content($)
{
my($content) = @_;
my(@jscalls) = grep (/return js_file_menu[^{]*/, split(/\n/, $content));
my $i;
for ($i = 0; $i < @jscalls ; $i++)
{
$jscalls[$i] =~ s/.*\(|\).*//g;
my(@callparams) = split(/,/, $jscalls[$i]);
my ($repos, $dir, $file, $rev) = grep(s/['\s]//g, @callparams);
$jscalls[$i] = "$dir/$file";
}
&uniq(sort(@jscalls));
}
#//--------------------------------------------------------------------------------------------------
#// FastUpdate
#//
#// Use Bonsai url data to update only those dirs which have new files
#//
#//--------------------------------------------------------------------------------------------------
sub FastUpdate($)
{
my($num_hours) = @_;
my($the_module) = "SeaMonkeyAll";
my($the_branch) = "HEAD";
my($search_type) = "hours";
my($min_date) = "";
my($max_date) = "";
my($url) = "http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=${the_module}&branch=${the_branch}&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=${num_hours}&date=${search_type}&mindate=${min_date}&maxdate=${max_date}&cvsroot=%2Fcvsroot";
my(@files) = &get_files_from_content(&get_url_contents($url));
my(@cvs_co_list);
my($co_file);
foreach $co_file (@files)
{
my(@cvs_co) = ["", "", ""];
@cvs_co[0] = $co_file;
push(@cvs_co_list, \@cvs_co);
}
CheckoutModules(\@cvs_co_list);
}
#//--------------------------------------------------------------------------------------------------
#// Checkout
#//--------------------------------------------------------------------------------------------------
sub CheckoutModules($)
{
my($modules) = @_; # list of modules to check out
my($start_time) = TimeStart();
# assertRightDirectory();
my($cvsfile) = AskAndPersistFile($main::filepaths{"sessionpath"});
my($session) = Moz::MacCVS->new( $cvsfile );
unless (defined($session)) { die "Error: Checkout aborted. Cannot create session file: $session" }
# activate MacCVS
ActivateApplication('Mcvs');
my($this_co);
foreach $this_co (@$modules)
{
my($module, $revision, $date) = ($this_co->[0], $this_co->[1], $this_co->[2]);
CheckOutModule($session, $module, $revision, $date);
# print "Checking out $module with ref $revision, date $date\n";
}
TimeEnd($start_time, "Checkout");
}
#//--------------------------------------------------------------------------------------------------
#// Checkout
#//--------------------------------------------------------------------------------------------------
sub Checkout($)
{
my($checkout_list) = @_;
unless ( $main::build{pull} ) { return; }
StartBuildModule("pull");
my(@cvs_co_list);
my($checkout_file) = getScriptFolder().":".$checkout_list;
local(*CHECKOUT_FILE);
open(CHECKOUT_FILE, "< $checkout_file") || die "Error: failed to open checkout list $checkout_file\n";
while (<CHECKOUT_FILE>)
{
my($line) = $_;
chomp($line);
# ignore comments and empty lines
if ($line =~ /^\#/ || $line =~ /^\s*$/) {
next;
}
my(@cvs_co) = ["", "", ""];
my($module, $revision, $date) = (0, 1, 2);
if ($line =~ /\s*([^#,\s]+)\s*\,\s*([^#,\s]+)\s*\,\s*([^#]+)/)
{
@cvs_co[$module] = $1;
@cvs_co[$revision] = $2;
@cvs_co[$date] = $3;
}
elsif ($line =~ /\s*([^#,\s]+)\s*\,\s*([^#,\s]+)\s*(#.+)?/)
{
@cvs_co[$module] = $1;
@cvs_co[$revision] = $2;
}
elsif ($line =~ /\s*([^#,\s]+)\s*\,\s*,\s*([^#,]+)/)
{
@cvs_co[$module] = $1;
@cvs_co[$date] = $2;
}
elsif ($line =~ /\s*([^#,\s]+)/)
{
@cvs_co[$module] = $1;
}
else
{
die "Error: unrecognized line '$line' in $checkout_list\n";
}
# strip surrounding space from date
@cvs_co[$date] =~ s/^\s*|\s*$//g;
# print "Going to check out '@cvs_co[$module]', '@cvs_co[$revision]', '@cvs_co[$date]'\n";
push(@cvs_co_list, \@cvs_co);
}
close(CHECKOUT_FILE);
CheckoutModules(\@cvs_co_list);
EndBuildModule("pull");
}
#//--------------------------------------------------------------------------------------------------
#// RunBuild
#//--------------------------------------------------------------------------------------------------
sub RunBuild($$$$)
{
my($do_pull, $do_build, $input_files, $build_prefs) = @_;
InitBuildProgress($input_files->{"buildprogress"});
# if we are pulling, we probably want to do a full build, so clear the build progress
if ($do_pull) {
ClearBuildProgress();
}
# read local prefs, and the build progress file, and set flags to say what to build
SetupBuildParams(\%main::build,
\%main::options,
\%main::optiondefines,
\%main::filepaths,
$input_files->{"buildflags"},
$build_prefs);
# If we were told to pull, make sure we do, overriding prefs etc.
if ($do_pull)
{
$main::build{"pull"} = 1;
}
# transfer this flag
$CodeWarriorLib::CLOSE_PROJECTS_FIRST = $main::CLOSE_PROJECTS_FIRST;
# setup the build log
SetupBuildLog($main::filepaths{"buildlogfilepath"}, $main::USE_TIMESTAMPED_LOGS);
StopForErrors();
if ($main::LOG_TO_FILE) {
RedirectOutputToFile($main::filepaths{"scriptlogfilepath"});
}
# run a pre-build check to see that the tools etc are in order
DoPrebuildCheck();
if ($main::FAST_UPDATE)
{
my($hours) = 8; # update files checked in during last 8 hours
FastUpdate($hours);
} else {
Checkout($input_files->{"checkoutdata"});
}
unless ($do_build) { return; }
my($build_start) = TimeStart();
# create generated headers
ConfigureBuildSystem();
# here we load and call methods in the build module indirectly.
# we have to use indirection because the build module can be named
# differently for different builds.
chdir(dirname($0)); # change to the script dir
my($build_module) = $input_files->{"buildmodule"};
# load the build module
require $build_module;
{ # scope for no strict 'refs'
no strict 'refs';
my($package_name) = $build_module;
$package_name =~ s/\.pm$//;
chdir($main::MOZ_SRC);
&{$package_name."::BuildDist"}();
chdir($main::MOZ_SRC);
&{$package_name."::BuildProjects"}();
}
# the build finished, so clear the build progress state
ClearBuildProgress();
TimeEnd($build_start, "Build");
print "Build complete\n";
}
1;

View File

@@ -0,0 +1,416 @@
package Moz::BuildFlags;
require 5.004;
require Exporter;
# Package that attempts to read a file from the Preferences folder,
# and get build settings out of it
use strict;
use Exporter;
use Cwd;
use File::Basename;
use Moz::Moz;
use Moz::Prefs;
use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter);
@EXPORT = qw(
SetupBuildParams
InitBuildProgress
WriteBuildProgress
ClearBuildProgress
ReadBuildProgress
);
my(@build_flags);
my(@options_flags);
my(@filepath_flags);
my(%arrays_list) = (
"build_flags", \@build_flags,
"options_flags", \@options_flags,
"filepath_flags", \@filepath_flags
);
my($progress_file) = "¥ÊBuild progress";
#-------------------------------------------------------------------------------
# appendArrayFlag
#
# Set a flag in the array
#-------------------------------------------------------------------------------
sub appendArrayFlag($$$)
{
my($array_name, $setting, $value) = @_;
my(@this_flag) = [$setting, $value];
my($flags_array) = $arrays_list{$array_name};
if ($flags_array)
{
push(@{$flags_array}, @this_flag) || die "Failed to append\n";
}
else
{
die "Error: unknown build flags array $array_name\n";
}
}
#-------------------------------------------------------------------------------
# readFlagsFile
#
# Read the file of build flags from disk. File path is relative to the
# script directory.
#-------------------------------------------------------------------------------
sub readFlagsFile($)
{
my($flags_file) = @_;
my($file_path) = $0;
$file_path =~ s/[^:]+$/$flags_file/;
print "Reading build flags from '$file_path'\n";
local(*FLAGS_FILE);
open(FLAGS_FILE, "< $file_path") || die "Error: failed to open flags file $file_path\n";
my($cur_array) = "";
while(<FLAGS_FILE>)
{
my($line) = $_;
chomp($line);
# ignore comments and empty lines
if ($line =~ /^\#/ || $line =~ /^\s*$/) {
next;
}
# 1-word line, probably array name
if ($line =~ /^([^#\s]+)\s*$/)
{
$cur_array = $1;
next;
}
elsif ($line =~ /^([^#\s]+)\s+\"(.+)\"(\s+#.+)?$/) # quoted option, possible comment
{
my($flag) = $1;
my($setting) = $2;
appendArrayFlag($cur_array, $flag, $setting);
}
elsif ($line =~ /^([^#\s]+)\s+([^#\s]+)(\s+#.+)?$/) # two-word line, possible comment
{
my($flag) = $1;
my($setting) = $2;
appendArrayFlag($cur_array, $flag, $setting);
}
else
{
die "Error: unknown build flag at '$line'\n";
}
}
close(FLAGS_FILE);
}
#-------------------------------------------------------------------------------
# flagsArrayToHash
#
# Utility routine to migrate flag from a 2D array to a hash, where
# item[n][0] is the hash entry name, and item[n][1] is the hash entry value.
#-------------------------------------------------------------------------------
sub flagsArrayToHash($$)
{
my($src_array, $dest_hash) = @_;
my($item);
foreach $item (@$src_array)
{
$dest_hash->{$item->[0]} = $item->[1];
}
}
#-----------------------------------------------
# printHash
#
# Utility routine to print a hash
#-----------------------------------------------
sub printHash($)
{
my($hash_ref) = @_;
print "Printing hash:\n";
my($key, $value);
while (($key, $value) = each (%$hash_ref))
{
print " $key $value\n";
}
}
#-----------------------------------------------
# printBuildArray
#
# Utility routine to print a 2D array
#-----------------------------------------------
sub printBuildArray($)
{
my($build_array) = @_;
my($entry);
foreach $entry (@$build_array)
{
print "$entry->[0] = $entry->[1]\n";
}
}
#-------------------------------------------------------------------------------
# SetBuildFlags
#-------------------------------------------------------------------------------
sub SetBuildFlags($)
{
my($build) = @_;
flagsArrayToHash(\@build_flags, $build);
}
#-------------------------------------------------------------------------------
# SetBuildOptions
#-------------------------------------------------------------------------------
sub SetBuildOptions($)
{
my($options) = @_;
flagsArrayToHash(\@options_flags, $options);
}
#-------------------------------------------------------------------------------
# SetFilepathFlags
#-------------------------------------------------------------------------------
sub SetFilepathFlags($)
{
my($filepath) = @_;
flagsArrayToHash(\@filepath_flags, $filepath);
}
#-------------------------------------------------------------------------------
# SetOptionDefines
#-------------------------------------------------------------------------------
sub SetOptionDefines($)
{
my($optiondefines) = @_;
# These should remain unchanged
$optiondefines->{"mathml"}{"MOZ_MATHML"} = 1;
$optiondefines->{"svg"}{"MOZ_SVG"} = 1;
}
#-------------------------------------------------------------------------------
# PropagateAllFlags
#-------------------------------------------------------------------------------
sub PropagateAllFlags($)
{
my($build_array) = @_;
# if "all" is set, set all the flags to 1
unless ($build_array->[0][0] eq "all") { die "Error: 'all' must come first in the flags array\n"; }
if ($build_array->[0][1] == 1)
{
my($index);
foreach $index (@$build_array)
{
$index->[1] = 1;
}
}
}
#//--------------------------------------------------------------------------------------------------
#// _getBuildProgressFile
#//--------------------------------------------------------------------------------------------------
sub _getBuildProgressFile()
{
return $progress_file;
}
#//--------------------------------------------------------------------------------------------------
#// setBuildProgressStart
#//
#// This automagically sets $build{"all"} to 0
#//--------------------------------------------------------------------------------------------------
sub setBuildProgressStart($$)
{
my($build_array, $name) = @_;
my($index);
foreach $index (@$build_array)
{
$index->[1] = 0;
if ($index->[0] eq $name) {
last;
}
}
print "Building from module after $name, as specified by build progress\n";
}
#//--------------------------------------------------------------------------------------------------
#// InitBuildProgress
#//--------------------------------------------------------------------------------------------------
sub InitBuildProgress($)
{
my($prog_file) = @_;
if ($prog_file ne "") {
$progress_file = full_path_to($prog_file);
print "Writing build progress to $progress_file\n";
}
}
#//--------------------------------------------------------------------------------------------------
#// WriteBuildProgress
#//--------------------------------------------------------------------------------------------------
sub WriteBuildProgress($)
{
my($module_built) = @_;
my($progress_file) = _getBuildProgressFile();
if ($progress_file ne "")
{
open(PROGRESS_FILE, ">>$progress_file") || die "Failed to open $progress_file\n";
print(PROGRESS_FILE "$module_built\n");
close(PROGRESS_FILE);
}
}
#//--------------------------------------------------------------------------------------------------
#// ClearBuildProgress
#//--------------------------------------------------------------------------------------------------
sub ClearBuildProgress()
{
my($progress_file) = _getBuildProgressFile();
if ($progress_file ne "") {
unlink $progress_file;
}
}
#//--------------------------------------------------------------------------------------------------
#// WipeBuildProgress
#//--------------------------------------------------------------------------------------------------
sub WipeBuildProgress()
{
print "Ignoring build progress\n";
ClearBuildProgress();
$progress_file = "";
}
#//--------------------------------------------------------------------------------------------------
#// ReadBuildProgress
#//--------------------------------------------------------------------------------------------------
sub ReadBuildProgress($)
{
my($build_array) = @_;
my($progress_file) = _getBuildProgressFile();
my($last_module);
if (open(PROGRESS_FILE, "< $progress_file"))
{
print "Getting build progress from $progress_file\n";
while (<PROGRESS_FILE>)
{
my($line) = $_;
chomp($line);
$last_module = $line;
}
close(PROGRESS_FILE);
}
if ($last_module)
{
setBuildProgressStart($build_array, $last_module);
}
}
#-------------------------------------------------------------------------------
# clearOldBuildSettings
#-------------------------------------------------------------------------------
sub clearOldBuildSettings($$$$)
{
my($build, $options, $optiondefines, $filepaths) = @_;
# empty the arrays in case we're being called twice
@build_flags = ();
@options_flags = ();
@filepath_flags = ();
# and empty the hashes
%$build = ();
%$options = ();
%$optiondefines = ();
%$filepaths = ();
}
#-------------------------------------------------------------------------------
# SetupBuildParams
#-------------------------------------------------------------------------------
sub SetupBuildParams($$$$$$)
{
my($build, $options, $optiondefines, $filepaths, $flags_file, $prefs_file) = @_;
# Empty the hashes and arrays, to wipe out any stale data.
# Needed because these structures persist across two build scripts
# called using 'do' from a parent script.
clearOldBuildSettings($build, $options, $optiondefines, $filepaths);
# Read from the flags file, which sets up the various arrays
readFlagsFile($flags_file);
# If 'all' is set in the build array, propagate that to all entries
PropagateAllFlags(\@build_flags);
# read the user pref file, that can change values in the array
ReadMozUserPrefs($prefs_file, \@build_flags, \@options_flags, \@filepath_flags);
# If build progress exists, this clears flags in the array up to a certain point
if ($main::USE_BUILD_PROGRESS) {
ReadBuildProgress(\@build_flags);
} else {
WipeBuildProgress();
}
# printBuildArray(\@build_flags);
# printBuildArray(\@options_flags);
SetBuildFlags($build);
SetBuildOptions($options);
SetOptionDefines($optiondefines);
SetFilepathFlags($filepaths);
# printHash($build);
# printHash($options);
}
1;

View File

@@ -0,0 +1,519 @@
package Moz::BuildUtils;
require 5.004;
require Exporter;
# Package that contains build util functions specific to the Mozilla build
# process.
use strict;
use Exporter;
use Cwd;
use File::Path;
use File::Basename;
use Mac::Events;
use Mac::StandardFile;
use Moz::Moz;
use Moz::BuildFlags;
use Moz::MacCVS;
use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter);
@EXPORT = qw(
SetupDefaultBuildOptions
SetupBuildRootDir
StartBuildModule
EndBuildModule
GetBinDirectory
BuildOneProjectWithOutput
BuildOneProject
BuildIDLProject
BuildFolderResourceAliases
AskAndPersistFile
DelayFor
TimeStart
TimeEnd
EmptyTree
SetupBuildLog
SetBuildNumber
SetTimeBomb
);
#//--------------------------------------------------------------------------------------------------
#// SetupDefaultBuildOptions
#//--------------------------------------------------------------------------------------------------
sub SetupDefaultBuildOptions($$)
{
my($debug, $bin_dir) = @_;
# Here we set up defaults for the various build flags.
# If you want to override any of these, it's best to do
# so via the relevant preferences file, which lives in
# System Folder:Preferences:Mozilla build prefs:{build prefs file}.
# For the name of the prefs file, see the .pl script that you
# run to start this build. The prefs files are created when
# you run the build, and contain some documentation.
#-------------------------------------------------------------
# configuration variables that globally affect what is built
#-------------------------------------------------------------
$main::DEBUG = $debug;
$main::CARBON = 0; # turn on to build with TARGET_CARBON
$main::PROFILE = 0;
$main::RUNTIME = 0; # turn on to just build runtime support and NSPR projects
$main::GC_LEAK_DETECTOR = 0; # turn on to use GC leak detection
$main::MOZILLA_OFFICIAL = 0; # generate build number
$main::LOG_TO_FILE = 0; # write perl output to a file
#-------------------------------------------------------------
# configuration variables that affect the manner of building,
# but possibly affecting the outcome.
#-------------------------------------------------------------
$main::ALIAS_SYM_FILES = $main::DEBUG;
$main::CLOBBER_LIBS = 1; # turn on to clobber existing libs and .xSYM files before
# building each project
# The following two options will delete all dist files (if you have $main::build{dist} turned on),
# but leave the directory structure intact.
$main::CLOBBER_DIST_ALL = 1; # turn on to clobber all aliases/files inside dist (headers/xsym/libs)
$main::CLOBBER_DIST_LIBS = 0; # turn on to clobber only aliases/files for libraries/sym files in dist
$main::CLOBBER_IDL_PROJECTS = 0; # turn on to clobber all IDL projects.
$main::UNIVERSAL_INTERFACES_VERSION = 0x0320;
#-------------------------------------------------------------
# configuration variables that are preferences for the build,
# style and do not affect what is built.
#-------------------------------------------------------------
$main::CLOSE_PROJECTS_FIRST = 0;
# 1 = close then make (for development),
# 0 = make then close (for tinderbox).
$main::USE_TIMESTAMPED_LOGS = 0;
$main::USE_BUILD_PROGRESS = 1; # track build progress for restartable builds
#-------------------------------------------------------------
# END OF CONFIG SWITCHES
#-------------------------------------------------------------
$main::BIN_DIRECTORY = $bin_dir;
}
#//--------------------------------------------------------------------------------------------------
#// SetupBuildRootDir
#//--------------------------------------------------------------------------------------------------
sub SetupBuildRootDir($)
{
my($rel_path_to_script) = @_;
my($cur_dir) = cwd();
$cur_dir =~ s/$rel_path_to_script$//;
chdir($cur_dir) || die "Error: failed to set build root directory to '$cur_dir'.\nYou probably need to put 'mozilla' one level down (in a folder).\n";
$main::MOZ_SRC = cwd();
}
#//--------------------------------------------------------------------------------------------------
#// StartBuildModule
#//--------------------------------------------------------------------------------------------------
sub StartBuildModule($)
{
my($module) = @_;
print("---- Start of $module ----\n");
}
#//--------------------------------------------------------------------------------------------------
#// EndBuildModule
#//--------------------------------------------------------------------------------------------------
sub EndBuildModule($)
{
my($module) = @_;
WriteBuildProgress($module);
print("---- End of $module ----\n");
}
#--------------------------------------------------------------------------------------------------
# GetBinDirectory
#--------------------------------------------------------------------------------------------------
sub GetBinDirectory()
{
if ($main::BIN_DIRECTORY eq "") { die "Dist directory not set\n"; }
return $main::BIN_DIRECTORY;
}
#--------------------------------------------------------------------------------------------------
# AskAndPersistFile stores the information about the user pick inside
# the file $session_storage
#--------------------------------------------------------------------------------------------------
sub AskAndPersistFile($)
{
my ($sessionStorage) = @_;
my $cvsfile;
if (( -e $sessionStorage) &&
open( SESSIONFILE, $sessionStorage ))
{
# Read in the path if available
$cvsfile = <SESSIONFILE>;
chomp $cvsfile;
close SESSIONFILE;
if ( ! -e $cvsfile )
{
print STDERR "$cvsfile has disappeared\n";
undef $cvsfile;
}
}
unless (defined ($cvsfile))
{
# make sure that MacPerl is a front process
ActivateApplication('McPL');
MacPerl::Answer("Could not find your MacCVS session file. Please choose one", "OK");
# prompt user for the file name, and store it
my $macFile = StandardGetFile( 0, "McvD");
if ( $macFile->sfGood() )
{
$cvsfile = $macFile->sfFile();
# save the choice if we can
if ( open (SESSIONFILE, ">" . $sessionStorage))
{
printf SESSIONFILE $cvsfile, "\n";
close SESSIONFILE;
}
else
{
print STDERR "Could not open storage file $sessionStorage for saving $cvsfile\n";
}
}
}
return $cvsfile;
}
#--------------------------------------------------------------------------------------------------
# BuildIDLProject
#
#--------------------------------------------------------------------------------------------------
sub BuildIDLProject($$)
{
my ($project_path, $module_name) = @_;
if ($main::CLOBBER_IDL_PROJECTS)
{
my($datafolder_path) = $project_path;
$datafolder_path =~ s/\.mcp$/ Data:/; # generate name of the project's data folder.
print STDERR "Deleting IDL data folder: $datafolder_path\n";
EmptyTree($datafolder_path);
}
BuildOneProject($project_path, "headers", 0, 0, 0);
BuildOneProject($project_path, $module_name.".xpt", 1, 0, 1);
}
#//--------------------------------------------------------------------------------------------------
#// Build one project, and make the alias. Parameters are project path, target name, shared library
#// name, make shlb alias (boolean), make xSYM alias (boolean), and is component (boolean).
#//--------------------------------------------------------------------------------------------------
sub BuildOneProjectWithOutput($$$$$$)
{
my ($project_path, $target_name, $output_name, $alias_shlb, $alias_xSYM, $component) = @_;
unless ($project_path =~ m/^$main::BUILD_ROOT.+/) { return; }
# $D becomes a suffix to target names for selecting either the debug or non-debug target of a project
my($D) = $main::DEBUG ? "Debug" : "";
my($dist_dir) = GetBinDirectory();
# Put libraries in "Essential Files" folder, Components in "Components" folder
my($component_dir) = $component ? "Components:" : "Essential Files:";
my($project_dir) = $project_path;
$project_dir =~ s/:[^:]+$/:/; # chop off leaf name
if ($main::CLOBBER_LIBS)
{
unlink "$project_dir$output_name"; # it's OK if these fail
unlink "$project_dir$output_name.xSYM";
}
BuildProject($project_path, $target_name);
$alias_shlb ? MakeAlias("$project_dir$output_name", "$dist_dir$component_dir") : 0;
$alias_xSYM ? MakeAlias("$project_dir$output_name.xSYM", "$dist_dir$component_dir") : 0;
}
#//--------------------------------------------------------------------------------------------------
#// For compatiblity with existing scripts, BuildOneProject now just calls
#// BuildOneProjectWithOutput, with the output name and target name identical.
#// Note that this routine assumes that the target name and the shared libary name
#// are the same.
#//--------------------------------------------------------------------------------------------------
sub BuildOneProject($$$$$)
{
my ($project_path, $target_name, $alias_shlb, $alias_xSYM, $component) = @_;
BuildOneProjectWithOutput($project_path, $target_name, $target_name,
$alias_shlb, $alias_xSYM, $component);
}
#//--------------------------------------------------------------------------------------------------
#// Make resource aliases for one directory
#//--------------------------------------------------------------------------------------------------
sub BuildFolderResourceAliases($$)
{
my($src_dir, $dest_dir) = @_;
# get a list of all the resource files
opendir(SRCDIR, $src_dir) || die("can't open $src_dir");
my(@resource_files) = readdir(SRCDIR);
closedir(SRCDIR);
# make aliases for each one into the dest directory
print("Placing aliases to all files from $src_dir in $dest_dir\n");
for ( @resource_files )
{
next if $_ eq "CVS";
#print(" Doing $_\n");
if (-l $src_dir.$_)
{
print(" $_ is an alias\n");
next;
}
my($file_name) = $src_dir . $_;
MakeAlias($file_name, $dest_dir);
}
}
#//--------------------------------------------------------------------------------------------------
#// DelayFor
#//
#// Delay for the given number of seconds, allowing the script to be cancelled
#//--------------------------------------------------------------------------------------------------
sub DelayFor($)
{
my($delay_secs) = @_;
STDOUT->autoflush(1);
my($end_time) = time() + $delay_secs;
my($last_time) = 0;
my($cur_time) = time();
while ($cur_time < $end_time)
{
$cur_time = time();
if ($cur_time > $last_time)
{
print ".";
$last_time = $cur_time;
}
WaitNextEvent();
}
print "\n";
STDOUT->autoflush(0);
}
#//--------------------------------------------------------------------------------------------------
#// TimeStart
#//--------------------------------------------------------------------------------------------------
sub TimeStart()
{
return time();
}
#//--------------------------------------------------------------------------------------------------
#// TimeEnd
#//--------------------------------------------------------------------------------------------------
sub TimeEnd($$)
{
use integer;
my($start_time, $operation_name) = @_;
my($end_time) = time();
my($tot_sec) = $end_time - $start_time;
my($seconds) = $tot_sec;
my($hours) = $seconds / (60 * 60);
$seconds -= $hours * (60 * 60);
my($minutes) = $seconds / 60;
$seconds -= $minutes * 60;
print "$operation_name took $hours hours $minutes minutes and $seconds seconds\n";
}
#//--------------------------------------------------------------------------------------------------
#// Remove all files from a tree, leaving directories intact (except "CVS").
#//--------------------------------------------------------------------------------------------------
sub EmptyTree($)
{
my ($root) = @_;
#print "EmptyTree($root)\n";
opendir(DIR, $root);
my $sub;
foreach $sub (readdir(DIR))
{
my $fullpathname = $root.$sub; # -f, -d only work on full paths
# Don't call empty tree for the alias of a directory.
# -d returns true for the alias of a directory, false for a broken alias)
if (-d $fullpathname)
{
if (-l $fullpathname) # delete aliases
{
unlink $fullpathname;
next;
}
EmptyTree($fullpathname.":");
if ($sub eq "CVS")
{
#print "rmdir $fullpathname\n";
rmdir $fullpathname;
}
}
else
{
unless (unlink $fullpathname) { die "Failed to delete $fullpathname\n"; }
}
}
closedir(DIR);
}
#//--------------------------------------------------------------------------------------------------
#// Recurse through a directory hierarchy, looking for MANIFEST files.
#// Currently unused.
#//--------------------------------------------------------------------------------------------------
sub ScanForManifestFiles($$$$)
{
my($dir, $theme_root, $theme_name, $dist_dir) = @_;
opendir(DIR, $dir) or die "Cannot open dir $dir\n";
my @files = readdir(DIR);
closedir DIR;
my $file;
foreach $file (@files)
{
my $filepath = $dir.":".$file;
if (-d $filepath)
{
# print "Looking for MANIFEST files in $filepath\n";
ScanForManifestFiles($filepath, $theme_root, $theme_name, $dist_dir);
}
elsif ($file eq "MANIFEST")
{
# print "Doing manifest file $filepath\n";
# Get the dest path from the first line of the file
open(MANIFEST, $filepath) || die "Could not open file $file";
# Read in the path if available
my($dest_line) = <MANIFEST>;
chomp $dest_line;
close MANIFEST;
$dest_line =~ s|^#!dest[\t ]+|| || die "No destination line found in $filepath\n";
my($dest_path) = $dist_dir."chrome:skins:$theme_name:$dest_line";
# print " Destination is $dest_path\n";
InstallResources($filepath, "$dest_path", 0);
}
}
}
#-----------------------------------------------
# SetupBuildLog
#-----------------------------------------------
sub SetupBuildLog($$)
{
my($logfile_path, $timestamped_log) = @_;
my($logdir) = "";
my($logfile) = $logfile_path;
if ($logfile_path =~ /(.+?:)([^:]+)$/) # ? for non-greedy match
{
$logdir = $1;
$logfile = $2;
mkpath($logdir);
}
if ($timestamped_log)
{
#Use time-stamped names so that you don't clobber your previous log file!
my $now = localtime();
while ($now =~ s@:@.@) {} # replace all colons by periods
OpenErrorLog("${logdir}${now}");
}
else
{
OpenErrorLog("${logdir}${logfile}");
}
}
#-----------------------------------------------
# SetBuildNumber
#-----------------------------------------------
sub SetBuildNumber($$)
{
my($build_num_file, $files_to_touch) = @_;
# Make sure we add the config dir to search, to pick up mozBDate.pm
# Need to do this dynamically, because this module can be used before
# mozilla/config has been checked out.
my ($inc_path) = $0; # $0 is the path to the parent script
$inc_path =~ s/:build:mac:build_scripts:.+$/:config/;
push(@INC, $inc_path);
require mozBDate;
mozBDate::UpdateBuildNumber($build_num_file, $main::MOZILLA_OFFICIAL);
my($file);
foreach $file (@$files_to_touch)
{
print "Writing build number to $file from ${file}.in\n";
mozBDate::SubstituteBuildNumber($file, $build_num_file, "${file}.in");
}
}
#-----------------------------------------------
# SetBuildNumber
#-----------------------------------------------
sub SetTimeBomb($$)
{
my ($warn_days, $bomb_days) = @_;
system("perl :mozilla:config:mac-set-timebomb.pl $warn_days $bomb_days");
}
1;

View File

@@ -0,0 +1,592 @@
#!perl
package Moz::CodeWarriorLib;
=pod
=head1 NAME
CodeWarriorLib - supply interface to CodeWarrior
=head1 SYNOPSIS
#!perl
use CodeWarriorLib;
CodeWarriorLib::activate();
$had_errors = CodeWarriorLib::build_project(
$project_path, $target_name, $recent_errors_file, $clean_build
);
=head1 DESCRIPTION
Replaces the AppleScript library I<CodeWarriorLib>.
=over 4
=cut
use strict;
use Cwd;
use Mac::Types;
use Mac::Events;
use Mac::AppleEvents;
use Mac::AppleEvents::Simple;
use Mac::Processes;
use Mac::MoreFiles;
use Mac::StandardFile;
use File::Basename;
use vars qw($VERSION);
$VERSION = '1.02';
my($app) = 'CWIE';
my($scriptDir) = cwd(); # could use $0 for this
my($ide_loc_file) = "";
# 0 == don't switch CWIE to front app in do_event(), 1 == do switch
# note: activate() still switches when called
$Mac::AppleEvents::Simple::SWITCH = 0;
# $Mac::AppleEvents::Simple::WARN = 1;
# supply your own path to the source here
#_test('PowerPudgeIV:mozilla:mozilla:');
=pod
=item _get_project($full_path)
A private routine returning a reference to the open project with the given name,
or else the empty string (when that project is not open)
full_path is a string identifying the project to be built and is of the form,
e.g., "HD:ProjectFolder:MyProject.mcp". It must be supplied.
=cut
sub _get_project ($) {
my(
$full_path, $candidate_projects
) = @_;
$candidate_projects = _doc_named(basename($full_path, '*'));
if ($candidate_projects) {
my($cps) = _get_dobj($candidate_projects);
my($num) = AECountItems($cps);
if ($num) { # is a list
foreach (1 .. AECountItems($cps)) {
my($cp) = AEGetNthDesc($cps, $_);
if (lc $full_path eq lc _full_path($cp)) {
return($cp);
}
}
} else { # is only one, not a list
if (lc $full_path eq lc _full_path($cps)) {
return($cps);
}
}
}
return;
}
=pod
=item build_project
Build a selected target of a project, saving any errors to a file, if supplied.
full_path is a string identifying the project to be built and is of the form,
e.g., "HD:ProjectFolder:MyProject.mcp". It must be supplied.
If target_name is the empty string, the current target of the selected project
will be built, else, target_name should be a string matching a target name in
the selected project.
If error_path is the empty string, errors will not be saved to a file,
else, error_path should be the full path of a file to save error messages into.
=cut
$CodeWarriorLib::CLOSE_PROJECTS_FIRST = 0; # If true we close then make. If false, make then close.
my $last_project_built = "";
my $last_project_was_closed = 0;
sub build_project ($;$$$) {
my(
$full_path, $target_name, $error_path,
$remove_object, $p, $project_was_closed, $had_errors
) = @_;
_close_errors_window();
if ($CodeWarriorLib::CLOSE_PROJECTS_FIRST && ($last_project_built ne $full_path))
{
# If we're in "close first" mode, we don't close if the current project
# is the same as the previous one.
if ($last_project_was_closed) {
$p = _get_project($last_project_built);
_close($p);
}
$last_project_built = $full_path;
$last_project_was_closed = 0; # now refers to the new project
}
$project_was_closed = 0;
while (1) {
$p = _get_project($full_path);
if (!$p) {
if ($project_was_closed) {
print "### Error - request for project document failed after opening\n";
die "### possibly CW Pro 4 bug: be sure to close your Find window\n";
}
$project_was_closed = 1;
$last_project_was_closed = 1;
_open_file($full_path);
} else {
last;
}
}
$had_errors = 0;
if ($target_name eq '') {
if ($remove_object) {_remove_object($p)}
_build($p);
} else {
if ($remove_object) {_remove_object($p, $target_name)}
_build($p, $target_name);
}
if ($error_path ne '') {
_save_errors_window($error_path);
}
$had_errors = _close_errors_window();
if (!$CodeWarriorLib::CLOSE_PROJECTS_FIRST)
{
if ($project_was_closed) {
$p = _get_project($full_path);
_close($p);
}
}
return($had_errors);
}
=pod
=item appIsRunning()
=cut
sub _appIsRunning($)
{
my ($appSignature) = @_;
my ($psi);
my ($found) = 0;
my ($appPSN);
foreach $psi (values(%Process))
{
if ($psi->processSignature() eq $appSignature)
{
$appPSN = $psi->processNumber();
$found = 1;
last;
}
}
return $found;
}
=pod
=item appIsFrontmost()
=cut
sub _appIsFrontmost($)
{
my ($appSignature) = @_;
my ($psi);
my ($found) = 0;
my ($appPSN);
foreach $psi (values(%Process))
{
if ($psi->processSignature() eq $appSignature)
{
$appPSN = $psi->processNumber();
$found = 1;
last;
}
}
return (GetFrontProcess() == $appPSN);
}
=pod
=item activate()
Launches CodeWarrior and brings it to the front.
Once found, path will be saved in $idepath_file for future reference.
Edit or delete this file to change the location of the IDE. If app is
moved, C<activate()> will prompt for a new location.
First looks for an open CodeWarrior app. Second, tries to open previously
saved location in ':idepath.txt'. Third, tries to find it and allow user
to choose it with Navigation Services (if present). Fourth, uses good old
GUSI routines built-in to MacPerl for a Choose Directory dialog box.
=cut
sub activate ($) {
$ide_loc_file = $_[0]; # save in global
my($filepath, $appath, $psi) = ($ide_loc_file);
foreach $psi (values(%Process)) {
if ($psi->processSignature() eq $app) {
$appath = $psi->processAppSpec();
_save_appath($filepath, $appath);
last;
}
}
if (!$appath || !-x $appath) {
$appath = _read_appath($filepath);
}
if (!$appath || ! -x $appath)
{
# make sure that MacPerl is a front process
#ActivateApplication('McPL');
MacPerl::Answer("Please locate the CodeWarrior application.", "OK");
# prompt user for the file name, and store it
my $macFile = StandardGetFile( 0, "APPL");
if ( $macFile->sfGood() )
{
$appath = $macFile->sfFile();
}
else
{
die "Operation canceled\n";
}
# if (eval {require Mac::Navigation}) {
# my($options, $nav);
# Mac::Navigation->import();
# $options = NavGetDefaultDialogOptions();
# $options->message('Where is CodeWarrior IDE?');
# $options->windowTitle('Find CodeWarrior IDE');
# $nav = NavChooseObject($Application{$app}, $options);
# die "CodeWarrior IDE not found.\n" if (!$nav || !$nav->file(1));
# $appath = $nav->file(1);
# } else {
# local(*D);
# my $cwd = `pwd`;
# $appath = _get_folder(
# 'Where is the CW IDE folder?',
# dirname($Application{$app})
# );
# die "CodeWarrior IDE not found.\n" if !$appath;
# opendir(D, $appath) or die $!;
# chdir($appath);
# foreach my $file (sort readdir (D)) {
# my(@app) = MacPerl::GetFileInfo($file);
# if ($app[0] && $app[1] &&
# $app[1] eq 'APPL' && $app[0] eq $app
# ) {
# $appath .= $file;
# last;
# }
# }
# chomp($cwd);
# chdir($cwd);
# }
_save_appath($filepath, $appath);
}
my($lp) = LaunchParam->new(
launchAppSpec => $appath,
launchControlFlags => launchContinue() + launchNoFileFlags()
);
unless (LaunchApplication($lp)) {
unlink($filepath);
die $^E;
}
# wait for CodeWarrior to show up in the list of processes
while (!_appIsRunning('CWIE'))
{
WaitNextEvent();
}
# wait for CodeWarrior to come to the front
while (!_appIsFrontmost('CWIE'))
{
WaitNextEvent();
}
}
=pod
=item getCodeWarriorPath()
Returns a file path relative to the CodeWarrior folder
=cut
sub getCodeWarriorPath($)
{
my($subfolder)=@_;
my($app_path) = _read_appath($ide_loc_file);
if ($app_path eq "") { die "Error: Failed to get CodeWarrior IDE path\n"; }
my($codewarrior_root) = $app_path;
$codewarrior_root =~ s/[^:]*$//;
return ($codewarrior_root . $subfolder);
}
=pod
=item getCodeWarriorIDEName()
Returns the name of the CodeWarrior application
=cut
sub getCodeWarriorIDEName()
{
my($subfolder)=@_;
my($app_path) = _read_appath($ide_loc_file);
if ($app_path eq "") { die "Error: Failed to get CodeWarrior IDE path\n"; }
my(@codewarrior_path) = split(/:/, $app_path);
return pop(@codewarrior_path);
}
=pod
=item quit()
Quits CodeWarrior.
=cut
sub quit() {
$last_project_built = "";
$last_project_was_closed = 0;
my($evt) = do_event(qw/aevt quit/, $app);
}
sub _build ($;$) {
my($evt);
if ($_[1]) {
my($prm) =
q"'----':obj {form:name, want:type(TRGT), seld:TEXT(@), from:" .
AEPrint($_[0]) . '}';
$evt = do_event(qw/CWIE MAKE/, $app, $prm, $_[1]);
} else {
my($prm) = q"'----':" . AEPrint($_[0]);
$evt = do_event(qw/CWIE MAKE/, $app, $prm);
}
}
sub _remove_object ($;$) {
my($evt);
if ($_[1]) {
my($prm) =
q"'----':obj {form:name, want:type(TRGT), seld:TEXT(@), from:" .
AEPrint($_[0]) . '}';
$evt = do_event(qw/CWIE RMOB/, $app, $prm, $_[1]);
} else {
my($prm) = q"'----':" . AEPrint($_[0]);
$evt = do_event(qw/CWIE RMOB/, $app, $prm);
}
}
sub _open_file ($) {
my($prm) =
q"'----':obj {form:name, want:type(alis), " .
q"seld:TEXT(@), from:'null'()}";
do_event(qw/aevt odoc/, $app, $prm, $_[0]);
}
sub import_project ($$) {
my($xml_file, $project_path) = @_;
my($prm) = "kocl:type(PRJD), rtyp:TEXT(@), data:TEXT(@), &subj:'null'()";
my($evt) = do_event(qw/core crel/, $app, $prm, $project_path, $xml_file);
return $evt->{ERROR};
}
sub _doc_named ($) {
my($prm) =
q"'----':obj {form:test, want:type(docu), from:'null'(), " .
q"seld:cmpd{relo:'= ', 'obj1':obj {form:prop, want:type" .
q"(prop), seld:type(pnam), from:'exmn'()}, 'obj2':TEXT(@)}}";
my($evt) = do_event(qw/core getd/, $app, $prm, $_[0]);
return($evt->{REPLY} eq 'aevt\ansr{}' ? undef : $evt);
}
sub _full_path ($) {
my($obj) = $_[0];
my($prm) =
q"'----':obj {form:prop, want:type(prop), seld:type(FILE), " .
q"from:" . AEPrint($_[0]) . q"}, rtyp:type(TEXT)";
my($evt) = do_event(qw/core getd/, $app, $prm);
return MacPerl::MakePath(
MacUnpack('fss ', (
AEGetParamDesc($evt->{REP}, keyDirectObject()))->data()->get()
)
);
}
sub _save_errors_window ($) {
my($prm) =
q"'----':obj {form:name, want:type(alis), seld:TEXT(@), from:'null'()}";
do_event(qw/MMPR SvMs/, $app, $prm, $_[0]);
}
sub _close_errors_window () {
my($prm) =
q"'----':obj {form:name, want:type(cwin), " .
q"seld:TEXT(@), from:'null'()}";
my($evt) = do_event(qw/core clos/, $app, $prm, 'Errors & Warnings');
return($evt->{REPLY} eq 'aevt\ansr{}' ? 1 : 0);
}
sub _close () {
my($prm) = q"'----':" . AEPrint($_[0]);
do_event(qw/core clos/, $app, $prm);
}
sub _get_dobj ($) {
return(AEGetParamDesc($_[0]->{REP}, keyDirectObject()));
}
sub _get_folder ($$) {
require 'GUSI.ph';
my($prompt, $default) = @_;
MacPerl::Choose(
GUSI::AF_FILE(), 0, $prompt, '',
GUSI::CHOOSE_DIR() + ($default ? &GUSI::CHOOSE_DEFAULT : 0),
$default
);
}
sub _save_appath ($$) {
my($cwd) = cwd(); # remember the current working dir
chdir($scriptDir); # change dir to the script dir
local(*F);
open(F, '>' . $_[0]) or die $!;
print F $_[1];
close(F);
chdir($cwd); # restore the cwd
}
sub _read_appath ($) {
my($filepath) = @_;
my($cwd) = cwd(); # remember the current working dir
chdir($scriptDir); # change dir to the script dir
if (! -e $filepath) {
return "";
}
local(*F);
open(F, $filepath);
my($appath) = <F>;
close(F);
chdir($cwd); # restore the cwd
return($appath);
}
sub _test ($) {
activate($ide_loc_file);
my($path) = $_[0];
build_project(
"${path}modules:xml:macbuild:XML.mcp", '',
"${path}build:mac:Mozilla.BuildLog.part"
);
}
1;
=pod
=back
=head1 HISTORY
=over 4
=item v1.02, September 23, 1998
Made fixes in finding and saving location of CodeWarrior IDE.
=item v1.01, June 1, 1998
Made fixes to C<chdir()> in C<activate()>, made C<activate()> more robust
in finding CodeWarrior IDE, added global variable to NOT switch to IDE
for each sent event, a few other fixes.
=item v1.00, May 30, 1998
First shot
=back
=head1 AUTHORS
Chris Nandor F<E<lt>pudge@pobox.comE<gt>>, and the author of the
original I<CodeWarriorLib>, Scott Collins F<E<lt>scc@netscape.comE<gt>>.
=head1 SEE ALSO
BuildProject L<Moz>.
=head1 COPYRIGHT
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
=cut

View File

@@ -0,0 +1,599 @@
#!perl -w
package Moz::Jar;
#
# Module for creating jar files, either using a jar manifest, or
# simply jarring up folders on disk.
#
require 5.004;
require Exporter;
use strict;
use Archive::Zip;
use File::Path;
use Mac::Files;
use Moz::Moz;
use vars qw( @ISA @EXPORT );
@ISA = qw(Exporter);
@EXPORT = qw(
CreateJarFileFromDirectory
CreateJarFromManifest
WriteOutJarFiles
SanityCheckJarOptions
);
#-------------------------------------------------------------------------------
# Add the contents of a directory to the zip file
#
#-------------------------------------------------------------------------------
sub _addDirToJar($$$$)
{
my($dir, $jar_root, $zip, $compress) = @_;
opendir(DIR, $dir) or die "Error: Cannot open dir $dir\n";
my @files = readdir(DIR);
closedir DIR;
my $unix_jar_root = $jar_root;
$unix_jar_root =~ s|:|/|g; # colon to slash conversion
my $file;
foreach $file (@files)
{
my $filepath = $dir.":".$file;
if (-d $filepath)
{
print "Adding files to jar from $filepath\n";
_addDirToJar($filepath, $jar_root, $zip, $compress);
}
else
{
my $member = Archive::Zip::Member->newFromFile($filepath);
die "Error: Failed to create zip file member $filepath\n" unless $member;
my $unixName = $filepath;
$unixName =~ s|:|/|g; # colon to slash conversion
$unixName =~ s|^$unix_jar_root||; # relativise
$member->fileName($unixName);
# print "Adding $file as $unixName\n";
if ($compress) {
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_DEFLATED);
} else {
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_STORED);
}
$zip->addMember($member);
}
}
}
#-------------------------------------------------------------------------------
# Add the contents of a directory to the zip file
#
#-------------------------------------------------------------------------------
sub CreateJarFileFromDirectory($$$)
{
my($srcdir, $jarpath, $compress) = @_;
my $zip = Archive::Zip->new();
_addDirToJar($srcdir, $srcdir, $zip, $compress);
print "Saving zip file...\n";
my $status = $zip->writeToFileNamed($jarpath);
if ($status == 0) {
print "Zipping completed successfully\n";
} else {
print "Error saving zip file\n";
}
# set the file type/creator to something reasonable
MacPerl::SetFileInfo("ZIP ", "ZIP ", $jarpath);
}
#-------------------------------------------------------------------------------
# SanityCheckJarOptions
#
#-------------------------------------------------------------------------------
sub SanityCheckJarOptions()
{
if (!$main::options{chrome_jars} && !$main::options{chrome_files})
{
print "Both \$options{chrome_jars} and \$options{chrome_files} are off. You won't get any chrome.\n";
return;
}
if (!$main::options{chrome_jars} && $main::options{use_jars})
{
print "\$options{chrome_jars} is off but \$options{use_jars} is on. Your build won't run (expects jars, got files).\n";
return;
}
if (!$main::options{chrome_files} && !$main::options{use_jars})
{
print "\$options{chrome_jars} is off but \$options{chrome_files} is on. Your build won't run (expects files, got jars).\n";
return;
}
}
#-------------------------------------------------------------------------------
# printZipContents
#
#-------------------------------------------------------------------------------
sub printZipContents($)
{
my($zip) = @_;
my(@members) = $zip->memberNames();
print "Zip contains:\n";
my($member);
foreach $member (@members)
{
print " $member\n";
}
}
#-------------------------------------------------------------------------------
# safeSaveJarFile
#
# Archive::Zip has a problem where you cannot save a zip file on top of
# an existing zip file that it has open, because it holds references
# into that zip. So we have to save to a temp file, then do a swap.
#
# Note that the zip will become invalid after this operation.
# If you want to do further operations on it, you'll have to reread it.
#-------------------------------------------------------------------------------
sub safeSaveJarFile($$)
{
my($zip, $full_dest_path) = @_;
my($temp_file_name) = $full_dest_path."_temp";
($zip->writeToFileNamed($temp_file_name) == Archive::Zip::AZ_OK) || die "Error: died writing jar to temp file $temp_file_name\n";
unlink $full_dest_path;
(rename $temp_file_name, $full_dest_path) || die "Error: Failed to rename $temp_file_name\n";
MacPerl::SetFileInfo("ZIP ", "ZIP ", $full_dest_path);
}
#-------------------------------------------------------------------------------
# addToJarFile
#
# Add a file to a jar file
#
# Parameters:
# 1. Jar ID. Unix path of jar file inside chrome.
# 2. Abs path to jar.mn file (i.e. source) (mac breaks)
# 3. File source, relative to jar.mn path (mac breaks)
# 4. Abs path to the resulting .jar file (mac breaks)
# 5. Relative file path within the jar (unix breaks)
# 6. Reference to hash of jar files
#
#-------------------------------------------------------------------------------
sub addToJarFile($$$$$$$)
{
my($jar_id, $jar_man_dir, $file_src, $jar_path, $file_jar_path, $override, $jars) = @_;
# print "addToJarFile with:\n $jar_man_dir\n $file_src\n $jar_path\n $file_jar_path\n";
unless ($jar_path =~ m/(.+:)([^:]+)$/) { die "Error: Bad jar path $jar_path\n"; }
my($target_dir) = $1;
my($jar_name) = $2;
$target_dir =~ s/[^:]+$//;
# print "¥ $target_dir $jar_name\n";
# find the source file
my($src) = $jar_man_dir.":".$file_src;
if ((!-e $src) && ($file_src =~ m/.+:([^:]+)$/)) # src does not exist. Fall back to looking for src in jar.mn dir
{
$file_src = $1;
$src = $jar_man_dir.":".$file_src;
if (!-e $src) {
die "Error: Can't find chrome file $src\n";
}
}
if ($main::options{chrome_jars})
{
my($zip) = $jars->{$jar_id};
unless ($zip) { die "Error: Can't find Zip entry for $jar_id\n"; }
# print "Adding $file_src to jar file $jar_path at $file_jar_path\n";
my($member) = Archive::Zip::Member->newFromFile($src);
unless ($member) { die "Error: Failed to create zip file member $src\n"; }
$member->fileName($file_jar_path);
my($compress) = 1;
if ($compress) {
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_DEFLATED);
$member->desiredCompressionLevel(Archive::Zip::COMPRESSION_LEVEL_DEFAULT); # defaults to 6
} else {
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_STORED);
}
my($old_member) = $zip->memberNamed($file_jar_path);
if ($override)
{
if ($old_member)
{
# print "Overriding $file_jar_path in jar file $jar_id\n";
# need to compare mod dates or use the + here
$zip->removeMember($old_member);
}
$zip->addMember($member);
}
else
{
if ($old_member)
{
#compare dates here
my($member_moddate) = $old_member->lastModTime();
my($file_moddate) = GetFileModDate($src);
if ($file_moddate > $member_moddate)
{
print "Updating older file $file_jar_path in $jar_id\n";
$zip->removeMember($old_member);
$zip->addMember($member);
}
else
{
print "File $file_jar_path in $jar_id is more recent. Not updating.\n";
}
}
else
{
$zip->addMember($member);
}
}
}
if ($main::options{chrome_files}) # we install raw files too
{
my($rel_path) = $file_jar_path;
$rel_path =~ s|/|:|g; # slash to colons
my($dir_name) = $jar_name;
$dir_name =~ s/\.jar$//;
my($dst) = $target_dir.$dir_name.":".$rel_path;
# print "Aliassing $src\n to\n$dst\n";
if ($override)
{
unlink $dst;
MakeAlias($src, $dst); # don't check errors, otherwise we fail on replacement
}
else
{
if (-e $dst)
{
#compare dates here
my($dst_moddate) = GetFileModDate($dst);
my($file_moddate) = GetFileModDate($src);
if ($file_moddate > $dst_moddate)
{
print "Updating older file $rel_path in $dir_name\n";
unlink $dst;
MakeAlias($src, $dst);
}
else
{
print "File $file_jar_path in $jar_id is more recent. Not updating.\n";
}
}
else
{
MakeAlias($src, $dst);
}
}
}
}
#-------------------------------------------------------------------------------
# setupJarFile
#
# setup a zip for writing
#-------------------------------------------------------------------------------
sub setupJarFile($$$)
{
my($jar_id, $dest_path, $jar_hash) = @_;
# print "Creating jar file $jar_id at $jar_path\n";
my($jar_file) = $jar_id;
$jar_file =~ s|/|:|g; # slash to colons
my($full_jar_path) = full_path_to($dest_path.":".$jar_file);
if ($main::options{chrome_jars})
{
my($zip) = $jar_hash->{$jar_id};
if (!$zip) # if we haven't made it already, do so
{
my($zip) = Archive::Zip->new();
$jar_hash->{$jar_id} = $zip;
# does the jar file exist already? If so, read it in
if (-e $full_jar_path)
{
print "Reading in jar file $jar_id\n";
if ($zip->read($full_jar_path) != Archive::Zip::AZ_OK) { die "Error: Failed to re-read $full_jar_path\n"; }
# printZipContents($zip);
}
}
}
else
{
# installing files.
# nothing to do. MakeAlias creates dirs as needed.
# add this jar to the list
$jar_hash->{$jar_id} = 1;
}
}
#-------------------------------------------------------------------------------
# closeJarFile
#
# We're done with this jar file _for this jar.mn_. We may add more entries
# to it later, so keep it open in the hash.
#-------------------------------------------------------------------------------
sub closeJarFile($$)
{
my($jar_path, $jar_hash) = @_;
# print "Closing jar file $jar_path\n";
if ($main::options{chrome_jars})
{
}
else
{
# installing files.
# nothing to do
}
}
#-------------------------------------------------------------------------------
# WriteOutJarFiles
#
# Now we dump out the jars
#-------------------------------------------------------------------------------
sub WriteOutJarFiles($$)
{
my($chrome_dir, $jars) = @_;
unless ($main::options{chrome_jars}) { return; }
my($full_chrome_path) = full_path_to($chrome_dir);
my($key);
foreach $key (keys %$jars)
{
my($zip) = $jars->{$key};
my($rel_path) = $key;
$rel_path =~ s/\//:/g;
my($output_path) = $full_chrome_path.":".$rel_path;
print "Writing zip file $key to $output_path\n";
# ensure the target dirs exist
my($path) = $output_path;
$path =~ s/[^:]+$//;
mkpath($path);
# unlink $output_path; # remove any existing jar
safeSaveJarFile($zip, $output_path);
# $zip is invalid after this operation, so nuke it here
$jars->{$key} = 0;
}
}
#-------------------------------------------------------------------------------
# registerChromePackage
#
# Enter a chrome package into the installed-chrome.txt file
#-------------------------------------------------------------------------------
sub registerChromePackage($$$$$$)
{
my($jar_file, $file_path, $chrome_dir, $jar_hash, $chrome_type, $pkg_name) = @_;
my($manifest_subdir) = $jar_file;
$manifest_subdir =~ s/:/\//g;
my($chrome_entry);
if ($main::options{use_jars}) {
$chrome_entry = "$chrome_type,install,url,jar:resource:/chrome/$manifest_subdir!/$chrome_type/$pkg_name";
} else {
$manifest_subdir =~ s/\.jar$//;
$chrome_entry = "$chrome_type,install,url,resource:/chrome/$manifest_subdir/$chrome_type/$pkg_name";
}
# print "Entering $chrome_entry in installed-chrome.txt\n";
# ensure chrome_dir exists
mkpath($chrome_dir);
my($inst_chrome) = ${chrome_dir}.":installed-chrome.txt";
if (open(CHROMEFILE, "<$inst_chrome")) {
while (<CHROMEFILE>) {
chomp;
if ($_ eq $chrome_entry) {
# $chrome_entry already appears in installed-chrome.txt file
# just update the mod date
my $now = time;
utime($now, $now, $inst_chrome) || die "Error: Couldn't touch $inst_chrome";
print "+++ updating chrome $inst_chrome\n+++\t\t$chrome_entry\n";
close(CHROMEFILE) || die "Error: can't close $inst_chrome: $!";
return 0;
}
}
close(CHROMEFILE) || die "Error: can't close $inst_chrome: $!";
}
open(CHROMEFILE, ">>${inst_chrome}") || die "Error: Failed to open $inst_chrome\n";
print(CHROMEFILE "${chrome_entry}\n");
close(CHROMEFILE) || die "Error: Failed to close $inst_chrome\n";
print "+++ adding chrome $inst_chrome\n+++\t\t$chrome_entry\n";
}
#-------------------------------------------------------------------------------
# Create or add to a jar file from a jar.mn file.
# Both arguments are relative to the mozilla root dir.
#
#
#-------------------------------------------------------------------------------
sub CreateJarFromManifest($$$)
{
my($jar_man_path, $dest_path, $jars) = @_;
if ($main::options{chrome_jars}) {
print "Jarring from $jar_man_path\n";
}
if ($main::options{chrome_files}) {
print "Installing files from $jar_man_path\n";
}
$jar_man_path = full_path_to($jar_man_path);
$dest_path = full_path_to($dest_path);
# if the jars hash is empty, nuke installed-chrome.txt
if (! scalar(%$jars))
{
print "Nuking installed-chrome.txt\n";
my($installed_chrome) = $dest_path.":installed-chrome.txt";
# unlink $installed_chrome;
}
my $jar_man_dir = "";
my $jar_man_file = "";
if ($jar_man_path =~ /(.+):([^:]+)$/)
{
$jar_man_dir = $1; # no trailing :
$jar_man_file = $2;
}
# Keep a hash of jar files, keyed on relative jar path (e.g. "packages/core.jar")
# Entries are open Archive::Zips (if zipping), and installed-chrome entries.
my($jar_id) = ""; # Current foo/bar.jar from jar.mn file
my($jar_file) = ""; # relative path to jar file (from $dest_path), with mac separators
my($full_jar_path);
open(FILE, "<$jar_man_path") || die "Error: could not open \"$jar_man_path\": $!";
while (<FILE>)
{
my($line) = $_;
chomp($line);
# print "$line\n";
if ($line =~ /^\s*\#.*$/) { # skip comments
next;
}
if ($line =~/^([\w\d.\-\_\\\/]+)\:\s*$/) # line start jar file entries
{
$jar_id = $1;
$jar_file = $jar_id;
$jar_file =~ s|/|:|g; # slash to colons
$full_jar_path = $dest_path.":".$jar_file;
setupJarFile($jar_id, $dest_path, $jars);
}
elsif ($line =~ /^(\+?)\s+([\w\d.\-\_\\\/]+)\s*(\([\w\d.\-\_\\\/]+\))?$\s*/) # jar file entry
{
my($override) = ($1 eq "+");
my($file_dest) = $2;
my($file_src) = $3;
if ($file_src) {
$file_src = substr($file_src, 1, -1); #strip the ()
} else {
$file_src = $file_dest;
}
$file_src =~ s|/|:|g;
if ($jar_file ne "") # if jar is open, add to jar
{
if ($file_dest =~ /([\w\d.\-\_]+)\/([\w\d.\-\_\\\/]+)contents.rdf/)
{
my $chrome_type = $1;
my $pkg_name = $2;
registerChromePackage($jar_file, $file_dest, $dest_path, $jars, $chrome_type, $pkg_name);
}
addToJarFile($jar_id, $jar_man_dir, $file_src, $full_jar_path, $file_dest, $override, $jars);
}
else
{
die "Error: bad jar.mn format at $line\n";
}
}
elsif ($line =~ /^\s*$/ ) # blank line
{
if ($jar_file ne "") #if a jar file is open, close it
{
closeJarFile($full_jar_path, $jars);
$jar_file = "";
$full_jar_path = "";
}
}
}
close(FILE);
if ($jar_file ne "") #if a jar file is open, close it
{
closeJarFile($full_jar_path, $jars);
}
}
1;

View File

@@ -0,0 +1,254 @@
#!perl -w
package Moz::MacCVS;
# package Mac::Apps::MacCVS; this should really be the name of the package
# but due to our directory hierarchy in mozilla, I am not doing it
require 5.004;
require Exporter;
use strict;
use Exporter;
use vars qw($VERSION @ISA @EXPORT $MacCVSLib);
use Cwd;
use Mac::StandardFile;
use File::Basename;
@ISA = qw(Exporter);
@EXPORT = qw( new print checkout);
$VERSION = "1.00";
my($last_error) = 0;
# Architecture:
# cvs session object:
# name - session name
# session_file - session file
#
# globals
# $MacCVSLib - location of MacCVS applescript library
#
#
#
# utility routines
#
# just like Mac::DoAppleScript, 1 is success, 0 is failure
sub _myDoAppleScript($)
{
my($script) = @_;
my $asresult = MacPerl::DoAppleScript($script);
if ($asresult eq "0")
{
return 1;
}
else
{
my($error_string) = "Unknown error";
my($error_code) = 0;
if ($asresult =~ /^\"(.*)\.([0-9]+)\"$/)
{
$error_string = $1;
$error_code = $2;
}
print STDERR "Error. Script returned '$error_string (error $error_code)\n";
# print STDERR "AppleScript was: \n $script \n";
$last_error = $error_code;
return 0;
}
}
# get the full path to this module
sub _getPathToMe()
{
# this can be a relative or absolute path. If relative, is relative
# to the running script ($0)
my($my_path) = $INC{"Moz/MacCVS.pm"};
if (substr($my_path, 0, 1) eq ":") # relative path
{
$my_path = dirname($0).$my_path;
}
return $my_path;
}
# _useMacCVSLib
# returns 1 on success
# Search the include path for the file called MacCVSLib
sub _useMacCVSLib()
{
unless (defined($MacCVSLib) && ($MacCVSLib ne ""))
{
my($libname) = "MacCVSLib";
my($my_path) = _getPathToMe();
# try in the same directory as this module
my($c) = dirname($my_path).":".$libname;
if ( -e $c)
{
$MacCVSLib = $c;
return 1;
}
# try the directory we were run from
$c = dirname($0) . ":" . $libname;
if ( -e $c)
{
$MacCVSLib = $c;
return 1;
}
# now search the include directories
foreach (@INC)
{
unless ( m/^Dev:Pseudo/ ) # This is some bizarre MacPerl special-case directory
{
$c = $_ . $libname;
if (-e $c)
{
$MacCVSLib = $c;
return 1;
}
}
}
die "Error: MacCVSLib could not be found!";
}
return 1;
}
#
# Session object methods
#
sub new
{
my ( $proto, $session_file) = @_;
my $class = ref($proto) || $proto;
my $self = {};
if ( defined($session_file) && ( -e $session_file) )
{
$self->{"name"} = basename( $session_file );
$self->{"session_file"} = $session_file;
bless $self, $class;
return $self;
}
else
{
print STDERR "MacCVS->new cvs file < $session_file > does not exist\n";
return;
}
}
# makes sure that the session is open
# assertSessionOpen()
# returns 1 on success
sub assertSessionOpen()
{
my ($self) = shift;
_useMacCVSLib() || die "Error: Could not load MacCVSLib\n";
$last_error = 0;
my $script = <<END_OF_APPLESCRIPT;
tell (load script file "$MacCVSLib") to OpenSession("$self->{session_file}")
END_OF_APPLESCRIPT
return _myDoAppleScript($script);
}
# prints the cvs object, used mostly for debugging
sub print
{
my($self) = shift;
$last_error = 0;
print "MacCVS:: name: ", $self->{name}, " session file: ", $self->{session_file}, "\n";
}
# checkout( self, module, revision, date)
# MacCVS checkout command
# returns 1 on success.
sub checkout()
{
my($self, $module, $revision, $date ) = @_;
unless( defined ($module) ) { $module = ""; } # get rid of the pesky undefined warnings
unless( defined ($revision) ) { $revision = ""; }
unless( defined ($date) ) { $date = ""; }
$last_error = 0;
$self->assertSessionOpen() || die "Error: failed to open MacCVS session file at $self->{session_file}\n";
my($revstring) = ($revision ne "") ? $revision : "(none)";
my($datestring) = ($date ne "") ? $date : "(none)";
print "Checking out $module with revision $revstring, date $datestring\n";
my $script = <<END_OF_APPLESCRIPT;
tell (load script file "$MacCVSLib") to Checkout given sessionName:"$self->{name}", module:"$module", revision:"$revision", date:"$date"
END_OF_APPLESCRIPT
return _myDoAppleScript($script);
}
sub getLastError()
{
return $last_error;
}
1;
=pod
=head1 NAME
MacCVS - Interface to MacCVS
=head1 SYNOPSIS
use MacCVS;
$session = MacCVS->new( <session_file_path>) || die "cannot create session";
$session->checkout([module] [revision] [date]) || die "Could not check out";
=head1 DESCRIPTION
This is a MacCVS interface for talking to MacCVS Pro client.
MacCVSSession is the class used to manipulate the session
=item new
MacCVS->new( <cvs session file path>);
Creates a new session. Returns undef on failure.
=item checkout( <module> [revision] [date] )
cvs checkout command. Revision and date are optional
returns 0 on failure
=cut
=head1 SEE ALSO
=over
=item MacCVS Home Page
http://www.maccvs.org/
=back
=head1 AUTHORS
Aleks Totic atotic@netscape.com
=cut
__END__

Binary file not shown.

View File

@@ -0,0 +1,597 @@
=head1 NAME
B<Moz> - routines for automating CodeWarrior builds, and some extra-curricular
activities related to building Mozilla
=head1 SYNOPSIS
use Moz;
OpenErrorLog(":::BuildLog");
StopForErrors();
$Moz::QUIET = 1;
InstallFromManifest(":projects:MANIFEST", $dist_dir);
BuildProjectClean(":projects:SomeProject.mcp", "SomeTarget");
MakeAlias(":projects:SomeProject.shlb", $dist_dir);
DontStopForErrors();
BuildProject(":projects:SomeOtherProject.mcp", "SomeTarget");
=head1 DESCRIPTION
B<Moz> comprises the routines needed to slap CodeWarrior around, force it
to build a sequence of projects, report the results, and a few other things.
This module should only contain functions that are generic to any build,
not just the Mozilla build.
=cut
package Moz::Moz;
require Exporter;
use Cwd;
use File::Copy;
use File::Path;
use Mac::Types;
use Mac::Events;
use Mac::Processes;
use ExtUtils::Manifest 'maniread';
use Moz::CodeWarriorLib;
@ISA = qw(Exporter);
@EXPORT = qw( LaunchCodeWarrior
GetCodeWarriorRelativePath
current_directory
full_path_to
BuildProject
BuildProjectClean
ImportXMLProject
OpenErrorLog
MakeAlias
GetFileModDate
StopForErrors
DontStopForErrors
InstallFromManifest
InstallResources
RedirectOutputToFile
Delay
ActivateApplication
IsProcessRunning);
@EXPORT_OK = qw(CloseErrorLog QUIET);
sub current_directory()
{
my $current_directory = cwd();
chop($current_directory) if ( $current_directory =~ m/:$/ );
return $current_directory;
}
sub full_path_to($)
{
my ($path) = @_;
if ( $path =~ m/^[^:]+$/ )
{
$path = ":" . $path;
}
if ( $path =~ m/^:/ )
{
$path = current_directory() . $path;
}
return $path;
}
$logging = 0;
$recent_errors_file = "";
$stop_on_1st_error = 1;
$QUIET = 0;
=head2 Logging all the errors and warnings - C<OpenErrorLog($log_file)>, C<CloseErrorLog()>
The warnings and errors generated in the course of building projects can be logged to a file.
Tinderbox uses this facility to show why a remote build failed.
Logging is off by default.
Start logging at any point in your build process with C<OpenErrorLog($log_file)>.
Stop with C<CloseErrorLog()>.
You never need to close the log explicitly, unless you want to just log a couple of projects in the middle of a big list.
C<CloseErrorLog()> is not exported by default.
=cut
sub CloseErrorLog()
{
if ( $logging )
{
close(ERROR_LOG);
$logging = 0;
StopForErrors() if $stop_on_1st_error;
}
}
sub OpenErrorLog($)
{
my ($log_file) = @_;
CloseErrorLog();
if ( $log_file )
{
$log_file = full_path_to($log_file);
open(ERROR_LOG, ">$log_file") || die "Error: Can't open $log_file\n";
MacPerl::SetFileInfo("CWIE", "TEXT", $log_file);
$log_file =~ m/.+:(.+)/;
$recent_errors_file = full_path_to("$1.part");
$logging = 1;
}
}
=head2 Stopping before it's too late - C<StopForErrors()>, C<DontStopForErrors()>
When building a long list of projects, you decide whether to continue building subsequent projects when one fails.
By default, your build script will C<die> after the first project that generates an error while building.
Change this behavior with C<DontStopForErrors()>.
Re-enable it with C<StopForErrors()>.
=cut
sub StopForErrors()
{
$stop_on_1st_error = 1;
# Can't stop for errors unless we notice them.
# Can't notice them unless we are logging.
# If the user didn't explicitly request logging, log to a temporary file.
if ( ! $recent_errors_file )
{
OpenErrorLog("${TMPDIR}BuildResults");
}
}
sub DontStopForErrors()
{
$stop_on_1st_error = 0;
}
sub log_message($)
{
if ( $logging )
{
my ($message) = @_;
print ERROR_LOG $message;
}
}
sub log_message_with_time($)
{
if ( $logging )
{
my ($message) = @_;
my $time_stamp = localtime();
log_message("$message ($time_stamp)\n");
}
}
sub log_recent_errors($)
{
my ($project_name) = @_;
my $found_errors = 0;
if ( $logging )
{
open(RECENT_ERRORS, "<$recent_errors_file");
while( <RECENT_ERRORS> )
{
if ( /^Error/ || /^CouldnÕt find project file/ || /^Link Error/ )
{
# if (!$found_errors)
# print $_;
$found_errors = 1;
}
print ERROR_LOG $_;
}
close(RECENT_ERRORS);
unlink("$recent_errors_file");
}
if ( $stop_on_1st_error && $found_errors )
{
print ERROR_LOG "### Build failed.\n";
die "### Errors encountered building \"$project_name\".\n";
}
}
sub build_project($$$)
{
my ($project_path, $target_name, $clean_build) = @_;
$project_path = full_path_to($project_path);
# $project_path =~ m/.+:(.+)/;
# my $project_name = $1;
log_message_with_time("### Building \"$project_path\"");
# Check that the given project exists
if (! -e $project_path)
{
print ERROR_LOG "### Build failed.\n";
die "### Can't find project file \"$project_path\".\n";
}
print "Building \"$project_path\[$target_name\]\"\n";
$had_errors = Moz::CodeWarriorLib::build_project(
$project_path, $target_name, $recent_errors_file, $clean_build
);
WaitNextEvent();
# $had_errors =
#MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
# tell (load script file "$CodeWarriorLib") to BuildProject("$project_path", "$project_name", "$target_name", "$recent_errors_file", $clean_build)
#END_OF_APPLESCRIPT
# Append any errors to the globally accumulated log file
# if ( $had_errors ) # Removed this test, because we want warnings, too. -- jrm
{
log_recent_errors($project_path);
}
}
=head2 Getting CodeWarrior to build projects - C<BuildProject($project, $opt_target)>, C<BuildProjectClean($project, $opt_target)>
C<BuildProject()> and C<BuildProjectClean()> are identical, except that the latter first removes object code.
In both, CodeWarrior opens the project if it wasn't already open; builds the given (or else current) target; and finally closes
the project, if it wasn't already open.
=cut
sub BuildProject($;$)
{
my ($project_path, $target_name) = @_;
build_project($project_path, $target_name, 0);
}
sub BuildProjectClean($;$)
{
my ($project_path, $target_name) = @_;
build_project($project_path, $target_name, 1);
}
sub ImportXMLProject($$)
{
my ($xml_path, $project_path) = @_;
my ($codewarrior_ide_name) = Moz::CodeWarriorLib::getCodeWarriorIDEName();
# my $ascript = <<EOS;
# tell application "$codewarrior_ide_name"
# make new (project document) as ("$project_path") with data ("$xml_path")
# end tell
#EOS
# print $ascript."\n";
# my($result) = MacPerl::DoAppleScript($ascript);
# unless ($result) { die "Error: ImportXMLProject AppleScript failed $^E $result\n"; }
#
my($import_error) = Moz::CodeWarriorLib::import_project($xml_path, $project_path);
if ($import_error ne "") {
die "Error: ImportXMLProject failed with error $import_error\n";
}
}
=head2 Miscellaneous
C<MakeAlias($old_file, $new_file)> functions like C<symlink()>, except with better argument defaulting and more explicit error messages.
=cut
sub MakeAlias($$)
{
my ($old_file, $new_file) = @_;
# if the directory to hold $new_file doesn't exist, create it
if ( ($new_file =~ m/(.+:)/) && !-d $1 )
{
mkpath($1);
}
# if a leaf name wasn't specified for $new_file, use the leaf from $old_file
if ( ($new_file =~ m/:$/) && ($old_file =~ m/.+:(.+)/) )
{
$new_file .= $1;
}
my $message = "Can't create a Finder alias (at \"$new_file\")\n for \"$old_file\"; because ";
die "Error: $message \"$old_file\" doesn't exist.\n" unless -e $old_file;
die "Error: $message I won't replace an existing (non-alias) file with an alias.\n" if ( -e $new_file && ! -l $new_file );
# now: $old_file exists; $new_file doesn't (or else, is an alias already)
if ( -l $new_file )
{
# ...then see if it already points to $old_file
my $current_target = full_path_to(readlink($new_file));
my $new_target = full_path_to($old_file);
return if ( $current_target eq $new_target );
# if the desired alias already exists and points to the right thing, then we're done
unlink $new_file;
}
symlink($old_file, $new_file) || die "Error: $message symlink returned an unexpected error.\n";
}
=pod
C<InstallFromManifest()>
=cut
sub InstallFromManifest($;$$)
{
my ($manifest_file, $dest_dir, $flat) = @_;
$flat = 0 unless defined($flat); # if $flat, all rel. paths in MANIFEST get aliased to the root of $dest_dir
$dest_dir ||= ":";
$manifest_file =~ m/(.+):/;
my $source_dir = $1;
chop($dest_dir) if $dest_dir =~ m/:$/;
#Mac::Events->import();
WaitNextEvent();
if ($flat)
{
print "Doing manifest on \"$manifest_file\" FLAT\n" unless $QUIET;
}
else
{
print "Doing manifest on \"$manifest_file\"\n" unless $QUIET;
}
my $read = maniread(full_path_to($manifest_file));
foreach $file (keys %$read)
{
next unless $file;
$subdir = ":";
if (!$flat && ($file =~ /:.+:/ ))
{
$subdir = $&;
}
$file = ":$file" unless $file =~ m/^:/;
MakeAlias("$source_dir$file", "$dest_dir$subdir");
}
}
=pod
C<InstallResources()>
=cut
# parameters are path to MANIFEST file, destination dir, true (to make copies) or false (to make aliases)
sub InstallResources($;$;$)
{
my ($manifest_file, $dest_dir, $copy_files) = @_;
$dest_dir ||= ":";
mkpath($dest_dir) if !-d $dest_dir;
$manifest_file =~ m/(.+):/;
my $source_dir = $1;
chop($dest_dir) if $dest_dir =~ m/:$/;
WaitNextEvent();
print "Installing resources from \"$manifest_file\"\n" unless $QUIET;
my $read = maniread(full_path_to($manifest_file));
foreach $file (keys %$read)
{
next unless $file;
if ($copy_files)
{
copy("$source_dir:$file", "$dest_dir:$file");
}
else
{
MakeAlias("$source_dir:$file", "$dest_dir:$file");
}
}
}
#//--------------------------------------------------------------------------------------------------
#// Delay
#//--------------------------------------------------------------------------------------------------
sub Delay($)
{
my ($delay_seconds) = @_;
$now = time;
$exit_time = $now + $delay_seconds;
while ($exit_time > $now) {
$now = time;
}
}
#//--------------------------------------------------------------------------------------------------
#// GetFileModDate
#//--------------------------------------------------------------------------------------------------
sub GetFileModDate($)
{
my($filePath)=@_;
my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks) = stat($filePath);
return $mtime;
}
#//--------------------------------------------------------------------------------------------------
#// LaunchCodeWarrior
#//--------------------------------------------------------------------------------------------------
sub LaunchCodeWarrior($)
{
my($idepath_file) = @_; # full path to IDE location file
my($cur_dir) = cwd();
# this both launches and writes the IDE path file
Moz::CodeWarriorLib::activate($idepath_file);
chdir($cur_dir);
}
#//--------------------------------------------------------------------------------------------------
#// GetCodeWarriorRelativePath
#//--------------------------------------------------------------------------------------------------
sub GetCodeWarriorRelativePath($)
{
my($rel_path) = @_;
return Moz::CodeWarriorLib::getCodeWarriorPath($rel_path);
}
#//--------------------------------------------------------------------------------------------------
#// RedirectOutputToFile
#//--------------------------------------------------------------------------------------------------
sub RedirectOutputToFile($)
{
my($log_file) = @_;
# ensure that folders in the path exist
my($logdir) = "";
my($logfile) = $log_file;
if ($log_file =~ /(.+?:)([^:]+)$/) # ? for non-greedy match
{
$logdir = $1;
$logfile = $2;
mkpath($logdir);
}
print "Output is now being redirected to the file '$log_file'\n";
open(STDOUT, "> $log_file") || die "Can't redirect stdout";
open(STDERR, ">&STDOUT") || die "Can't dup stdout";
select(STDERR); $| = 1; # make unbuffered
select(STDOUT); $| = 1; # make unbuffered
MacPerl::SetFileInfo("CWIE", "TEXT", $log_file);
}
#//--------------------------------------------------------------------------------------------------
#// ActivateApplication
#//--------------------------------------------------------------------------------------------------
sub ActivateApplication($)
{
my ($appSignature) = @_;
my ($psi, $found);
my ($appPSN);
$found = 0;
foreach $psi (values(%Process))
{
if ($psi->processSignature() eq $appSignature)
{
$appPSN = $psi->processNumber();
$found = 1;
last;
}
}
if ($found == 0 || SameProcess($appPSN, GetFrontProcess()))
{
return;
}
SetFrontProcess($appPSN);
while (GetFrontProcess() != $appPSN)
{
WaitNextEvent();
}
}
#//--------------------------------------------------------------------------------------------------
#// IsProcessRunning
#//--------------------------------------------------------------------------------------------------
sub IsProcessRunning($)
{
my($processName, $psn, $psi) = @_;
while ( ($psn, $psi) = each(%Process) ) {
if ($psi->processName eq $processName) { return 1; }
}
return 0;
}
1;
=head1 AUTHORS
Scott Collins <scc@netscape.com>, Simon Fraser <sfraser@netscape.com>, Chris Yeh <cyeh@netscape.com>
=head1 SEE ALSO
BuildMozillaDebug.pl (et al), BuildList.pm, CodeWarriorLib (an AppleScript library)
=head1 COPYRIGHT
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
=cut

View File

@@ -0,0 +1,273 @@
package Moz::Prefs;
require 5.004;
require Exporter;
# Package that attempts to read a file from the Preferences folder,
# and get build settings out of it
use strict;
use Exporter;
use File::Path;
use Mac::Files;
use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter);
@EXPORT = qw(ReadMozUserPrefs);
#-------------------------------------------------------------------------------
#
# GetPrefsFolder
#
#-------------------------------------------------------------------------------
sub GetPrefsFolder()
{
my($prefs_folder) = FindFolder(kOnSystemDisk, kPreferencesFolderType, 1);
return $prefs_folder.":Mozilla build prefs";
}
#-------------------------------------------------------------------------------
#
# SetArrayValue
#
#-------------------------------------------------------------------------------
sub SetArrayValue($$$)
{
my($array_ref, $index1, $index2) = @_;
my($index);
foreach $index (@$array_ref)
{
if ($index->[0] eq $index1)
{
$index->[1] = $index2;
return 1;
}
}
return 0;
}
#-------------------------------------------------------------------------------
#
# WriteDefaultPrefsFile
#
#-------------------------------------------------------------------------------
sub WriteDefaultPrefsFile($)
{
my($file_path) = @_;
my($file_contents);
$file_contents = <<'EOS';
% You can use this file to customize the Mozilla build system.
% The following kinds of lines are allowable:
% Comment lines, which start with a '%' in the first column
% Lines which modify the default build settings. For the list of flags,
% see MozBuildFlags.pm. Examples are:
%
% build pull 0 % don't pull
% options mng 1 % turn mng on
%
% Line containing the special 'buildfrom' flag, which specifies
% where to start the build. Example:
%
% buildfrom nglayout % where to start the build
%
% Lines which specify the location of the files used to store paths
% to the CodeWarrior IDE, and the MacCVS Pro session file. Note quoting
% of paths containing whitespace. Examples:
%
% filepath idepath ::codewarrior.txt
% filepath sessionpath ":Some folder:MacCVS session path.txt"
%
% Lines which modify the build settings like %main::DEBUG.
% Any lines which do not match either of the above are assumed
% to set variables on $main::. Examples:
%
% CARBON 1
% MOZILLA_OFFICIAL 1
%
EOS
$file_contents =~ s/%/#/g;
local(*PREFS_FILE);
open(PREFS_FILE, "> $file_path") || die "Could not write default prefs file\n";
print PREFS_FILE ($file_contents);
close(PREFS_FILE);
MacPerl::SetFileInfo("McPL", "TEXT", $file_path);
}
#-------------------------------------------------------------------------------
#
# HandlePrefSet
#
#-------------------------------------------------------------------------------
sub HandlePrefSet($$$$)
{
my($flags, $name, $value, $desc) = @_;
if (SetArrayValue($flags, $name, $value)) {
print "Prefs set $desc flag '$name' to '$value'\n";
} else {
die "$desc setting '$name' is not a valid option\n";
}
}
#-------------------------------------------------------------------------------
#
# HandleBuildFromPref
#
#-------------------------------------------------------------------------------
sub HandleBuildFromPref($$)
{
my($build_array, $name) = @_;
my($setting) = 0;
my($index);
foreach $index (@$build_array)
{
if ($index->[0] eq $name) {
$setting = 1;
}
$index->[1] = $setting;
}
if ($setting == 1) {
print "Building from $name onwards, as specified by prefs\n";
} else {
printf "Failed to find buildfrom setting '$name'\n";
}
}
#-------------------------------------------------------------------------------
#
# ReadPrefsFile
#
#-------------------------------------------------------------------------------
sub ReadPrefsFile($$$$$)
{
my($file_path, $build_flags, $options_flags, $filepath_flags, $create_if_missing) = @_;
local(*PREFS_FILE);
if (open(PREFS_FILE, "< $file_path"))
{
print "Reading build prefs from '$file_path'\n";
while (<PREFS_FILE>)
{
my($line) = $_;
chomp($line);
if ($line =~ /^\#/ || $line =~ /^\s*$/) { # ignore comments and empty lines
next;
}
if (($line =~ /^\s*([^#\s]+)\s+([^#\s]+)\s+\"(.+)\"(\s+#.+)?/) ||
($line =~ /^\s*([^#\s]+)\s+([^#\s]+)\s+\'(.+)\'(\s+#.+)?/) ||
($line =~ /^\s*([^#\s]+)\s+([^#\s]+)\s+([^#\s]+)(\s+#.+)?/))
{
my($array_name) = $1;
my($option_name) = $2;
my($option_value) = $3;
# print "Read '$array_name' '$option_name' '$option_value'\n";
if ($array_name eq "build")
{
HandlePrefSet($build_flags, $option_name, $option_value, "Build");
}
elsif ($array_name eq "options")
{
HandlePrefSet($options_flags, $option_name, $option_value, "Options");
}
elsif ($array_name eq "filepath" && $option_name && $option_value)
{
HandlePrefSet($filepath_flags, $option_name, $option_value, "Filepath");
}
else
{
print "Unknown pref option at $line\n";
}
}
elsif ($line =~ /^\s*buildfrom\s+([^#\s]+)(\s+#.+)?/)
{
my($build_start) = $1;
HandleBuildFromPref($build_flags, $build_start);
}
elsif ($line =~ /^\s*([^#\s]+)\s+([^#\s]+)(\s+#.+)?/)
{
my($build_var) = $1;
my($var_setting) = $2;
print "Setting \$main::$build_var to $var_setting\n";
eval "\$main::$build_var = \"$var_setting\"";
}
else
{
print "Unrecognized input line at $line\n";
}
}
close(PREFS_FILE);
}
elsif ($create_if_missing)
{
print "No prefs file found at $file_path; using defaults\n";
my($folder_path) = $file_path;
$folder_path =~ s/[^:]+$//;
mkpath($folder_path);
WriteDefaultPrefsFile($file_path);
}
}
#-------------------------------------------------------------------------------
#
# ReadMozUserPrefs
#
#-------------------------------------------------------------------------------
sub ReadMozUserPrefs($$$$)
{
my($prefs_file_name, $build_flags, $options_flags, $filepath_flags) = @_;
if ($prefs_file_name eq "") { return; }
# if local prefs exist, just use those. Othewise, look in the prefs folder
if (-e $prefs_file_name)
{
# read local prefs
ReadPrefsFile($prefs_file_name, $build_flags, $options_flags, $filepath_flags, 0);
}
else
{
# first read prefs folder prefs
my($prefs_path) = GetPrefsFolder();
$prefs_path .= ":$prefs_file_name";
ReadPrefsFile($prefs_path, $build_flags, $options_flags, $filepath_flags, 1);
}
}
1;

View File

@@ -0,0 +1,54 @@
#-------------------------------------------------------------------------------
# These 3 lists are the 'master lists' to control what gets built.
#
# Ordering in these arrays is important; it has to reflect the order in
# which the build occurs.
#
# Setting containing spaces must be quoted with double quotes.
#-------------------------------------------------------------------------------
build_flags
all 1
pull 0
dist 0
xpidl 0
idl 0
stubs 0
runtime 0
common 0
imglib 0
necko 0
security 0
browserutils 0
intl 0
nglayout 0
editor 0
embedding 0
viewer 0
xpapp 0
extensions 0
plugins 0
mailnews 0
apprunner 0
resources 0
options_flags
chrome_jars 1
chrome_files 0
use_jars 1
transformiix 0
mathml 0
svg 0
mng 1
ldap 0
xmlextras 0
mailextras 1
xptlink 0
psm 0
embedding_test 1
filepath_flags
idepath ":CodeWarrior IDE Path.txt"
sessionpath ":Mozilla session path.txt"
buildlogfilepath ":Build Logs:Mozilla build log.txt" # this is a path
scriptlogfilepath ":Build Logs:Mozilla script log.txt"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
# List of modules to check out. Format is
# module, (tag), (date)
# where tag and date are optional (non-trailing commas are required)
#
# Examples:
# mozilla/nsprpub, NSPRPUB_CLIENT_BRANCH
# mozilla/gc, , 10/25/2000 12:00:00
#
#mozilla/nsprpub, NSPRPUB_CLIENT_BRANCH
#mozilla/security/nss, NSS_CLIENT_TAG
#mozilla/security/psm,
#DirectorySDKSourceC, LDAPCSDK_40_BRANCH
#mozilla/lib/mac/Instrumentation
SeaMonkeyAll, MailNews_Performance_20010208_BRANCH

View File

@@ -0,0 +1,78 @@
#!perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Simon Fraser <sfraser@netscape.com>
#
require 5.004;
use strict;
use Cwd;
use Moz::BuildUtils;
use Moz::BuildCore;
#-------------------------------------------------------------
# Where have the build options gone?
#
# The various build flags have been centralized into one place.
# The master list of options is in MozBuildFlags.txt. However,
# you should never need to edit that file, or this one.
#
# To customize what gets built, or where to start the build,
# edit the $prefs_file_name file in
# System Folder:Preferences:Mozilla build prefs:
# Documentation is provided in that file.
#-------------------------------------------------------------
my($prefs_file_name) = "Mozilla pull prefs";
#-------------------------------------------------------------
# hashes to hold build options
#-------------------------------------------------------------
my(%build);
my(%options);
my(%filepaths);
my(%optiondefines);
# Hash of input files for this build. Eventually, there will be
# input files for manifests, and projects too.
my(%inputfiles) = (
"buildflags", "MozillaBuildFlags.txt",
"checkoutdata", "MozillaCheckoutList.txt",
"buildprogress", "",
"buildmodule", "MozillaBuildList.pm"
);
#-------------------------------------------------------------
# end build hashes
#-------------------------------------------------------------
# set the build root directory, which is the the dir above mozilla
SetupBuildRootDir(":mozilla:build:mac:build_scripts");
# Set up all the flags on $main::, like DEBUG, CARBON etc.
# Override the defaults using the preferences files.
SetupDefaultBuildOptions(0, ":mozilla:dist:viewer:");
my($do_checkout) = 1;
my($do_build) = 0;
RunBuild($do_checkout, $do_build, \%inputfiles, $prefs_file_name);

View File

@@ -0,0 +1,4 @@
This directory is merely here to test the project editor server. It will go away after
it is validated. For more information, see http://camelot.
Testing watchers.

Binary file not shown.

View File

@@ -0,0 +1 @@
// test1.cpp

View File

@@ -0,0 +1 @@
// test2.cpp

Binary file not shown.

View File

@@ -0,0 +1 @@
// test2.cpp

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,4 @@
// test2.cpp
as
dfasdf

View File

@@ -0,0 +1,12 @@
#include <stdio.h>
#include <ConditionalMacros.h>
int main(int argc, char* argv[])
{
FILE* file = fopen("BuildSystemInfo.pm", "w");
if (file != NULL) {
fprintf(file, "$UNIVERSAL_INTERFACES_VERSION=0x%04X;\n", UNIVERSAL_INTERFACES_VERSION);
fclose(file);
}
}

View File

@@ -0,0 +1,5 @@
- Currently, we do a fairly conservative (--disable a lot) build; find
out what works already.
- More libraries could be put in separate packages, like mailnews and
editor are.

View File

@@ -0,0 +1,279 @@
mozilla (19990716.M8-3) unstable; urgency=low
* Updated with build rules for the new mozilla-provided CVS directory.
* Register as MIME-handler (Close Bug# 42206)
-- Brent A. Fulgham <bfulgham@debian.org> Tue, 3 Aug 1999 09:15:17 -0700
mozilla (19990716.M8-2) unstable; urgency=low
* Added fix for m68k in hashtable function (Res. Bug# 41267)
* More robust /usr/bin/mozilla (Res. Bug# 41912)
* Remove suggestion for obsolete x11amp (Res. Bug# 41181)
-- Brent A. Fulgham <bfulgham@debian.org> Tue, 27 Jul 1999 09:15:17 -0700
mozilla (19990716.M8-1) unstable; urgency=low
* This is SeaMonkey Milestone 8.
-- Brent A. Fulgham <bfulgham@debian.org> Thu, 22 Jul 1999 21:20:10 -0700
mozilla (19990624.M7-1) unstable; urgency=low
* This is SeaMonkey Milestone 7 !
* Removed the so-called upstream changelog (fixes #39307 #39496 #40368).
* Retried building without the static libraries. It actually worked,
after two Makefile.ins backports from M8 :)
-- Josip Rodin <jrodin@jagor.srce.hr> Sat, 3 Jul 1999 14:09:18 +0200
mozilla (19990529.M6-1) unstable; urgency=low
* This is SeaMonkey Milestone 6 !
-- Josip Rodin <jrodin@jagor.srce.hr> Mon, 31 May 1999 20:46:16 +0200
mozilla (19990527-1) unstable; urgency=low
* Another try, the previous one didn't build, stopped in xpidl/build/
* Fresh tarball from the FTP site.
* I'll give up with NO_STATIC_LIB for now, let's just make something.
* First attempt on the editor exclusion (in mozilla-editor package).
-- Josip Rodin <jrodin@jagor.srce.hr> Fri, 28 May 1999 16:08:56 +0200
mozilla (19990526-1) unstable; urgency=low
* New one, this time with .orig.tar.gz cleaned up.
-- Josip Rodin <jrodin@jagor.srce.hr> Thu, 27 May 1999 19:31:13 +0200
mozilla (19990524-1) unstable; urgency=low
* Another new tree, probably the last before M6 releases. Maybe it'll
even build, who knows? ;)
-- Josip Rodin <jrodin@jagor.srce.hr> Tue, 25 May 1999 16:11:57 +0200
mozilla (19990521-1) unstable; urgency=low
* Another try, more testing of --disable-static and some changes to
the rules file. Applied some more recent patches from CVS.
* Build NSPR with pthreads support.
* Building on pandora (fast!), but it'll depend on glibc2.1 :(
-- Josip Rodin <jrodin@jagor.srce.hr> Sun, 23 May 1999 14:10:53 +0200
mozilla (19990518-1) unstable; urgency=low
* Bypassed the dangling symlinks with a "-" :(
* Added some Conflicts/Replaces to libnspr to prevent clashes with the
previous (unreleased) versions of it, 20 and 21.
* Brent decided to split out mailnews from the main package, so it's
now in mozilla-mailnews package. Quite a lot of changes to the rules
and control file. Added appropriate Provides: because of that, so
that's one less TODO item.
-- Josip Rodin <jrodin@jagor.srce.hr> Wed, 19 May 1999 04:10:07 -0700
mozilla (19990515-1) unstable; urgency=low
* Another try. Incorporated some changes as seen in M4's spec file
that was used to build the RPM.
* Fixed debian/control NSPR entries.
-- Josip Rodin <jrodin@jagor.srce.hr> Sun, 16 May 1999 05:30:39 -0700
mozilla (19990513-1) unstable; urgency=low
* Try, try again.
-- Brent A. Fulgham <bfulgham@debian.org> Thu, 13 May 1999 09:50:20 -0700
mozilla (19990510-1) unstable; urgency=low
* A possibly working build from the FTP site, since M5 didn't manage
to build :(
* NSPR renamed to libnspr3{-dev}, as one of the upstream people advised.
-- Josip Rodin <jrodin@jagor.srce.hr> Thu, 13 May 1999 05:08:24 -0700
mozilla (19990505.M5-1) unstable; urgency=low
* This is SeaMonkey Milestone 5 !
* The previous M4 builds didn't work out. This was released on my
birthday, so it could even work ;)
-- Josip Rodin <jrodin@jagor.srce.hr> Mon, 10 May 1999 00:27:47 -0700
mozilla (19990415.M4-2) unstable; urgency=low
* Let's try once again - the previous build was kinda fscked up...
-- Josip Rodin <jrodin@jagor.srce.hr> Sun, 9 May 1999 15:08:39 -0700
mozilla (19990415.M4-1) unstable; urgency=low
* This is SeaMonkey Milestone 4 !
* Massive changes to debian/rules, now it actually works :o)
+ builds in a subdirectory (yipee!)
+ removes unneeded Makefiles
+ installs a proper copyright file
* NSPR renamed to libnspr21{-dev}, thought I'm not sure it is the
real version... we still have to hardcode the dependency :(
-- Josip Rodin <jrodin@jagor.srce.hr> Tue, 4 May 1999 01:41:22 -0700
mozilla (19990410-1) unstable; urgency=low
* Let's try this snapshot from FTP... I modified the debian/rules file
a bit.
-- Josip Rodin <jrodin@jagor.srce.hr> Sat, 10 Apr 1999 19:17:59 -0700
mozilla (19990402-1) unstable; urgency=low
* New CVS pull. First attempt at mail and editor support.
-- Brent A. Fulgham <bfulgham@debian.org> Fri, 2 Apr 1999 09:15:22 -0800
mozilla (19990331-1) unstable; urgency=low
* New build, using automated script to grab the latest stable
branch from CVS.
-- Brent A. Fulgham <bfulgham@debian.org> Wed, 31 Mar 1999 14:58:40 -0800
mozilla (19990326-1) unstable; urgency=low
* Updated to fix library so-name and shlibdepends problem.
* Current CVS pull
* Double-double check that debugging is turned off.
-- Brent A. Fulgham <bfulgham@debian.org> Fri, 26 Mar 1999 09:31:45 -0800
mozilla (19990325-1) unstable; urgency=low
* Updated for fix to (hopefully) stop segfault problem.
-- Brent A. Fulgham <bfulgham@debian.org> Thu, 25 Mar 1999 12:58:18 -0800
mozilla (19990323-1) unstable; urgency=low
* This is a test release using CVS snapshots
* Continuing to use Ray's debian/ dir (thanks again!).
* Change moz-wrapper to use "apprunner" instead of the viewer (viewer is just
a test application.
* Whoo-hoo -- it's running!
-- Brent A. Fulgham <bfulgham@debian.org> Tue, 23 Mar 1999 14:25:07 -0800
mozilla (19990317-1) unstable; urgency=low
* This is a test release done just to get things moving.
* Built on va from a snapshot, using Ray's debian/ dir (thanks!).
-- Josip Rodin <jrodin@jagor.srce.hr> Sun, 21 Mar 1999 15:37:16 -0800
mozilla (19981211-0.1) unstable; urgency=low
* UNRELEASED
* UNFINISHED. TODO:
* Check we're not compiling -DDEVELOPER_DEBUG.
* Ensure nsprpub/config/UNIX.mk doesn't get a hardwired x86 reference.
* Remove the ?widgets/src/gdk/depend.mk? as part of clean.
* Remove the autogenerated files of htmlparser/src.
* ~/.mozilla -> ~/.netscape fixes bug #?????.
* Non-maintainer upload.
* New upstream tarball:
* Includes glibc2.1 patches.
* Configuration dir is now ~/.mozilla rather than ~/.netscape.
* Default widget set has switched from Motif to Gtk. The Gtk version
needed is newer than the one in frozen, so this for unstable only.
* Moved libnspr into packages of its own (as non-mozilla software like
Japhar uses it) and made mozilla depend on the runtime library package.
* Removed YAFHintel (thanks to John Goerzen for reminding me).
* [nsprpub/config/rules.mk] Use standard naming of shared library files
and SONAMEs.
* Make sure mozilla gets linked against the system libjpeg, libpng,
libz and libxmltok1 (Fixes #30306).
-- J.H.M. Dassen (Ray) <jdassen@wi.LeidenUniv.nl> Sun, 10 Jan 1999 20:02:19 +0100
mozilla (19981008-0.1) frozen unstable; urgency=low
* Non-maintainer upload.
* New upstream tarball.
* Adapted build process to it (nspr doesn't use autoconf and needs to be
built before the regular autoconf build).
* Built with fixed libc6 (and other fixed libs), so it works again.
* Updated Standards-Version.
* [config/Linux.mk] Added EXTRA_DSO_LDOPTS = -lc to add dependency
information to the shared libraries generated.
* [nsprlib/config/Linux.mk] Added OS_LIBS = -lc to add dependency
information to the shared libraries generated.
-- J.H.M. Dassen (Ray) <jdassen@wi.LeidenUniv.nl> Sat, 28 Nov 1998 18:29:06 +0100
mozilla (19980904-1) unstable; urgency=low
* Non-maintainer upload: this package has been orphaned.
* Used latest snapshot tarball; as no real mozilla releases have been made
so far, we use the snapshot date for the version number.
* Previous versions were accidentally built as "Debian only" source.
* Updated Standards-Version.
* Adapted to current mozilla source organisation and build process.
* LessTif version, so mozilla can go in main.
* Improved package relationships:
* Added Provides: www-browser .
* Added Recommends: mime-support .
* Added Suggest dependency for postscript-viewer, pdf-viewer, images
formats viewers, video formats viewers and audio formats players.
* Added mozilla(1) -> unknown(7) manpage symlink.
-- J.H.M. Dassen (Ray) <jdassen@wi.LeidenUniv.nl> Thu, 10 Sep 1998 21:58:26 +0200
mozilla (5.0b1-2) unstable; urgency=low
* Made mozilla-smotif and mozilla-dmotif conflict with and replace each
other; both now provide mozilla, so that we can cope with a lesstif
version when there is one.
* Put packages in contrib and added a README.contrib-only file to explain
why.
* Tweaked ns/cmd/xfe/Makefile to force a build of the dynamic Motif version.
My previous change to this had made both versions dynamically linked to
Motif. With no change at all, both versions were statically linked.
-- Oliver Elphick <Oliver.Elphick@lfix.co.uk> Wed, 8 Apr 1998 13:17:10 +0100
mozilla (5.0b1-1) unstable; urgency=low
* Linked with Motif 2.1 and libc6
* Modified ns/cmd/xfe/Makefile to force it to build a version dynamically
linked to Motif.
* Created -smotif and -dmotif packages.
* New Maintainer
-- Oliver Elphick <Oliver.Elphick@lfix.co.uk> Tue, 7 Apr 1998 11:25:16 +0100
mozilla (5.0b1-0.0) unstable; urgency=low
* First release.
* I don't intend to maintain this package becuase:
1. I don't have a libc6 motif (this is built with a libc5 motif, though
the package only depends on libc6 and it works ok). Ideally, the
maintainer should have libc6 motif.
2. I don't have enough disk space, cpu time, bandwidth, or free time to
maintain it.
So this is just a quickie to get the package out. Somebody else should
take it from here.
* Applied some minor fixes to make it work. In particular, cmd/xfe/foo.c
is a nasty hack to define a symbol that my motif libs needed.
-- Joey Hess <joeyh@master.debian.org> Tue, 31 Mar 1998 16:43:55 -0800
Local variables:
mode: debian-changelog
End:

View File

@@ -0,0 +1,101 @@
Source: mozilla
Section: net
Priority: optional
Maintainer: Debian Mozilla maintainers <mozilla@packages.debian.org>
Standards-Version: 2.5.1
Package: mozilla
Architecture: any
Depends: ${shlibs:Depends}, libnspr3
Recommends: mime-support
Suggests: postscript-viewer, pdf-viewer, eeyes | imagemagick | netpbm | xli | xloadimage | xv, xanim | ucbmpeg-play, freeamp | amp | splay | maplay | mpg123 | xmms
Conflicts: mozilla-dmotif, mozilla-smotif
Replaces: mozilla-dmotif, mozilla-smotif
Provides: www-browser
Description: An Open Source WWW browser for X and GTK+
Mozilla is a sophisticated graphical World-Wide-Web browser, with large
number of various browser features like support for HTML 4.0, CSS 2,
JavaScript and Java. Of course, besides the network option, it can also
be used as a standalone HTML viewer.
.
Mozilla is based on part of the codebase of the well known "netscape"
("communicator" or "navigator") browser. It was opened up to the Open
Source (TM) community by Netscape Communications under a new NPL licence.
.
See the website http://www.mozilla.org/ for more information on the
development of mozilla.
Package: mozilla-mailnews
Architecture: any
Depends: mozilla (= ${Source-Version}), libnspr3
Recommends: mime-support
Suggests: mail-transport-agent
Provides: mail-reader, imap-client, news-reader
Description: An Open Source WWW browser for X and GTK+, mail and news files
Mozilla is a sophisticated graphical World-Wide-Web browser, with large
number of various browser features like support for HTML 4.0, CSS 2,
JavaScript and Java. Of course, besides the network option, it can also
be used as a standalone HTML viewer.
.
Mozilla is based on part of the codebase of the well known "netscape"
("communicator" or "navigator") browser. It was opened up to the Open
Source (TM) community by Netscape Communications under a new NPL licence.
.
See the website http://www.mozilla.org/ for more information on the
development of mozilla.
Package: mozilla-editor
Architecture: any
Depends: mozilla (= ${Source-Version}), libnspr3
Suggests: httpd
Description: An Open Source WWW browser for X and GTK+, editor files
Mozilla is a sophisticated graphical World-Wide-Web browser, with large
number of various browser features like support for HTML 4.0, CSS 2,
JavaScript and Java. Of course, besides the network option, it can also
be used as a standalone HTML viewer.
.
Mozilla is based on part of the codebase of the well known "netscape"
("communicator" or "navigator") browser. It was opened up to the Open
Source (TM) community by Netscape Communications under a new NPL licence.
.
See the website http://www.mozilla.org/ for more information on the
development of mozilla.
Package: libnspr3
Section: libs
Architecture: any
Depends: ${shlibs:Depends}
Conflicts: libnspr20, libnspr21
Replaces: libnspr20, libnspr21
Description: Netscape Portable Runtime library
This library provides platform independent non-GUI operating system
facilities including:
* threads,
* thread synchronisation,
* normal file I/O and network I/O,
* interval timing and calender time,
* basic memory management (malloc and free),
* shared library linking.
.
See http://www.mozilla.org/docs/refList/refNSPR/ for more information.
Package: libnspr3-dev
Section: libs
Architecture: any
Depends: libc6-dev, xlib6g-dev, libnspr3 (= ${Source-Version})
Conflicts: libnspr20-dev, libnspr21-dev
Replaces: libnspr20-dev, libnspr21-dev
Description: Netscape Portable Runtime library - development files
NSPR provides platform independence for non-GUI operating system
facilities including:
* threads,
* thread synchronisation,
* normal file I/O and network I/O,
* interval timing and calender time,
* basic memory management (malloc and free),
* shared library linking.
.
See http://www.mozilla.org/docs/refList/refNSPR/ for more information.
.
You need this package to get includes and static libraries for building
programs linked to NSPR.

View File

@@ -0,0 +1,13 @@
This package was originally put together by Joey Hess <joeyh@debian.org>.
People who contributed were: Oliver Elphick, J.H.M. Dassen (Ray),
Josip Rodin, Brent Fulgham.
Today, package is maintained by the maintenance team which consists
of Josip Rodin and Brent Fulgham, at <mozilla@packages.debian.org>.
Original source can be found at:
ftp://ftp.mozilla.org/pub/mozilla/releases/
ftp://ftp.mozilla.org/pub/mozilla/nightly/
The following copyright (from ../LICENCE) applies to this package:

View File

@@ -0,0 +1,5 @@
mozilla_19990716.M8-3_i386.deb net optional
mozilla-mailnews_19990716.M8-3_i386.deb net optional
mozilla-editor_19990716.M8-3_i386.deb net optional
libnspr3_19990716.M8-3_i386.deb libs optional
libnspr3-dev_19990716.M8-3_i386.deb libs optional

View File

@@ -0,0 +1,4 @@
usr/lib
usr/include/nspr
usr/doc

View File

@@ -0,0 +1,2 @@
usr/lib
usr/doc

View File

@@ -0,0 +1,6 @@
#! /bin/sh
set -e
if [ "$1" = "configure" ]; then
ldconfig
fi

View File

@@ -0,0 +1,3 @@
libnspr3 libnspr3
libplc3 libnspr3
libplds3 libnspr3

View File

@@ -0,0 +1 @@
shlibs:Depends=libc6 (>= 2.1)

View File

@@ -0,0 +1,2 @@
?package(mozilla):needs="x11" section="Apps/Net" \
title="Mozilla Navigator" command="mozilla"

View File

@@ -0,0 +1,4 @@
usr/lib/mozilla
usr/lib/mozilla/components
usr/lib/mozilla/chrome/editor
usr/doc

View File

@@ -0,0 +1,2 @@
usr/lib/mozilla/components/libeditor.so
usr/lib/mozilla/chrome/editor

View File

@@ -0,0 +1 @@
shlibs:Depends=libc6 (>= 2.1), libstdc++2.9-glibc2.1

View File

@@ -0,0 +1,9 @@
usr/lib/mozilla
usr/lib/mozilla/chrome
usr/lib/mozilla/chrome/addressbook
usr/lib/mozilla/chrome/messenger
usr/lib/mozilla/chrome/messengercompose
usr/lib/mozilla/components
usr/lib/mozilla/res
usr/lib/mozilla/res/mailnews
usr/doc

View File

@@ -0,0 +1,15 @@
usr/lib/mozilla/libmsgbaseutil.so
usr/lib/mozilla/chrome/addressbook
usr/lib/mozilla/chrome/messenger
usr/lib/mozilla/chrome/messengercompose
usr/lib/mozilla/components/addrbook.xpt
usr/lib/mozilla/components/libaddrbook.so
usr/lib/mozilla/components/liblocalmail.so
usr/lib/mozilla/components/libmailnews.so
usr/lib/mozilla/components/libmime*.so
usr/lib/mozilla/components/libmork.so
usr/lib/mozilla/components/libmsg*.so
usr/lib/mozilla/components/libvcard.so
usr/lib/mozilla/components/mailnews.xpt
usr/lib/mozilla/components/msg*.xpt
usr/lib/mozilla/res/mailnews

View File

@@ -0,0 +1 @@
shlibs:Depends=libc6 (>= 2.1), libstdc++2.9-glibc2.1

View File

@@ -0,0 +1,6 @@
usr/bin
usr/lib/mozilla
usr/lib/mozilla/chrome
usr/lib/mozilla/components
usr/lib/mozilla/res
usr/doc/mozilla

View File

@@ -0,0 +1,2 @@
text/html; /usr/bin/mozilla %s; description=HTML Text; nametemplate=%s.html; priority=3

View File

@@ -0,0 +1,6 @@
# Automatically added by dh_installmime
if [ -x /usr/sbin/update-mime ]; then update-mime; fi
# End automatically added section
# Automatically added by dh_installmenu
if test -x /usr/bin/update-menus ; then update-menus ; fi
# End automatically added section

View File

@@ -0,0 +1,6 @@
# Automatically added by dh_installmime
if [ -x /usr/sbin/update-mime ]; then update-mime; fi
# End automatically added section
# Automatically added by dh_installmenu
if test -x /usr/bin/update-menus ; then update-menus ; fi
# End automatically added section

View File

@@ -0,0 +1,117 @@
#!/usr/bin/make -f
# Derived from debhelper/dh_make example.
#export DH_VERBOSE=1
# Set by configure (plus USE_AUTOCONF=1), but useful for NSPR
export MOZILLA_CLIENT=1
export BUILD_OPT=1
export NO_STATIC_LIB=1
# untested upstream - export USE_IPV6=$(shell cpp debian/testipv6 | sh -)
export USE_PTHREADS=1
nspr = libnspr3
nsprdev = libnspr3-dev
mailnews = mozilla-mailnews
editor = mozilla-editor
TOP=..
build: build-stamp
build-stamp:
dh_testdir
test -d build-nspr || mkdir build-nspr
test -s build-nspr/lib/$(nspr).so || $(MAKE) -C nsprpub DIST=`pwd`/build-nspr
test -d obj-`./build/autoconf/config.guess` || mkdir obj-`./build/autoconf/config.guess`
cd obj-`./build/autoconf/config.guess` && \
LD_LIBRARY_PATH=`cd ..;pwd`/build-nspr/lib \
$(TOP)/configure --verbose --prefix=/usr \
--disable-debug --disable-profile --disable-crypto \
--disable-netcast --disable-java --disable-oji --disable-static \
--disable-tests --disable-smart-mail --enable-mailnews \
--enable-editor --enable-ldap --enable-optimize --with-pthreads \
--with-jpeg=/usr/include --with-png=/usr/include \
--with-zlib=/usr/include --with-nspr=`cd $(TOP);pwd`/build-nspr
cd obj-`./build/autoconf/config.guess` && LD_LIBRARY_PATH=`cd $(TOP);pwd`/build-nspr/lib $(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp install-stamp
-cd nsprpub ; $(MAKE) realclean
rm -rf build-nspr obj-`./build/autoconf/config.guess`
# find . -type f -name Makefile ! -path '*nsprpub*' | xargs -r rm
dh_clean
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs -a
cp -pR build-nspr/lib/*.so* `pwd`/debian/$(nspr)/usr/lib
cd `pwd`/debian/$(nspr)/usr/lib ; /sbin/ldconfig -n .
# cd `pwd`/debian/$(nspr)/usr/lib ; for i in * ; do ln -s $$i $$i.0 ; done
cp -pR build-nspr/include/* `pwd`/debian/$(nsprdev)/usr/include/nspr
cp -pR build-nspr/lib/*.a `pwd`/debian/$(nsprdev)/usr/lib
# this may fail, but who cares
-cp -pR obj-`./build/autoconf/config.guess`/dist/bin/* `pwd`/debian/tmp/usr/lib/mozilla
install -m 755 `pwd`/debian/runner `pwd`/debian/tmp/usr/bin/mozilla
# # Okay, lets move a bunch of mail-news stuff to its own place
# Note: We have to cd and set sourcedir because the debian directory
# now lives in mozilla/build/package and dh_movefiles won't work
# across the symlink.
cd `pwd`/build/package; \
dh_movefiles --sourcedir=debian/tmp -a
touch install-stamp
binary-indep: build
# We have nothing to do by default, no architecture-independent files here.
binary-arch: build install
dh_testdir -a
dh_testroot -a
cd debian/ ; cat copyright.short > copyright
cat LICENSE >> debian/copyright
dh_installdocs -pmozilla LEGAL
dh_installdocs -p$(nspr)
dh_installmime -pmozilla
rm debian/copyright
# dh_installexamples `find -name '*.ad'`
dh_installmenu -pmozilla
# Running this is a baaad idea.
# dh_installmanpages
dh_undocumented -pmozilla mozilla.1
dh_installchangelogs -pmozilla
dh_installchangelogs -p$(nspr)
cd `pwd`/debian/$(nsprdev)/usr/doc ; ln -s /usr/doc/$(nspr) ./$(nsprdev)
cd `pwd`/debian/$(mailnews)/usr/doc ; ln -s /usr/doc/mozilla ./$(mailnews)
cd `pwd`/debian/$(editor)/usr/doc ; ln -s /usr/doc/mozilla ./$(editor)
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
cd debian ; cat $(nspr).shlibs > shlibs.local
env LD_LIBRARY_PATH=`pwd`/debian/$(nspr)/usr/lib:`pwd`/debian/tmp/usr/lib/mozilla \
dh_shlibdeps -pmozilla -plibnspr3 -p$(mailnews) -p$(editor)
rm -f debian/shlibs.local
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary # quicktest make

View File

@@ -0,0 +1,20 @@
#!/bin/sh
# A simple script to start mozilla.
MOZILLA_DIR=/usr/lib/mozilla
# Check for a $HOME/.mozilla directory. If it doesn't exist, create a GOOD one
if [ ! -d $HOME/.mozilla ]
then
cd $HOME
mkdir .mozilla
for file in $MOZILLA_DIR/*; do
if [ `basename $file` != component.reg ]; then
ln -s $file $HOME/.mozilla
fi
done
fi
export LD_LIBRARY_PATH=$MOZILLA_DIR MOZILLA_FIVE_HOME=$HOME/.mozilla
exec $MOZILLA_DIR/apprunner "$@"

View File

@@ -0,0 +1 @@
shlibs:Depends=libc6 (>= 2.1), libglib1.2 (>= 1.2.0), libgtk1.2 (>= 1.2.3-2), libjpeg62, libpng2, libstdc++2.9-glibc2.1, orbit (>= 0.4.3-1), xlib6g (>= 3.3.3.1-1), zlib1g (>= 1:1.1.3)

View File

@@ -0,0 +1,8 @@
#include <features.h>
#if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC__ + __GLIBC_MINOR__ >= 3)
/* For IPv6 support, glibc2.1 or newer is required */
echo 1
#else
/* Sorry, no IPv6 support */
echo 0
#endif

View File

@@ -0,0 +1,252 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# The way this thing works:
#
# + A packages file is parsed. This file contains something
# that looks like this (note that spaces are illegal):
#
# +----------------------------------------------
# |nspr:nsprpub
# |core:build,db,xpcom,intl,js,modules/libutil,modules/security/freenav,modules/libpref,modules/libimg,modules/libjar,caps
# |network:netwerk
# |layout:htmlparser,gfx,dom,view,widget/timer,widget,layout,webshell,editor,modules/plugin
# |xpinstall:xpinstall
# |profile:profile
# |xptoolkit:xpfe,rdf
# |cookie:extensions/cookie
# |wallet:extensions/wallet
# |mailnews:mailnews
# +----------------------------------------------
#
# + For each package, a list of modules corresponding to that
# package is parsed. Each modules corresponds to a
# directory somewhere in a mozilla build tree - usually
# the toplevel ones (ie, layout, nsprpub, xpcom) but not
# always (ie, extensions/wallet)
#
# + For each module, print-module-filelist.sh is invoked.
# The output of that is parsed and converted from the
# crazy mozilla install hierarchy to something that
# makes sense on a linux box.
#
# For example:
#
# bin/components/libraptorhtml.so
#
# becomes
#
# %{prefix}/lib/mozilla/components/libraptorhtml.so
#
# + Also, this script determines which files belong in
# a devel package. For example, "include/*" and "idl/*"
name=generate-package-info.sh
if [ $# -lt 4 ]
then
echo
echo "Usage: $name package-list module-list-dir outdir mozdir"
echo
exit 1
fi
package_list=$1
module_list_dir=$2
outdir=$3
mozdir=$4
if [ ! -f $package_list ]
then
echo
echo "$name: Cant access package file $package_list."
echo
exit 1
fi
if [ ! -d $module_list_dir ]
then
echo
echo "$name: Cant access module list dir $package_list."
echo
exit 1
fi
if [ ! -d $outdir ]
then
echo
echo "$name: Cant access outdir $outdir."
echo
exit 1
fi
if [ ! -d $mozdir ]
then
echo
echo "$name: Cant access mozdir $mozdir."
echo
exit 1
fi
rm -rf $outdir/*
packages=`cat $package_list | grep -v -e "^#.*$" | grep -v -e "^[ \t]*$"`
for p in $packages
do
package=`echo $p | awk -F":" '{ print $1; }'`
modules=`echo $p | awk -F":" '{ print $2; }' | tr "," " "`
file_list=$outdir/mozilla-$package-file-list.txt
file_list_devel=$outdir/mozilla-$package-devel-file-list.txt
tmp_raw=/tmp/raw-list.$$.tmp
tmp_file_list=/tmp/file-list.$$.tmp
tmp_file_list_devel=/tmp/file-list-devel.$$.tmp
tmp_dir_list=/tmp/dir-list.$$.tmp
tmp_dir_list_devel=/tmp/dir-list-devel.$$.tmp
# echo "package=$package"
# echo "modules=$modules"
# echo "file_list=$file_list"
# echo "file_list_devel=$file_list_devel"
# echo "#################"
rm -f $tmp_raw $file_list $file_list_devel
rm -f $tmp_file_list $tmp_file_list_devel
rm -f $tmp_dir_list $tmp_dir_list_devel
touch $tmp_raw $file_list $file_list_devel
touch $tmp_file_list $tmp_file_list_devel
touch $tmp_dir_list $tmp_dir_list_devel
print_cmd=$mozdir/build/package/rpm/print-module-filelist.sh
here=`pwd`
# Write the raw file list
for m in $modules
do
cd $mozdir/$m
$print_cmd >> $tmp_raw
done
cd $here
# Munge the raw list into the file list
for i in `cat $tmp_raw`
do
prefix=`echo $i | awk -F"/" '{ print $1; }'`
case "$prefix"
in
# dirs
DIR:*)
dir=`echo $i | cut -b5-`
case "$dir"
in
include*)
echo $dir >> $tmp_dir_list_devel
;;
*)
prefix2=`echo $dir | awk -F"/" '{ print $2; }'`
case "$prefix2"
in
# Cut out the "bin/" from these
res|chrome|defaults)
echo $dir | cut -b5- >> $tmp_dir_list
;;
esac
;;
esac
;;
##
## XXX: This one needs to be smarter and catch more devel only
## stuff. For example, the gecko viewer and all its resources
## should go in the devel package. This would in turn make the
## regular package smaller.
##
# include, idl, lib
include|idl|lib)
echo $i >> $tmp_file_list_devel
;;
# bin the evil
bin)
prefix2=`echo $i | awk -F"/" '{ print $2; }'`
case "$prefix2"
in
# Cut out the "bin/" from these
components|res|chrome|defaults|netscape.cfg)
echo $i | cut -b5- >> $tmp_file_list
;;
# whatever else in "bin/"
*)
# Move special files in "bin/" around
base=`basename $i`
case "$base"
in
# Mozilla brillantly puts .so files in "bin/" bleh
*.so)
echo "lib/$base" >> $tmp_file_list
;;
*)
echo $i >> $tmp_file_list
;;
esac
;;
esac
;;
# whatever else
*)
echo $i >> $tmp_file_list
;;
esac
done
# Spit out sorted file lists
cat $tmp_dir_list | sort | uniq | awk '{ printf("%%dir %%{prefix}/lib/mozilla/%s\n" , $0); }' >> $file_list
cat $tmp_file_list | sort | uniq | awk '{ printf("%%{prefix}/lib/mozilla/%s\n" , $0); }' >> $file_list
cat $tmp_dir_list_devel | sort | uniq | awk '{ printf("%%dir %%{prefix}/lib/mozilla/%s\n" , $0); }' >> $file_list_devel
cat $tmp_file_list_devel | sort | uniq | awk '{ printf("%%{prefix}/lib/mozilla/%s\n" , $0); }' >> $file_list_devel
# Cleanup
rm -f $tmp_raw $tmp_file_list $tmp_file_list_devel $tmp_dir_list $tmp_dir_list_devel
done

View File

@@ -0,0 +1,125 @@
#!/bin/sh
# A hack to make mozilla rpms in place.
here=`pwd`
if [ ! -d ./mozilla ]
then
printf "\n\nDude, you have to be on the root of the mozilla cvs tree.\n\n"
exit 1
fi
rpm_place=$here/rpm_on_demand_dir
rm -rf $rpm_place
mkdir -p $rpm_place
mkdir -p $rpm_place/tarball
mkdir -p $rpm_place/home
mkdir -p $rpm_place/topdir
mkdir -p $rpm_place/topdir/BUILD
mkdir -p $rpm_place/topdir/RPMS
mkdir -p $rpm_place/topdir/RPMS/i386
mkdir -p $rpm_place/topdir/RPMS/noarch
mkdir -p $rpm_place/topdir/SOURCES
mkdir -p $rpm_place/topdir/SPECS
mkdir -p $rpm_place/topdir/SRPMS
_top_dir=$rpm_place/topdir
_spec_dir=$_top_dir/SPECS
_sources_dir=$_top_dir/SOURCES
_rpms_dir=$_top_dir/RPMS
_home=$rpm_place/home
_rpm_macros=$_home/.rpmmacros
_tarball_dir=$rpm_place/tarball
#_spec_file=$here/build/package/rpm/mozilla.spec
##
## Setup a phony topdir for the phony rpm macros file
##
echo "%_topdir $_top_dir" >> $_rpm_macros
##
## Make a tarball of the beast
##
cd $_tarball_dir
cvs co mozilla/client.mk
make -f mozilla/client.mk pull_all
tar vzcf mozilla-source.tar.gz mozilla
#XXXX YANK
#cp /tmp/mozilla-source.tar.gz .
#XXXX YANK
tarball=`/bin/ls -1 mozilla*.tar.gz | head -1`
if [ ! -f $tarball ]
then
printf "\n\nDude, failed to make mozilla tarball.\n\n"
exit 1
fi
# Put the tarball in the SOURCES dir
mv -f $tarball $_sources_dir
printf "\n\nMozilla tarball = %s\n\n" $_sources_dir/$tarball
# Find the spec file from the rpm
spec_in_rpm=`tar tzvf $_sources_dir/$tarball |grep -w "mozilla\.spec$" | awk '{ print $6; }'`
printf "\n\nspec_in_rpm=%s\n\n" $spec_in_rpm
# Extract the spec file from the tarball
spec_in_rpm_dir=`echo $spec_in_rpm | awk -F"/" '{ print $1; }'`
printf "\n\nspec_in_rpm_dir=%s\n\n" $spec_in_rpm_dir
tar zvxf $_sources_dir/$tarball $spec_in_rpm
#_spec_file=`/bin/ls -1 $spec_in_rpm_dir | grep "\.spec$" | head -1`
#printf "\n\n_spec_file=%s\n\n" $_spec_file
if [ ! -f $spec_in_rpm ]
then
printf "\n\nFailed to extract spec file from tarball.\n\n"
exit 1
fi
# Put the spec file in SPECS
#cp $spec_in_rpm $_spec_dir
#XXXX YANK
cp /tmp/mozilla.spec $_spec_dir
#XXXX YANK
HOME=$_home rpm -ba $_spec_dir/mozilla.spec # > /dev/null 2>&1
if [ $? -eq 0 ]
then
mkdir -p $rpm_place/RPMS
cp $_rpms_dir/i386/*.rpm $rpm_place/RPMS/
last=`/bin/ls -lt1 $rpm_place/RPMS|head -1`
echo "New RPM written to RPMS/$last"
else
echo "Failed to build the rpm. Check the spec file."
fi
echo
cd $rpm_place
# Cleanup
rm -rf $rpm_place/topdir $rpm_place/home

View File

@@ -0,0 +1,133 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
##
## Usage:
##
## $ mozilla
##
## This script is meant to run a mozilla program from the mozilla
## rpm installation.
##
## The script will setup all the environment voodoo needed to make
## mozilla work.
##
## Standard shell script disclaimer blurb thing:
##
## This script is a hcak. Its brute force. Its horrible.
## It doesnt use Artificial Intelligence. It doesnt use Virtual Reality.
## Its not perl. Its not python. It probably wont work unchanged on
## the "other" thousands of unices. But it worksforme.
##
## If you have an improvement, patch, idea, whatever, on how to make this
## script better, post it here:
##
## news://news.mozilla.org/netscape.public.mozilla.patches
## news://news.mozilla.org/netscape.public.mozilla.unix
##
##
##
## Potential improvements:
##
## + Run ldd on the program and report missing dlls
## + All the "other" unices/packages
##
cmdname=`basename $0`
##
## location of the apprunner binary.
##
MOZ_APPRUNNER_NAME="/usr/lib/mozilla/bin/apprunner"
##
## Variables
##
MOZ_DIST_BIN=""
MOZ_PROGRAM=""
##
## Functions
##
moz_bail()
{
message=$1
echo
echo "$cmdname: $message"
echo
exit 1
}
moz_test_binary()
{
binary=$1
if [ -f "$binary" ]
then
if [ -x "$binary" ]
then
return 1
fi
fi
return 0
}
moz_test_binary $MOZ_APPRUNNER_NAME
if [ $? -eq 1 ]
then
MOZ_PROGRAM=$MOZ_APPRUNNER_NAME
fi
##
## Make sure the program is executable
##
if [ ! -x $MOZ_PROGRAM ]
then
moz_bail "Cannot execute $MOZ_PROGRAM."
fi
##
## Set MOZILLA_FIVE_HOME
##
MOZILLA_FIVE_HOME="/usr/lib/mozilla"
export MOZILLA_FIVE_HOME
##
## Set LD_LIBRARY_PATH
##
if [ "$LD_LIBRARY_PATH" ]
then
LD_LIBRARY_PATH=/usr/lib/mozilla/lib:$LD_LIBRARY_PATH
else
LD_LIBRARY_PATH=/usr/lib/mozilla/lib
fi
export LD_LIBRARY_PATH
exec $MOZ_PROGRAM ${1+"$@"}

View File

@@ -0,0 +1,10 @@
nspr:nsprpub
core:build,db,xpcom,intl,js,modules/libutil,modules/security/freenav,modules/libpref,modules/libimg,modules/libjar,caps
network:netwerk
layout:htmlparser,gfx,dom,view,widget/timer,widget,layout,webshell,editor,modules/plugin
xpinstall:xpinstall
profile:profile
xptoolkit:xpfe,rdf
cookie:extensions/cookie
wallet:extensions/wallet
mailnews:mailnews

View File

@@ -0,0 +1,115 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
##
## Usage:
##
## $ mozilla
##
## This script is meant to run a mozilla program from the mozilla
## rpm installation.
##
## The script will setup all the environment voodoo needed to make
## mozilla work.
##
## Standard shell script disclaimer blurb thing:
##
## This script is a hcak. Its brute force. Its horrible.
## It doesnt use Artificial Intelligence. It doesnt use Virtual Reality.
## Its not perl. Its not python. It probably wont work unchanged on
## the "other" thousands of unices. But it worksforme.
##
## If you have an improvement, patch, idea, whatever, on how to make this
## script better, post it here:
##
## news://news.mozilla.org/netscape.public.mozilla.patches
## news://news.mozilla.org/netscape.public.mozilla.unix
##
##
##
## Potential improvements:
##
## + Run ldd on the program and report missing dlls
## + All the "other" unices/packages
##
cmdname=`basename $0`
##
## location of the viewer binary.
##
MOZ_VIEWER_NAME="/usr/lib/mozilla/bin/viewer"
##
## Variables
##
MOZ_PROGRAM=""
##
## Functions
##
moz_bail()
{
message=$1
echo
echo "$cmdname: $message"
echo
exit 1
}
moz_test_binary()
{
binary=$1
if [ -f "$binary" ]
then
if [ -x "$binary" ]
then
return 1
fi
fi
return 0
}
MOZ_PROGRAM=$MOZ_APPRUNNER_NAME
moz_test_binary $MOZ_PROGRAM
if [ $? -eq 0 ]
then
moz_bail "Cannot execute $MOZ_PROGRAM."
fi
##
## Set MOZILLA_FIVE_HOME
##
MOZILLA_FIVE_HOME="/usr/lib/mozilla"
export MOZILLA_FIVE_HOME
exec $MOZ_PROGRAM ${1+"$@"}

View File

@@ -0,0 +1,410 @@
Summary: Mozilla and stuff
Name: mozilla
Version: 666
Release: 0
Serial: 0
Copyright: NPL/MPL
Group: Mozilla
Source0: ftp://ftp.mozilla.org/pub/mozilla/nightly/latest/mozilla-source.tar.gz
#Source0: ftp://ftp.mozilla.org/pub/mozilla/nightly/latest/mozilla-binary.tar.gz
Buildroot: /var/tmp/mozilla-root
Prefix: /usr
Requires: gtk+ >= 1.2.4
#
# TODO: lots of stuff
#
# + Add nice summary and description entries
#
# + Make sure the requires entries make sense
#
# + Add more packages for other mozilla extensions (for instance: irc)
#
# + Remove and/or combine the current packages that make more sense
#
# + mozilla-xpcom package ?
#
# + should nspr be its own package ?
#
# + it is probably a good idea to have a mozilla-browser package
# instead of mozilla-xptoolkit
#
# + the mozilla-xpinstall package obviously doesnt make sense -
# its there for show
#
# + a lot of stuff is dumped into the default package that
# should really be in the devel package. For example the
# gecko viewer and all its tests.
#
# For the code that determines what goes where, see:
#
# mozilla/build/package/rpm/print-module-filelist.sh
# mozilla/build/package/rpm/generate-package-info.sh
#
#Exclusivearch: i386
%description
Mozilla is the king of all beasts - big badass Beasts.
%package nspr
Summary: mozilla-nspr
Group: Mozilla
%description nspr
mozilla-nspr
%package nspr-devel
Requires: mozilla-nspr
Summary: mozilla-nspr-devel
Group: Mozilla
%description nspr-devel
mozilla-nspr devel
%package core
Summary: mozilla-core
Group: Mozilla
Requires: mozilla-nspr
%description core
mozilla-core
%package core-devel
Requires: mozilla-core
Summary: mozilla-core-devel
Group: Mozilla
Requires: mozilla-nspr-devel
%description core-devel
mozilla-core devel
%package network
Summary: mozilla-network
Group: Mozilla
Requires: mozilla-core
%description network
mozilla-network
%package network-devel
Requires: mozilla-network
Summary: mozilla-network-devel
Group: Mozilla
Requires: mozilla-core-devel
%description network-devel
mozilla-network devel
%package layout
Summary: mozilla-layout
Group: Mozilla
Requires: mozilla-network
%description layout
mozilla-layout
%package layout-devel
Requires: mozilla-layout
Summary: mozilla-layout-devel
Group: Mozilla
Requires: mozilla-network-devel
%description layout-devel
mozilla-layout devel
%package xpinstall
Summary: mozilla-xpinstall
Group: Mozilla
Requires: mozilla-layout
%description xpinstall
mozilla-xpinstall
%package xpinstall-devel
Requires: mozilla-xpinstall
Summary: mozilla-xpinstall-devel
Group: Mozilla
Requires: mozilla-layout-devel
%description xpinstall-devel
mozilla-xpinstall devel
%package profile
Summary: mozilla-profile
Group: Mozilla
Requires: mozilla-layout
%description profile
mozilla-profile
%package profile-devel
Requires: mozilla-profile
Summary: mozilla-profile-devel
Group: Mozilla
Requires: mozilla-layout-devel
%description profile-devel
mozilla-profile devel
%package xptoolkit
Summary: mozilla-xptoolkit
Group: Mozilla
Requires: mozilla-layout
%description xptoolkit
mozilla-xptoolkit
%package xptoolkit-devel
Requires: mozilla-xptoolkit
Summary: mozilla-xptoolkit-devel
Group: Mozilla
Requires: mozilla-layout-devel
%description xptoolkit-devel
mozilla-xptoolkit devel
%package cookie
Summary: mozilla-cookie
Group: Mozilla
Requires: mozilla-layout
%description cookie
mozilla-cookie
%package cookie-devel
Requires: mozilla-cookie
Summary: mozilla-cookie-devel
Group: Mozilla
Requires: mozilla-layout-devel
%description cookie-devel
mozilla-cookie devel
%package wallet
Summary: mozilla-wallet
Group: Mozilla
Requires: mozilla-layout
%description wallet
mozilla-wallet
%package wallet-devel
Requires: mozilla-wallet
Summary: mozilla-wallet-devel
Group: Mozilla
Requires: mozilla-layout-devel
%description wallet-devel
mozilla-wallet devel
%package mailnews
Summary: mozilla-mailnews
Group: Mozilla
Requires: mozilla-layout
%description mailnews
mozilla-mailnews
%package mailnews-devel
Requires: mozilla-mailnews
Summary: mozilla-mailnews-devel
Group: Mozilla
Requires: mozilla-layout-devel
%description mailnews-devel
mozilla-mailnews devel
%prep
%setup -n mozilla
%install
rm -rf $RPM_BUILD_ROOT
################################
#
# Remember where we are
#
################################
here=`pwd`
################################
#
# configure
#
################################
if [ 1 ]
then
###
###
###
rm -f $here/blank
touch $here/blank
MOZCONFIG=blank
export MOZCONFIG
./configure --disable-tests --with-xlib=no --with-motif=no --enable-strip-libs --disable-debug --enable-optimize --disable-gtk-mozilla
make
fi
################################
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/mozilla
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/mozilla/plugins
################################
#
# Generate the package lists
#
################################
here=`pwd`
mkdir -p $here/file-lists
cd build/package/rpm
./generate-package-info.sh mozilla-package-list.txt . $here/file-lists $here
cd $here
################################
################################
#
# Copy the stuff in dist/* to the rpm stage place
#
################################
cp -r dist/* $RPM_BUILD_ROOT/%{prefix}/lib/mozilla/
cd $RPM_BUILD_ROOT/%{prefix}/lib/mozilla/
/bin/mv -f bin/*.so lib
/bin/mv -f bin/chrome .
/bin/mv -f bin/components .
/bin/mv -f bin/defaults .
/bin/mv -f bin/netscape.cfg .
/bin/mv -f bin/res .
strip lib/*.so
strip components/*.so
cd $here
install -m 755 build/package/rpm/mozilla $RPM_BUILD_ROOT/%{prefix}/lib/mozilla/bin
################################
##
## This function gets called on the %post stage to make sure any
## new components that are installed in the system get
## registered to component.reg
##
%define call_regxpcom here=`pwd` ; cd %{prefix}/lib/mozilla ; LD_LIBRARY_PATH=`pwd`/lib ./bin/regxpcom ; cd $here
%clean
rm -rf $RPM_BUILD_ROOT
%files -f file-lists/mozilla-nspr-file-list.txt nspr
%defattr(-,root,root)
%files -f file-lists/mozilla-nspr-devel-file-list.txt nspr-devel
%defattr(-,root,root)
%files -f file-lists/mozilla-core-file-list.txt core
%defattr(-,root,root)
%dir %{prefix}/lib/mozilla
%dir %{prefix}/lib/mozilla/bin
%dir %{prefix}/lib/mozilla/chrome
%dir %{prefix}/lib/mozilla/components
%dir %{prefix}/lib/mozilla/defaults
%dir %{prefix}/lib/mozilla/defaults/pref
%dir %{prefix}/lib/mozilla/lib
%dir %{prefix}/lib/mozilla/plugins
%dir %{prefix}/lib/mozilla/res
%files -f file-lists/mozilla-core-devel-file-list.txt core-devel
%defattr(-,root,root)
%post core
%{call_regxpcom}
%files -f file-lists/mozilla-network-file-list.txt network
%defattr(-,root,root)
%files -f file-lists/mozilla-network-devel-file-list.txt network-devel
%defattr(-,root,root)
%post network
%{call_regxpcom}
%files -f file-lists/mozilla-layout-file-list.txt layout
%defattr(-,root,root)
%files -f file-lists/mozilla-layout-devel-file-list.txt layout-devel
%defattr(-,root,root)
%post layout
%{call_regxpcom}
%files -f file-lists/mozilla-xpinstall-file-list.txt xpinstall
%defattr(-,root,root)
%files -f file-lists/mozilla-xpinstall-devel-file-list.txt xpinstall-devel
%defattr(-,root,root)
%post xpinstall
%{call_regxpcom}
%files -f file-lists/mozilla-profile-file-list.txt profile
%defattr(-,root,root)
%files -f file-lists/mozilla-profile-devel-file-list.txt profile-devel
%defattr(-,root,root)
%post profile
%{call_regxpcom}
%files -f file-lists/mozilla-xptoolkit-file-list.txt xptoolkit
%defattr(-,root,root)
%files -f file-lists/mozilla-xptoolkit-devel-file-list.txt xptoolkit-devel
%defattr(-,root,root)
%post xptoolkit
%{call_regxpcom}
%files -f file-lists/mozilla-cookie-file-list.txt cookie
%defattr(-,root,root)
%files -f file-lists/mozilla-cookie-devel-file-list.txt cookie-devel
%defattr(-,root,root)
%post cookie
%{call_regxpcom}
%files -f file-lists/mozilla-wallet-file-list.txt wallet
%defattr(-,root,root)
%files -f file-lists/mozilla-wallet-devel-file-list.txt wallet-devel
%defattr(-,root,root)
%post wallet
%{call_regxpcom}
%files -f file-lists/mozilla-mailnews-file-list.txt mailnews
%defattr(-,root,root)
%files -f file-lists/mozilla-mailnews-devel-file-list.txt mailnews-devel
%defattr(-,root,root)
%post mailnews
%{call_regxpcom}
%changelog
* Wed Oct 20 1999 Ramiro Estrugo <ramiro@fateware.com>
- First rev.

View File

@@ -0,0 +1,156 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# The way this thing works:
#
# + a phony $(DIST) is created: /tmp/foo
#
# + The module is instaled there so that it can be isolated and
# catalogued.
#
# + A bunch of case statements determine what gets ignored
# and what is otherwise echoed as a file or dir member for
# the module
#
# + Most of this hacks are a result of the totally messed
# way in which mozilla pretentsto do "make install"
here=`pwd`
dist=/tmp/dist-$$.tmp
raw_file_list=/tmp/raw-file-list-$$.txt
file_list=/tmp/file-list-$$.txt
raw_dir_list=/tmp/raw-dir-list-$$.txt
dir_list=/tmp/dir-list-$$.txt
rm -rf $dist $raw_file_list $file_list $raw_dir_list $dir_list
# Need to mkdir include or else "make export" in mozilla gets confused
mkdir -p $dist
mkdir -p $dist/include
make -s DIST=$dist XPDIST=$dist PUBLIC=$dist/include EXTRA_DEPS= >/dev/null 2>&1
cd $dist
find -type l | cut -b3- > $raw_file_list
find -type d | cut -b3- | grep -v -e "^[ \t]*$" > $raw_dir_list
touch $file_list
for i in `cat $raw_file_list`
do
skip="false"
dir=`echo $i | awk -F"/" '{ print $1; }'`
# "lib" voodoo
if [ "$dir" = "lib" ]
then
rest=`echo $i | cut -b5-`
bin_dup="bin/$rest"
# Dont output files in "lib/" that are duplicated in "bin/"
if [ -f "$bin_dup" ]
then
skip="true"
fi
# Test for files that need to be skipped
file=`basename $i`
case "$file"
in
# Dont skip util .a files
*util_s.a)
:
;;
# Dont skip nspr .a files
libnspr*.a|libplc*|libplds*)
:
;;
# Skip all .a files
*.a)
skip="true"
;;
# Skip .so files
*.so)
skip="true"
;;
esac
fi
if [ "$skip" != "true" ]
then
echo $i >> $file_list
# else
# echo "skipping $i"
fi
done
touch $dir_list
for i in `cat $raw_dir_list`
do
skip="false"
# Skip directories that are shared across all of mozilla's components
case $i in
# level 1
include|idl|lib|bin)
skip="true"
;;
# level 2
lib/components|bin/components|bin/chrome|bin/res|bin/defaults|bin/plugins)
skip="true"
;;
# level 3
bin/defaults/pref)
skip="true"
;;
esac
if [ "$skip" != "true" ]
then
echo DIR:$i >> $dir_list
# else
# echo "skipping $i"
fi
done
cat $file_list
cat $dir_list
rm -rf $dist $raw_file_list $file_list $raw_dir_list $dir_list
cd $here

View File

@@ -0,0 +1,26 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
module=`make -s echo-depth-path | cut -b9-`
echo $module

View File

@@ -0,0 +1,37 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Mozilla Communicator client code,
# released March 31, 1998.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
export::
chmod 755 mozilla-config
$(INSTALL) -m 755 mozilla-config $(DIST)/bin
install:: $(srcdir)/run-mozilla.sh
$(INSTALL) $< $(DIST)/bin

View File

@@ -0,0 +1,8 @@
EXPORTED {
global:
NSGetFactory;
NSGetModule;
NSRegisterSelf;
NSUnregisterSelf;
local: *;
};

115
mozilla/build/unix/mddepend.pl Executable file
View File

@@ -0,0 +1,115 @@
#!/usr/bin/env perl
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is this file as it was released upon March 8, 1999.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# mddepend.pl - Reads in dependencies generated my -MD flag. Prints list
# of objects that need to be rebuilt. These can then be added to the
# PHONY target. Using this script copes with the problem of header
# files that have been removed from the build.
#
# Usage:
# mddepend.pl <output_file> <dependency_files...>
#
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
#$debug = 1;
$outfile = shift @ARGV;
@alldeps=();
# Parse dependency files
while ($line = <>) {
chomp $line;
($obj,$rest) = split /\s*:\s+/, $line, 2;
next if $obj eq '';
if ($line =~ /\\$/) {
chop $rest;
$hasSlash = 1;
} else {
$hasSlash = 0;
}
$deps = [ $obj, split /\s+/, $rest ];
while ($hasSlash and $line = <>) {
chomp $line;
if ($line =~ /\\$/) {
chop $line;
} else {
$hasSlash = 0;
}
$line =~ s/^\s+//;
push @{$deps}, split /\s+/, $line;
}
warn "add @{$deps}\n" if $debug;
push @alldeps, $deps;
}
# Test dependencies
foreach $deps (@alldeps) {
$obj = shift @{$deps};
$mtime = (stat $obj)[9] or next;
foreach $dep_file (@{$deps}) {
if (not defined($dep_mtime = $modtimes{$dep_file})) {
$dep_mtime = (stat $dep_file)[9];
$modtimes{$dep_file} = $dep_mtime;
}
if ($dep_mtime ne '' and $dep_mtime > $mtime) {
print "$obj($mtime) older than $dep_file($dep_mtime)\n" if $debug;
push @objs, $obj;
# Object will be marked for rebuild. No need to check other dependencies.
last;
}
}
}
# Output objects to rebuild (if needed).
if (@objs) {
$new_output = "@objs: FORCE\n";
# Read in the current dependencies file.
open(OLD, "<$outfile")
and $old_output = <OLD>;
close(OLD);
# Only write out the dependencies if they are different.
if ($new_output ne $old_output) {
open(OUT, ">$outfile") and print OUT "$new_output";
print "Updating dependencies file, $outfile\n";
if ($debug) {
print "new: $new_output\n";
print "was: $old_output\n" if $old_output ne '';
}
}
} elsif (-s $outfile) {
# Remove the old dependencies because all objects are up to date.
print "Removing old dependencies file, $outfile\n";
if ($debug) {
open(OLD, "<$outfile")
and $old_output = <OLD>;
close(OLD);
print "was: $old_output\n";
}
unlink $outfile;
}

View File

@@ -0,0 +1,119 @@
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is build/unix/modules.mk from the Mozilla source tree.
#
# The Initial Developer of the Original Code is Christopher
# Seawood. Portions created by Christopher Seawood are
# Copyright (C) 2000 Christopher Seawood. All Rights Reserved.
#
#
BUILD_MODULE_DIRS := config build include
BUILD_MODULE_CVS = config build include
# client.mk does not have topsrcdir set
ifndef topsrcdir
topsrcdir=$(TOPSRCDIR)
endif
ifndef MOZ_NATIVE_NSPR
# Do not regenerate Makefile for NSPR
ifdef USE_NSPR_AUTOCONF
NSPRPUB_DIR = nsprpub
else
NSPRPUB_DIR = $(topsrcdir)/nsprpub
endif
endif
# BM_DIRS_mod: list of directories to traverse from toplevel Makefile
# BM_DEP_DIRS_mod: list of directories to run "export" over
# BM_CVS_mod: list of directories to check out of cvs recursively
# BM_CVS_NS_mod: list of directories to check out of cvs non-recursively
ifneq ($(BUILD_MODULES),all)
#
# dbm
#
BM_DIRS_dbm = $(NSPRPUB_DIR) dbm
BM_CVS_dbm = $(BM_DIRS_dbm)
#
# js
#
BM_DIRS_js = $(NSPRPUB_DIR) js
BM_CVS_js = $(NSPRPUB_DIR)
BM_CVS_NS_js = js js/src js/src/fdlibm
#
# xpcom
#
BM_DIRS_xpcom = $(NSPRPUB_DIR) modules/libreg xpcom
BM_DEP_DIRS_xpcom = intl/unicharutil/public intl/uconv/public modules/libjar
BM_CVS_NS_xpcom = xpcom xpcom/typelib xpcom/typelib/xpidl intl/unicharutil/public intl/uconv/public
BM_CVS_xpcom = $(NSPRPUB_DIR) modules/libreg xpcom/typelib/xpt xpcom/base xpcom/ds xpcom/io xpcom/components xpcom/threads xpcom/reflect xpcom/proxy xpcom/build xpcom/tools xpcom/sample modules/libjar
#
# xpconnect
#
BM_DIRS_xpconnect = $(BM_DIRS_xpcom) $(BM_DIRS_js) js/src/xpconnect
BM_CVS_xpconnect = $(BM_CVS_xpcom) $(BM_CVS_js) js/src/xpconnect
BM_CVS_NS_xpconnect = $(BM_CVS_NS_xpcom) $(BM_CVS_NS_js) js/src/xpconnect
#
# necko
#
BM_DIRS_necko = $(BM_DIRS_xpcom) $(BM_DIRS_dbm) netwerk
BM_DEP_DIRS_necko = $(BM_DEP_DIRS_xpcom) $(BM_DEP_DIRS_dbm) uriloader/exthandler intl/locale/idl intl/strres/public js/src modules/libpref/public
BM_CVS_necko = $(BM_CVS_xpcom) $(BM_CVS_dbm) netwerk uriloader/exthandler
BM_CVS_NS_necko = $(BM_CVS_NS_xpcom) intl/locale/idl intl/strres/public modules/libpref/public $(BM_CVS_NS_js)
#
# tranformiix
#
BM_DIRS_transformiix = extensions/transformiix
BM_CVS_transformiix = extensions/transformiix
#
# psm
#
BM_DIRS_psm = $(BM_DIRS_dbm) $(BM_DIRS_xpcom) security netwerk/base/public netwerk/socket/base dom/public $(BM_DIRS_js) extensions/psm-glue
BM_DEP_DIRS_psm = $(BM_DEP_DIRS_dbm) $(BM_DEP_DIRS_xpcom) $(BM_DEP_DIRS_js) intl/locale/idl intl/locale/public intl/strres/public uriloader/base modules/libpref/public profile/public caps/idl netwerk/protocol/http/public gfx/idl gfx/public rdf/base/idl xpfe/appshell/public widget/public docshell/base layout/html/forms/public layout/base/public rdf/content/public dom/src/base modules/oji/public caps/include
BM_CVS_psm = $(BM_CVS_dbm) $(BM_CVS_xpcom) $(BM_CVS_js) security netwerk/base/public netwerk/socket/base dom/public $(BM_CVS_js) extensions/psm-glue
BM_CVS_NS_psm = $(BM_CVS_NS_dbm) $(BM_CVS_NS_xpcom) $(BM_CVS_NS_js) intl/locale/idl intl/locale/public intl/strres/public uriloader/base modules/libpref/public profile/public caps/idl netwerk/protocol/http/public gfx/idl gfx/public rdf/base/idl xpfe/appshell/public widget/public docshell/base layout/html/forms/public layout/base/public rdf/content/public dom/src/base modules/oji/public caps/include
#
# Tally
#
BUILD_MODULE_DIRS += $(foreach mod,$(BUILD_MODULES), $(BM_DIRS_$(mod)))
BUILD_MODULE_DEP_DIRS = $(foreach mod,$(BUILD_MODULES), $(BM_DEP_DIRS_$(mod)))
BUILD_MODULE_CVS += $(foreach mod,$(BUILD_MODULES), $(BM_CVS_$(mod)))
BUILD_MODULE_CVS_NS = $(foreach mod,$(BUILD_MODULES), $(BM_CVS_NS_$(mod)))
# Remove dups from the list to speed up the build
#
ifdef PERL
BUILD_MODULE_DIRS := $(shell $(PERL) $(topsrcdir)/build/unix/uniq.pl $(BUILD_MODULE_DIRS))
BUILD_MODULE_DEP_DIRS := $(shell $(PERL) $(topsrcdir)/build/unix/uniq.pl $(BUILD_MODULE_DEP_DIRS))
else
# Since PERL isn't defined, client.mk must've called us so order doesn't matter
BUILD_MODULE_DIRS := $(sort $(BUILD_MODULE_DIRS))
BUILD_MODULE_DEP_DIRS := $(sort $(BUILD_MODULE_DEP_DIRS))
BUILD_MODULE_CVS := $(sort $(BUILD_MODULE_CVS))
BUILD_MODULE_CVS_NS := $(sort $(BUILD_MODULE_CVS_NS))
endif
endif # BUILD_MODULES

View File

@@ -0,0 +1,80 @@
#!/bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
usage()
{
cat <<EOF
Usage: mozilla-config [OPTIONS] [LIBRARIES]
Options:
[--prefix[=DIR]]
[--exec-prefix[=DIR]]
[--version]
[--libs]
[--cflags]
EOF
exit $1
}
if test $# -eq 0; then
usage 1 1>&2
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo_prefix=yes
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo_exec_prefix=yes
;;
--version)
echo -1
exit 0
;;
--cflags)
if test "@includedir@" != /usr/include ; then
includes="-I@includedir@"
fi
echo_cflags=yes
;;
--libs)
echo_libs=yes
;;
*)
usage 1 1>&2
;;
esac
shift
done
if test "$echo_prefix" = "yes"; then
echo $prefix
fi
if test "$echo_exec_prefix" = "yes"; then
echo $exec_prefix
fi
if test "$echo_cflags" = "yes"; then
cflags="@DEFS@"
echo $includes $cflags
fi
if test "$echo_libs" = "yes"; then
echo -L@libdir@ -lxpcom
fi

View File

@@ -0,0 +1,8 @@
USE_PTHREADS=@MOZ_NSPRENV_USE_PTHREADS@
BUILD_OPT=@MOZ_NSPRENV_BUILD_OPT@
NS_USE_GCC=@MOZ_NSPRENV_NS_USE_GCC@
NO_MDUPDATE=@MOZ_NSPRENV_NO_MDUPDATE@
NS_USE_NATIVE=@MOZ_NSPRENV_NS_USE_NATIVE@
MOZILLA_CLIENT=@MOZ_NSPRENV_MOZILLA_CLIENT@
CLASSIC_NSPR=@MOZ_NSPRENV_CLASSIC_NSPR@
GC_LEAK_DETECTOR=@MOZ_NSPRENV_GC_LEAK_DETECTOR@

View File

@@ -0,0 +1,12 @@
DIST=@MOZ_NSPRENV_DIST@
MOZ_NSPRENV_OVERRIDE_MAKE=@MOZ_NSPRENV_OVERRIDE_MAKE@
MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS=@MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS@
ifdef MOZ_NSPRENV_OVERRIDE_MAKE
MAKE=$(MOZ_NSPRENV_OVERRIDE_MAKE)
endif
ifdef MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS
DSO_LDOPTS=$(MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS)
endif

View File

@@ -0,0 +1,73 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# jim_nance@yahoo.com
#
#
# This script will print the depth path for a mozilla directory based
# on the info in Makefile
#
# Its a hack. Its brute force. Its horrible.
# It dont use Artificial Intelligence. It dont use Virtual Reality.
# Its not perl. Its not python. But it works.
#
# Usage: print-depth-path.sh
#
# Send comments, improvements, bugs to jim_nance@yahoo.com
#
# Make sure a Makefile exists
if [ ! -f Makefile ]
then
echo
echo "There ain't no 'Makefile' over here: $pwd, dude."
echo
exit
fi
# awk can be quite primitave. Try enhanced versions first
for AWK in gawk nawk awk; do
if type $AWK 2>/dev/null 1>/dev/null; then
break;
fi
done
$AWK -v PWD=`pwd` '
{
if($1 == "DEPTH") {
DEPTH=$0
}
}
END {
sub("^.*DEPTH.*=[ \t]*", "", DEPTH)
dlen = split(DEPTH, darray, "/")
plen = split(PWD, parray, "/")
fsep=""
for(i=plen-dlen; i<=plen; i++) {
printf("%s%s", fsep, parray[i])
fsep="/"
}
printf("\n")
}' Makefile

Some files were not shown because too many files have changed in this diff Show More