Index: /unk/uploadr/README.windows =================================================================== --- /trunk/uploadr/README.windows (revision 480) +++ (revision ) @@ -1,376 +1,0 @@ -Flickr Uploadr - -Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is -free software; you can redistribute it and/or modify it under the terms of -the GNU General Public License (GPL), version 2 only. This library is -distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU -GPL for more details (http://www.gnu.org/licenses/gpl.html) - ------------------------------------------------------------------------- - -This guide uses UPLOADR to indicate the root of the Flickr Uploadr -source tree on your filesystem. It probably shouldn't contain spaces -(C:\Documents and Settings\you\My Documents\Flickr Uploadr is probably -a bad idea). - -On Windows, you must use the MSys bash shell to build Uploadr. Cygwin -is not supported. Instructions for getting your MSys environment setup -are included below. - -You can obtain the Flickr Uploadr source code from either a tarball or -from Subversion. - -Download tarball: - http://flickr.com/tools/uploadr/ - -Checkout from Subversion: - $ svn co http://code.flickr.com/svn/trunk/uploadr UPLOADR - - -Windows Build Environment ------------------------------------------------------------------------- - -If you're planning on building the third party libraries on windows -(graphics magick, exiv2, ffmepg) then you'll need to have MS Visual C++ -version 8 or greater installed. Version 7 will work for the third party -libraries themselves, but version 8 is required for building the final -DLLs. - -To build the installers and such, you'll need to install MSYS. Start -by going here: - -http://sf.net/project/showfiles.php?group_id=2435 - -Choose 'MSYS Base System', then find the file called something like -'msysCORE-1.0.11-2007.01.19-1.tar.bz2'. Unzip this (get WinRaR if you -can't open it) and put it at C:\msys - -Download the following files from the 'MSYS Base System' page: - - MSYS-1.0.11-20071204.tar.bz2 - bash-3.1-MSYS-1.0.11-1.tar.bz2 - coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2 - -And download these file from the 'MSYS Supplementary Tools' page: - - perl-5.6.1-MSYS-1.0.11-1.tar.bz2 - crypt-1.1-1-MSYS-1.0.11-1.tar.bz2 - -Version numbers may be higher. Unzip them into the same folder as -MSYS, overwriting any existing duplicate files. - -When you launch MSYS via the batch file in its root folder, you should -be able to type 'perl -v' and get a Perl banner if all went well. - -Follow these steps to get MSYS working with Visual Studio: - -http://ffmpeg.arrozcru.com/ffmpeg_wiki/tiki-index.php?page=Fixing+msys - -From the same download page, download the following packages: - - From the MinGW Runtime section: - mingwrt-3.15-mingw32-dev.tar.gz - - From the GNU Binutils section: - binutils-2.18.50-20080109-2.tar.gz - - From the MinGW API for MS-Windows section: - w32api-3.11.tar.gz (because of http://archives.free.net.ph/message/20080910.160811.a4295713.en.html, not using 3.12 yet) - - From the GCC Version 4 / Technology Preview: gcc-4.2.1-sjlj-2 section: - gcc-core-4.2.1-sjlj-2.tar.gz - gcc-g++-4.2.1-sjlj-2.tar.gz - -Unpack each package into C:\msys\mingw then go to C:\msys\mingw\bin\ and -rename: - - c++-sjlj.exe to c++.exe - cpp-sjlj.exe to cpp.exe - g++-sjlj.exe to g++.exe - gcc-sjlj.exe to gcc.exe - -Make sure you have C:\msys\mingw\lib\crt2.o (comes from MinGW Runtime section) - -Follow these instructions to make mingw work with msys: - -http://ffmpeg.arrozcru.com/ffmpeg_wiki/tiki-index.php?page=Integrating+MinGW+with+MSys - -You probably already have an SVN client, but if not, you can grab the -commandline one from here: - - http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91 - svn-1.4.6-setup.exe (or a more recent version) - -Once installed, typing 'svn --version' from a fresh MSYS shell should give -you a version banner. - -Next you'll need a zip utility. Grab this zip file: - - ftp://ftp.info-zip.org/pub/infozip/WIN32/zip232xN.zip - -And copy zip.exe into msys/bin. Ok, all ready! - - -XULRunner ------------------------------------------------------------------------- - -XULRunner trunk builds: - ftp://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/latest-trunk/ - -Note: You want the version *without* 'sdk' in the name. - - -Download a version of XULRunner trunk and unzip it into: - UPLOADR/MacUploadr.app/Contents/Resources/ - -The XULRunner files (e.g. xulrunner.exe) should now be here: - UPLOADR/MacUploadr.app/Contents/Resources/xulrunner/ - -Make sure you unzip the file keeping directory paths intact. There should -be several folders inside the 'xulrunner' folder, including 'chrome', -'components', etc. - - -Gecko SDK ------------------------------------------------------------------------- - -To build the XPCOM components you will need the Gecko SDK: - http://developer.mozilla.org/en/docs/Gecko_SDK#Downloading - -Place the SDK here: - UPLOADR/MacUploadr.app/Contents/Resources/xulrunner-sdk - -These SDKs are from the Gecko 1.9 series and so are only safe to use -if the XPCOM components use only frozen interfaces. Fortunately, -Uploadr currently falls into this category. - - -You'll also need bits from Mozilla's Wintools: - http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/wintools.zip - -Extract that and copy glib-1.2.dll and libIDL-0.6.dll from -wintools/buildtools/windows/bin/x86/ to your xulrunner-sdk/sdk/bin/ directory. - - - -API Keys ------------------------------------------------------------------------- - -You'll need your own API key and secret from Flickr to build Uploadr. -These can be obtained at http://flickr.com/services/api/. The key -and secret must be placed in flKey.cpp in the spaces provided. Copy -flKey.cpp.template to flKey.cpp and insert your keys: - - UPLOADR/MacUploadr.app/Contents/Resources/components/flKey.cpp.template - UPLOADR/MacUploadr.app/Contents/Resources/components/flKey.cpp - -The API key is stored as a string. The secret is stored as individual -characters so it is not easily readable from the binary. - -There are blocks to keep both a Windows and Mac key/secret in the same -source file (you certainly don't have to, though). This is mainly -important for the official builds. - - - -GraphicsMagick ------------------------------------------------------------------------- - -Download GraphicsMagick Windows SOURCE: - ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/windows/ - -You'll need MS Visual C++ to build GraphicsMagick. We've built it -sucessfully using VC++ 7 and 8, but other versions may work fine. - -Go to the VisualMagick/configure directory of the GraphicsMagick Windows -source directory. Open configure.vcproj in Visual Studio and edit the -project configuration: - - o Set the active configuration to "Release" - o Change the Use of MFC under Configuration Properties > General to - "Use MFC in a Static Library" - o Change the Runtime Library under Configuration Properties > C/C++ > - Code Generation to "Multi-threaded (/MT)" - -Build the project and then run the configuration program (called -configure.exe, in the same folder as the .vcproj file). Select "Static -Multi-threaded runtimes" and otherwise accept the defaults. This will -create your solution (project file) for Visual Studio in the root -GraphicsMagick folder. It should be called 'VisualStaticMT.sln'. - -Open the solution and let Visual Studio 8 have its way with the Visual -Studio 7 solution file. Edit the project configuration: - - o Set the active configuration to "Release" for 'All' - o Change the Runtime Library for the CORE_Magick++ project under - Configuration Properties > C/C++ > Code Generation to - "Multi-threaded DLL (/MD)" - o Tell all of the CORE_* projects to optimize for speed under - Configuration Properties > C/C++ > Optimization - (Optimization: "Maximize Speed /O2") - -Build it to see where the problems are. As of 1.1.8, 18 out of 20 -projects build properly. The two that do not are utilities that are -extraneous. In 1.1.7, the errors that will likely show up in a -try/catch block can be fixed by changing "exception" to "std::exception" -and adding "&" to make all of the catches happen by reference. The -official builds are build with 1.1.10 and will soon move to 1.1.11. -build 1.2.5 builds all the CORE_* projects fine - -You can verify that enough of it built correctly by checking in the -VisualMagick\lib directory. There should be a .lib file for each -CORE_* project. - -Add the path to your GraphicsMagick build's VisualMagick\lib directory -to your library path. Add the path to VisualMagick\include (JDE --- -GraphicsMagick-1.2.5 does not have an include dir, but C:\Source\UPLOADR\GraphicsMagick-1.2.5\magick maybe) -to your include path. - -The magic.mgk, modules.mgk and delegates.mgk files must be in the root of -the application (next to application.ini). These files are included in -the tarball and Subversion checkouts, so you shouldn't have to worry. You -can otherwise find them in the VisualMagick\bin directory. - - -Exiv2 ------------------------------------------------------------------------- - -Download Exiv2 source from: - http://exiv2.org/download.html - -Download and install Expat for Windows: - http://sourceforge.net/project/showfiles.php?group_id=10127 - -Open up the solution file at 'msvc\exiv2.sln'. Just like GraphicsMagick, -let Visual Studio 8 eat the 7.1 project files. Edit the project -configuration: - - o Disable every project in the Exiv2 solution except exiv2lib and xmpsdk - (Use the configuration manager and uncheck the boxes) - o Change the Runtime Library for remaining projects under - Configuration Properties > C/C++ > Code Generation to - "Multi-threaded DLL (/MD)" - o Set remaining projects to their Release state - o Modify the xmpsdk project: - o Change Configuration Properties > C/C++ > General > - Additional Include Directories to (all one line): - "..\..\..\expat-2.0.1\lib;..\..\xmpsdk\src;..\..\xmpsdk\include;" - "C:\Program Files\Expat 2.0.1\Source\lib" - (the last path portion might be different, depending on where - you install expat). - o Change Configuration Properties > Librarian > General > - Additional Dependencies to "libexpat.lib" - o Change Configuration Properties > Librarian > General > - Additional Library Directories to: - "$(SolutionDir)/lib";"C:\Program Files\Expat 2.0.1\Bin" - o Modify the exiv2lib project: - o Change Configuration Properties > Librarian > General > - Link Library Dependencies to "Yes" (VC7 doesn't seem to have - this option - just skip it) - o Change Configuration Properties > C/C++ > General > - Additional Include Directories to: - "..\..\src;..\..;..\..\xmpsdk\include" - -You should now be able to build the solution. It should produce the -following files: - - msvc\exiv2lib\Release\exiv2.lib - msvc\xmpsdk\Release\xmpsdk.lib - -Copy libexpat.dll from "C:\Program Files\Expat 2.0.1\Bin" to -"UPLOADR\MacUploadr.app\Contents\Resources". - - -FFmpeg ------------------------------------------------------------------------- - -FFmpeg will not build in Visual Studio but can be linked by Visual -Studio, so we'll need to use MSys/WinGW. - ---- I'm dubious that we need to install anything extra here [CAL] ---- But i need to wait until i actually get gm.dll linking ---- Additionally add in dependencies like zlib: (got it from zlib-1.2.3-MSYS-1.0.11-1.tar.bz2 from the MSYS supplementary tool download URL) ---- http://wiki.videolan.org/Win32CompileMSYS - -Check out and build the most recent version of FFmpeg: -(handy hint: Shift+Insert pastes into the MSYS shell) - - $ svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg - $ cd ffmpeg - $ ./configure --disable-ffserver --disable-ffplay --enable-gpl \ - --enable-memalign-hack --enable-static --disable-shared \ - --disable-debug --enable-swscale - -The lastest version of FFmpeg is kinda broken on windows and needs -to be built one library at a time,. This should do the trick: - --- JDE : Note = with trunk from 09/17/08, make just works -BUT -had to patch MinGW as described at http://ffmpeg.arrozcru.org/wiki/index.php?title=MSys_MinGW -and commented out the #include - - $ cd libswscale && make && cd .. - $ cd libavdevice && make && cd .. - $ cd libavformat && make && cd .. - $ cd libavcodec && make && cd .. - $ cd libavutil && make && cd .. - $ make - -make install on windows doesn't work for FFmpeg trunk at the moment. -that may or may not be a problem... - -The Uploadr Visual Studio project is setup to expect the MinGW bits for -linking FFmpeg into the flGM XPCOM object. - - -Building XPCOM components ------------------------------------------------------------------------- - -If you make any changes to the IDL files defining the XPCOM interfaces, -you must increment the BuildID defined in: - UPLOADR/MacUploadr.app/Contents/Resources/application.ini - -Use the Visual Studio projects in: - UPLOADR/MacUploadr.app/Contents/Resources/components/*.vcproj - -Modify project properties to use your paths to GraphicsMagick and exiv2-0.17.1 - -The two projects will generate gm.dll and key.dll. - - -Running Flickr Uploadr ------------------------------------------------------------------------- - -Copy xulrunner-stub.exe from the xulrunner/ directory into the root -of your app, UPLOADR/MacUploadr.app/Contents/Resources/, rename it to -"Flickr Uploadr.exe" and double-click it to run Uploadr. -you also need to change the resource of this file to use the flickr uploadr icon. -You can use XN Resource editor from http://www.wilsonc.demon.co.uk/d10resourceeditor.htm - -You can hack the icons.ico file into the executable using Resource -Hacker: - http://angusj.com/resourcehacker/ - -Create a shortcut to this executable and append the "-console --jsconsole" parameters to launch Uploadr with both debug windows open. - - -Packaging ------------------------------------------------------------------------- - -Windows installers are created using NSIS, specifically the Unicode -version available here: - http://www.scratchpaper.com/ - -Building the NSIS package will likely fail if you do not have Visual -Studio 8 installed. The installer references vcredist_x86.exe. For -controlled experimentation it is OK to omit this installation step by -commenting line 110 in UPLOADR/windows_install_build.nsi. - -One-command builds in MSys for all eight languages: - $ make win all - -Or to build a single language: - $ make win packaging en-US - -If you do not want to create update files (see README.updates): - $ make win all-build Index: /unk/uploadr/NOTES =================================================================== --- /trunk/uploadr/NOTES (revision 385) +++ (revision ) @@ -1,152 +1,0 @@ -NOTES - - - -Offer a preference to not create thumbnails in the name of speed - Accomplish this with special case param of thumb_size = 0 to gm.thumb - This will still return the date taken but will not actually do the thumbing - - - -In case we ever want to set PROPER EXIF orientation rather than actually rotating pixels, -here is the C code: - -long orient = exif["Exif.Image.Orientation"].toLong(); -if (1 > orient || 8 < orient) { - orient = 1; -} -switch (orient) { - case 1: - if (90 == degrees) { - orient = 6; - } else if (-90 == degrees || 270 == degrees) { - orient = 8; - } - break; - case 2: - if (90 == degrees) { - orient = 5; - } else if (-90 == degrees || 270 == degrees) { - orient = 7; - } - break; - case 3: - if (90 == degrees) { - orient = 8; - } else if (-90 == degrees || 270 == degrees) { - orient = 6; - } - break; - case 4: - if (90 == degrees) { - orient = 7; - } else if (-90 == degrees || 270 == degrees) { - orient = 5; - } - break; - case 5: - if (90 == degrees) { - orient = 4; - } else if (-90 == degrees || 270 == degrees) { - orient = 2; - } - break; - case 6: - if (90 == degrees) { - orient = 3; - } else if (-90 == degrees || 270 == degrees) { - orient = 1; - } - break; - case 7: - if (90 == degrees) { - orient = 2; - } else if (-90 == degrees || 270 == degrees) { - orient = 4; - } - break; - case 8: - if (90 == degrees) { - orient = 1; - } else if (-90 == degrees || 270 == degrees) { - orient = 3; - } - break; - default: - break; -} -exif["Exif.Image.Orientation"] = uint32_t(orient); - - - -Files changed in my hacked up XULRunner locales - locale/xx-xx/global/dialog.properties - locale/xx-xx/global/wizard.dtd - locale/xx-xx/mozapps/update/* - - - -Errors building FFmpeg into XPCOM: - -ld: common symbols not allowed with MH_DYLIB output format with the -multi_module option -/usr/local/lib/libavcodec.a(dsputil_mmx.o) definition of common _mm_flags (size 16) -/usr/local/lib/libavcodec.a(h261.o) definition of common _ff_h261_rl_table_store (size 400) -/usr/local/lib/libavcodec.a(cabac.o) definition of common _ff_h264_lps_range (size 512) -/usr/local/lib/libavcodec.a(cabac.o) definition of common _ff_h264_mlps_state (size 256) -/usr/local/lib/libavcodec.a(mpeg12.o) definition of common _ff_mpeg12_static_rl_table_store (size 784) -/usr/local/lib/libavcodec.a(msmpeg4data.o) definition of common _ff_msmp4_dc_chroma_vlc (size 32) -/usr/local/lib/libavcodec.a(msmpeg4data.o) definition of common _ff_msmp4_dc_luma_vlc (size 32) -/usr/local/lib/libavcodec.a(msmpeg4data.o) definition of common _ff_msmp4_mb_i_vlc (size 16) -/usr/local/lib/libavcodec.a(vc1data.o) definition of common _ff_vc1_4mv_block_pattern_vlc (size 64) -/usr/local/lib/libavcodec.a(vc1data.o) definition of common _ff_vc1_ac_coeff_table (size 128) -/usr/local/lib/libavcodec.a(vc1data.o) definition of common _ff_vc1_bfraction_vlc (size 16) -/usr/local/lib/libavcodec.a(vc1data.o) definition of common _ff_vc1_cbpcy_p_vlc (size 64) -/usr/local/lib/libavcodec.a(vc1data.o) definition of common _ff_vc1_imode_vlc (size 16) -/usr/local/lib/libavcodec.a(vc1data.o) definition of common _ff_vc1_mv_diff_vlc (size 64) -/usr/local/lib/libavcodec.a(vc1data.o) definition of common _ff_vc1_norm2_vlc (size 16) -/usr/local/lib/libavcodec.a(vc1data.o) definition of common _ff_vc1_norm6_vlc (size 16) -/usr/local/lib/libavcodec.a(vc1data.o) definition of common _ff_vc1_subblkpat_vlc (size 48) -/usr/local/lib/libavcodec.a(vc1data.o) definition of common _ff_vc1_ttblk_vlc (size 48) -/usr/local/lib/libavcodec.a(vc1data.o) definition of common _ff_vc1_ttmb_vlc (size 48) -/usr/local/lib/libavcodec.a(msmpeg4.o) definition of common _ff_inter_intra_vlc (size 16) -/usr/local/lib/libavcodec.a(msmpeg4.o) definition of common _ff_mb_non_intra_vlc (size 64) -/usr/local/lib/libavcodec.a(cabac.o) definition of common _ff_h264_lps_state (size 128) -/usr/local/lib/libavcodec.a(cabac.o) definition of common _ff_h264_mps_state (size 128) -/usr/bin/libtool: internal link edit command failed - - - -ld: Undefined symbols: -__Z11img_convertP9AVPictureiPKS_iii -__Z12avcodec_openP14AVCodecContextP7AVCodec -__Z13av_read_frameP15AVFormatContextP8AVPacket -__Z13avcodec_closeP14AVCodecContext -__Z14avpicture_fillP9AVPicturePhiii -__Z15av_register_allv -__Z18av_open_input_filePP15AVFormatContextPKcP13AVInputFormatiP18AVFormatParameters -__Z18avpicture_get_sizeiii -__Z19av_close_input_fileP15AVFormatContext -__Z19av_find_stream_infoP15AVFormatContext -__Z19avcodec_alloc_framev -__Z20avcodec_decode_videoP14AVCodecContextP7AVFramePiPhi -__Z20avcodec_find_decoder7CodecID -__Z7av_freePv -__Z9av_mallocj - - - -Software Update - -Partials are broken. Eh. - - - -some useful XUL video stuff: -http://www.sephiroth.it/weblog/archives/2006/10/xul_and_xulrunner_costarring_f.php -http://xulplayer.sourceforge.net/ - - -cal : i assume there's a good reason why we can't build the xpcom objects in msys/mingw? -richard : um -richard : i don't think so but i don't completely understand the compatibility issues between binaries out of visual studio and binaries from msys -richard : er, mingw's g++ Index: /unk/uploadr/README.linux =================================================================== --- /trunk/uploadr/README.linux (revision 383) +++ (revision ) @@ -1,108 +1,0 @@ -Flickr Uploadr - -Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is -free software; you can redistribute it and/or modify it under the terms of -the GNU General Public License (GPL), version 2 only. This library is -distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU -GPL for more details (http://www.gnu.org/licenses/gpl.html) - ------------------------------------------------------------------------- - -This guide uses UPLOADR to indicate the root of the Flickr Uploadr -source tree on your filesystem. It probably shouldn't contain spaces. - -You can obtain the Flickr Uploadr source code from either a tarball or -from Subversion. - -Download tarball: - http://flickr.com/tools/uploadr/ - -Checkout from Subversion: - $ svn co http://code.flickr.com/svn/trunk/uploadr UPLOADR - - -XULRunner ------------------------------------------------------------------------- - -XULRunner trunk builds: - ftp://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/latest-trunk/ - -Note: You want the version *without* 'sdk' in the name. - -TODO - - -Gecko SDK ------------------------------------------------------------------------- - -To build the XPCOM components you will need the Gecko SDK: - http://developer.mozilla.org/en/docs/Gecko_SDK#Downloading - -Place the SDK here: - UPLOADR/MacUploadr.app/Contents/Resources/gecko-sdk.lin - -These SDKs are from the Gecko 1.8 series and so are only safe to use -if the XPCOM components use only frozen interfaces. Fortunately, -Uploadr currently falls into this category. - - -API Keys ------------------------------------------------------------------------- - -You'll need your own API key and secret from Flickr to build Uploadr. -These can be obtained at http://flickr.com/services/api/. The key -and secret must be placed in flKey.cpp in the spaces provided. Copy -flKey.cpp.template to flKey.cpp and insert your keys: - - UPLOADR/MacUploadr.app/Contents/Resources/components/flKey.cpp.template - UPLOADR/MacUploadr.app/Contents/Resources/components/flKey.cpp - -The API key is stored as a string. The secret is stored as individual -characters so it is not easily readable from the binary. - -There are blocks to keep both a Windows and Mac key/secret in the same -source file (you certainly don't have to, though). This is mainly -important for the official builds. - - -GraphicsMagick ------------------------------------------------------------------------- - -TODO - - -Exiv2 ------------------------------------------------------------------------- - -Download Exiv2 source from: - http://exiv2.org/download.html - -TODO - - -FFmpeg ------------------------------------------------------------------------- - -TODO - - -Building XPCOM components ------------------------------------------------------------------------- - -If you make any changes to the IDL files defining the XPCOM interfaces, -you must increment the BuildID defined in: - UPLOADR/MacUploadr.app/Contents/Resources/application.ini - -TODO - - -Running Flickr Uploadr ------------------------------------------------------------------------- - -TODO - - -Packaging ------------------------------------------------------------------------- - -TODO Index: /unk/uploadr/LICENSE.txt =================================================================== --- /trunk/uploadr/LICENSE.txt (revision 252) +++ (revision ) @@ -1,267 +1,0 @@ -Flickr Uploadr - -Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is free -software; you can redistribute it and/or modify it under the terms of the GNU -General Public License (GPL), version 2 ONLY. - -GNU GENERAL PUBLIC LICENSE Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, -Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and -distribute verbatim copies of this license document, but changing it is not -allowed. - -Preamble - -The licenses for most software are designed to take away your freedom to share -and change it. By contrast, the GNU General Public License is intended to -guarantee your freedom to share and change free software--to make sure the -software is free for all its users. This General Public License applies to -most of the Free Software Foundation's software and to any other program whose -authors commit to using it. (Some other Free Software Foundation software is -covered by the GNU Library General Public License instead.) You can apply it -to your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom to -distribute copies of free software (and charge for this service if you wish), -that you receive source code or can get it if you want it, that you can change -the software or use pieces of it in new free programs; and that you know you -can do these things. - -To protect your rights, we need to make restrictions that forbid anyone to -deny you these rights or to ask you to surrender the rights. These -restrictions translate to certain responsibilities for you if you distribute -copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether gratis or for -a fee, you must give the recipients all the rights that you have. You must -make sure that they, too, receive or can get the source code. And you must -show them these terms so they know their rights. - -We protect your rights with two steps: (1) copyright the software, and (2) -offer you this license which gives you legal permission to copy, distribute -and/or modify the software. - -Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If the -software is modified by someone else and passed on, we want its recipients to -know that what they have is not the original, so that any problems introduced -by others will not reflect on the original authors' reputations. - -Finally, any free program is threatened constantly by software patents. We -wish to avoid the danger that redistributors of a free program will -individually obtain patent licenses, in effect making the program proprietary. -To prevent this, we have made it clear that any patent must be licensed for -everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and modification -follow. - -GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND -MODIFICATION - -0. This License applies to any program or other work which contains a notice -placed by the copyright holder saying it may be distributed under the terms of -this General Public License. The "Program", below, refers to any such program -or work, and a "work based on the Program" means either the Program or any -derivative work under copyright law: that is to say, a work containing the -Program or a portion of it, either verbatim or with modifications and/or -translated into another language. (Hereinafter, translation is included -without limitation in the term "modification".) Each licensee is addressed as -"you". - -Activities other than copying, distribution and modification are not covered -by this License; they are outside its scope. The act of running the Program is -not restricted, and the output from the Program is covered only if its -contents constitute a work based on the Program (independent of having been -made by running the Program). Whether that is true depends on what the Program -does. - -1. You may copy and distribute verbatim copies of the Program's source code as -you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice and -disclaimer of warranty; keep intact all the notices that refer to this License -and to the absence of any warranty; and give any other recipients of the -Program a copy of this License along with the Program. - -You may charge a fee for the physical act of transferring a copy, and you may -at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion of it, -thus forming a work based on the Program, and copy and distribute such -modifications or work under the terms of Section 1 above, provided that you -also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices stating that -you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in whole or in -part contains or is derived from the Program or any part thereof, to be -licensed as a whole at no charge to all third parties under the terms of this -License. - -c) If the modified program normally reads commands interactively when run, you -must cause it, when started running for such interactive use in the most -ordinary way, to print or display an announcement including an appropriate -copyright notice and a notice that there is no warranty (or else, saying that -you provide a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this License. -(Exception: if the Program itself is interactive but does not normally print -such an announcement, your work based on the Program is not required to print -an announcement.) - -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Program, and can be reasonably -considered independent and separate works in themselves, then this License, -and its terms, do not apply to those sections when you distribute them as -separate works. But when you distribute the same sections as part of a whole -which is a work based on the Program, the distribution of the whole must be on -the terms of this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise the -right to control the distribution of derivative or collective works based on -the Program. - -In addition, mere aggregation of another work not based on the Program with -the Program (or with a work based on the Program) on a volume of a storage or -distribution medium does not bring the other work under the scope of this -License. - -3. You may copy and distribute the Program (or a work based on it, under -Section 2) in object code or executable form under the terms of Sections 1 and -2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable source code, -which must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three years, to give -any third party, for a charge no more than your cost of physically performing -source distribution, a complete machine-readable copy of the corresponding -source code, to be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer to -distribute corresponding source code. (This alternative is allowed only for -noncommercial distribution and only if you received the program in object code -or executable form with such an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for making -modifications to it. For an executable work, complete source code means all -the source code for all modules it contains, plus any associated interface -definition files, plus the scripts used to control compilation and -installation of the executable. However, as a special exception, the source -code distributed need not include anything that is normally distributed (in -either source or binary form) with the major components (compiler, kernel, and -so on) of the operating system on which the executable runs, unless that -component itself accompanies the executable. - -If distribution of executable or object code is made by offering access to -copy from a designated place, then offering equivalent access to copy the -source code from the same place counts as distribution of the source code, -even though third parties are not compelled to copy the source along with the -object code. - -4. You may not copy, modify, sublicense, or distribute the Program except as -expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense or distribute the Program is void, and will automatically terminate -your rights under this License. However, parties who have received copies, or -rights, from you under this License will not have their licenses terminated so -long as such parties remain in full compliance. - -5. You are not required to accept this License, since you have not signed it. -However, nothing else grants you permission to modify or distribute the -Program or its derivative works. These actions are prohibited by law if you do -not accept this License. Therefore, by modifying or distributing the Program -(or any work based on the Program), you indicate your acceptance of this -License to do so, and all its terms and conditions for copying, distributing -or modifying the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the Program), -the recipient automatically receives a license from the original licensor to -copy, distribute or modify the Program subject to these terms and conditions. -You may not impose any further restrictions on the recipients' exercise of the -rights granted herein. You are not responsible for enforcing compliance by -third parties to this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or otherwise) -that contradict the conditions of this License, they do not excuse you from -the conditions of this License. If you cannot distribute so as to satisfy -simultaneously your obligations under this License and any other pertinent -obligations, then as a consequence you may not distribute the Program at all. -For example, if a patent license would not permit royalty-free redistribution -of the Program by all those who receive copies directly or indirectly through -you, then the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply and -the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or -other property right claims or to contest validity of any such claims; this -section has the sole purpose of protecting the integrity of the free software -distribution system, which is implemented by public license practices. Many -people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose that -choice. - -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in certain -countries either by patents or by copyrighted interfaces, the original -copyright holder who places the Program under this License may add an explicit -geographical distribution limitation excluding those countries, so that -distribution is permitted only in or among countries not thus excluded. In -such case, this License incorporates the limitation as if written in the body -of this License. - -9. The Free Software Foundation may publish revised and/or new versions of the -General Public License from time to time. Such new versions will be similar in -spirit to the present version, but may differ in detail to address new -problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any later -version", you have the option of following the terms and conditions either of -that version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of this License, -you may choose any version ever published by the Free Software Foundation. - -10. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by the Free Software Foundation, -write to the Free Software Foundation; we sometimes make exceptions for this. -Our decision will be guided by the two goals of preserving the free status of -all derivatives of our free software and of promoting the sharing and reuse of -software generally. - -NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE -PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND -PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, -YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL -ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE -OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR -DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR -A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH -HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -END OF TERMS AND CONDITIONS Index: /unk/uploadr/README.updates =================================================================== --- /trunk/uploadr/README.updates (revision 541) +++ (revision ) @@ -1,47 +1,0 @@ - -Software Update ------------------------------------------------------------------------- - -Uploadr phones home to Flickr about once a day to check for updates, -available as MAR files. Details: - http://wiki.mozilla.org/Software_Update - -Actually creating software updates means actually building Mozilla. -This is not for the faint of heart. - -Start by satisfying prerequisites for your platform: - http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites - http://developer.mozilla.org/en/docs/Mac_OS_X_Build_Prerequisites - including https://developer.mozilla.org/Talk:en/Mac_OS_X_Build_Prerequisites#PKG_CONFIG_path - -NEW - get mozilla-build: http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.3.exe - Open a shell window by running: c:\mozilla-build\start-msvc8.bat - cd /c - hg clone http://hg.mozilla.org/mozilla-central mozilla for latest - hg clone http://hg.mozilla.org/releases/mozilla-1.9.1 mozilla for 1.9.1 -OLD -Now checkout and build Mozilla: - $ cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot \ - co mozilla/client.mk - -Configure your build, using the UPLOADR/mozconfig file. Make sure to -comment the Mac-specific line if you're on Windows: - http://developer.mozilla.org/en/docs/Configuring_Build_Options - - $ cd mozilla - -NEW - hg pull -r default - hg update -OLD - $ make -f client.mk checkout - - $ make -f client.mk build - -Once you have your Mozilla tree built, the Packaging section in the \ -platform-specific README files can complete properly. Alternatively, -if you just want to build the MAR files: - $ make win all-mar - $ make mac all-mar - $ make lin all-mar Index: /unk/uploadr/strings_verify.php =================================================================== --- /trunk/uploadr/strings_verify.php (revision 562) +++ (revision ) @@ -1,130 +1,0 @@ - array( - 'title.version' => '!\${VERSION}!', - 'title.version.inst' => '!\${VERSION}!', - ), - 'main.dtd' => array( - 'help.offline' => $rx_hats, - 'help.drag' => $rx_hats, - 'help.faq' => $rx_hats, - '!photos.init.text.joined' => '!.+!', - ), - 'main.properties' => array( - 'video.add.restricted.sz.guidelines' => $rx_hats, - 'video.add.restricted.pz.guidelines' => $rx_hats, - 'video.add.restricted.sp.guidelines' => $rx_hats, - 'video.add.restricted.pp.guidelines' => $rx_hats, - 'video.edit.restricted.sz.guidelines' => $rx_hats, - 'video.edit.restricted.pz.guidelines' => $rx_hats, - 'video.edit.restricted.sp.guidelines' => $rx_hats, - 'video.edit.restricted.pp.guidelines' => $rx_hats, - ), - 'proxy.dtd' => array( - 'connectionDesc.label' => '!\&brandShortName\;!', - ), - ); - - - # - # ignore everything below this line :) - # - - ######################################################################################### - - - $locales = dirname(__FILE__).'/MacUploadr.app/Contents/Resources/chrome/locale'; - - $dh = opendir($locales); - while ($file = readdir($dh)){ - - if (is_dir("$locales/$file") && preg_match('!^[a-z0-9]{2}-[a-z0-9]{2}$!i', $file)){ - - check_language($file, $check); - } - } - closedir($dh); - - ######################################################################################### - - function check_language($lang, $check){ - - echo "checking $lang: "; flush(); - - foreach ($check as $file => $strings){ - - $catalogue = load_strings($lang, $file); - - foreach ($strings as $key => $rx){ - - if ($key{0} == '!'){ - - if (preg_match($rx, $catalogue[substr($key, 1)])){ - - echo "\nMatched $rx against $catalogue[$key]\n"; - - }else{ - echo '.'; flush(); - } - - }else{ - - if (!preg_match($rx, $catalogue[$key])){ - - echo "\nFailed to match $rx against $catalogue[$key]\n"; - - }else{ - echo '.'; flush(); - } - } - } - } - - echo "done\n"; flush(); - } - - ######################################################################################### - - function load_strings($lang, $filename){ - - $path = dirname(__FILE__).'/MacUploadr.app/Contents/Resources/chrome/locale/'.$lang.'/'.$filename; - - $lines = file($path); - $dict = array(); - - if (preg_match('!\.dtd$!', $filename)){ - - foreach ($lines as $line){ - - if (preg_match('!ENTITY\s+([A-Za-z0-9._]+)\s+"([^"]+)"!', $line, $m)){ - - $dict[$m[1]] = $m[2]; - } - } - } - - if (preg_match('!\.properties$!', $filename)){ - - foreach ($lines as $line){ - - if (preg_match('!^([a-z0-9-.]+)=(.*)$!i', $line, $m)){ - - $dict[$m[1]] = $m[2]; - } - } - } - - return $dict; - } - - ######################################################################################### -?> Index: /unk/uploadr/README.osx =================================================================== --- /trunk/uploadr/README.osx (revision 586) +++ (revision ) @@ -1,243 +1,0 @@ -Flickr Uploadr - -Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is -free software; you can redistribute it and/or modify it under the terms of -the GNU General Public License (GPL), version 2 only. This library is -distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU -GPL for more details (http://www.gnu.org/licenses/gpl.html) - ------------------------------------------------------------------------- - -This guide uses UPLOADR to indicate the root of the Flickr Uploadr -source tree on your filesystem. It probably shouldn't contain spaces. - -You can obtain the Flickr Uploadr source code from either a tarball or -from Subversion. - -Download tarball: - http://flickr.com/tools/uploadr/ - -Checkout from Subversion: - $ svn co http://code.flickr.com/svn/trunk/uploadr UPLOADR - - -XULRunner ------------------------------------------------------------------------- - -you'll have to build it until 1.9.1 is released -Good luck! - -finish with : -make -C obj-xulrunner/ppc/xulrunner/installer/ CHOWN_ROOT=~/UPLOADR/chown_root CHOWN_REVERT=~/UPLOADR/chown_revert -install the resulting xulrunner-1.9.1b3pre.en-US.mac-pkg.dmg - - -(rsync -rl mozilla/obj-xulrunner/ppc/dist/universal/xulrunner/XUL.framework/ MacUploadr.app/Contents/Frameworks) - - -XULRunner trunk builds: - ftp://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/latest-trunk/ - -Note: You want the version *without* 'sdk' in the name. - -Install the Mac version of XULRunner, which will live in -/Library/Frameworks. Then pull it into your fake Uploadr distribution: - $ mkdir UPLOADR/MacUploadr.app/Contents/Frameworks - $ sudo mv /Library/Frameworks/XUL.framework \ - UPLOADR/MacUploadr.app/Contents/Frameworks - -Install MacPorts if you haven't already: - http://svn.macosforge.org/repository/macports/downloads/MacPorts-1.5.0/ - -The Mozilla tools require the IDL library: - $ sudo port install libidl (sudo /opt/local/bin/port install libidl) - - -Gecko SDK ------------------------------------------------------------------------- - -To build the XPCOM components you will need the Gecko SDK. For PPC Mac: - http://developer.mozilla.org/en/docs/Gecko_SDK#Downloading - -For Intel Mac: -http://developer.mozilla.org/en/docs/Gecko_SDK#Downloading -was http://www.oxymoronical.com/view/1114 - -Place the SDK(s) appropriately: - UPLOADR/MacUploadr.app/Contents/Resources/gecko-sdk.mac (Intel Mac) - UPLOADR/MacUploadr.app/Contents/Resources/gecko-sdk.ppc (PPC Mac) - -These SDKs are from the Gecko 1.8/1.9 series and so are only safe to use -if the XPCOM components use only frozen interfaces. Fortunately, -Uploadr currently falls into this category. - -Beware https://developer.mozilla.org/en/Gecko_SDK#Issues_with_the_OS_X_SDK - -API Keys ------------------------------------------------------------------------- - -You'll need your own API key and secret from Flickr to build Uploadr. -These can be obtained at http://flickr.com/services/api/. The key -and secret must be placed in flKey.cpp in the spaces provided. Copy -flKey.cpp.template to flKey.cpp and insert your keys: - - UPLOADR/MacUploadr.app/Contents/Resources/components/flKey.cpp.template - UPLOADR/MacUploadr.app/Contents/Resources/components/flKey.cpp - -The API key is stored as a string. The secret is stored as individual -characters so it is not easily readable from the binary. - -There are blocks to keep both a Windows and Mac key/secret in the same -source file (you certainly don't have to, though). This is mainly -important for the official builds. - -Libintl static linking ------------------------------------------------------------------------- -Because of dynamic/static linker weirdness, before building GraphicsMagick, -and Exiv, move libintl.dylibout of the way: - $ sudo mv /opt/local/lib/libintl.dylib /opt/local/lib/libintl.dylib.sav -you might need to do that for all the versions of libintl you have on your system - -GraphicsMagick ------------------------------------------------------------------------- - -Install prerequisites with MacPorts: - $ sudo port install jpeg configure.flags=-O3 - $ sudo port install tiff configure.flags=-O3 - $ sudo port install libpng - -in trunk, using 1.3.5 release - -Configure and install GraphicsMagick: - $ ./configure \ - CFLAGS="-O3" \ - CXXFLAGS="-O3" \ - CPPFLAGS="-I/opt/local/include -I/usr/local/include" \ - LDFLAGS="-L/opt/local/lib -L/usr/local/lib" \ - --without-x --without-perl \ - --disable-installed \ - --without-dps --without-fpx --without-jbig --without-jp2 \ - --without-lcms --without-trio --without-ttf --without-wmf \ - --with-quantum-depth=16 - $ make && sudo make install - -Because of dynamic/static linker weirdness, after building GraphicsMagick, -move libjpeg.dylib, libtiff.dylib and libpng.dylib out of the way: - $ sudo mv /opt/local/lib/libjpeg.dylib /opt/local/lib/libjpeg.dylib.sav - $ sudo mv /opt/local/lib/libtiff.dylib /opt/local/lib/libtiff.dylib.sav - $ sudo mv /opt/local/lib/libpng.dylib /opt/local/lib/libpng.dylib.sav - -For Mac, the magic.mgk, modules.mgk and delegates.mgk files must be in -Contents/lib/GraphicsMagick-/config/. Like on Windows, these -are included in the tarball/Subversion trees. - - - -Exiv2 ------------------------------------------------------------------------- - -Download Exiv2 source from: - http://exiv2.org/download.html - -In Unix-land, it's easy! - $ sudo port install libiconv - $ sudo port install expat - $ sudo port install xml2 - $ ./configure --prefix=/opt/local --disable-shared --with-expat=/opt/local - $ make && sudo make install - -Again because of static linker weirdness, after building Exiv2, move the -dynamic libraries out of the way: - $ sudo mv /opt/local/lib/libiconv.dylib /opt/local/lib/libiconv.dylib.sav - $ sudo mv /opt/local/lib/libexpat.dylib /opt/local/lib/libexpat.dylib.sav - $ sudo mv /opt/local/lib/libxml2.dylib /opt/local/lib/libxml2.dylib.sav ??? - - -FFmpeg ------------------------------------------------------------------------- - -Check out the most recent version of FFmpeg: - $ svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg - $ cd ffmpeg - -Then build: - $ ./configure --disable-ffserver --disable-ffplay --enable-gpl \ - --disable-mmx --enable-static --disable-shared \ - --extra-cflags=-fno-common --disable-debug - $ make && sudo make install - - -Building XPCOM components ------------------------------------------------------------------------- - -If you make any changes to the IDL files defining the XPCOM interfaces, -you must increment the BuildID defined in: - UPLOADR/MacUploadr.app/Contents/Resources/application.ini - -Use the Makefile in: - UPLOADR/MacUploadr.app/Contents/Resources/components/ - -http://developer.mozilla.org/en/docs/Gecko_SDK#Issues_with_the_OS_X_SDK - -Running `make ppc gm ; make ppc key` will build the PPC binaries as -gm.dylib.ppc and key.dylib.ppc. `make mac gm ; make mac key` will -build gm.dylib.mac and key.dylib.mac. These architecture-dependent -files can be combined on an Intel Mac to leave gm.dylib and key.dylib -by running `make universal gm ; make universal key`. - -Make sure by running otool -Lv that you are not depending on -, which is not intalled by default on Mac Os X - -Running Flickr Uploadr ------------------------------------------------------------------------- -cp MacUploadr.app/Contents/Frameworks/Versions/1.9..../xulrunner-bin MacUploadr.app/Contents/MacOS/xulrunner ??? - -The app can be launched by double-clicking on MacUploadr.app in Finder. - -Launch Uploadr from Terminal to get debug windows: - $ chmod a+w MacUploadr.app/Contents/MacOS/xulrunner - $ chmod a+x MacUploadr.app/Contents/MacOS/xulrunner - $ MacUploadr.app/Contents/MacOS/xulrunner -jsconsole - - -Packaging ------------------------------------------------------------------------- - -The nice background image for the DMGs must be recreated each time you -change version numbers. - o Start Disk Utility and create a new image called "Flickr Uploadr - $(VERSION)" (substitute your version) - o Create a folder there called "Flickr Uploadr.app" and a symbolic - link called "Applications" - o Copy one of the installer images from mac_installer/ in as ".i.png" - o Create a symbolic link to that image as "i.png" - o Open the image with Finder and press Command+J to set folder options - o Select "This window only" - o Set the "Icon size" to 128px - o Uncheck "Snap to grid" - o Set the background picture to your "i.png" symbolic link (this - is rather finicky) - o Close the settings window - o Delete the "i.png" symbolic link (the hidden file will remain) - o Arrange the icons appropriately - o Close the window - -After all of that, copy the .DS_Store file into your source tree, the -Makefile will take care of everything else (substitute your version): - $ cp /Volumes/Flickr\ Uploadr\ $(VERSION)/.DS_Store \ - UPLOADR/mac_installer/DS_Store - -Unmount and delete the disk image you created. - -One-command builds for all eight languages: - $ make mac all - -NOTE: This will fail at the MAR build steps, unless you have the Mozilla -tools built and installed. See README.updates for this, or you can -skip the MAR build step (recommended for outside developers): - $ make mac all-build - -Or to build a single language: - $ make mac build en-US - - Index: /unk/uploadr/strings_extract.php =================================================================== --- /trunk/uploadr/strings_extract.php (revision 138) +++ (revision ) @@ -1,90 +1,0 @@ -\n"); - } - $project = $argv[1]; - - # - # find files we care about - # - - $dh = opendir($locale); - while (($file = readdir($dh)) !== false){ - - if (preg_match('!\.dtd!', $file)){ do_dtd($file); } - if (preg_match('!\.properties!', $file)){ do_props($file); } - } - closedir($dh); - - ############################################################################################## - - function do_dtd($file){ - - global $locale, $str_hash, $dir, $project; - - $content = implode(file("$locale/$file")); - - $str_hash = array(); - - $content = preg_replace_callback('!ENTITY ([A-Za-z0-9._]+) "([^"]+)"!', 'markup_dtd', - $content); - - $content .= "\n\n"; - - foreach ($str_hash as $k => $v){ - - $v = implode('{TOKEN}', $v); - $content .= "$v\">\n"; - } - - $fh = fopen("$dir/ext_uploadr3_{$file}.txt", 'w'); - fwrite($fh, $content); - fclose($fh); - - echo "wrote $dir/ext_uploadr3_{$file}.txt\n"; - } - - function markup_dtd($m){ - - global $project; - - if (preg_match('!^(.*)\.(\d+)$!', $m[1], $m2)){ - - if ($m2[2] < 10){ - - $GLOBALS[str_hash][$m2[1]][$m2[2]] = $m[2]; - - return "ENTITY $m[1] \"$m[2]\""; - } - } - - return "ENTITY $m[1] \"$m[2]\""; - } - - ############################################################################################## - - function do_props($file){ - - global $locale, $dir, $project; - - $content = implode(file("$locale/$file")); - - $content = preg_replace('!^([a-z0-9._]+)=(.*)$!im', "$1=$2", - $content); - - $fh = fopen("$dir/ext_uploadr3_{$file}.txt", 'w'); - fwrite($fh, $content); - fclose($fh); - - echo "wrote $dir/ext_uploadr3_{$file}.txt\n"; - } - - ############################################################################################## - -?> Index: /unk/uploadr/strings_import.php =================================================================== --- /trunk/uploadr/strings_import.php (revision 368) +++ (revision ) @@ -1,95 +1,0 @@ -\n"); -} - -# Clean each directory's files -foreach (array('de-de', 'es-us', 'fr-fr', 'it-it', 'ko-kr', 'pt-br', 'zh-hk') as $l) { - $dir = opendir("$argv[1]/$l"); - if (!$dir) die; - while (false !== $file = readdir($dir)) { - - # Only act on DTD and PROPERTIES files - if (0 == preg_match('/^.*ext_uploadr3_(.*\.(?:dtd|properties)).txt.php$/', $file, $match)) { - continue; - } - - # Make sure the destination directory exists - if (!file_exists("$locale/$l") && !mkdir("$locale/$l", 0755)) { - echo "[error] Can't create locale $l\n"; - continue; - } - - # Clean PHP garbage out - $text = file_get_contents("$argv[1]/$l/$file"); - if (false === $text) { - echo "[error] Reading $file\n"; - continue; - } - $text = trim(preg_replace('/^<\?php.*\?>$/ms', '', $text)); - - # Process each string - $lines = explode("\n", $text); - $ii = sizeof($lines); - $replace = array(); - for ($i = 0; $i < $ii; ++$i) { - - # Escape & and " properly - if (preg_match('/^()$/', $lines[$i], $s)) { - $lines[$i] = $s[1] . str_replace('"', '"', - preg_replace('/&(?!#\d\d;)/', '&', $s[2])) . $s[3]; - } - - # Split up combined complicated strings - if (preg_match('/^$/', $lines[$i], $s) - && preg_match('/^(.+)\.joined$/', $s[1], $k)) { - $parts = explode(' ', $s[2]); - if (2 == sizeof($parts)) { - $replace["{$k[1]}.1"] = "{$parts[0]} "; - $replace["{$k[1]}.2"] = " {$parts[1]}"; - $lines[$i] = ''; - } - } - - } - - # Replace split up versions with their translations - for ($i = 0; $i < $ii; ++$i) { - if (preg_match('/^$/', $lines[$i], $s) - && isset($replace[$s[1]])) { - $lines[$i] = ""; - } - } - - # Write and save - $file = next($match); - $file_p = fopen("$locale/$l/$file", 'w'); - if (false === $file_p) { - echo "[error] Opening $file\n"; - continue; - } - if (false === fwrite($file_p, implode("\n", $lines))) { - echo "[error] Writing $file\n"; - } - if (false === fclose($file_p)) { - echo "[error] Closing $file\n"; - } - - echo "[ok] finished writing $l/$file\n"; - } - closedir($dir); -} - -?> Index: /unk/uploadr/Makefile =================================================================== --- /trunk/uploadr/Makefile (revision 602) +++ (revision ) @@ -1,451 +1,0 @@ -# -# Flickr Uploadr -# -# Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is -# free software; you can redistribute it and/or modify it under the terms of -# the GNU General Public License (GPL), version 2 only. This library is -# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU -# GPL for more details (http://www.gnu.org/licenses/gpl.html) -# - -# Macs can build DMGs and MARs for all languages with `make` -# Windows can build installers and MARs for all languages with `make win` - -INTL := $(filter de-de en-US es-us fr-fr it-it ko-kr pt-br zh-hk ja-jp, $(MAKECMDGOALS)) - -ifeq (de-de, $(INTL)) -INTL_SHORT := de -endif -ifeq (en-US, $(INTL)) -INTL_SHORT := en -endif -ifeq (es-us, $(INTL)) -INTL_SHORT := es -endif -ifeq (fr-fr, $(INTL)) -INTL_SHORT := fr -endif -ifeq (it-it, $(INTL)) -INTL_SHORT := it -endif -ifeq (ko-kr, $(INTL)) -INTL_SHORT := kr -endif -ifeq (pt-br, $(INTL)) -INTL_SHORT := br -endif -ifeq (zh-hk, $(INTL)) -INTL_SHORT := hk -endif -ifeq (ja-jp, $(INTL)) -INTL_SHORT := ja -endif - - -######################################################################## -######################################################################## -# Configuration - -# Source files -# Even though this isn't a very Windows-y path, it makes life -# simpler to use it on all platforms -SRC := MacUploadr.app/Contents - -# Version number for Uploadr - this comes from application.ini -VER := `grep ^Version= $(SRC)/Resources/application.ini | sed 's/Version=\(.*\)/\1/'` -# Dated version for the NSIS installer - this comes from application.ini -VER_DATE := `grep ^BuildID= $(SRC)/Resources/application.ini | sed 's/BuildID=\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\1.\2.\3.\4/'` - -######################################################################## -# Windows configuration - -ifeq (win, $(filter win, $(MAKECMDGOALS))) -PLATFORM := win - -# Location of Mozilla tree for the MAR tools -MOZILLA := /c/mozilla -MARTOOLDIR := /c/mozilla - -# Location for application bundle staging -APPNAME := Flickr\ Uploadr - -# Location to output finished NSIS installers -OUT := /c/code/uploadr - -# Location of the makensis.exe binary -MAKE_NSIS := /c/Program\ Files/NSIS/Unicode/makensis.exe - - -# below here, don't modify anything - -# Location for build staging -BUILD := $(OUT)/builds/$(INTL) - -# Location for application bundle staging -APP := $(BUILD)/$(APPNAME) - -# Location for resource file (chrome, components, etc) staging -RES := $(APP) - -# End Windows configuration -######################################################################## - -######################################################################## -# Mac configuration - -else -PLATFORM := mac - -# GraphicsMagick version for stupid directory structure -GM_VER := 1.2.5 - -# Location of Mozilla tree for the MAR tools -MOZILLA := ~/UPLOADR/mozilla -MARTOOLDIR := ~/UPLOADR/mozilla/obj-xulrunner/ppc - -# Location for build staging -# The base of this path must exist before running make -BUILD := ~/Desktop/builds/$(INTL) - -# Location for application bundle staging -APP := $(BUILD)/Flickr\ Uploadr.app - -# Location for resource file (chrome, components, etc) staging -RES := $(APP)/Contents/Resources - -# Location to output finished DMGs -OUT := ~/Desktop - -# End Mac configuration -######################################################################## - -endif - -# End configuration -######################################################################## -######################################################################## - - - -dummy: - @echo "Nothing happens if you don't give some arguments!" - @echo " win all, mac all: Build the whole thing" - @echo " packaging, mar: Build a single package or update but requires" - @echo " de-de, en-US, es-us, fr-fr, it-it, ko-kr, pt-br, or zh-hk" - @echo " dev for development build: i.e. unjared content" - -all: all-build all-mar - -mac: - @echo "Building for Mac" -win: - @echo "Building for Windows" - -all-build: - make $(PLATFORM) de-de packaging - make $(PLATFORM) en-US packaging - make $(PLATFORM) es-us packaging - make $(PLATFORM) fr-fr packaging - make $(PLATFORM) it-it packaging - make $(PLATFORM) ko-kr packaging - make $(PLATFORM) pt-br packaging - make $(PLATFORM) zh-hk packaging - make $(PLATFORM) ja-jp packaging - -all-mar: - @make $(PLATFORM) de-de mar - @make $(PLATFORM) en-US mar - @make $(PLATFORM) es-us mar - @make $(PLATFORM) fr-fr mar - @make $(PLATFORM) it-it mar - @make $(PLATFORM) ko-kr mar - @make $(PLATFORM) pt-br mar - @make $(PLATFORM) zh-hk mar - @make $(PLATFORM) ja-jp mar - - -de-de: - @echo "Building German (de-de)" -en-US: - @echo "Building English (en-US)" -es-us: - @echo "Building Spanish (es-us)" -fr-fr: - @echo "Building French (fr-fr)" -it-it: - @echo "Building Italian (it-it)" -ko-kr: - @echo "Building Korean (ko-kr)" -pt-br: - @echo "Building Portuguese (pt-br)" -zh-hk: - @echo "Building Chinese (zh-hk)" -ja-jp: - @echo "Building Japanese (ja-jp)" -dev: - @echo "Development Build" - -packaging: - @echo "Build step" - @# Make sure the package directory exists - mkdir -p $(BUILD) - - @# Saving the previous version for the partial MAR -# rm -rf $(BUILD)/old -# mv $(APP) $(BUILD)/old - rm -rf $(APP) -ifeq (mac, $(PLATFORM)) - rm -f $(BUILD)/Applications -endif - - @# Package structure -ifeq (mac, $(PLATFORM)) - mkdir -p $(APP)/Contents - mkdir $(APP)/Contents/lib - mkdir $(APP)/Contents/Frameworks - mkdir $(APP)/Contents/MacOS - mkdir $(RES) - cp $(SRC)/Info.plist $(APP)/Contents/ -else - mkdir $(APP) -endif - - @# GraphicsMagick config files -ifeq (mac, $(PLATFORM)) - mkdir $(APP)/Contents/lib/GraphicsMagick-$(GM_VER) - mkdir $(APP)/Contents/lib/GraphicsMagick-$(GM_VER)/config - cp $(SRC)/lib/GraphicsMagick-$(GM_VER)/config/*.mgk \ - $(APP)/Contents/lib/GraphicsMagick-$(GM_VER)/config/ -else - cp $(SRC)/Resources/*.mgk $(RES)/ -endif - - @# XULRunner - cp $(SRC)/Resources/application.ini $(RES)/ - cp $(SRC)/Resources/chrome/locale/$(INTL)/updater.ini $(RES)/ - cp $(SRC)/Resources/LICENSE.txt $(RES)/ -ifeq (mac, $(PLATFORM)) - cp -R $(SRC)/Frameworks/XUL.framework $(APP)/Contents/Frameworks/ - cp $(APP)/Contents/Frameworks/XUL.framework/Versions/Current/xulrunner \ - $(APP)/Contents/MacOS/xulrunner - cp $(SRC)/Resources/icons.icns $(RES)/ -endif -ifeq (win, $(PLATFORM)) - cp -R $(SRC)/Resources/xulrunner $(RES)/ - cp $(SRC)/Resources/Flickr\ Uploadr.exe $(RES)/ - cp $(SRC)/Resources/libexpat.dll $(RES)/ - cp $(SRC)/Resources/icons.ico $(RES)/ -endif - - @# XULRunner preferences - mkdir -p $(RES)/defaults/preferences - cp $(SRC)/Resources/defaults/preferences/*.js \ - $(RES)/defaults/preferences/ - sed 's/en-US/$(INTL)/g' $(SRC)/Resources/defaults/preferences/prefs.js > \ - $(RES)/defaults/preferences/prefs.js - - @# XULRunner locale -ifeq (mac, $(PLATFORM)) - rm $(APP)/Contents/Frameworks/XUL.framework/Versions/Current/chrome/??-??.* - cp ./xulrunner_locales/$(INTL).* \ - $(APP)/Contents/Frameworks/XUL.framework/Versions/Current/chrome/ -else - rm $(RES)/xulrunner/chrome/??-??.* - cp ./xulrunner_locales/$(INTL).* $(RES)/xulrunner/chrome/ -endif - - @# Chrome - mkdir $(RES)/chrome - mkdir $(BUILD)/jar - mkdir $(BUILD)/jar/content - mkdir $(BUILD)/jar/content/uploadr - mkdir $(BUILD)/jar/content/uploadr/flash - cp $(SRC)/Resources/chrome/content/uploadr/*.js $(BUILD)/jar/content/uploadr/ - cp $(SRC)/Resources/chrome/content/uploadr/*.xul $(BUILD)/jar/content/uploadr/ - cp $(SRC)/Resources/chrome/content/uploadr/*.dtd $(BUILD)/jar/content/uploadr/ - cp $(SRC)/Resources/chrome/content/uploadr/flash/*.swf $(BUILD)/jar/content/uploadr/flash/ - mkdir $(BUILD)/jar/content/hacks -ifeq (mac, $(PLATFORM)) - mkdir $(BUILD)/jar/content/hacks/mac - cp $(SRC)/Resources/chrome/content/hacks/mac/*.xul $(BUILD)/jar/content/hacks/mac/ -# cp $(SRC)/Resources/chrome/content/hacks/mac/*.js $(BUILD)/jar/content/hacks/mac/ -endif -ifeq (win, $(PLATFORM)) - mkdir $(BUILD)/jar/content/hacks/win - cp $(SRC)/Resources/chrome/content/hacks/win/*.xul $(BUILD)/jar/content/hacks/win/ -# cp $(SRC)/Resources/chrome/content/hacks/win/*.js $(BUILD)/jar/content/hacks/win/ -endif -ifeq (linux, $(PLATFORM)) - mkdir content/hacks/unix - cp $(SRC)/Resources/chrome/content/hacks/unix/*.xul $(BUILD)/jar/content/hacks/unix/ -# cp $(SRC)/Resources/chrome/content/hacks/unix/*.js $(BUILD)/jar/content/hacks/unix/ -endif - mkdir $(BUILD)/jar/locale - mkdir $(BUILD)/jar/locale/branding - cp $(SRC)/Resources/chrome/locale/branding/*.* $(BUILD)/jar/locale/branding/ - mkdir $(BUILD)/jar/locale/$(INTL) - cp $(SRC)/Resources/chrome/locale/$(INTL)/*.* $(BUILD)/jar/locale/$(INTL)/ -ifeq (dev, $(filter dev, $(MAKECMDGOALS))) - sed 's/en-US/$(INTL)/g' $(SRC)/Resources/chrome/chrome.manifest > \ - $(RES)/chrome/chrome.manifest -else - sed 's/en-US/$(INTL)/g' $(SRC)/Resources/chrome/chrome.manifest.prod > \ - $(RES)/chrome/chrome.manifest -endif - mkdir $(BUILD)/jar/skin -#ifeq (mac, $(PLATFORM)) -# mkdir $(BUILD)/jar/skin/hacks -# mkdir $(BUILD)/jar/skin/hacks/mac -# cp $(SRC)/Resources/chrome/skin/hacks/mac/hacks.css $(BUILD)/jar/skin/hacks/mac/ -#endif -#ifeq (win, $(PLATFORM)) -# mkdir $(BUILD)/jar/skin/hacks/win -# cp $(SRC)/Resources/chrome/skin/hacks/win/hacks.css $(BUILD)/jar/skin/hacks/win/ -#endif -#ifeq (linux, $(PLATFORM)) -# mkdir $(BUILD)/jar/skin/hacks/unix -# cp $(SRC)/Resources/chrome/skin/hacks/unix/hacks.css $(BUILD)/jar/skin/hacks/unix/ -#endif - mkdir $(BUILD)/jar/skin/uploadr - cp $(SRC)/Resources/chrome/skin/uploadr/*.css $(BUILD)/jar/skin/uploadr/ - cp $(SRC)/Resources/chrome/skin/uploadr/*.gif $(BUILD)/jar/skin/uploadr/ - cp $(SRC)/Resources/chrome/skin/uploadr/*.png $(BUILD)/jar/skin/uploadr/ - -ifeq (dev, $(filter dev, $(MAKECMDGOALS))) - cd $(BUILD)/jar/ && mv content $(RES)/chrome/ && mv locale $(RES)/chrome/ && mv skin $(RES)/chrome/ -else -ifeq (win, $(PLATFORM)) - cd $(BUILD)/jar/ && zip uploadr.zip -r content locale skin -else - cd $(BUILD)/jar/ && zip uploadr -r content locale skin -endif - mv $(BUILD)/jar/uploadr.zip $(RES)/chrome/uploadr.jar -endif - rm -rf $(BUILD)/jar - - @# Non-JAR'd Chrome - mkdir $(RES)/chrome/icons - mkdir $(RES)/chrome/icons/default - cp $(SRC)/Resources/chrome/icons/default/*.ico $(RES)/chrome/icons/default/ - - @# XPCOM - mkdir $(RES)/components - cp $(SRC)/Resources/components/*.xpt $(RES)/components/ -ifeq (mac, $(PLATFORM)) - cp $(SRC)/Resources/components/*.dylib $(RES)/components/ -endif -ifeq (win, $(PLATFORM)) - cp $(SRC)/Resources/components/*.dll $(RES)/components/ -endif -ifeq (linux, $(PLATFORM)) - cp $(SRC)/Resources/components/*.so $(RES)/components/ -endif - cp $(SRC)/Resources/components/*.js $(RES)/components/ - - @# Create DMG for Macs -ifeq (mac, $(PLATFORM)) - ln -s /Applications $(BUILD)/Applications - cp mac_installer/install-pane-$(INTL_SHORT).png $(BUILD)/.i.png - cp mac_installer/DS_Store $(BUILD)/.DS_Store - rm -f $(OUT)/FlickrUploadr-$(VER)-$(VER_DATE)-$(INTL_SHORT).dmg - rm -f $(OUT)/FlickrUploadr-$(VER)-$(VER_DATE)-$(INTL_SHORT)-dev.dmg -ifeq (dev, $(filter dev, $(MAKECMDGOALS))) - hdiutil create -srcfolder $(BUILD) -volname "Flickr Uploadr $(VER)" \ - -format UDZO -imagekey zlib-level=9 \ - $(OUT)/FlickrUploadr-$(VER)-$(VER_DATE)-$(INTL_SHORT)-dev.dmg -else - hdiutil create -srcfolder $(BUILD) -volname "Flickr Uploadr $(VER)" \ - -format UDZO -imagekey zlib-level=9 \ - $(OUT)/FlickrUploadr-$(VER)-$(VER_DATE)-$(INTL_SHORT).dmg -endif -endif - - @# Create NSIS installer for Windows -ifeq (win, $(PLATFORM)) - - perl win_installer/strsub.pl win_installer/strings.nsh \ - $(SRC)/Resources/chrome/locale/$(INTL)/installer.properties > \ - $(BUILD)/strings-temp.nsh - perl win_installer/utf16.pl \ - $(BUILD)/strings-temp.nsh > \ - $(BUILD)/strings.nsh - rm $(BUILD)/strings-temp.nsh - - perl win_installer/strsub.pl win_installer/config.ini \ - $(SRC)/Resources/chrome/locale/$(INTL)/installer.properties > \ - $(BUILD)/config-temp.ini - perl win_installer/utf16.pl \ - $(BUILD)/config-temp.ini > \ - $(BUILD)/config.ini - rm $(BUILD)/config-temp.ini -ifeq (dev, $(filter dev, $(MAKECMDGOALS))) - perl win_installer/utf16.pl \ - win_installer/build_dev.nsi > \ - $(BUILD)/build.nsi -else - perl win_installer/utf16.pl \ - win_installer/build.nsi > \ - $(BUILD)/build.nsi -endif - cp win_installer/vcredist_x86.exe $(APP)/vcredist_x86.exe - - $(MAKE_NSIS) -DVERSION=$(VER) \ - -DVERSION_DATE=$(VER_DATE) \ - $(BUILD)/build.nsi -ifeq (dev, $(filter dev, $(MAKECMDGOALS))) - mv $(BUILD)/FlickrUploadr-$(VER)-XX.exe \ - $(OUT)/FlickrUploadr-$(VER)-$(VER_DATE)-$(INTL_SHORT)-dev.exe -else - mv $(BUILD)/FlickrUploadr-$(VER)-XX.exe \ - $(OUT)/FlickrUploadr-$(VER)-$(VER_DATE)-$(INTL_SHORT).exe -endif - rm $(BUILD)/build.nsi - rm $(BUILD)/strings.nsh - rm $(BUILD)/config.ini -endif - - @# Create ??? for Linux -ifeq (linux, $(PLATFORM)) -endif - - - -mar: - - @echo "MAR step" - @# Making MAR files -ifeq (mac, $(PLATFORM)) - @ln -s Flickr\ Uploadr.app $(BUILD)/new -endif -ifeq (win, $(PLATFORM)) - @# In Windows, `ln -s ...` == `cp -R ...` - @ln -s $(BUILD)/Flickr\ Uploadr $(BUILD)/new -endif -ifeq (linux, $(PLATFORM)) - @ln -s Flickr\ Uploadr $(BUILD)/new -endif - @rm -f $(OUT)/FlickrUploadr-$(VER)-$(VER_DATE)-$(INTL_SHORT).complete.mar - @PATH="$(PATH):$(MOZILLA)/other-licenses/bsdiff:$(MARTOOLDIR)/modules/libmar/tool" \ - $(MOZILLA)/tools/update-packaging/make_full_update.sh \ - $(OUT)/FlickrUploadr-$(VER)-$(VER_DATE)-$(INTL_SHORT)-$(PLATFORM).complete.mar \ - $(BUILD)/new &> /dev/null -# @rm -f $(OUT)/FlickrUploadr-$(VER)-$(INTL_SHORT).partial.mar -# @PATH="$(PATH):$(MOZILLA)/other-licenses/bsdiff:$(MARTOOLDIR)/modules/libmar/tool" \ -# $(MOZILLA)/tools/update-packaging/make_incremental_update.sh \ -# $(OUT)/FlickrUploadr-$(VER)-$(INTL_SHORT).partial.mar \ -# $(BUILD)/old $(BUILD)/new &> /dev/null -ifeq (win, $(PLATFORM)) - @rm -rf $(BUILD)/new -else - @rm $(BUILD)/new -endif - - @# Size and hash for the XML file -# @ls -l $(OUT)/FlickrUploadr-$(VER)-$(INTL_SHORT).complete.mar | \ -# awk '{print "$(INTL) complete size: ",$$5}' -# @md5 $(OUT)/FlickrUploadr-$(VER)-$(INTL_SHORT).complete.mar | \ -# awk '{print "$(INTL) complete MD5: ",$$4}' -# @ls -l $(OUT)/FlickrUploadr-$(VER)-$(INTL_SHORT).partial.mar | \ -# awk '{print "$(INTL) partial size: ",$$5}' -# @md5 $(OUT)/FlickrUploadr-$(VER)-$(INTL_SHORT).partial.mar | \ -# awk '{print "$(INTL) partial MD5: ",$$4}' Index: /unk/uploadr/README.locales =================================================================== --- /trunk/uploadr/README.locales (revision 369) +++ (revision ) @@ -1,83 +1,0 @@ - -Locale handling ------------------------------------------------------------------------- - -The Flickr Uploadr has official builds for the following locales: - - en-US US English - de-de German - es-us Spanish - fr-fr French - it-it Italian - ko-kr Korean - pt-br Portuguese - zh-hk Traditional Chinese - - - -If you want to translate the Uploadr into another language, there -are several files that you'll need to edit. To customize the -Flickr-specific strings, you'll need to edit these files: - -/MacUploadr.app/Contents/Resources/chrome/locale/en-US/main.dtd -/MacUploadr.app/Contents/Resources/chrome/locale/en-US/main.properties -/MacUploadr.app/Contents/Resources/chrome/locale/en-US/proxy.dtd - -for an example, see the Korean versions: - -/MacUploadr.app/Contents/Resources/chrome/locale/ko-kr/main.dtd -/MacUploadr.app/Contents/Resources/chrome/locale/ko-kr/main.properties -/MacUploadr.app/Contents/Resources/chrome/locale/ko-kr/proxy.dtd - -The proxy.dtd file is based on two files from the Firefox 2 locale bundle: - -{$locale.jar}/locale/browser/preferences/connection.dtd -{$locale.jar}/locale/browser/preferences/advanced.dtd - -(Only the last 3 strings come from advanced.dtd, all the rest are from -conenction.dtd) - -You can get hold of this inside the language JAR of a Firefox 2 or 3 -install (inside the 'chrome' folder) to avoid having to translate the -strings yourself. - - - -XULRunner also contains some non-flickr-specific strings which need -translating. The versions for currently supported languages can be -found here: - -/xulrunner_locales/locale/ - -And instructions for how to create and build these bundles can be found -here: - -/xulrunner_locales/README - - - -At this time, we're not making final builds available in other -locales, but this may change in the near future if we get -interest. If we do, we'll need to get a version of the XULRunner -bundle for that locale into SVN. - -To submit community translations, start a topic in the forum: - -http://flickr.com/groups/hackinguploadr/ - - - -Translations (by richard) ------------------------------------------------------------------------- - -I've just been pulling the translated DTD and PROPERTIES files from a -production WWW server and running them through strings_import.php. - -Note that in the German translation, the help page is messed up because -they insist on removing the ^^ wrappers around some sections of the -text. Replace these or you'll see "undefined" in several places in the -UI. - -Also note that " must be escaped with ". This led me to believe -that & could be escaped with & but this is not the case. Don't -use & in the main.dtd files - spell out "and" instead.