aboutsummaryrefslogtreecommitdiff
path: root/nsis
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-12-03 05:51:59 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-12-03 05:51:59 +0000
commit3a54dc9a9d8e28b9415552512d45d172528d1a78 (patch)
tree82a7622945511ee9ab8a10b4e0d6089eb0415918 /nsis
parent30b67d11c7c33e61b16fb56badbe1c38db8cdd7b (diff)
added NSIS install script files.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2732 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'nsis')
-rw-r--r--nsis/COPYING.ja.txt378
-rw-r--r--nsis/COPYING.txt378
-rw-r--r--nsis/Makefile.am12
-rw-r--r--nsis/README.txt11
-rw-r--r--nsis/compile.bat14
-rw-r--r--nsis/english.nsh57
-rw-r--r--nsis/japanese.nsh57
-rw-r--r--nsis/plugin-updater.nsi173
-rw-r--r--nsis/spanish.nsh58
-rw-r--r--nsis/sylpheed-defs.nsh30
-rw-r--r--nsis/sylpheed.nsi441
-rw-r--r--nsis/update-manager.nsi111
12 files changed, 1720 insertions, 0 deletions
diff --git a/nsis/COPYING.ja.txt b/nsis/COPYING.ja.txt
new file mode 100644
index 00000000..873c91bc
--- /dev/null
+++ b/nsis/COPYING.ja.txt
@@ -0,0 +1,378 @@
+Sylpheed is copyrighted 1999-2010 by Hiroyuki Yamamoto and
+Sylpheed Development Team, and distributed under the GNU GPL.
+
+Specific permission is granted for the GPLed code in this distribition to
+be linked to OpenSSL without invoking GPL clause 2(b).
+
+GLib, GTK+, Pango, and LibSylph is distributed under the GNU LGPL.
+
+-------------------------------------------------------------------------------
+bsfilter Copyright (C) 2003, 2004, 2005, 2006 NABEYA Kenichi
+bsfilter is released under the GNU GPL.
+
+-------------------------------------------------------------------------------
+Curl copyright notice
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1996 - 2009, Daniel Stenberg, <daniel@haxx.se>.
+
+All rights reserved.
+
+Permission to use, copy, modify, and distribute this software for any purpose
+with or without fee is hereby granted, provided that the above copyright
+notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
+NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
+OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization of the copyright holder.
+
+-------------------------------------------------------------------------------
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, 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
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/nsis/COPYING.txt b/nsis/COPYING.txt
new file mode 100644
index 00000000..873c91bc
--- /dev/null
+++ b/nsis/COPYING.txt
@@ -0,0 +1,378 @@
+Sylpheed is copyrighted 1999-2010 by Hiroyuki Yamamoto and
+Sylpheed Development Team, and distributed under the GNU GPL.
+
+Specific permission is granted for the GPLed code in this distribition to
+be linked to OpenSSL without invoking GPL clause 2(b).
+
+GLib, GTK+, Pango, and LibSylph is distributed under the GNU LGPL.
+
+-------------------------------------------------------------------------------
+bsfilter Copyright (C) 2003, 2004, 2005, 2006 NABEYA Kenichi
+bsfilter is released under the GNU GPL.
+
+-------------------------------------------------------------------------------
+Curl copyright notice
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1996 - 2009, Daniel Stenberg, <daniel@haxx.se>.
+
+All rights reserved.
+
+Permission to use, copy, modify, and distribute this software for any purpose
+with or without fee is hereby granted, provided that the above copyright
+notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
+NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
+OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization of the copyright holder.
+
+-------------------------------------------------------------------------------
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, 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
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/nsis/Makefile.am b/nsis/Makefile.am
new file mode 100644
index 00000000..e3d137a9
--- /dev/null
+++ b/nsis/Makefile.am
@@ -0,0 +1,12 @@
+EXTRA_DIST = \
+ COPYING.ja.txt \
+ COPYING.txt \
+ README.txt \
+ compile.bat \
+ english.nsh \
+ japanese.nsh \
+ plugin-updater.nsi \
+ spanish.nsh \
+ sylpheed-defs.nsh \
+ sylpheed.nsi \
+ update-manager.nsi
diff --git a/nsis/README.txt b/nsis/README.txt
new file mode 100644
index 00000000..d056d05f
--- /dev/null
+++ b/nsis/README.txt
@@ -0,0 +1,11 @@
+NSIS scripts for Sylpheed installer
+===================================
+
+How to compile installer:
+
+1. Install latest version of NSIS.
+2. Install NsProcess plug-in into NSIS.
+3. Install nsisunz plug-in (http://nsis.sourceforge.net/Nsisunz_plug-in).
+4. Make Sylpheed/ bsfilter/ plugins/ folders here.
+5. Run compile.bat.
+6. If successful, Sylpheed-x.y.z_setup.exe should be made.
diff --git a/nsis/compile.bat b/nsis/compile.bat
new file mode 100644
index 00000000..b1527e75
--- /dev/null
+++ b/nsis/compile.bat
@@ -0,0 +1,14 @@
+PATH "C:\Program Files\NSIS";%PATH%
+makensis plugin-updater.nsi
+move plugin-updater.exe Sylpheed
+makensis update-manager.nsi
+move update-manager.exe Sylpheed
+makensis sylpheed.nsi
+
+rem makensis /DSYLPHEED_PRO plugin-updater.nsi
+rem move plugin-updater.exe Sylpheed
+rem makensis /DSYLPHEED_PRO update-manager.nsi
+rem move update-manager.exe Sylpheed
+rem makensis /DSYLPHEED_PRO sylpheed.nsi
+
+pause
diff --git a/nsis/english.nsh b/nsis/english.nsh
new file mode 100644
index 00000000..a212dec5
--- /dev/null
+++ b/nsis/english.nsh
@@ -0,0 +1,57 @@
+LicenseLangString license ${LANG_ENGLISH} "COPYING.txt"
+LangString readme ${LANG_ENGLISH} "Show README"
+LangString jump ${LANG_ENGLISH} "Show ${INST_NAME}'s Website"
+LangString plugins ${LANG_ENGLISH} "Sylpheed Plug-ins"
+LangString attachment_tool_plugin ${LANG_ENGLISH} "attachment_tool"
+LangString desktop_shortcut ${LANG_ENGLISH} "Shortcut for Desktop"
+LangString quick_shortcut ${LANG_ENGLISH} "Shortcut for Quick Launch"
+LangString handler ${LANG_ENGLISH} "Register as mailto: protocol handler"
+LangString sylpheed_description ${LANG_ENGLISH} "Sylpheed itself"
+LangString plugins_description ${LANG_ENGLISH} "Plug-ins for Sylpheed"
+LangString sylpheed_pro_description ${LANG_ENGLISH} "Sylpheed Pro Full-text Search Plug-in"
+LangString attachment_tool_plugin_description ${LANG_ENGLISH} "attachment_tool plugin"
+LangString bsfilter_description ${LANG_ENGLISH} "bsfilter bayesian spam filter"
+LangString desktop_shortcut_description ${LANG_ENGLISH} "Create shortcut for Desktop (current user only)"
+LangString quick_shortcut_description ${LANG_ENGLISH} "Create shortcut for Quick Launch (current user only)"
+LangString handler_description ${LANG_ENGLISH} "Start Sylpheed when the link of mailto: \
+ is clicked by an Web browser etc."
+LangString un_sylpheed_description ${LANG_ENGLISH} "Sylpheed itself"
+LangString un_plugins_description ${LANG_ENGLISH} "Plug-ins for Sylpheed"
+LangString un_sylpheed_pro_description ${LANG_ENGLISH} "Sylpheed Pro Full-text Search Plug-in"
+LangString un_attachment_tool_plugin_description ${LANG_ENGLISH} "attachment_tool plugin"
+LangString un_bsfilter_description ${LANG_ENGLISH} "bsfilter bayesian spam filter"
+LangString un_desktop_shortcut_description ${LANG_ENGLISH} "Delete shortcut for Desktop (current user only)"
+LangString un_quick_shortcut_description ${LANG_ENGLISH} "Delete shortcut for Quick Launch (current user only)"
+LangString delete_caution ${LANG_ENGLISH} "Sylpheed is already installed. $\n$\nClick `OK` to remove the \
+ previous version or `Cancel` to cancel this upgrade."
+LangString app_running ${LANG_ENGLISH} "Sylpheed is running. Please quit Sylpheed before installing."
+LangString app_running_uninst ${LANG_ENGLISH} "Sylpheed is running. Please quit Sylpheed before uninstalling."
+LangString downloading ${LANG_ENGLISH} "Downloading %s"
+LangString connecting ${LANG_ENGLISH} "Connecting ..."
+LangString second ${LANG_ENGLISH} " (1 second remaining)"
+LangString minute ${LANG_ENGLISH} " (1 minute remaining)"
+LangString hour ${LANG_ENGLISH} " (1 hour remaining)"
+LangString seconds ${LANG_ENGLISH} " (%u seconds remaining)"
+LangString minutes ${LANG_ENGLISH} " (%u minutes remaining)"
+LangString hours ${LANG_ENGLISH} " (%u hours remaining)"
+LangString progress ${LANG_ENGLISH} "%skB (%d%%) of %skB @ %u.%01ukB/s"
+LangString download_failed ${LANG_ENGLISH} "Download Failed:"
+LangString update_confirm ${LANG_ENGLISH} "Update $(^NameDA)?"
+LangString kill_and_update_confirm ${LANG_ENGLISH} "Quit Sylpheed, and update $(^NameDA)?"
+LangString MUI_UNTEXT_FINISH_INFO_TEXT ${LANG_ENGLISH} "$(^NameDA) has been uninstalled from your computer.$\r$\n$\r$\nBut the user data which exists in $APPDATA\Sylpheed has not been deleted.$\r$\n$\r$\nClick Finish to close this wizard."
+;--------------------------------
+; Localized strings for use with nsisunz
+; The '%f' in the string is replaced with the filename on run-time.
+; "%c" and "%u" is replaced with compressed size and uncompressed size
+; respectively.
+LangString plugin_updater_nsisunz_text ${LANG_ENGLISH} "Extract: %f (%c -> %u)"
+LangString plugin_updater_completed_text ${LANG_ENGLISH} "Plugin update completed!"
+LangString plugin_updater_header ${LANG_ENGLISH} "Plugin Updater"
+LangString plugin_updater_header_description ${LANG_ENGLISH} "Select plugins to update"
+LangString plugin_updater_must_select ${LANG_ENGLISH} "You must select at least one plugin!"
+LangString plugin_updater_extracting ${LANG_ENGLISH} "Extracting"
+LangString plugin_updater_extracting_files ${LANG_ENGLISH} "Extracting files"
+LangString plugin_updater_extracted ${LANG_ENGLISH} "Extracted"
+LangString plugin_updater_extracted_description ${LANG_ENGLISH} "Thes files has been extracted"
+LangString plugin_updater_extraction_aborted ${LANG_ENGLISH} "Extraction aborted"
+LangString plugin_updater_extraction_aborted_description ${LANG_ENGLISH} "The extraction process was aborted"
diff --git a/nsis/japanese.nsh b/nsis/japanese.nsh
new file mode 100644
index 00000000..309b05d8
--- /dev/null
+++ b/nsis/japanese.nsh
@@ -0,0 +1,57 @@
+LicenseLangString license ${LANG_JAPANESE} "COPYING.ja.txt"
+LangString readme ${LANG_JAPANESE} "READMEを表示"
+LangString jump ${LANG_JAPANESE} "${INST_NAME}のWebサイトを表示する"
+LangString plugins ${LANG_JAPANESE} "Sylpheed プラグイン"
+LangString attachment_tool_plugin ${LANG_JAPANESE} "attachment_tool"
+LangString desktop_shortcut ${LANG_JAPANESE} "デスクトップのショートカット"
+LangString quick_shortcut ${LANG_JAPANESE} "クイック起動のショートカット"
+LangString handler ${LANG_JAPANESE} "mailto: プロトコルのハンドラの登録"
+LangString sylpheed_description ${LANG_JAPANESE} "Sylpheed本体です"
+LangString plugins_description ${LANG_JAPANESE} "Sylpheed用のプラグイン"
+LangString sylpheed_pro_description ${LANG_JAPANESE} "Sylpheed Pro 全文検索プラグイン"
+LangString attachment_tool_plugin_description ${LANG_JAPANESE} "attachment_tool プラグイン"
+LangString bsfilter_description ${LANG_JAPANESE} "bsfilter 迷惑メールフィルタ"
+LangString desktop_shortcut_description ${LANG_JAPANESE} "デスクトップにショートカットを作成します(現在のユーザのみ)"
+LangString quick_shortcut_description ${LANG_JAPANESE} "クイック起動にショートカットを作成します(現在のユーザのみ)"
+LangString handler_description ${LANG_JAPANESE} "Webブラウザなどで mailto: のリンクをクリックした場合、\
+Sylpheedを起動するように設定します"
+LangString un_sylpheed_description ${LANG_JAPANESE} "Sylpheed本体です"
+LangString un_plugins_description ${LANG_JAPANESE} "Sylpheed用のプラグイン"
+LangString un_sylpheed_pro_description ${LANG_JAPANESE} "Sylpheed Pro 全文検索プラグイン"
+LangString un_attachment_tool_plugin_description ${LANG_JAPANESE} "attachment_tool プラグイン"
+LangString un_bsfilter_description ${LANG_JAPANESE} "bsfilter 迷惑メールフィルタ"
+LangString un_desktop_shortcut_description ${LANG_JAPANESE} "デスクトップのショートカットを削除します(現在のユーザのみ)"
+LangString un_quick_shortcut_description ${LANG_JAPANESE} "クイック起動のショートカットを削除します(現在のユーザのみ)"
+LangString delete_caution ${LANG_JAPANESE} "${PRODUCT_NAME} がすでにインストールされています。$\n$\nOK をクリックすると\
+インストールされているバージョンを削除し、 キャンセル をクリックするとインストールを中止します。"
+LangString app_running ${LANG_JAPANESE} "${PRODUCT_NAME} が起動中です。インストールの前に ${PRODUCT_NAME} を終了してください。"
+LangString app_running_uninst ${LANG_JAPANESE} "${PRODUCT_NAME} が起動中です。アンインストールの前に ${PRODUCT_NAME} を終了してください。"
+LangString downloading ${LANG_JAPANESE} "%sをダウンロード中"
+LangString connecting ${LANG_JAPANESE} "接続中 ..."
+LangString second ${LANG_JAPANESE} " (残り 1 秒)"
+LangString minute ${LANG_JAPANESE} " (残り 1 分)"
+LangString hour ${LANG_JAPANESE} " (残り 1 時間)"
+LangString seconds ${LANG_JAPANESE} " (残り %u 秒)"
+LangString minutes ${LANG_JAPANESE} " (残り %u 分)"
+LangString hours ${LANG_JAPANESE} " (残り %u 時間)"
+LangString progress ${LANG_JAPANESE} "%skB (%d%%) of %skB @ %u.%01ukB/s"
+LangString download_failed ${LANG_JAPANESE} "ダウンロード失敗:"
+LangString update_confirm ${LANG_JAPANESE} "$(^NameDA)をアップデートしますか?"
+LangString kill_and_update_confirm ${LANG_JAPANESE} "Sylpheedを終了して、$(^NameDA)をアップデートしますか?"
+LangString MUI_UNTEXT_FINISH_INFO_TEXT ${LANG_JAPANESE} "$(^NameDA)は、このコンピュータからアンインストールされました。$\r$\n$\r$\nただし、$APPDATA\${PRODUCT_NAME} にあるユーザのデータは削除していません。$\r$\n$\r$\nウィザードを閉じるには [完了] を押してください。"
+;--------------------------------
+; Localized strings for use with nsisunz
+; The '%f' in the string is replaced with the filename on run-time.
+; "%c" and "%u" is replaced with compressed size and uncompressed size
+; respectively.
+LangString plugin_updater_nsisunz_text ${LANG_JAPANESE} "展開: %f (%c -> %u)"
+LangString plugin_updater_completed_text ${LANG_JAPANESE} "プラグインのアップデートが完了しました。"
+LangString plugin_updater_header ${LANG_JAPANESE} "プラグインアップデーター"
+LangString plugin_updater_header_description ${LANG_JAPANESE} "更新するプラグインを選択してください"
+LangString plugin_updater_must_select ${LANG_JAPANESE} "少なくとも1個プラグインを選択してください。"
+LangString plugin_updater_extracting ${LANG_JAPANESE} "展開中"
+LangString plugin_updater_extracting_files ${LANG_JAPANESE} "ファイルを展開中"
+LangString plugin_updater_extracted ${LANG_JAPANESE} "展開完了"
+LangString plugin_updater_extracted_description ${LANG_JAPANESE} "ファイルを展開しました。"
+LangString plugin_updater_extraction_aborted ${LANG_JAPANESE} "展開中止"
+LangString plugin_updater_extraction_aborted_description ${LANG_JAPANESE} "展開処理を中止しました。"
diff --git a/nsis/plugin-updater.nsi b/nsis/plugin-updater.nsi
new file mode 100644
index 00000000..efb4b152
--- /dev/null
+++ b/nsis/plugin-updater.nsi
@@ -0,0 +1,173 @@
+; Dependencies:
+; - nsisunz.dll Plug-in
+; - InstallOptions.dll Plug-in
+;
+; usage: plugin-updater.exe /ini 'path\to\some-install-options.ini'
+;--------------------------------
+
+!include "sylpheed-defs.nsh"
+
+SetCompressor /SOLID lzma
+
+;--------------------------------
+
+!include "MUI.nsh"
+!include "Sections.nsh"
+!include "FileFunc.nsh"
+!include "LogicLib.nsh"
+
+; location of nsisunz.dll
+!addplugindir "."
+
+; MUI Settings
+!define MUI_ABORTWARNING
+!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install-blue.ico"
+!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-blue.ico"
+
+;--------------------------------
+
+!define INSTALL_OPTIONS_INI "$R2"
+!define TEMP1 $R3 ;Temp variable
+
+OutFile "plugin-updater.exe"
+Name "${PRODUCT_NAME} Plugin Updater"
+Caption "$(^Name)"
+ShowInstDetails show
+CompletedText "$(plugin_updater_completed_text)"
+BrandingText "${INST_NAME} ${INST_VERSION}"
+
+; $INSTDIR
+InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
+InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
+
+;Things that need to be extracted on startup (keep these lines before any File command!)
+;Only useful for BZIP2 compression
+;Use ReserveFile for your own InstallOptions INI files too!
+
+ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
+
+RequestExecutionLevel admin
+XPStyle on
+
+;Order of pages
+Page custom SetCustom ValidateCustom ": Select update plugins" ;Custom page. InstallOptions gets called in SetCustom.
+!define MUI_PAGE_HEADER_TEXT "$(plugin_updater_extracting)"
+!define MUI_PAGE_HEADER_SUBTEXT "$(plugin_updater_extracting_files)"
+!define MUI_INSTFILESPAGE_FINISHHEADER_TEXT "$(plugin_updater_extracted)"
+!define MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT "$(plugin_updater_extracted_description)"
+!define MUI_INSTFILESPAGE_ABORTHEADER_TEXT "$(plugin_updater_extraction_aborted)"
+!define MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT "$(plugin_updater_extraction_aborted_description)"
+; Instfiles page
+!insertmacro MUI_PAGE_INSTFILES
+
+;--------------------------------
+; Language files
+!insertmacro MUI_LANGUAGE "English" # ${LANG_ENGLISH}
+!insertmacro MUI_LANGUAGE "Spanish" # ${LANG_SPANISH}
+!insertmacro MUI_LANGUAGE "Japanese" # ${LANG_JAPANESE}
+
+!include "English.nsh"
+!include "Spanish.nsh"
+!include "Japanese.nsh"
+;--------------------------------
+
+Var field
+Var NumFields
+Var URL
+Var basename
+Var name
+Var archive
+
+Section "Components"
+
+ ;Get Install Options dialog user input
+
+ ;DetailPrint "TEMP=$TEMP"
+
+ ReadINIStr $NumFields "${INSTALL_OPTIONS_INI}" "Settings" "NumFields"
+ ;DetailPrint "NumFields=$NumFields"
+
+ StrCpy $field 1
+ ${While} $field < $NumFields ; >
+ IntOp $field $field + 1
+ ReadINIStr ${TEMP1} "${INSTALL_OPTIONS_INI}" "Field $field" "State"
+ StrCmp ${TEMP1} 0 skip
+ ReadINIStr $URL "${INSTALL_OPTIONS_INI}" "Field $field" "URL"
+ ReadINIStr $basename "${INSTALL_OPTIONS_INI}" "Field $field" "basename"
+ ReadINIStr $name "${INSTALL_OPTIONS_INI}" "Field $field" "name"
+ ;DetailPrint "Field $field State=${TEMP1}"
+ ;DetailPrint "Field $field URL=$URL"
+ ;DetailPrint "Field $field basename=$basename"
+ ;DetailPrint "Field $field name=$name"
+ StrCpy $archive "$TEMP\sylpheed-plugin-$basename.zip"
+
+ DetailPrint "$name:"
+ DetailPrint "Downloading from $URL"
+ DetailPrint " to $archive"
+ NSISdl::download \
+ /TRANSLATE2 "$(downloading)" "$(connecting)" "$(second)" "$(minute)" "$(hour)" "$(seconds)" "$(minutes)" "$(hours)" "$(progress)" \
+ /TIMEOUT=30000 "$URL" "$archive"
+ Pop $0
+ StrCmp "$0" "success" download_ok
+ DetailPrint "$(download_failed) $0"
+ Abort
+ download_ok:
+
+ SetOutPath "$INSTDIR"
+ nsisunz::UnzipToLog /text "$(plugin_updater_nsisunz_text)" "$archive" "$INSTDIR"
+
+ ; Always check for errors. Everything else than "success" means an error.
+ Pop $0
+ StrCmp $0 "success" extract_ok
+ Abort "$0"
+ extract_ok:
+
+ skip:
+ ${EndWhile}
+
+SectionEnd
+
+
+Function .onInit
+ InitPluginsDir
+
+ ${GetParameters} $R0
+ ${GetOptions} "$R0" "/ini" "${INSTALL_OPTIONS_INI}"
+
+ StrCmp "${INSTALL_OPTIONS_INI}" "" 0 ini_option_found
+ MessageBox MB_ICONEXCLAMATION|MB_OK "usage: plugin-updater.exe /ini 'path\to\some-install-options.ini'"
+ Abort
+ ini_option_found:
+FunctionEnd
+
+Function SetCustom
+ ;Display the InstallOptions dialog
+
+ !insertmacro MUI_HEADER_TEXT "$(plugin_updater_header)" "$(plugin_updater_header_description)"
+
+ Push ${TEMP1}
+
+ InstallOptions::dialog "${INSTALL_OPTIONS_INI}"
+ Pop ${TEMP1}
+
+ Pop ${TEMP1}
+
+FunctionEnd
+
+Function ValidateCustom
+
+ ReadINIStr $NumFields "${INSTALL_OPTIONS_INI}" "Settings" "NumFields"
+
+ StrCpy $field 1
+ ${While} $field < $NumFields ; >
+ IntOp $field $field + 1
+ ReadINIStr ${TEMP1} "${INSTALL_OPTIONS_INI}" "Field $field" "State"
+ StrCmp ${TEMP1} 1 done
+ ${EndWhile}
+
+ MessageBox MB_ICONEXCLAMATION|MB_OK "$(plugin_updater_must_select)"
+ Abort
+
+ done:
+
+FunctionEnd
diff --git a/nsis/spanish.nsh b/nsis/spanish.nsh
new file mode 100644
index 00000000..a3aefa7d
--- /dev/null
+++ b/nsis/spanish.nsh
@@ -0,0 +1,58 @@
+LicenseLangString license ${LANG_SPANISH} "COPYING.txt"
+LangString readme ${LANG_SPANISH} "Ver README"
+LangString jump ${LANG_SPANISH} "Ver la p疊ina web de ${INST_NAME}"
+LangString plugins ${LANG_SPANISH} "Sylpheed Plug-ins"
+LangString attachment_tool_plugin ${LANG_SPANISH} "attachment_tool"
+LangString desktop_shortcut ${LANG_SPANISH} "Acceso directo en el escritorio"
+LangString quick_shortcut ${LANG_SPANISH} "Acceso directo en la barra r疳ida"
+LangString handler ${LANG_SPANISH} "Mantener asociado al protocolo mailto:"
+LangString sylpheed_description ${LANG_SPANISH} "el propio Sylpheed"
+LangString plugins_description ${LANG_SPANISH} "Plug-ins for Sylpheed"
+LangString sylpheed_pro_description ${LANG_SPANISH} "Sylpheed Pro Full-text Search Plug-in"
+LangString attachment_tool_plugin_description ${LANG_SPANISH} "attachment_tool Plug-in"
+LangString bsfilter_description ${LANG_SPANISH} "bsfilter bayesian spam filter"
+LangString desktop_shortcut_description ${LANG_SPANISH} "Se realiz el acceso directo al escritorio."
+LangString quick_shortcut_description ${LANG_SPANISH} "Se realiz el acceso directo a la barra r疳ida. "
+LangString handler_description ${LANG_SPANISH} "Se iniciar Sylpheed cuando se haga clic en \
+ los enlaces mailto: del navegador web y similares."
+LangString un_sylpheed_description ${LANG_SPANISH} "el propio Sylpheed"
+LangString un_plugins_description ${LANG_SPANISH} "Plug-ins for Sylpheed"
+LangString un_sylpheed_pro_description ${LANG_SPANISH} "Sylpheed Pro Full-text Search Plug-in"
+LangString un_attachment_tool_plugin_description ${LANG_SPANISH} "attachment_tool Plug-in"
+LangString un_bsfilter_description ${LANG_SPANISH} "bsfilter bayesian spam filter"
+LangString un_desktop_shortcut_description ${LANG_SPANISH} "Delete shortcut for Desktop (current user only)"
+LangString un_quick_shortcut_description ${LANG_SPANISH} "Delete shortcut for Quick Launch (current user only)"
+LangString delete_caution ${LANG_SPANISH} "${PRODUCT_NAME} ya est instalado. $\n$\nPulse ォAceptarサ para \
+ eliminar la versin anterior o ォCancelarサ para cancelar la actualizacin. $\n$\n\
+ Tenga en cuenta que todos los ficheros existentes en $INSTDIR ser疣 eliminados. "
+LangString app_running ${LANG_SPANISH} "Sylpheed is running. Please quit Sylpheed before installing."
+LangString app_running_uninst ${LANG_SPANISH} "Sylpheed is running. Please quit Sylpheed before uninstalling."
+LangString downloading ${LANG_SPANISH} "Downloading %s"
+LangString connecting ${LANG_SPANISH} "Connecting ..."
+LangString second ${LANG_SPANISH} " (1 second remaining)"
+LangString minute ${LANG_SPANISH} " (1 minute remaining)"
+LangString hour ${LANG_SPANISH} " (1 hour remaining)"
+LangString seconds ${LANG_SPANISH} " (%u seconds remaining)"
+LangString minutes ${LANG_SPANISH} " (%u minutes remaining)"
+LangString hours ${LANG_SPANISH} " (%u hours remaining)"
+LangString progress ${LANG_SPANISH} "%skB (%d%%) of %skB @ %u.%01ukB/s"
+LangString download_failed ${LANG_SPANISH} "Download Failed:"
+LangString update_confirm ${LANG_SPANISH} "Update $(^NameDA)?"
+LangString kill_and_update_confirm ${LANG_SPANISH} "Quit Sylpheed, and update $(^NameDA)?"
+LangString MUI_UNTEXT_FINISH_INFO_TEXT ${LANG_SPANISH} "$(^NameDA) ha sido desinstalado de su sistema.$\r$\n$\r$\nPero los datos de usuario existentes en $APPDATA\${PRODUCT_NAME} no han sido eliminados. $\r$\n$\r$\nPresione Terminar para cerrar este asistente."
+;--------------------------------
+; Localized strings for use with nsisunz
+; The '%f' in the string is replaced with the filename on run-time.
+; "%c" and "%u" is replaced with compressed size and uncompressed size
+; respectively.
+LangString plugin_updater_nsisunz_text ${LANG_SPANISH} "Extract: %f (%c -> %u)"
+LangString plugin_updater_completed_text ${LANG_SPANISH} "Plugin update completed!"
+LangString plugin_updater_header ${LANG_SPANISH} "Plugin Updater"
+LangString plugin_updater_header_description ${LANG_SPANISH} "Select plugins to update"
+LangString plugin_updater_must_select ${LANG_SPANISH} "You must select at least one plugin!"
+LangString plugin_updater_extracting ${LANG_SPANISH} "Extracting"
+LangString plugin_updater_extracting_files ${LANG_SPANISH} "Extracting files"
+LangString plugin_updater_extracted ${LANG_SPANISH} "Extracted"
+LangString plugin_updater_extracted_description ${LANG_SPANISH} "Thes files has been extracted"
+LangString plugin_updater_extraction_aborted ${LANG_SPANISH} "Extraction aborted"
+LangString plugin_updater_extraction_aborted_description ${LANG_SPANISH} "The extraction process was aborted"
diff --git a/nsis/sylpheed-defs.nsh b/nsis/sylpheed-defs.nsh
new file mode 100644
index 00000000..17617446
--- /dev/null
+++ b/nsis/sylpheed-defs.nsh
@@ -0,0 +1,30 @@
+;!define SYLPHEED_PRO
+
+!define PRODUCT_NAME "Sylpheed"
+!define PRODUCT_VERSION "3.1beta4"
+
+!ifdef SYLPHEED_PRO
+!define PRODUCT_PUBLISHER "SRA OSS, Inc. Japan"
+!define PRODUCT_WEB_SITE "http://www.sraoss.co.jp/sylpheed-pro/"
+!else
+!define PRODUCT_PUBLISHER "Hiroyuki Yamamoto"
+!define PRODUCT_WEB_SITE "http://sylpheed.sraoss.jp/"
+!endif
+
+!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\sylpheed.exe"
+!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
+!define PRODUCT_UNINST_ROOT_KEY "HKLM"
+!define MEMENTO_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
+!define MEMENTO_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
+
+!ifdef SYLPHEED_PRO
+!define INST_NAME "Sylpheed Pro"
+!define INST_VERSION "2.0"
+!define INST_FILENAME "Sylpheed_Pro"
+!else
+!define INST_NAME ${PRODUCT_NAME}
+!define INST_VERSION ${PRODUCT_VERSION}
+!define INST_FILENAME ${PRODUCT_NAME}
+!endif
+
+!define ORIG_WEB_SITE "http://sylpheed.sraoss.jp/"
diff --git a/nsis/sylpheed.nsi b/nsis/sylpheed.nsi
new file mode 100644
index 00000000..2730cf98
--- /dev/null
+++ b/nsis/sylpheed.nsi
@@ -0,0 +1,441 @@
+; Script generated by the HM NIS Edit Script Wizard.
+; Modified by Ikuya Awashiro <ikuya@fruitsbasket.info>
+; Modified by Hiroyuki Yamamoto <hiro-y@kcn.ne.jp>
+
+; This script requires NsProcess plugin:
+; http://nsis.sourceforge.net/NsProcess_plugin
+
+!include "sylpheed-defs.nsh"
+
+SetCompressor /SOLID lzma
+
+!include "nsProcess.nsh"
+!include "Memento.nsh"
+
+; MUI 1.67 compatible ------
+!include "MUI.nsh"
+!include "Sections.nsh"
+!include "LogicLib.nsh"
+
+; MUI Settings
+!define MUI_ABORTWARNING
+!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install-blue.ico"
+!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-blue.ico"
+
+; Welcome page
+!insertmacro MUI_PAGE_WELCOME
+; License page
+!define MUI_LICENSEPAGE_RADIOBUTTONS
+!insertmacro MUI_PAGE_LICENSE $(license)
+; Components page
+!insertmacro MUI_PAGE_COMPONENTS
+; Directory page
+!insertmacro MUI_PAGE_DIRECTORY
+; Instfiles page
+!insertmacro MUI_PAGE_INSTFILES
+; Finish page
+;!define MUI_FINISHPAGE_RUN "$INSTDIR\sylpheed.exe"
+;!define MUI_FINISHPAGE_RUN_NOTCHECKED
+!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
+;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README-win32.txt"
+;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README-win32-ja.txt"
+!define MUI_FINISHPAGE_SHOWREADME_FUNCTION "ShowReadme"
+!define MUI_FINISHPAGE_SHOWREADME_TEXT "$(readme)"
+!define MUI_FINISHPAGE_LINK "$(jump)"
+!define MUI_FINISHPAGE_LINK_LOCATION ${PRODUCT_WEB_SITE}
+!insertmacro MUI_PAGE_FINISH
+
+; Uninstaller pages
+!insertmacro MUI_UNPAGE_WELCOME
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_COMPONENTS
+!insertmacro MUI_UNPAGE_INSTFILES
+!insertmacro MUI_UNPAGE_FINISH
+
+; Language files
+!insertmacro MUI_LANGUAGE "English" # ${LANG_ENGLISH}
+!insertmacro MUI_LANGUAGE "Spanish" # ${LANG_SPANISH}
+!insertmacro MUI_LANGUAGE "Japanese" # ${LANG_JAPANESE}
+
+; Reserve files
+!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
+
+; MUI end ------
+
+!include "English.nsh"
+!include "Spanish.nsh"
+!include "Japanese.nsh"
+
+Var ISSILENT
+
+;Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
+;OutFile "${PRODUCT_NAME}-${PRODUCT_VERSION}_setup.exe"
+Name "${INST_NAME} ${INST_VERSION}"
+OutFile "${INST_FILENAME}-${INST_VERSION}_setup.exe"
+InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
+InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
+RequestExecutionLevel admin
+ShowInstDetails hide
+ShowUnInstDetails hide
+XPStyle on
+BrandingText "${INST_NAME} ${INST_VERSION}"
+
+${MementoSection} "!Sylpheed" sec_sylpheed
+ SetShellVarContext all
+ SectionIn RO
+ SetOutPath "$INSTDIR"
+ File /r "Sylpheed\"
+ CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
+ ${If} $LANGUAGE = "${LANG_JAPANESE}"
+ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Manual.lnk" "$INSTDIR\doc\manual\ja\Sylpheed.html"
+ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\README.lnk" "$INSTDIR\README-win32-ja.txt"
+ File /oname=README.txt "Sylpheed\README-win32-ja.txt"
+ ${ElseIf} $LANGUAGE = "${LANG_SPANISH}"
+ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Manual.lnk" "$INSTDIR\doc\manual\en\Sylpheed.html"
+ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\README.lnk" "$INSTDIR\README-win32-es.txt"
+ File /oname=README.txt "Sylpheed\README-win32-es.txt"
+ ${Else}
+ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Manual.lnk" "$INSTDIR\doc\manual\en\Sylpheed.html"
+ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\README.lnk" "$INSTDIR\README-win32.txt"
+ File /oname=README.txt "Sylpheed\README-win32.txt"
+ ${EndIf}
+ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed.lnk" "$INSTDIR\sylpheed.exe"
+ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed (debug mode).lnk" "$INSTDIR\sylpheed.exe" "--debug"
+ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed All Quit.lnk" "$INSTDIR\sylpheed.exe" "--exit"
+ WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${ORIG_WEB_SITE}"
+ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Homepage.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
+ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\uninst.exe"
+${MementoSectionEnd}
+
+SectionGroup /e "$(plugins)" sec_plugins
+
+!ifdef SYLPHEED_PRO
+${MementoSection} "Sylpheed Pro" sec_sylpheed_pro
+ SetShellVarContext all
+ SetOutPath "$INSTDIR"
+ File /r "Sylpheed-Pro\"
+ WriteIniStr "$INSTDIR\${INST_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
+ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Pro Homepage.lnk" "$INSTDIR\${INST_NAME}.url"
+ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Pro Manual.lnk" "$INSTDIR\doc\manual\sylpheed-pro\ja\search-plugin.html"
+${MementoSectionEnd}
+!endif
+
+${MementoSection} "$(attachment_tool_plugin)" sec_attachment_tool_plugin
+ SetOutPath "$INSTDIR\plugins"
+ File "plugins\plugins\attachment_tool.dll"
+ SetOutPath "$INSTDIR\doc\plugins"
+ File "plugins\doc\plugins\README.attachment_tool.txt"
+${MementoSectionEnd}
+
+SectionGroupEnd
+
+${MementoSection} "bsfilter" sec_bsfilter
+ SetOutPath "$INSTDIR"
+ File /r "bsfilter\"
+${MementoSectionEnd}
+
+${MementoSection} "$(desktop_shortcut)" sec_desktop_shortcut
+ SetShellVarContext current
+ CreateShortCut "$DESKTOP\Sylpheed.lnk" "$INSTDIR\sylpheed.exe"
+${MementoSectionEnd}
+
+${MementoUnselectedSection} "$(quick_shortcut)" sec_quick_shortcut
+ SetShellVarContext current
+ CreateShortCut "$QUICKLAUNCH\Sylpheed.lnk" "$INSTDIR\sylpheed.exe"
+${MementoSectionEnd}
+
+${MementoSection} "$(handler)" sec_handler
+ WriteRegStr HKLM "Software\Clients\Mail\Sylpheed" "" "Sylpheed"
+ WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\Protocols\mailto" "" "URL:MailTo Protocol"
+ WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\Protocols\mailto" "URL Protocol" ""
+ WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\Protocols\mailto\shell\open\command" "" "$\"$INSTDIR\sylpheed.exe$\" --compose $\"%1$\""
+ WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\shell\open\command" "" "$\"$INSTDIR\sylpheed.exe$\""
+
+ WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\Capabilities" "ApplicationName" "Sylpheed"
+ WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\Capabilities" "ApplicationDescription" "Sylpheed - lightweight and user-friendly e-mail client"
+ WriteRegStr HKLM "Software\RegisteredApplications" "Sylpheed" "SOFTWARE\Clients\Mail\Sylpheed\Capabilities"
+ WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\Capabilities\URLAssociations" "mailto" "Sylpheed.Url.MailTo"
+ WriteRegStr HKCR "Sylpheed.Url.MailTo" "" "URL:MailTo Protocol"
+ WriteRegStr HKCR "Sylpheed.Url.MailTo" "FriendlyTypeName" "Sylpheed MailTo"
+ WriteRegDWORD HKCR "Sylpheed.Url.MailTo" "EditFlags" 0x00000002
+ WriteRegStr HKCR "Sylpheed.Url.MailTo" "URL Protocol" ""
+ WriteRegStr HKCR "Sylpheed.Url.MailTo\shell\open\command" "" "$\"$INSTDIR\sylpheed.exe$\" --compose $\"%1$\""
+${MementoSectionEnd}
+
+${MementoSectionDone}
+
+Section -Post
+ WriteUninstaller "$INSTDIR\uninst.exe"
+ WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\sylpheed.exe"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\sylpheed.exe"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
+SectionEnd
+
+Section "!un.Sylpheed" sec_un_sylpheed
+ SetShellVarContext all
+ Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Manual.lnk"
+ Delete "$SMPROGRAMS\${PRODUCT_NAME}\README.lnk"
+ Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed.lnk"
+ Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed (debug mode).lnk"
+ Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed All Quit.lnk"
+ Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Homepage.lnk"
+ Delete "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk"
+ SetShellVarContext current
+
+ Delete "$INSTDIR\plugin-updater.exe"
+ Delete "$INSTDIR\update-manager.exe"
+
+ Delete "$INSTDIR\curl.exe"
+ Delete "$INSTDIR\gpgme-w32spawn.exe"
+ Delete "$INSTDIR\gspawn-win32-helper-console.exe"
+ Delete "$INSTDIR\gspawn-win32-helper.exe"
+ Delete "$INSTDIR\iconv.dll"
+ Delete "$INSTDIR\intl.dll"
+ Delete "$INSTDIR\jpeg62.dll"
+ Delete "$INSTDIR\libatk-1.0-0.dll"
+ Delete "$INSTDIR\libcairo-2.dll"
+ Delete "$INSTDIR\libcompface.dll"
+ Delete "$INSTDIR\libeay32.dll"
+ Delete "$INSTDIR\libgdk-win32-2.0-0.dll"
+ Delete "$INSTDIR\libgdk_pixbuf-2.0-0.dll"
+ Delete "$INSTDIR\libglib-2.0-0.dll"
+ Delete "$INSTDIR\libgmodule-2.0-0.dll"
+ Delete "$INSTDIR\libgobject-2.0-0.dll"
+ Delete "$INSTDIR\libgpg-error-0.dll"
+ Delete "$INSTDIR\libgpgme-11.dll"
+ Delete "$INSTDIR\libgthread-2.0-0.dll"
+ Delete "$INSTDIR\libgtk-win32-2.0-0.dll"
+ Delete "$INSTDIR\libonig.dll"
+ Delete "$INSTDIR\libpango-1.0-0.dll"
+ Delete "$INSTDIR\libpangocairo-1.0-0.dll"
+ Delete "$INSTDIR\libpangowin32-1.0-0.dll"
+ Delete "$INSTDIR\libpng13.dll"
+ Delete "$INSTDIR\libsylph-0-1.dll"
+ Delete "$INSTDIR\libsylpheed-plugin-0-1.dll"
+ Delete "$INSTDIR\libtiff3.dll"
+ Delete "$INSTDIR\README-win32-es.txt"
+ Delete "$INSTDIR\README-win32-ja.txt"
+ Delete "$INSTDIR\README-win32.txt"
+ Delete "$INSTDIR\README.txt"
+ Delete "$INSTDIR\sample-sylpheed.ini"
+ Delete "$INSTDIR\ssleay32.dll"
+ Delete "$INSTDIR\sylpheed-128x128.png"
+ Delete "$INSTDIR\sylpheed-64x64.png"
+ Delete "$INSTDIR\sylpheed-mailto-protocol.reg"
+ Delete "$INSTDIR\sylpheed.exe"
+ Delete "$INSTDIR\sylpheed.png"
+ Delete "$INSTDIR\${PRODUCT_NAME}.url"
+ Delete "$INSTDIR\uninst.exe"
+ Delete "$INSTDIR\wabread.exe"
+ Delete "$INSTDIR\zlib1.dll"
+ RMDir /r "$INSTDIR\doc"
+ RMDir /r "$INSTDIR\etc"
+ RMDir /r "$INSTDIR\lib"
+ RMDir /r "$INSTDIR\share\themes"
+ RMDir "$INSTDIR\share"
+SectionEnd
+
+SectionGroup /e "un.$(plugins)" sec_un_plugins
+
+!ifdef SYLPHEED_PRO
+Section "un.Sylpheed Pro" sec_un_sylpheed_pro
+ SetShellVarContext all
+ Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Pro Homepage.lnk"
+ Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Pro Manual.lnk"
+ SetShellVarContext current
+
+ ; Sylpheed Pro components
+ Delete "$INSTDIR\bzip2.dll"
+ Delete "$INSTDIR\dbimport-ext.exe"
+ Delete "$INSTDIR\dts-indexer.exe"
+ Delete "$INSTDIR\libarchive2.dll"
+ Delete "$INSTDIR\libmecab.dll"
+ Delete "$INSTDIR\libpq.dll"
+ Delete "$INSTDIR\mecabrc"
+ Delete "$INSTDIR\Sylpheed Pro.url"
+ Delete "$INSTDIR\plugins\dbimport.dll"
+ Delete "$INSTDIR\plugins\scheduler.dll"
+ RMDir /r "$INSTDIR\dic"
+ RMDir /r "$INSTDIR\pgsql"
+ RMDir /r "$INSTDIR\pgsql83"
+ RMDir /r "$INSTDIR\share\sylpheed-pro"
+ RMDir "$INSTDIR\share"
+SectionEnd
+!endif
+
+Section "un.$(attachment_tool_plugin)" sec_un_attachment_tool_plugin
+ Delete "$INSTDIR\plugins\attachment_tool.dll"
+ Delete "$INSTDIR\doc\plugins\README.attachment_tool.txt"
+SectionEnd
+
+SectionGroupEnd
+
+Section "un.bsfilter" sec_un_bsfilter
+ ; bsfilter components
+ Delete "$INSTDIR\bsfilter"
+ Delete "$INSTDIR\bsfilterw.exe"
+SectionEnd
+
+Section "un.$(desktop_shortcut)" sec_un_desktop_shortcut
+ SetShellVarContext current
+ Delete "$DESKTOP\Sylpheed.lnk"
+SectionEnd
+
+Section "un.$(quick_shortcut)" sec_un_quick_shortcut
+ SetShellVarContext current
+ Delete "$QUICKLAUNCH\Sylpheed.lnk"
+SectionEnd
+
+Section "-un.install"
+ SetShellVarContext all
+ RMDir "$SMPROGRAMS\Sylpheed"
+ SetShellVarContext current
+
+ ; remove plug-ins dir only when empty
+ RMDir "$INSTDIR\plugins"
+ RMDir "$INSTDIR"
+
+ DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
+ DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_DIR_REGKEY}"
+ DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "Software\Clients\Mail\Sylpheed"
+ DeleteRegKey ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}"
+ SetAutoClose true
+SectionEnd
+
+; Section descriptions
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_sylpheed} "$(sylpheed_description)"
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_plugins} "$(plugins_description)"
+!ifdef SYLPHEED_PRO
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_sylpheed_pro} "$(sylpheed_pro_description)"
+!endif
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_attachment_tool_plugin} "$(attachment_tool_plugin_description)"
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_bsfilter} "$(bsfilter_description)"
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_desktop_shortcut} "$(desktop_shortcut_description)"
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_quick_shortcut} "$(quick_shortcut_description)"
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_handler} "$(handler_description)"
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_sylpheed} "$(un_sylpheed_description)"
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_plugins} "$(un_plugins_description)"
+!ifdef SYLPHEED_PRO
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_sylpheed_pro} "$(un_sylpheed_pro_description)"
+!endif
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_attachment_tool_plugin} "$(un_attachment_tool_plugin_description)"
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_bsfilter} "$(un_bsfilter_description)"
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_desktop_shortcut} "$(un_desktop_shortcut_description)"
+ !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_quick_shortcut} "$(un_quick_shortcut_description)"
+ ; handler is not uninstallable.
+!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
+
+Function .onInit
+ ${MementoSectionRestore}
+
+ StrCpy $1 ${sec_sylpheed}
+
+; Prevent install while Sylpheed is running
+check_app_running:
+ ${nsProcess::FindProcess} "sylpheed.exe" $R0
+ StrCmp $R0 "0" 0 +3
+ MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "$(app_running)" IDOK check_app_running
+ Abort
+
+; Auto-uninstall old before installing new
+; http://nsis.sourceforge.net/Auto-uninstall_old_before_installing_new
+ ReadRegStr $R0 HKLM \
+ "${PRODUCT_UNINST_KEY}" "UninstallString"
+ StrCmp $R0 "" done_
+
+ MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
+ "$(delete_caution)" \
+ /SD IDOK \
+ IDOK uninst
+ Abort
+
+;Run the uninstaller
+uninst:
+ ClearErrors
+ StrCpy $ISSILENT "/S"
+ IfSilent +2
+ StrCpy $ISSILENT ""
+ ExecWait '$R0 $ISSILENT _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
+
+ IfErrors no_remove_uninstaller
+ no_remove_uninstaller:
+
+; label "done" used in MementoSectionRestore
+done_:
+FunctionEnd
+
+Function .onInstSuccess
+ ${MementoSectionSave}
+FunctionEnd
+
+Function .onSelChange
+ !insertmacro StartRadioButtons $1
+ !insertmacro RadioButton ${sec_sylpheed}
+ !insertmacro EndRadioButtons
+FunctionEnd
+
+Function un.onInit
+check_app_running:
+ ; Prevent uninstall while Sylpheed is running
+ ${nsProcess::FindProcess} "sylpheed.exe" $R0
+ StrCmp $R0 "0" 0 +3
+ MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "$(app_running_uninst)" IDOK check_app_running
+ Abort
+
+ ${nsProcess::KillProcess} "sylpheed.exe" $R0
+ ${nsProcess::KillProcess} "dts-indexer.exe" $R0
+ ${nsProcess::KillProcess} "postgres.exe" $R0
+
+ SetShellVarContext current
+
+ IfFileExists "$INSTDIR\sylpheed.exe" sylpheed_file_exists
+ !insertmacro UnselectSection ${sec_un_sylpheed}
+ sylpheed_file_exists:
+ !insertmacro SetSectionFlag ${sec_un_sylpheed} ${SF_RO}
+
+!ifdef SYLPHEED_PRO
+ IfFileExists "$INSTDIR\plugins\dbimport.dll" sylpheed_pro_file_exists
+ !insertmacro UnselectSection ${sec_un_sylpheed_pro}
+ !insertmacro SetSectionFlag ${sec_un_sylpheed_pro} ${SF_RO}
+ sylpheed_pro_file_exists:
+!endif
+
+ IfFileExists "$INSTDIR\plugins\attachment_tool.dll" attachment_tool_plugin_file_exists
+ !insertmacro UnselectSection ${sec_un_attachment_tool_plugin}
+ !insertmacro SetSectionFlag ${sec_un_attachment_tool_plugin} ${SF_RO}
+ attachment_tool_plugin_file_exists:
+
+ IfFileExists "$INSTDIR\bsfilter" bsfilter_file_exists
+ !insertmacro UnselectSection ${sec_un_bsfilter}
+ !insertmacro SetSectionFlag ${sec_un_bsfilter} ${SF_RO}
+ bsfilter_file_exists:
+
+ SetShellVarContext current
+ IfFileExists "$DESKTOP\Sylpheed.lnk" desktop_shortcut_file_exists
+ !insertmacro UnselectSection ${sec_un_desktop_shortcut}
+ !insertmacro SetSectionFlag ${sec_un_desktop_shortcut} ${SF_RO}
+ desktop_shortcut_file_exists:
+
+ SetShellVarContext current
+ IfFileExists "$QUICKLAUNCH\Sylpheed.lnk" quick_shortcut_file_exists
+ !insertmacro UnselectSection ${sec_un_quick_shortcut}
+ !insertmacro SetSectionFlag ${sec_un_quick_shortcut} ${SF_RO}
+ quick_shortcut_file_exists:
+FunctionEnd
+
+Function ShowReadme
+ ExecShell open "$INSTDIR\README.txt"
+!ifdef SYLPHEED_PRO
+ ${If} $LANGUAGE = "${LANG_JAPANESE}"
+ IfFileExists "$INSTDIR\doc\manual\sylpheed-pro\ja\search-plugin.html" 0 +2
+ ExecShell open "$INSTDIR\doc\manual\sylpheed-pro\ja\search-plugin.html"
+ ${EndIf}
+!endif
+FunctionEnd
diff --git a/nsis/update-manager.nsi b/nsis/update-manager.nsi
new file mode 100644
index 00000000..e31ab3ad
--- /dev/null
+++ b/nsis/update-manager.nsi
@@ -0,0 +1,111 @@
+;--------------------------------
+
+!include "sylpheed-defs.nsh"
+
+SetCompressor /SOLID lzma
+
+;--------------------------------
+
+!include "nsProcess.nsh"
+
+!include "MUI.nsh"
+!include "Sections.nsh"
+!include "FileFunc.nsh"
+
+; MUI Settings
+!define MUI_ABORTWARNING
+!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install-blue.ico"
+!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-blue.ico"
+
+; Welcome page
+;!insertmacro MUI_PAGE_WELCOME
+; License page
+;!define MUI_LICENSEPAGE_RADIOBUTTONS
+;!insertmacro MUI_PAGE_LICENSE $(license)
+; Components page
+;!insertmacro MUI_PAGE_COMPONENTS
+; Directory page
+;!insertmacro MUI_PAGE_DIRECTORY
+; Instfiles page
+!insertmacro MUI_PAGE_INSTFILES
+; Finish page
+;!define MUI_FINISHPAGE_RUN "$INSTDIR\sylpheed.exe"
+;!define MUI_FINISHPAGE_RUN_NOTCHECKED
+!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
+;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README-win32.txt"
+;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README-win32-ja.txt"
+!define MUI_FINISHPAGE_SHOWREADME_FUNCTION "ShowReadme"
+!define MUI_FINISHPAGE_SHOWREADME_TEXT "$(readme)"
+!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
+!define MUI_FINISHPAGE_LINK "$(jump)"
+!define MUI_FINISHPAGE_LINK_LOCATION ${PRODUCT_WEB_SITE}
+!insertmacro MUI_PAGE_FINISH
+
+; Language files
+!insertmacro MUI_LANGUAGE "English" # ${LANG_ENGLISH}
+!insertmacro MUI_LANGUAGE "Spanish" # ${LANG_SPANISH}
+!insertmacro MUI_LANGUAGE "Japanese" # ${LANG_JAPANESE}
+
+!include "English.nsh"
+!include "Spanish.nsh"
+!include "Japanese.nsh"
+;--------------------------------
+
+Caption "$(^Name) Update Manager"
+Name "${PRODUCT_NAME}"
+OutFile "update-manager.exe"
+InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
+InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
+
+RequestExecutionLevel admin
+
+ShowInstDetails hide
+XPStyle on
+BrandingText "${INST_NAME} ${INST_VERSION}"
+
+!define TEMP_INSTALLER_PATH "$TEMP\${PRODUCT_NAME}_setup.exe"
+
+Section "Download"
+; SetOutPath "$TEMP"
+
+ ${GetParameters} $R0
+ ${GetOptions} "$R0" "/uri" $1
+
+ StrCmp "$1" "" 0 uri_option_found
+ DetailPrint "usage: update-manager.exe /uri 'http://example.com/Sylpheed-VER_setup.exe'"
+ DetailPrint "or update-manager.exe /uri path\to\Sylpheed-VER_setup.exe"
+ Abort
+ uri_option_found:
+
+ IfFileExists "$1" copy_file
+
+ DetailPrint "Downloading $1"
+ NSISdl::download \
+ /TRANSLATE2 "$(downloading)" "$(connecting)" "$(second)" "$(minute)" "$(hour)" "$(seconds)" "$(minutes)" "$(hours)" "$(progress)" \
+ /TIMEOUT=30000 "$1" "${TEMP_INSTALLER_PATH}"
+ Pop $0
+ StrCmp "$0" "success" download_ok
+ DetailPrint "$(download_failed) $0"
+ Abort
+
+
+ copy_file:
+ CopyFiles "$1" "${TEMP_INSTALLER_PATH}"
+ Goto download_ok
+
+ download_ok:
+SectionEnd
+
+Section "Exec Installer"
+ ${nsProcess::FindProcess} "sylpheed.exe" $R0
+ StrCmp $R0 "0" 0 +3
+ MessageBox MB_ICONQUESTION|MB_YESNO "$(kill_and_update_confirm)" /SD IDYES IDYES +2
+ Abort
+
+ ExecWait "$INSTDIR\sylpheed.exe --exit" $R0
+ ExecWait '"${TEMP_INSTALLER_PATH}" /S' $0
+SectionEnd
+
+Function ShowReadme
+ ExecShell open "$INSTDIR\README.txt"
+FunctionEnd