Compare commits
1 Commits
feature_te
...
NSCOM20_BR
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35f651f31b |
@@ -1,6 +0,0 @@
|
||||
# List clobbering rationale in this file. Please include bug numbers whenever possible.
|
||||
- 20070619: and now libxul is back on again
|
||||
- 20070618: clobbering for bug 345517 (enable libxul), after it was backed out for Mac
|
||||
- 20070612: clobbering for bug 345517 (enable libxul). Again, after fixing mozconfig
|
||||
- 20070612: clobbering for bug 345517 (enable libxul)
|
||||
- 20070529: CLOBBER to get symbols uploaded for the first time
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
## hostname: bm-xservex11.build.mozilla.org
|
||||
## uname: Darwin bm-xserve11.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
|
||||
#
|
||||
|
||||
. $topsrcdir/build/macosx/universal/mozconfig
|
||||
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j4"
|
||||
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging mozilla/tools/codesighs"
|
||||
mk_add_options MOZ_CO_PROJECT="browser"
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build/universal
|
||||
mk_add_options MOZ_MAKE_FLAGS="MOZ_ENABLE_NEW_TEXT_FRAME=1"
|
||||
|
||||
ac_add_options --enable-application=browser
|
||||
ac_add_options --enable-update-channel=nightly
|
||||
ac_add_options --enable-optimize="-O2 -g"
|
||||
ac_add_options --disable-debug
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --enable-update-packaging
|
||||
|
||||
# ac_add_options --enable-official-branding
|
||||
ac_add_app_options ppc --enable-prebinding
|
||||
ac_add_options --enable-svg
|
||||
ac_add_options --enable-canvas
|
||||
|
||||
ac_add_options --enable-codesighs
|
||||
@@ -1,257 +0,0 @@
|
||||
#
|
||||
## hostname: bm-xservex11.build.mozilla.org
|
||||
## uname: Darwin bm-xserve11.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
|
||||
#
|
||||
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
$ENV{NO_EM_RESTART} = "1";
|
||||
$ENV{DYLD_NO_FIX_PREBINDING} = "1";
|
||||
$ENV{LD_PREBIND_ALLOW_OVERLAP} = "1";
|
||||
$ENV{CVS_RSH} = "ssh";
|
||||
|
||||
$MacUniversalBinary = 1;
|
||||
|
||||
# $ENV{MOZ_PACKAGE_MSI}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: 0
|
||||
# Values: 0 | 1
|
||||
# Purpose: Controls whether a MSI package is made.
|
||||
# Requires: Windows and a local MakeMSI installation.
|
||||
#$ENV{MOZ_PACKAGE_MSI} = 0;
|
||||
|
||||
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: scp
|
||||
# Values: scp | rsync
|
||||
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
|
||||
# Requires: The selected type requires the command be available both locally
|
||||
# and on the Talkback server.
|
||||
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
$BuildAdministrator = 'build@mozilla.org';
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
#$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
#$BuildDepend = 1; # Depend or Clobber
|
||||
#$BuildDebug = 0; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
#$BuildLocales = 0; # Do l10n packaging?
|
||||
|
||||
# Tests
|
||||
$CleanProfile = 1;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = 'Minefield';
|
||||
$VendorName = "";
|
||||
|
||||
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
|
||||
$RegxpcomTest = 1;
|
||||
$AliveTest = 1;
|
||||
#$JavaTest = 0;
|
||||
#$ViewerTest = 0;
|
||||
#$BloatTest = 0; # warren memory bloat test
|
||||
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
|
||||
#$DomToTextConversionTest = 0;
|
||||
#$XpcomGlueTest = 0;
|
||||
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
#$MailBloatTest = 0;
|
||||
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
$LayoutPerformanceTest = 1; # Tp
|
||||
$LayoutPerformanceLocalTest = 0; # Tp2
|
||||
$DHTMLPerformanceTest = 1; # Tdhtml
|
||||
#$QATest = 0;
|
||||
$XULWindowOpenTest = 1; # Txul
|
||||
$StartupPerformanceTest = 1; # Ts
|
||||
|
||||
$TestsPhoneHome = 1; # Should test report back to server?
|
||||
|
||||
$GraphNameOverride = 'xserve11.build.mozilla.org_TextFrame';
|
||||
|
||||
# $results_server
|
||||
#----------------------------------------------------------------------------
|
||||
# Server on which test results will be accessible. This was originally tegu,
|
||||
# then became axolotl. Once we moved services from axolotl, it was time
|
||||
# to give this service its own hostname to make future transitions easier.
|
||||
# - cmp@mozilla.org
|
||||
#$results_server = "build-graphs.mozilla.org";
|
||||
|
||||
#$pageload_server = "spider"; # localhost
|
||||
$pageload_server = "pageload.build.mozilla.org"; # localhost
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
#$CVSCheckoutTimeout = 3600;
|
||||
#$CreateProfileTimeout = 45;
|
||||
#$RegxpcomTestTimeout = 120;
|
||||
|
||||
$AliveTestTimeout = 10;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
#$BloatTestTimeout = 120; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceLocalTestTimeout = 1200; # entire test, seconds
|
||||
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 15; # seconds
|
||||
#$XULWindowOpenTestTimeout = 150; # seconds
|
||||
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
#$Make = 'gmake'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
#$blat = 'c:/nstools/bin/blat';
|
||||
#$use_blat = 0;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
#$moz_cvsroot = $ENV{CVSROOT};
|
||||
$moz_cvsroot = ":ext:cltbld\@cvs.mozilla.org:/cvsroot";
|
||||
#$moz_cvsroot = "/builds/cvs.hourly/cvsroot";
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
$ObjDir = '../build/universal';
|
||||
|
||||
# Extra build name, if needed.
|
||||
$BuildNameExtra = 'TextFrame';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
$BuildTree = 'MozillaExperimental';
|
||||
|
||||
#$BuildName = '';
|
||||
#$BuildTag = '';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'firefox-bin';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
# Release build options
|
||||
$ReleaseBuild = 1;
|
||||
$shiptalkback = 0;
|
||||
#$ReleaseToLatest = 1; # Push the release to latest-<milestone>?
|
||||
#$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
|
||||
$build_hour = "4";
|
||||
$package_creation_path = "/browser/installer";
|
||||
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
|
||||
$mac_bundle_path = "/browser/app";
|
||||
$ssh_version = "2";
|
||||
#$ssh_user = "cltbld";
|
||||
#$ssh_server = "stage.mozilla.org";
|
||||
$ftp_path = "/home/ftp/pub/firefox/nightly/experimental/textframe";
|
||||
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/experimental/textframe";
|
||||
$tbox_ftp_path = "/home/ftp/pub/firefox/tinderbox-builds";
|
||||
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds";
|
||||
$milestone = "trunk";
|
||||
$notify_list = "build-announce\@mozilla.org";
|
||||
$stub_installer = 0;
|
||||
$sea_installer = 0;
|
||||
$archive = 1;
|
||||
#$push_raw_xpis = 1;
|
||||
$update_package = 1;
|
||||
$update_product = "Firefox";
|
||||
$update_version = "trunk";
|
||||
$update_platform = "Darwin_Universal-gcc3";
|
||||
$update_hash = "md5";
|
||||
$update_filehost = "ftp.mozilla.org";
|
||||
$update_ver_file = 'browser/config/version.txt';
|
||||
$update_pushinfo = 0;
|
||||
$crashreporter_buildsymbols = 0;
|
||||
$crashreporter_pushsymbols = 0;
|
||||
$ENV{SYMBOL_SERVER_HOST} = 'stage.mozilla.org';
|
||||
$ENV{SYMBOL_SERVER_USER} = 'ffxbld';
|
||||
$ENV{SYMBOL_SERVER_PATH} = '/mnt/netapp/breakpad/symbols_ffx/';
|
||||
$ENV{SYMBOL_SERVER_SSH_KEY} = "$ENV{HOME}/.ssh/ffxbld_dsa";
|
||||
$ENV{MOZ_SYMBOLS_EXTRA_BUILDID} = 'textframe';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
#$LogCompression = '';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
#$LogEncoding = '';
|
||||
|
||||
# Prevent Extension Manager from spawning child processes during tests
|
||||
# - processes that tbox scripts cannot kill.
|
||||
#$ENV{NO_EM_RESTART} = '1';
|
||||
@@ -1,5 +0,0 @@
|
||||
# List clobbering rationale in this file. Please include bug numbers whenever possible.
|
||||
- 2007/06/12: clobbering for bug 345517 (enable libxul). Again, after fixing mozconfig
|
||||
- 2007/06/12: clobbering for bug 345517 (enable libxul)
|
||||
- 2007/05/28: clobbering for bug 382141 to get symbols uploaded
|
||||
- 2007/05/22: clobbering a win32 trunk build to test aus2 migration (see http://wiki.mozilla.org/WeeklyUpdates/2007-05-21#Build and http://weblogs.mozillazine.org/preed/2007/05/aus2s_a_movin_can_you_help_us.html)
|
||||
@@ -1,24 +0,0 @@
|
||||
#
|
||||
## hostname: fxexp-win32-tbox
|
||||
## uname: CYGWIN_NT-5.2 fx-win32-tbox 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
|
||||
#
|
||||
|
||||
# . $topsrcdir/browser/config/mozconfig
|
||||
|
||||
mk_add_options MOZ_CO_PROJECT=browser
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j5"
|
||||
mk_add_options MOZ_MAKE_FLAGS="MOZ_ENABLE_NEW_TEXT_FRAME=1"
|
||||
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
|
||||
mk_add_options MOZ_PACKAGE_NSIS=1
|
||||
|
||||
ac_add_options --enable-application=browser
|
||||
ac_add_options --enable-update-channel=nightly
|
||||
ac_add_options --enable-optimize
|
||||
ac_add_options --disable-debug
|
||||
# ac_add_options --enable-codesighs
|
||||
ac_add_options --disable-tests
|
||||
# ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-svg
|
||||
ac_add_options --enable-canvas
|
||||
ac_add_options --enable-default-toolkit=cairo-windows
|
||||
ac_add_options --enable-update-packaging
|
||||
@@ -1,253 +0,0 @@
|
||||
#
|
||||
## hostname: fx-win32-tbox
|
||||
## uname: CYGWIN_NT-5.2 fx-win32-tbox 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
|
||||
#
|
||||
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
$ENV{MOZ_INSTALLER_USE_7ZIP} = '1';
|
||||
$ENV{NO_EM_RESTART} = '1';
|
||||
$ENV{MOZ_PACKAGE_NSIS} = '1';
|
||||
|
||||
# $ENV{MOZ_PACKAGE_MSI}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: 0
|
||||
# Values: 0 | 1
|
||||
# Purpose: Controls whether a MSI package is made.
|
||||
# Requires: Windows and a local MakeMSI installation.
|
||||
#$ENV{MOZ_PACKAGE_MSI} = 0;
|
||||
|
||||
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: scp
|
||||
# Values: scp | rsync
|
||||
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
|
||||
# Requires: The selected type requires the command be available both locally
|
||||
# and on the Talkback server.
|
||||
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
$BuildAdministrator = 'build@mozilla.org';
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
#$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
#$BuildDepend = 1; # Depend or Clobber
|
||||
#$BuildDebug = 0; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
#$BuildLocales = 0; # Do l10n packaging?
|
||||
|
||||
# Tests
|
||||
$CleanProfile = 1;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = "Firefox";
|
||||
$VendorName = "Mozilla";
|
||||
|
||||
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
|
||||
$RegxpcomTest = 1;
|
||||
$AliveTest = 1;
|
||||
$JavaTest = 0;
|
||||
$ViewerTest = 0;
|
||||
$BloatTest = 0; # warren memory bloat test
|
||||
$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
|
||||
$DomToTextConversionTest = 0;
|
||||
$XpcomGlueTest = 0;
|
||||
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
$MailBloatTest = 0;
|
||||
$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
$LayoutPerformanceTest = 0; # Tp
|
||||
$DHTMLPerformanceTest = 0; # Tdhtml
|
||||
$QATest = 0;
|
||||
$XULWindowOpenTest = 0; # Txul
|
||||
$StartupPerformanceTest = 0; # Ts
|
||||
$NeckoUnitTest = 0;
|
||||
$RenderPerformanceTest = 0; # Tgfx
|
||||
|
||||
$TestsPhoneHome = 0; # Should test report back to server?
|
||||
$GraphNameOverride = 'fx-win32-tbox';
|
||||
|
||||
# $results_server
|
||||
#----------------------------------------------------------------------------
|
||||
# Server on which test results will be accessible. This was originally tegu,
|
||||
# then became axolotl. Once we moved services from axolotl, it was time
|
||||
# to give this service its own hostname to make future transitions easier.
|
||||
# - cmp@mozilla.org
|
||||
#$results_server = "build-graphs.mozilla.org";
|
||||
|
||||
$pageload_server = "pageload.build.mozilla.org"; # localhost
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
#$CVSCheckoutTimeout = 3600;
|
||||
#$CreateProfileTimeout = 45;
|
||||
#$RegxpcomTestTimeout = 120;
|
||||
|
||||
#$AliveTestTimeout = 30;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
#$BloatTestTimeout = 120; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
$LayoutPerformanceTestTimeout = 800; # entire test, seconds
|
||||
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 20; # seconds
|
||||
#$XULWindowOpenTestTimeout = 90; # seconds
|
||||
#$NeckoUnitTestTimeout = 30; # seconds
|
||||
$RenderPerformanceTestTimeout = 1800; # seconds
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
$Make = 'make'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
$blat = 'd:/moztools/bin/blat';
|
||||
$use_blat = 0;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
#$moz_cvsroot = $ENV{CVSROOT};
|
||||
$moz_cvsroot = ':ext:cltbld@cvs.mozilla.org:/cvsroot';
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
#XXX: this breaks talkback currently
|
||||
#$ObjDir = 'fx-trunk';
|
||||
|
||||
# Extra build name, if needed.
|
||||
$BuildNameExtra = 'TextFrame';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
#$BuildTree = 'MozillaTest';
|
||||
$BuildTree = 'MozillaExperimental';
|
||||
|
||||
#$BuildName = '';
|
||||
#$BuildTag = '';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'firefox.exe';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
# Release build options
|
||||
$ReleaseBuild = 1;
|
||||
$shiptalkback = 0;
|
||||
$ReleaseToLatest = 1; # Push the release to latest-<milestone>?
|
||||
$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
|
||||
$build_hour = "7";
|
||||
$package_creation_path = "/browser/installer";
|
||||
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
|
||||
$ssh_version = "2";
|
||||
#$ssh_user = "cltbld";
|
||||
#$ssh_server = "stage.mozilla.org";
|
||||
$ftp_path = "/home/ftp/pub/firefox/nightly/experimental/textframe";
|
||||
$url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/experimental/textframe";
|
||||
$tbox_ftp_path = "/home/ftp/pub/firefox/tinderbox-builds";
|
||||
$tbox_url_path = "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds";
|
||||
$milestone = "trunk";
|
||||
$notify_list = 'build-announce@mozilla.org';
|
||||
$stub_installer = 0;
|
||||
$sea_installer = 1;
|
||||
$archive = 1;
|
||||
$push_raw_xpis = 1;
|
||||
$update_package = 1;
|
||||
$update_product = "Firefox";
|
||||
$update_version = "trunk";
|
||||
$update_platform = "WINNT_x86-msvc";
|
||||
$update_hash = "sha1";
|
||||
$update_filehost = "ftp.mozilla.org";
|
||||
$update_ver_file = 'browser/config/version.txt';
|
||||
$update_pushinfo = 0;
|
||||
$crashreporter_buildsymbols = 0;
|
||||
$crashreporter_pushsymbols = 0;
|
||||
$ENV{SYMBOL_SERVER_HOST} = 'stage.mozilla.org';
|
||||
$ENV{SYMBOL_SERVER_USER} = 'ffxbld';
|
||||
$ENV{SYMBOL_SERVER_PATH} = '/mnt/netapp/breakpad/symbols_ffx/';
|
||||
$ENV{SYMBOL_SERVER_SSH_KEY} = "$ENV{HOME}/.ssh/ffxbld_dsa";
|
||||
$ENV{MOZ_SYMBOLS_EXTRA_BUILDID} = 'textframe';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
#$LogCompression = '';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
#$LogEncoding = '';
|
||||
|
||||
# Prevent Extension Manager from spawning child processes during tests
|
||||
# - processes that tbox scripts cannot kill.
|
||||
#$ENV{NO_EM_RESTART} = '1';
|
||||
699
mozilla/widget/src/mac/nsFileWidget.cpp
Normal file
699
mozilla/widget/src/mac/nsFileWidget.cpp
Normal file
@@ -0,0 +1,699 @@
|
||||
/* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsFileWidget.h"
|
||||
#include "nsStringUtil.h"
|
||||
#include <StandardFile.h>
|
||||
#include <ICAPI.h>
|
||||
#include "nsMacControl.h"
|
||||
|
||||
#include "nsFileSpec.h"
|
||||
|
||||
#define DBG 0
|
||||
|
||||
NS_IMPL_ADDREF(nsFileWidget)
|
||||
NS_IMPL_RELEASE(nsFileWidget)
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// nsFileWidget constructor
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
nsFileWidget::nsFileWidget()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
mIOwnEventLoop = PR_FALSE;
|
||||
mNumberOfFilters = 0;
|
||||
|
||||
// Zero out the type lists
|
||||
for (int i = 0; i < kMaxTypeListCount; i++)
|
||||
{
|
||||
mTypeLists[i] = 0L;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// nsFileWidget destructor
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
nsFileWidget::~nsFileWidget()
|
||||
{
|
||||
// Destroy any filters we have built
|
||||
if (mNumberOfFilters)
|
||||
{
|
||||
for (int i = 0; i < kMaxTypeListCount; i++)
|
||||
{
|
||||
if (mTypeLists[i])
|
||||
DisposePtr((Ptr)mTypeLists[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileWidget::Create(nsIWidget *aParent,
|
||||
const nsRect &aRect,
|
||||
EVENT_CALLBACK aHandleEventFunction,
|
||||
nsIDeviceContext *aContext,
|
||||
nsIAppShell *aAppShell,
|
||||
nsIToolkit *aToolkit,
|
||||
nsWidgetInitData *aInitData)
|
||||
{
|
||||
nsString title("Open");
|
||||
Create(aParent, title, eMode_load, aContext, aAppShell, aToolkit, aInitData);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileWidget:: Create(nsIWidget *aParent,
|
||||
const nsString& aTitle,
|
||||
nsFileDlgMode aMode,
|
||||
nsIDeviceContext *aContext,
|
||||
nsIAppShell *aAppShell,
|
||||
nsIToolkit *aToolkit,
|
||||
void *aInitData)
|
||||
{
|
||||
mTitle = aTitle;
|
||||
mMode = aMode;
|
||||
|
||||
mWindowPtr = nsnull;
|
||||
|
||||
return NS_OK;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implement the standard QueryInterface for NS_IWIDGET_IID and NS_ISUPPORTS_IID
|
||||
* @param aIID The name of the class implementing the method
|
||||
* @param _classiiddef The name of the #define symbol that defines the IID
|
||||
* for the class (e.g. NS_ISUPPORTS_IID)
|
||||
*/
|
||||
nsresult nsFileWidget::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
{
|
||||
if (NULL == aInstancePtr) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
static NS_DEFINE_IID(kIFileWidgetIID, NS_IFILEWIDGET_IID);
|
||||
if (aIID.Equals(kIFileWidgetIID)) {
|
||||
*aInstancePtr = (void*) ((nsIFileWidget*)this);
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return nsWindow::QueryInterface(aIID,aInstancePtr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP nsFileWidget::Create(nsNativeWidget aParent,
|
||||
const nsRect &aRect,
|
||||
EVENT_CALLBACK aHandleEventFunction,
|
||||
nsIDeviceContext *aContext,
|
||||
nsIAppShell *aAppShell,
|
||||
nsIToolkit *aToolkit,
|
||||
nsWidgetInitData *aInitData)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Ok's the dialog
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileWidget::OnOk()
|
||||
{
|
||||
mWasCancelled = PR_FALSE;
|
||||
mIOwnEventLoop = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Cancel the dialog
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileWidget::OnCancel()
|
||||
{
|
||||
mWasCancelled = PR_TRUE;
|
||||
mIOwnEventLoop = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Show - Display the file dialog
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
PRBool nsFileWidget::Show()
|
||||
{
|
||||
nsString filterList;
|
||||
GetFilterListArray(filterList);
|
||||
char *filterBuffer = filterList.ToNewCString();
|
||||
|
||||
Str255 title;
|
||||
Str255 defaultName;
|
||||
nsMacControl::StringToStr255(mTitle,title);
|
||||
nsMacControl::StringToStr255(mDefault,defaultName);
|
||||
|
||||
FSSpec theFile;
|
||||
PRBool userClicksOK = PR_FALSE;
|
||||
|
||||
// XXX Ignore the filter list for now....
|
||||
|
||||
if (mMode == eMode_load)
|
||||
userClicksOK = GetFile ( title, &theFile );
|
||||
else if (mMode == eMode_save)
|
||||
userClicksOK = PutFile ( title, defaultName, &theFile );
|
||||
else if (mMode == eMode_getfolder)
|
||||
userClicksOK = GetFolder ( title, &theFile );
|
||||
|
||||
// Clean up filter buffers
|
||||
delete[] filterBuffer;
|
||||
|
||||
if ( userClicksOK ) {
|
||||
nsNativeFileSpec fileSpec(theFile);
|
||||
nsFilePath filePath(fileSpec);
|
||||
|
||||
mFile = filePath;
|
||||
mFileSpec = fileSpec;
|
||||
}
|
||||
|
||||
return userClicksOK;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// myProc
|
||||
//
|
||||
// An event filter proc for NavServices so the dialogs will be movable-modals. However,
|
||||
// this doesn't seem to work as of yet...I'll play around with it some more.
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
pascal void myProc ( NavEventCallbackMessage msg, NavCBRecPtr cbRec, NavCallBackUserData data ) ;
|
||||
pascal void myProc ( NavEventCallbackMessage msg, NavCBRecPtr cbRec, NavCallBackUserData data )
|
||||
{
|
||||
WindowPtr window = reinterpret_cast<WindowPtr>(cbRec->eventData.eventDataParms.event->message);
|
||||
switch ( msg ) {
|
||||
case kNavCBEvent:
|
||||
switch ( cbRec->eventData.eventDataParms.event->what ) {
|
||||
case updateEvt:
|
||||
::BeginUpdate(window);
|
||||
::EndUpdate(window);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// PutFile
|
||||
//
|
||||
// Use NavServices to do a PutFile. Returns PR_TRUE if the user presses OK in the dialog. If
|
||||
// they do so, the location to put the file and the name, etc is in the FSSpec.
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
PRBool
|
||||
nsFileWidget :: PutFile ( Str255 & inTitle, Str255 & inDefaultName, FSSpec* outSpec )
|
||||
{
|
||||
PRBool retVal = PR_FALSE;
|
||||
NavReplyRecord reply;
|
||||
NavDialogOptions dialogOptions;
|
||||
NavEventUPP eventProc = NewNavEventProc(myProc); // doesn't really matter if this fails
|
||||
OSType typeToSave = 'TEXT';
|
||||
OSType creatorToSave = 'MOZZ';
|
||||
|
||||
OSErr anErr = NavGetDefaultDialogOptions(&dialogOptions);
|
||||
if (anErr == noErr) {
|
||||
// Set the options for how the get file dialog will appear
|
||||
dialogOptions.dialogOptionFlags |= kNavNoTypePopup;
|
||||
dialogOptions.dialogOptionFlags |= kNavDontAutoTranslate;
|
||||
dialogOptions.dialogOptionFlags |= kNavDontAddTranslateItems;
|
||||
dialogOptions.dialogOptionFlags ^= kNavAllowMultipleFiles;
|
||||
::BlockMoveData(inTitle, dialogOptions.message, *inTitle + 1);
|
||||
|
||||
// Display the get file dialog
|
||||
anErr = ::NavPutFile(
|
||||
NULL,
|
||||
&reply,
|
||||
&dialogOptions,
|
||||
eventProc,
|
||||
typeToSave,
|
||||
creatorToSave,
|
||||
NULL); // callbackUD
|
||||
|
||||
// See if the user has selected save
|
||||
if (anErr == noErr && reply.validRecord) {
|
||||
AEKeyword theKeyword;
|
||||
DescType actualType;
|
||||
Size actualSize;
|
||||
FSSpec theFSSpec;
|
||||
|
||||
// Get the FSSpec for the file to be opened
|
||||
anErr = AEGetNthPtr(&(reply.selection), 1, typeFSS, &theKeyword, &actualType,
|
||||
&theFSSpec, sizeof(theFSSpec), &actualSize);
|
||||
|
||||
if (anErr == noErr) {
|
||||
*outSpec = theFSSpec; // Return the FSSpec
|
||||
|
||||
if (reply.replacing)
|
||||
mSelectResult = nsFileDlgResults_Replace;
|
||||
else
|
||||
mSelectResult = nsFileDlgResults_OK;
|
||||
|
||||
// Some housekeeping for Nav Services
|
||||
::NavCompleteSave(&reply, kNavTranslateInPlace);
|
||||
::NavDisposeReply(&reply);
|
||||
|
||||
retVal = PR_TRUE;
|
||||
}
|
||||
|
||||
} // if user clicked OK
|
||||
} // if can get dialog options
|
||||
|
||||
if ( eventProc ) {
|
||||
#if TARGET_CARBON
|
||||
::DisposeNavEventUPP(eventProc);
|
||||
#else
|
||||
::DisposeRoutineDescriptor(eventProc);
|
||||
#endif
|
||||
}
|
||||
|
||||
return retVal;
|
||||
|
||||
} // PutFile
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// GetFile
|
||||
//
|
||||
// Use NavServices to do a GetFile. Returns PR_TRUE if the user presses OK in the dialog. If
|
||||
// they do so, the selected file is in the FSSpec.
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
PRBool
|
||||
nsFileWidget :: GetFile ( Str255 & inTitle, /* filter list here later */ FSSpec* outSpec )
|
||||
{
|
||||
PRBool retVal = PR_FALSE;
|
||||
NavReplyRecord reply;
|
||||
NavDialogOptions dialogOptions;
|
||||
NavEventUPP eventProc = NewNavEventProc(myProc); // doesn't really matter if this fails
|
||||
|
||||
OSErr anErr = NavGetDefaultDialogOptions(&dialogOptions);
|
||||
if (anErr == noErr) {
|
||||
// Set the options for how the get file dialog will appear
|
||||
dialogOptions.dialogOptionFlags |= kNavNoTypePopup;
|
||||
dialogOptions.dialogOptionFlags |= kNavDontAutoTranslate;
|
||||
dialogOptions.dialogOptionFlags |= kNavDontAddTranslateItems;
|
||||
dialogOptions.dialogOptionFlags ^= kNavAllowMultipleFiles;
|
||||
::BlockMoveData(inTitle, dialogOptions.message, *inTitle + 1);
|
||||
|
||||
// Display the get file dialog
|
||||
anErr = ::NavGetFile(
|
||||
NULL,
|
||||
&reply,
|
||||
&dialogOptions,
|
||||
eventProc,
|
||||
NULL, // preview proc
|
||||
NULL, // filter proc
|
||||
NULL, //typeList,
|
||||
NULL); // callbackUD
|
||||
|
||||
// See if the user has selected save
|
||||
if (anErr == noErr && reply.validRecord) {
|
||||
AEKeyword theKeyword;
|
||||
DescType actualType;
|
||||
Size actualSize;
|
||||
FSSpec theFSSpec;
|
||||
|
||||
// Get the FSSpec for the file to be opened
|
||||
anErr = AEGetNthPtr(&(reply.selection), 1, typeFSS, &theKeyword, &actualType,
|
||||
&theFSSpec, sizeof(theFSSpec), &actualSize);
|
||||
|
||||
if (anErr == noErr) {
|
||||
*outSpec = theFSSpec; // Return the FSSpec
|
||||
mSelectResult = nsFileDlgResults_OK;
|
||||
|
||||
// Some housekeeping for Nav Services
|
||||
::NavDisposeReply(&reply);
|
||||
|
||||
retVal = PR_TRUE;
|
||||
}
|
||||
|
||||
} // if user clicked OK
|
||||
} // if can get dialog options
|
||||
|
||||
if ( eventProc ) {
|
||||
#if TARGET_CARBON
|
||||
::DisposeNavEventUPP(eventProc);
|
||||
#else
|
||||
::DisposeRoutineDescriptor(eventProc);
|
||||
#endif
|
||||
}
|
||||
|
||||
return retVal;
|
||||
|
||||
} // GetFile
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// GetFolder
|
||||
//
|
||||
// Use NavServices to do a PutFile. Returns PR_TRUE if the user presses OK in the dialog. If
|
||||
// they do so, the folder location is in the FSSpec.
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
PRBool
|
||||
nsFileWidget :: GetFolder ( Str255 & inTitle, FSSpec* outSpec )
|
||||
{
|
||||
PRBool retVal = PR_FALSE;
|
||||
NavReplyRecord reply;
|
||||
NavDialogOptions dialogOptions;
|
||||
NavEventUPP eventProc = NewNavEventProc(myProc); // doesn't really matter if this fails
|
||||
|
||||
OSErr anErr = NavGetDefaultDialogOptions(&dialogOptions);
|
||||
if (anErr == noErr) {
|
||||
// Set the options for how the get file dialog will appear
|
||||
dialogOptions.dialogOptionFlags |= kNavNoTypePopup;
|
||||
dialogOptions.dialogOptionFlags |= kNavDontAutoTranslate;
|
||||
dialogOptions.dialogOptionFlags |= kNavDontAddTranslateItems;
|
||||
dialogOptions.dialogOptionFlags ^= kNavAllowMultipleFiles;
|
||||
::BlockMoveData(inTitle, dialogOptions.message, *inTitle + 1);
|
||||
|
||||
// Display the get file dialog
|
||||
anErr = ::NavChooseFolder(
|
||||
NULL,
|
||||
&reply,
|
||||
&dialogOptions,
|
||||
eventProc,
|
||||
NULL, // filter proc
|
||||
NULL); // callbackUD
|
||||
|
||||
// See if the user has selected save
|
||||
if (anErr == noErr && reply.validRecord) {
|
||||
AEKeyword theKeyword;
|
||||
DescType actualType;
|
||||
Size actualSize;
|
||||
FSSpec theFSSpec;
|
||||
|
||||
// Get the FSSpec for the file to be opened
|
||||
anErr = AEGetNthPtr(&(reply.selection), 1, typeFSS, &theKeyword, &actualType,
|
||||
&theFSSpec, sizeof(theFSSpec), &actualSize);
|
||||
|
||||
if (anErr == noErr) {
|
||||
*outSpec = theFSSpec; // Return the FSSpec
|
||||
mSelectResult = nsFileDlgResults_OK;
|
||||
|
||||
// Some housekeeping for Nav Services
|
||||
::NavDisposeReply(&reply);
|
||||
|
||||
retVal = PR_TRUE;
|
||||
}
|
||||
|
||||
} // if user clicked OK
|
||||
} // if can get dialog options
|
||||
|
||||
if ( eventProc ) {
|
||||
#if TARGET_CARBON
|
||||
::DisposeNavEventUPP(eventProc);
|
||||
#else
|
||||
::DisposeRoutineDescriptor(eventProc);
|
||||
#endif
|
||||
}
|
||||
|
||||
return retVal;
|
||||
|
||||
|
||||
} // GetFolder
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Convert filter titles + filters into a Windows filter string
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
void nsFileWidget::GetFilterListArray(nsString& aFilterList)
|
||||
{
|
||||
aFilterList.SetLength(0);
|
||||
for (PRUint32 i = 0; i < mNumberOfFilters; i++) {
|
||||
const nsString& title = mTitles[i];
|
||||
const nsString& filter = mFilters[i];
|
||||
|
||||
aFilterList.Append(title);
|
||||
aFilterList.Append('\0');
|
||||
aFilterList.Append(filter);
|
||||
aFilterList.Append('\0');
|
||||
}
|
||||
aFilterList.Append('\0');
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Set the list of filters
|
||||
//
|
||||
// Note - Since the XP representation of filters is based on the Win32
|
||||
// file dialog mechanism of supplying a .ext list of files to
|
||||
// display we need to do some massaging to convert this into
|
||||
// something useful on the Mac. Luckily Internet Config provides
|
||||
// a mechanism to get a file's Mac type based on the .ext so
|
||||
// we'll utilize that.
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
NS_IMETHODIMP nsFileWidget::SetFilterList(PRUint32 aNumberOfFilters,const nsString aTitles[],const nsString aFilters[])
|
||||
{
|
||||
unsigned char typeTemp[256];
|
||||
unsigned char tempChar;
|
||||
OSType tempOSType;
|
||||
ICInstance icInstance;
|
||||
ICError icErr;
|
||||
Handle mappings = NewHandleClear(4);
|
||||
ICAttr attr;
|
||||
ICMapEntry icEntry;
|
||||
|
||||
mNumberOfFilters = aNumberOfFilters;
|
||||
mTitles = aTitles;
|
||||
mFilters = aFilters;
|
||||
|
||||
#if 0 // FOR NOW JUST BYPASS ALL THIS CODE
|
||||
icErr = ICStart(&icInstance, 'MOZZ');
|
||||
if (icErr == noErr)
|
||||
{
|
||||
icErr = ICFindConfigFile(icInstance, 0, nil);
|
||||
if (icErr == noErr)
|
||||
{
|
||||
icErr = ICFindPrefHandle(icInstance, kICMapping, &attr, mappings);
|
||||
if (icErr != noErr)
|
||||
goto bail_w_IC;
|
||||
}
|
||||
else
|
||||
goto bail_w_IC;
|
||||
}
|
||||
else
|
||||
goto bail_wo_IC;
|
||||
|
||||
if (aNumberOfFilters)
|
||||
{
|
||||
// First we allocate the memory for the Mac type lists
|
||||
for (PRUint32 loop1 = 0; loop1 < mNumberOfFilters; loop1++)
|
||||
{
|
||||
mTypeLists[loop1] =
|
||||
(NavTypeListPtr)NewPtrClear(sizeof(NavTypeList) + kMaxTypesPerFilter * sizeof(OSType));
|
||||
|
||||
if (mTypeLists[loop1] == nil)
|
||||
goto bail_w_IC;
|
||||
}
|
||||
|
||||
// Now loop through each of the filter strings
|
||||
for (PRUint32 loop1 = 0; loop1 < mNumberOfFilters; loop1++)
|
||||
{
|
||||
const nsString& filter = mFilters[loop1];
|
||||
PRUint32 filterIndex = 0; // Index into the filter string
|
||||
|
||||
if (filter[filterIndex])
|
||||
{
|
||||
PRUint32 typeTempIndex = 1; // Index into the temp string for a single filter type
|
||||
PRUint32 typesInThisFilter = 0; // Count for # of types in this filter
|
||||
bool finishedThisFilter = false; // Flag so we know when we're finsihed with the filter
|
||||
do // Loop throught the characters of filter string
|
||||
{
|
||||
if ((tempChar == ';') || (tempChar == 0))
|
||||
{ // End of filter type reached
|
||||
typeTemp[typeTempIndex] = 0;
|
||||
typeTemp[0] = typeTempIndex - 1;
|
||||
|
||||
icErr = ICMapEntriesFilename(icInstance, mappings, typeTemp, &icEntry);
|
||||
if (icErr != icPrefNotFoundErr)
|
||||
{
|
||||
bool addToList = true;
|
||||
tempOSType = icEntry.file_type;
|
||||
for (PRUint32 typeIndex = 0; typeIndex < typesInThisFilter; typeIndex++)
|
||||
{
|
||||
if (mTypeLists[loop1]->osType[typeIndex] == tempOSType)
|
||||
{
|
||||
addToList = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (addToList)
|
||||
mTypeLists[loop1]->osType[typesInThisFilter++] = tempOSType;
|
||||
}
|
||||
|
||||
typeTempIndex = 0; // Reset the temp string for the type
|
||||
typeTemp[0] = 0;
|
||||
if (tempChar == 0)
|
||||
finishedThisFilter = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
typeTemp[typeTempIndex++] = tempChar;
|
||||
}
|
||||
|
||||
filterIndex++;
|
||||
} while (!finishedThisFilter);
|
||||
|
||||
// Set hoe many OSTypes we actually found
|
||||
mTypeLists[loop1]->osTypeCount = typesInThisFilter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bail_w_IC:
|
||||
ICStop(icInstance);
|
||||
|
||||
bail_wo_IC:
|
||||
|
||||
#endif // FOR NOW JUST BYPASS ALL THIS CODE
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Get the file + path
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
NS_IMETHODIMP nsFileWidget::GetFile(nsFileSpec& aFile)
|
||||
{
|
||||
aFile = mFileSpec;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Get the file + path
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
NS_IMETHODIMP nsFileWidget::SetDefaultString(const nsString& aString)
|
||||
{
|
||||
mDefault = aString;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Set the display directory
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_METHOD nsFileWidget::SetDisplayDirectory(const nsFileSpec& aDirectory)
|
||||
{
|
||||
mDisplayDirectory = aDirectory;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Get the display directory
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
NS_METHOD nsFileWidget::GetDisplayDirectory(nsFileSpec& aDirectory)
|
||||
{
|
||||
aDirectory = mDisplayDirectory;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------
|
||||
nsFileDlgResults nsFileWidget::GetFile(
|
||||
nsIWidget * aParent,
|
||||
const nsString & promptString,
|
||||
nsFileSpec & theFileSpec)
|
||||
{
|
||||
Create(aParent, promptString, eMode_load, nsnull, nsnull);
|
||||
if (Show() == PR_TRUE)
|
||||
{
|
||||
theFileSpec = mFileSpec;
|
||||
return mSelectResult;
|
||||
}
|
||||
|
||||
return nsFileDlgResults_Cancel;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------
|
||||
nsFileDlgResults nsFileWidget::GetFolder(
|
||||
nsIWidget * aParent,
|
||||
const nsString & promptString,
|
||||
nsFileSpec & theFileSpec)
|
||||
{
|
||||
Create(aParent, promptString, eMode_getfolder, nsnull, nsnull);
|
||||
if (Show() == PR_TRUE)
|
||||
{
|
||||
theFileSpec = mFileSpec;
|
||||
return mSelectResult;
|
||||
}
|
||||
|
||||
return nsFileDlgResults_Cancel;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------
|
||||
nsFileDlgResults nsFileWidget::PutFile(
|
||||
nsIWidget * aParent,
|
||||
const nsString & promptString,
|
||||
nsFileSpec & theFileSpec)
|
||||
{
|
||||
Create(aParent, promptString, eMode_save, nsnull, nsnull);
|
||||
if (Show() == PR_TRUE)
|
||||
{
|
||||
theFileSpec = mFileSpec;
|
||||
return mSelectResult;
|
||||
}
|
||||
|
||||
return nsFileDlgResults_Cancel;
|
||||
}
|
||||
Reference in New Issue
Block a user