フリーソフト

技術文書

Quicktext - All tags

これは Tunderbird のアドオンの Quicktext(作者: WizKid)に関する非公式ドキュメントです。原文に忠実でない部分があります。必ず原文をご確認ください。自己責任でお願いします。 Kawai

Quicktext | すべてのタグ

[原文ページへ]

Quicktext と Quicktext Pro で利用できるタグを示します。* が付いているタグは Pro 版でのみ利用可能です。

ATT, CLIPBOARD, COUNTER, DATE, FILE, FROM, INPUT, ORGATT, ORGHEADER, SCRIPT, SUBJECT, TEXT, TIME, TO, URL, VERSION

[[ATT=type|separator]]

添付ファイルの名前やファイルサイズを取得します。

type  [任意]  name

name はファイル名、full はファイルサイズです。

separator  [任意]

添付ファイルが複数ある場合の区切り文字を指定します。デフォルトは ", " ですが、"\n" や ",\n" も使用できます。

使用例:

[[ATT]]
[[ATT=full]]

[[CLIPBOARD]]

現在のクリップボードの内容を取得します。

使用例:

[[CLIPBOARD]]

[[COUNTER]]*

カウンタです。タグが挿入されるたびにインクリメントされます。一意な値を取得するために利用できます。

使用例:

[[COUNTER]]

[[DATE=type]]

日付を取得します。

type  [任意]  short, long

short は短い形式、long は長い形式です。OSの言語に依存します。

使用例:

[[DATE]]
[[DATE=long]]

[[FILE=path]]

ローカルのテキストファイルの内容を取得します。リモートのファイルについてはURLを指定します。添付ファイルとしてファイルを追加したい場合は、設定の中の「添付ファイル」の項目を利用します。

path  [必須]  

ローカルファイルへのパス。

使用例:

[[FILE=C:\file.txt]]

[[FROM=type]]

差出人(from)フィールドから値を取得します。

type  [必須]  email, firstname, lastname, fullname, displayname, nickname, ... すべて表示

アドレス帳から値を取得します。失敗した場合はメールアドレスを解析します。最新版のQuicktextでは、ここに記載されている値が利用できます。値は小文字で指定します。

使用例:

[[FROM=firstname]]
[[FROM=fullname]]

[[INPUT=name|type|default]]*

入力画面を表示します。ユーザは任意の値を入力したり、選択肢の中から選んだりできます。

name  [必須]  

入力画面に表示する文字列を指定します。何の値を入力するのかを示します。

type  [任意]  text, select

任意の文字列を受け付ける場合は text を指定します。選択肢の中から選択させる場合は select を指定します。

default  [任意]  

type が text の場合は不要です。select の場合は、";" で区切った選択肢のリストを指定します。

使用例:

[[INPUT=freightnumber]]
[[INPUT=title|select|Mr;Mrs;Ms]]

[[ORGATT=separator]]*

あなたが返信しようとしているメールから添付ファイルを取得します。

separator  [任意]  

添付ファイルが複数ある場合の区切り文字を指定します。デフォルトは ", " ですが、"\n" や ",\n" も使用できます。

使用例:

[[ORGATT]]
[[ORGATT=\n]]

[[ORGHEADER=type|separator]]*

あなたが返信しようとしているメールからヘッダ情報を取得します。

type  [必須]  

必要なヘッダを指定します。例えば、"to" や "reply-to" などです。

separator  [任意]  

type で指定されたヘッダが複数ある場合の区切り文字を指定します。デフォルトは ", " ですが、"\n" や ",\n" も使用できます。

使用例:

[[ORGHEADER=to]]
[[ORGHEADER=received|\n\n]]

[[SCRIPT=name|...]]*

指定されたユーザスクリプトを実行します。

name  [必須]  

スクリプトの名前を指定します。

...    

スクリプトが引数を必要とする場合に指定します。

使用例:

[[SCRIPT=myscript]]
[[SCRIPT=myscript|myvar1|myvar2]]

[[SUBJECT]]

件名を取得します。

使用例:

[[SUBJECT]]

[[TEXT=group|name]]

他のテンプレートのテキストを挿入します。

group  [必須]  

グループ名を指定します。

name  [必須]  

テンプレート名を指定します。

使用例:

[[TEXT=mygroup|mytext]]

[[TIME=type]]

時間を取得します。

type  [任意]  noseconds, seconds

noseconds は秒を表示しません(例:11:37)。seconds は時分秒を表示します(例:11:37:54)。

使用例:

[[TIME]]
[[TIME=seconds]]

[[TO=type|separator]]

宛先(to)フィールドから値を取得します。

type  [必須]  email, firstname, lastname, fullname, displayname, nickname, ... すべて表示

アドレス帳から値を取得します。失敗した場合はメールアドレスを解析します。最新版のQuicktextでは、ここに記載されている値が利用できます。値は小文字で指定します。

separator  [任意]  

値が複数ある場合の区切り文字を指定します。デフォルトは ", " ですが、"\n" や ",\n" も使用できます。

使用例:

[[TO=firstname]]
[[TO=fullname|,\n]]

[[URL=url|data]]*

POSTメソッドでURLにデータを送信し、返されたテキストを挿入します。

url  [必須]  

データを送る url を指定します。

data  [任意]  att, clipboard, counter, date, from, orgatt, orgheader, subject, time, to, version

url に POST するデータを指定します。

使用例:

[[URL=http://example.com]]
[[URL=http://example.com|to;from]]

[[VERSION=type]]

あなたが使用している Thunderbird のバージョンを取得します。

type  [任意]  full, number

full は 「Thunderbird 1.5.0.4」の形式、number は 「1.5.0.4」の形式。

使用例:

[[VERSION]]
[[VERSION=number]]

nsIAbCard/Thunderbird3

[原文ページへ]

全部確認したわけではありませんのでご注意を。

  • 連絡先:
    lastname
    firstname
    phoneticlastname 姓(よみがな)
    phoneticfirstname 名(よみがな)
    displayname 表示名
    nickname ニックネーム
    primaryemail メールアドレス
    secondemail 別のメールアドレス
    _aimscreenname スクリーンネーム?
    prefermailformat 使用メール形式(参照:nsiabprefermailformat
    allowremotecontent リモートコンテンツの使用を許可する
    workphone 勤務先
    homephone 自宅
    faxnumber fax
    pagernumber ポケットベル
    cellularnumber 携帯電話
  • プライベート:
    homeaddress 番地
    homeaddress2 番地
    homecity 市町村名
    homestate 都道府県名
    homezipcode 郵便番号
    homecountry
    webpage2 webページ
    birthyear 誕生日(年)
    birthmonth 誕生日(月)
    birthday 誕生日(日)
    年齢
  • 仕事:
    jobtitle 役職
    department 部門
    company 組織
    workaddress 番地
    workaddress2 番地
    workcity 市町村名
    workstate 都道府県名
    workzipcode 郵便番号
    workcountry
    webpage1 webページ
  • その他:
    custom1 追加情報1
    custom2 追加情報2
    custom3 追加情報3
    custom4 追加情報4
    notes メモ
  • 非表示:
    spousename
    familyname
    homephonetype
    workphonetype
    faxnumbertype
    pagernumbertype
    cellularnumbertype
    anniversaryyear
    anniversarymonth
    anniversaryday
    lastmodifieddate
    popularityindex この受信者にメールが送信されるたびにインクリメントされる

I. License - NSIS Users Manual

これはNSIS Users Manualの非公式な日本語ドキュメントです。本コンテンツの利用によって生じたいかなる損害も、著者は一切の責任をとることができませんので、自己責任での利用をお願いします。読みやすさを重視するため必ずしも原文に忠実でない部分があります。また、誤りが含まれている可能性もあります。必ず原文をご確認ください。 訳者:Kawai

前へ | 目次 | 次へ

付録 I: ライセンス

I.1 著作権

[原文]

Copyright (C) 1995-2009 Contributors

より詳細な著作権情報については、個々のソースコードファイルに記載されています。

I.2 適用されるライセンス

[原文]

  • All NSIS source code, plug-ins, documentation, examples, header files and graphics, with the exception of the compression modules and where otherwise noted, are licensed under the zlib/libpng license.
  • The zlib compression module for NSIS is licensed under the zlib/libpng license.
  • The bzip2 compression module for NSIS is licensed under the bzip2 license.
  • The lzma compression module for NSIS is licensed under the Common Public License version 1.0.

I.3 zlib/libpng ライセンス

[原文]

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

I.4 bzip2 ライセンス

[原文]

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Julian Seward, Cambridge, UK.

jseward@acm.org

I.5 Common Public License version 1.0

[原文]

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

1. DEFINITIONS

"Contribution" means:

a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and b) in the case of each subsequent Contributor:

i) changes to the Program, and

ii) additions to the Program;

where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.

"Contributor" means any person or entity that distributes the Program.

"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.

"Program" means the Contributions distributed in accordance with this Agreement.

"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.

2. GRANT OF RIGHTS

a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.

b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.

c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.

d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.

3. REQUIREMENTS

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:

a) it complies with the terms and conditions of this Agreement; and

b) its license agreement:

i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;

ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;

iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and

iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.

When the Program is made available in source code form:

a) it must be made available under this Agreement; and

b) a copy of this Agreement must be included with each copy of the Program.

Contributors may not remove or alter any copyright notices contained within the Program.

Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.

4. COMMERCIAL DISTRIBUTION

Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.

For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.

5. NO WARRANTY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.

6. DISCLAIMER OF LIABILITY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. GENERAL

If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.

All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.

Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.

This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

I.6 LZMA 圧縮モジュールにおける特例

[原文]

Igor Pavlov and Amir Szekely, the authors of the LZMA compression module for NSIS, expressly permit you to statically or dynamically link your code (or bind by name) to the files from the LZMA compression module for NSIS without subjecting your linked code to the terms of the Common Public license version 1.0. Any modifications or additions to files from the LZMA compression module for NSIS, however, are subject to the terms of the Common Public License version 1.0.

前へ | 目次 | 次へ


 
SourceForge Logo

H. Credits - NSIS Users Manual

これはNSIS Users Manualの非公式な日本語ドキュメントです。本コンテンツの利用によって生じたいかなる損害も、著者は一切の責任をとることができませんので、自己責任での利用をお願いします。読みやすさを重視するため必ずしも原文に忠実でない部分があります。また、誤りが含まれている可能性もあります。必ず原文をご確認ください。 訳者:Kawai

前へ | 目次 | 次へ

付録 H: クレジット

H.1 プログラマ

[原文]

Justin Frankel aka 0xDEADBEEF

  • Creating the all mighty NSIS

Amir "make me stop" Szekely aka KiCHiK

  • Multilingual NSIS
  • RTF license text
  • The new paging system
  • Full color support for icons and bitmaps
  • Branding image
  • Customizable UI
  • One makensis.exe for both zlib and bzip2

Joost Verburg

  • Modern User Interface
  • NSIS website
  • NSIS Menu
  • System for DLL/TLB library setup
  • NSIS Update for NSIS distribution (original version by Nathan Purciful)

Robert Rainwater

  • MakeNSISW
  • New documentation format
  • Enhancing the TreeView
  • Reorganizing NSIS directory structure

Dave "bit-by-bit" Laundon aka eccles

  • Massive optimizing

Ximon Eighteen aka Sunjammer

  • The new plug-ins system
  • "Copy to clipboard" context menu for the Details window
  • License text initial focus

Ramon aka Ramon18

  • Version information resource commands
  • Named user variables
  • Lots of UI fixes
  • InstallOptions improvements

Jim Park

  • Unicode support

Olivier Marcoux

nnop@newmail.ru

Ryan Geiss

Andras Varga

Drew Davidson

Peter Windridge

Yaroslav Faybishenko

Jeff Doozan

  • NSIS 2's new TreeView

Nike (nike@sendmail.ru)

  • HTML Help support for Halibut

Diego Pedroso aka deguix

  • New NSIS Wiki

Shengalts Aleksander aka Instructor

Stuart Welch aka Afrow UK

David Weiss aka Comm@nder21

Anders Kjersem

H.2 デザイナ

[原文]

Nikos Adamamas

  • The new modern icons

Jan T. Sott / whyEye.org

  • Lots of icons and check marks

H.3 翻訳者

[原文]

Albanian - Besnik Bleta

Afrikaans - Friedel Wolff

Arabic - asdfuae, Rami Kattan

Asturian - Marcos (marcoscostales@gmail.com)

Basque - Iñaki San Vicente

Belarusian - Sitnikov Vjacheslav

Bosnian - Salih CAVKIC

Breton - Korvigelloù An Drouizig

Bulgarian - Asparouh Kalyandjiev, Plamen Penkov

Catalan - falanko

Croatian - Igor Ostriz, Vedran "RIV@NVX" Miletic

Czech - T.V. Zuggy, SELiCE

Danish - Christopher, Casper Bergenstoff, Claus Futtrup

Dutch - Hendri Adriaens, Joost Verburg

Esperanto - Felipe Castro

Estonian - izzo

Farsi - Masoud Alinaqian, FzerorubigD, Elnaz Sarbar

Finnish - AKX, Eclipser

French - veekee, Sebastien Delahaye, Jerome Charaoui

Galician - Ramon Flores

German - L.King, K. Windszus, R. Bisswanger, M. Simmack, Tim Kosse

Greek - Makidis N. Michael

Hebrew - Amir Szekely (aka KiCHiK), Yaron Shahrabani

Hungarian - Soft-Trans Bt., Jozsef Tamas Herczeg, Lajos Molnar (Orfanik)

Icelandic - Gretar Orri Kristinsson

Indonesian - ariel825010106

Italian - Orfanik, sanface, Alessandro Staltari, Lorenzo Bevilacqua

Japanese - Dnanako, Takahiro Yoshimura

Korean - dTomoyo, linak, koder

Kurdish - Erdal Ronahi

Latvian - Valdis Griíis, Kristaps Meòìelis

Lithuanian - NorCis, Vytautas Krivickas, Danielius Scepanskis

Luxembourgish - Jo Hoeser

Macedonian - Sasko Zdravkin

Mongolian - Bayarsaikhan Enkhtaivan

Norwegian - Jonas Christoffer Lindstrom, Jan Ivar Beddari

Norwegian Nynorsk - Vebjørn Sture

Polish - Piotr Murawski, Rafa³ Lampe, cube, SYSTEMsoft Group

Portuguese - DragonSoull, Dre', Ramon

Portuguese Brasil - Layout do Brasil, deguix

Romanian - Sorin Sbarnea, Cristian Pirvu, George Radu, Vlad Rusu

Russian - Sergey `Timon` Kusnetsov, Nik Medved, Scam, THRaSH, Dmitry Yerokhin

Serbian - Srdjan Obucina

Serbian Latin - Srdjan Obucina, Vladan Obradovic

Slovak - trace, Kypec, Marián Hikaník

Slovenian - Janez Dolinar, Martin Sebotnjak

Spanish - MoNKi, Lobo Lunar, Darwin Rodrigo Toledo Cáceres

Swedish - Peter Gustafsson, Magnus Bonnevier, Rickard Angbratt

Thai - SoKoOLz, TuW@nNu (asdfuae)

Traditional & Simplified Chinese - Kii Ali

Turkish - Bertan Kodamanoglu, Cagatay Dilsiz, Fatih BOY

Ukrainian - Yuri Holubow, Nash-Soft

Uzbek - Emil Garipov (emil.garipov@gmail.com)

Valencian - Bernardo Arlandis Mañó

Welsh - Rhoslyn Prys, Meddal.com

H.4 著者

[原文]

Sebastian Armbrust aka flizebogen

  • Tutorial

前へ | 目次 | 次へ


SourceForge Logo

AppendixG

[原文]

AppendixF

[原文]

AppendixE

[原文]

D. Useful Information

これはNSIS Users Manualの非公式な日本語ドキュメントです。本コンテンツの利用によって生じたいかなる損害も、著者は一切の責任をとることができませんので、自己責任での利用をお願いします。読みやすさを重視するため必ずしも原文に忠実でない部分があります。また、誤りが含まれている可能性もあります。必ず原文をご確認ください。 訳者:Kawai

前へ | 目次 | 次へ

付録 D: 役に立つ情報

D.1 エラーレベル

[原文]

他のアプリケーションと同様に、NSIS インストーラは実行結果としてエラーレベルを返します。他のアプリケーションや他のインストーラから、 NSIS インストーラを呼び出した場合には、エラーレベルをチェックすることは有用です。

  • 0 - 通常の実行 (エラーなし)
  • 1 - ユーザによるインストールの中断 (キャンセルボタン)
  • 2 - スクリプトによるインストールの中断

NSIS 2.01 以降では、SetErrorLevel を利用して、エラーレベルを設定することができます。

注意: アンインストーラ自身を削除できるようにするため、アンインストーラは自分自身を一時フォルダにコピーした後、そこから実行します。そのため、アンインストーラが設定したエラーレベルは実行プロセスから利用することができません。エラーレベルを得るためには、このコピー処理をシミュレートして、実行する必要があります。具体的には、以下のようにします。

CopyFiles $INSTDIR\uninstaller.exe $TEMP
ExecWait '"$TEMP\uninstaller.exe" _?=$INSTDIR' $0
DetailPrint "uninstaller set error level $0"

このようにしないと、アンインストーラは自分自身を一時ディレクトリにコピーすることができません。

D.2 プログラムの追加と削除へのアンインストール情報の追加

HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall の下に、製品名のキーを作成すると、コントロールパネルの「プログラムの追加と削除」にエントリーを追加することができます。Windows NT (NT4/2000/XP) においては、HKCUにキーを作成することで、カレントユーザにのみ表示されるようにすることもできます。いくつかの値をキーに記述することによって、アプリケーションやアンインストーラに関する情報を与えることができます。WriteRegStr コマンド(文字列用)や WriteRegDWORD コマンド(DWORD 値用)を利用して値を書き込みます。例を示します。

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Product" "DisplayName" "Application Name"

記述が必要な値

DisplayName (string) - アプリケーションの名前
UninstallString (string) - アンインストーラのパスとファイル名。空白でパスが分割されないようにするため、パスは常にクォートすべきです。

オプション値

以下の値のうちのいくつかは、古い Windows では使用されません。

InstallLocation (string) - インストールディレクトリ ($INSTDIR)
DisplayIcon (string) - アプリケーション名の次に表示される、パス、ファイル名、アイコンのインデクス

Publisher (string) - 発行元の(会社の)名前

ModifyPath (string) - アプリケーション更新プログラムのパスとファイル名
InstallSource (string) - アプリケーションのインストール元の場所

ProductID (string) - アプリケーションの製品 ID
RegOwner (string) - アプリケーションの登録ユーザ
RegCompany (string) - アプリケーションの登録企業

HelpLink (string) - サポートのウェブサイトへのリンク
HelpTelephone (string) - サポートのための電話番号

URLUpdateInfo (string) - アプリケーションのアップデートのためのウェブサイトへのリンク
URLInfoAbout (string) - アプリケーションのホームページへのリンク

DisplayVersion (string) - アプリケーションの表示バージョン
VersionMajor (DWORD) - アプリケーションのメジャーバージョン番号
VersionMinor (DWORD) - アプリケーションのマイナーバージョン番号

NoModify (DWORD) - アンインストーラがアプリケーションを更新するためのオプションを持っていない場合は 1
NoRepair (DWORD) - アンインストーラがインストールを修復するためのオプションを持っていない場合は 1

NoModify と NoRepair の両方が 1 に設定された場合、「変更/削除」の代わりに「削除」というボタンが表示されます。

D.3 System.dll プラグインを利用した外部 DLL の呼び出し

インストール処理において、サードパーティの DLL を内部に含む関数を呼び出す必要がある場合があります。代表的な例は、Palm(TM) コンジットをインストールするときです。

System.dll について
System.dll プラグイン(Brainsucker 氏)によって、外部の DLL を "Call" 関数で呼び出すことが可能となります。System.dll には、そのほかにも沢山の関数が含まれていますが、ここでは取り上げません。その他の関数の詳細については、System readme を参照してください。

データ型
System.dll は以下のデータ型を認識します。

  • v - void 型(返り値として一般的)
  • i - 整数型 (char, byte, short, ハンドル, ポインタなどを含む)
  • l - 大きな整数型 (int64 として知られているもの)
  • t - テキスト、文字列型 (LPCSTR、一文字目へのポインタ)
  • b - 論理型 ('true'、'false') - 実際は、この型は無意味です -> 普通の整数を使うこともできます('0'、'1')
  • k - コールバック型。system.html のコールバックの節を参照してください。
  • * - ポインタ指定子 -> 型へのポインタ、次の文字(引数)に影響します [例: '*i' - 整数へのポインタ]

System.dll 変数の NSIS スクリプト変数へのマッピング
外部の関数を呼び出すことができたとしても、返り値を取得することができないと意味がありません。System.dll は、次のように、関数の変数を NSIS スクリプト変数にマップします。

NSIS の $0..$9 は、System.dll の r0..r9 に、NSIS の $R0..$R9 は、 System.dll の r10..r19 になります。

各引数は、型や入力、出力によって特定されます。入力や出力をスキップするには、ドットを利用します。例を示します。

文字列(文字配列へのポインタ)。入力は 'happy calling'。

t 'happy calling'

文字列(文字配列へのポインタ)。入力は $5 から取得し、呼び出しによる変更は $R8 に保存する。

t r5R8

整数へのポインタ。 $1 から値を取得し $2 に格納する。

*i r1r2

64 ビット整数へのポインタ。出力はスタックにプッシュ。入力はなし。

*l .s

System.dll::Call を利用すると、サードパーティの DLL 内にある関数を呼び出すことができます。Call 関数は次のように使用します。

System::Call 'YourDllName::YourDllFunction(i, *i, t) i(r0, .r1, r2) .r3'

最後の '(r0, .r1, r2) .r3' の部分は、DLL と NSIS スクリプトの間で渡されるパラメータです。このパラメータリストから分かるように、型と入力、出力を分けることができます。"(parms list) return value" の各ブロックは最後のもので、上書きされたり追加されたりします。上記の例では、最初のブロックは型を指定し、2番目は入力と出力を指定しています。

NSIS スクリプトをコーディングし始める前に
NSIS スクリプトをコーディングするには、呼び出そうとしている関数の完全なプロトタイプを知っている必要があります。例として、Palm の 'CondMgr.dll' から、'CmGetHotSyncExecPath' を利用する場合を考えます。この関数は、'HotSync.exe' のフルパスを返すために利用されます。

関数の定義

int CmGetHotSyncExecPath(TCHAR *pPath, int *piSize);

ここで、

  • pPath は、文字バッファへのポインタです。HotSync マネージャのパスとファイル名が返されます。
  • piSize は、pPath 引数によって参照されるバッファの(TCHAR での)サイズを指定します。

返り値

  • 0: エラーなし
  • -1: 特定できないエラーが発生
  • ERR_REGISTRY_ACCESS(-1006):Palm コンフィギュレーションエントリにアクセスできない
  • ERR_BUFFER_TOO_SMALL(-1010): 要求された情報を格納するには、バッファが小さすぎる
  • ERR_INVALID_POINTER(-1013):指定されたポインタは、有効なポインタではない

また、バッファが小さすぎる場合は、必要なバッファサイズが *int の値に設定されます(TCHAR でのサイズ)。

この関数定義は、以下の System.dll 定義にマップされます。

CmGetHotSyncExecPath(t, *i) i

つまり、これは、テキスト変数と、整数へのポインタを引数として、整数値を返します。

外部 DLL 関数の使用
Now that we've sorted out what the function does, and how it maps to the System.dll format, we can use the function in a NSIS script.

First, you have to change the output directory to that where the DLL you want to use is. It may also work if the DLL is on the system path, but this hasn't been tested.

The following code fragment will install 'condmgr.dll' to a temporary directory, execute the CmGetHotSyncExecPath function and display returned data. Save this script

; **** snip ****
Function loadDll

  SetOutPath $TEMP\eInspect             ; create temp directory
  File bin\CondMgr.dll                  ; copy dll there
  StrCpy $1 ${NSIS_MAX_STRLEN}          ; assign memory to $0
  System::Call 'CondMgr::CmGetHotSyncExecPath(t, *i) i(.r0, r1r1).r2'
  DetailPrint 'Path: "$0"'
  DetailPrint "Path length: $1"
  DetailPrint "Return value: $2"

FunctionEnd
; **** snip ****

and this function produces the following output in the 'details' page:

Output folder: c:\windows\TEMP\eInspect
Extract: CondMgr.dll
Path: "C:\Dave\palm\Hotsync.exe"
Path length: 24
Return value: 0

Written by djc

Acknowledgements & Thanks
Lots of thanks go to kichik and Sunjammer for spending a lot of time assisting in solving this problem. Also to brainsucker for creating the System.dll plug-in in the first place. Good Luck!

D.4 Dump Content of Log Window to File

This function will dump the log of the installer (installer details) to a file of your choice. I created this function for Afrow_UK who requested a way to dump the log to a file in this forum thread.

To use it, push a file name and call it. It will dump the log to the file specified. For example:

GetTempFileName $0
Push $0
Call DumpLog

Here is the function:

!define LVM_GETITEMCOUNT 0x1004
!define LVM_GETITEMTEXT 0x102D

Function DumpLog
  Exch $5
  Push $0
  Push $1
  Push $2
  Push $3
  Push $4
  Push $6

  FindWindow $0 "#32770" "" $HWNDPARENT
  GetDlgItem $0 $0 1016
  StrCmp $0 0 error
  FileOpen $5 $5 "w"
  StrCmp $5 0 error
    SendMessage $0 ${LVM_GETITEMCOUNT} 0 0 $6
    System::Alloc ${NSIS_MAX_STRLEN}
    Pop $3
    StrCpy $2 0
    System::Call "*(i, i, i, i, i, i, i, i, i) i \
      (0, 0, 0, 0, 0, r3, ${NSIS_MAX_STRLEN}) .r1"
    loop: StrCmp $2 $6 done
      System::Call "User32::SendMessageA(i, i, i, i) i \
        ($0, ${LVM_GETITEMTEXT}, $2, r1)"
      System::Call "*$3(&t${NSIS_MAX_STRLEN} .r4)"
      FileWrite $5 "$4$\r$\n"
      IntOp $2 $2 + 1
      Goto loop
    done:
      FileClose $5
      System::Free $1
      System::Free $3
      Goto exit
  error:
    MessageBox MB_OK error
  exit:
    Pop $6
    Pop $4
    Pop $3
    Pop $2
    Pop $1
    Pop $0
    Exch $5
FunctionEnd

written by KiCHiK

D.5 How to Read REG_MULTI_SZ Values

I wrote this script to help rpetges in this forum thread. It reads a registry value of the type REG_MULTI_SZ and prints it out. Don't forget to edit where it says "Edit this!" when you test this script. The values must point to a REG_MULTI_SZ value or the example will spit out an error.

OutFile "REG_MULTI_SZ Reader.exe"

Name "REG_MULTI_SZ Reader"

ShowInstDetails show

!define HKEY_CLASSES_ROOT        0x80000000
!define HKEY_CURRENT_USER        0x80000001
!define HKEY_LOCAL_MACHINE       0x80000002
!define HKEY_USERS               0x80000003
!define HKEY_PERFORMANCE_DATA    0x80000004
!define HKEY_PERFORMANCE_TEXT    0x80000050
!define HKEY_PERFORMANCE_NLSTEXT 0x80000060
!define HKEY_CURRENT_CONFIG      0x80000005
!define HKEY_DYN_DATA            0x80000006

!define KEY_QUERY_VALUE          0x0001
!define KEY_ENUMERATE_SUB_KEYS   0x0008

!define REG_NONE                 0
!define REG_SZ                   1
!define REG_EXPAND_SZ            2
!define REG_BINARY               3
!define REG_DWORD                4
!define REG_DWORD_LITTLE_ENDIAN  4
!define REG_DWORD_BIG_ENDIAN     5
!define REG_LINK                 6
!define REG_MULTI_SZ             7

!define RegOpenKeyEx     "Advapi32::RegOpenKeyExA(i, t, i, i, *i) i"
!define RegQueryValueEx  "Advapi32::RegQueryValueExA(i, t, i, *i, i, *i) i"
!define RegCloseKey      "Advapi32::RegCloseKeyA(i) i"

####### Edit this!

!define ROOT_KEY         ${HKEY_CURRENT_USER}
!define SUB_KEY          "Software\Joe Software"
!define VALUE            "Strings"

####### Stop editing

Section "Read"
  StrCpy $0 ""
  StrCpy $1 ""
  StrCpy $2 ""
  StrCpy $3 ""
  System::Call "${RegOpenKeyEx}(${ROOT_KEY}, '${SUB_KEY}', \
    0, ${KEY_QUERY_VALUE}|${KEY_ENUMERATE_SUB_KEYS}, .r0) .r3"
 
  StrCmp $3 0 goon
    MessageBox MB_OK|MB_ICONSTOP "Can't open registry key! ($3)"
    Goto done
goon:

  System::Call "${RegQueryValueEx}(r0, '${VALUE}', 0, .r1, 0, .r2) .r3"
 
  StrCmp $3 0 read
    MessageBox MB_OK|MB_ICONSTOP "Can't query registry value size! ($3)"
    Goto done
 
read:
 
  StrCmp $1 ${REG_MULTI_SZ} multisz
    MessageBox MB_OK|MB_ICONSTOP "Registry value no REG_MULTI_SZ! ($3)"
    Goto done
 
multisz:
 
  StrCmp $2 0 0 multiszalloc
    MessageBox MB_OK|MB_ICONSTOP "Registry value empty! ($3)"
    Goto done
 
multiszalloc:

  System::Alloc $2
  Pop $1
 
  StrCmp $1 0 0 multiszget
    MessageBox MB_OK|MB_ICONSTOP "Can't allocate enough memory! ($3)"
    Goto done
 
multiszget:
 
  System::Call "${RegQueryValueEx}(r0, '${VALUE}', 0, n, r1, r2) .r3"
 
  StrCmp $3 0 multiszprocess
    MessageBox MB_OK|MB_ICONSTOP "Can't query registry value data! ($3)"
    Goto done
 
multiszprocess:
 
  StrCpy $4 $1
 
  loop:
 
    System::Call "*$4(&t${NSIS_MAX_STRLEN} .r3)"
    StrCmp $3 "" done
    DetailPrint $3
    StrLen $5 $3
    IntOp $4 $4 + $5
    IntOp $4 $4 + 1
    Goto loop
 
done:
 
  System::Free $1
 
  StrCmp $0 0 noClose
    System::Call "${RegCloseKey}(r0)"
 
noClose:

SectionEnd

written by KiCHiK

前へ | 目次 | 次へ


SourceForge Logo

C. Useful Scripts - NSIS Users Manual

これはNSIS Users Manualの非公式な日本語ドキュメントです。本コンテンツの利用によって生じたいかなる損害も、著者は一切の責任をとることができませんので、自己責任での利用をお願いします。読みやすさを重視するため必ずしも原文に忠実でない部分があります。また、誤りが含まれている可能性もあります。必ず原文をご確認ください。 訳者:Kawai

Previous | Contents | Next

付録 C:役に立つスクリプト

C.1 Internet Explorer のバージョンを取得する

[原文]

 ; GetIEVersion
;
; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
; Returns on top of stack
; 1-6 (Installed IE Version)
; or
; '' (IE is not installed)
;
; Usage:
;   Call GetIEVersion
;   Pop $R0
;   ; at this point $R0 is "5" or whatnot

Function GetIEVersion
Push $R0
   ClearErrors
   ReadRegStr $R0 HKLM "Software\Microsoft\Internet Explorer" "Version"
   IfErrors lbl_123 lbl_456

   lbl_456: ; ie 4+
     Strcpy $R0 $R0 1
   Goto lbl_done

   lbl_123: ; older ie version
     ClearErrors
     ReadRegStr $R0 HKLM "Software\Microsoft\Internet Explorer" "IVer"
     IfErrors lbl_error

       StrCpy $R0 $R0 3
       StrCmp $R0 '100' lbl_ie1
       StrCmp $R0 '101' lbl_ie2
       StrCmp $R0 '102' lbl_ie2

       StrCpy $R0 '3' ; default to ie3 if not 100, 101, or 102.
       Goto lbl_done
         lbl_ie1:
           StrCpy $R0 '1'
         Goto lbl_done
         lbl_ie2:
           StrCpy $R0 '2'
         Goto lbl_done
     lbl_error:
       StrCpy $R0 ''
   lbl_done:
   Exch $R0
FunctionEnd

C.2 .NET Framework がインストールされているか?

[原文]

 ; IsDotNETInstalled
;
; Based on GetDotNETVersion
;   http://nsis.sourceforge.net/Get_.NET_Version
;
; Usage:
;   Call IsDotNETInstalled
;   Pop $0
;   StrCmp $0 1 found.NETFramework no.NETFramework

Function IsDotNETInstalled
   Push $0
   Push $1

   StrCpy $0 1
   System::Call "mscoree::GetCORVersion(w, i ${NSIS_MAX_STRLEN}, *i) i .r1"
   StrCmp $1 0 +2
     StrCpy $0 0

   Pop $1
   Exch $0
FunctionEnd

C.3 Macromedia Flash Player がインストールされているか??

[原文]

 ; IsFlashInstalled
;
; By Yazno, http://yazno.tripod.com/powerpimpit/
; Returns on top of stack
; 0 (Flash is not installed)
; or
; 1 (Flash is installed)
;
; Usage:
;   Call IsFlashInstalled
;   Pop $R0
;   ; $R0 at this point is "1" or "0"

Function IsFlashInstalled
  Push $R0
  ClearErrors
  ReadRegStr $R0 HKCR "CLSID\{D27CDB6E-AE6D-11cf-96B8-444553540000}" ""
  IfErrors lbl_na
    StrCpy $R0 1
  Goto lbl_end
  lbl_na:
    StrCpy $R0 0
  lbl_end:
  Exch $R0
FunctionEnd

C.4 インターネットに接続する

[原文]

 ; ConnectInternet (uses Dialer plug-in)
; Written by Joost Verburg
;
; This function attempts to make a connection to the internet if there is no
; connection available. If you are not sure that a system using the installer
; has an active internet connection, call this function before downloading
; files with NSISdl.
;
; The function requires Internet Explorer 3, but asks to connect manually if
; IE3 is not installed.

Function ConnectInternet

   Push $R0
    
     ClearErrors
     Dialer::AttemptConnect
     IfErrors noie3
    
     Pop $R0
     StrCmp $R0 "online" connected
       MessageBox MB_OK|MB_ICONSTOP "Cannot connect to the internet."
       Quit ;This will quit the installer. You might want to add your own error handling.
    
     noie3:
   
     ; IE3 not installed
     MessageBox MB_OK|MB_ICONINFORMATION "Please connect to the internet now."
    
     connected:
   
   Pop $R0
   
FunctionEnd

C.5 インストーラ ファイル名を取得する

[原文]

 System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
;$R0 will contain the installer filename

C.6 複数起動を禁止する

[原文]

以下のコードを .onInit 関数 に記述してください。

 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e'
Pop $R0

StrCmp $R0 0 +3
   MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
   Abort

'myMutex' はユニークな値に置き換える必要があります。

C.7 More

[原文]

NSIS WikiNSIS forumNSIS development page で、その他の有用なスクリプトを見つけることができます。

前へ | 目次 | 次へ


 
SourceForge Logo

B. DLL/TLB Library Setup - NSIS Users Manual

これはNSIS Users Manualの非公式な日本語ドキュメントです。本コンテンツの利用によって生じたいかなる損害も、著者は一切の責任をとることができませんので、自己責任での利用をお願いします。読みやすさを重視するため必ずしも原文に忠実でない部分があります。また、誤りが含まれている可能性もあります。必ず原文をご確認ください。 訳者:Kawai

前へ | 目次 | 次へ

付録 B: DLL/TLB ライブラリのセットアップ

B.1 はじめに

[原文]

ライブラリのヘッダファイルは、ダイナミック リンク ライブラリ(DLL)やタイプ ライブラリ(TLB)をセットアップするために利用できます。必要に応じて、以下のアクションが実行されます。

  • ファイルをコピー
  • 再起動時にファイルをコピー
  • バージョンチェック
  • 登録と登録解除
  • 再起動時に登録と登録解除
  • 共有 DLL のカウント
  • Windows ファイル保護のチェック

マクロは、ヘッダ ファイル Library.nsh に含まれていますので、以下のようにスクリプト内でインクルードする必要があります。

!include Library.nsh

ライブラリのマクロは、Windows 以外のプラットホームでは制限があることに注意してください。Windows 以外のプラットホームでは、コンパイル時にDLL のバージョン情報が要求されます。

B.2 ライブラリのインストール

[原文]

B.2.1 はじめに

[原文]

InstallLib マクロによってライブラリをインストールすることができます。ライブラリのセットアップ中に何か問題が発生した場合は、エラー フラグがセットされます。

ユーザに再起動するかを問い合わせるためには、モダン UI の完了ページを利用するか、あるいは IfRebootFlag を利用して独自のページ、またはメッセージ ボックスを作成します。

B.2.2 引数

[原文]

libtype shared install localfile destfile tempbasedir

libtype

ライブラリのタイプ

DLL - ダイナミック リンク ライブラリ(DLL)
REGDLL - 登録が必要なDLL
REGEXE - /regserver による登録が必要なEXE COM サーバ
TLB - タイプ ライブラリ、あるいはタイプ ライブラリを含む DLL
REGDLLTLB - タイプ ライブラリを含む、登録が必要な DLL

shared

他のアプリケーションとライブラリを共有するかどうかを指定する

NOTSHARED - ライブラリを共有しない
$VARNAME - Variable that is empty when the application is installed for the first time, which is when the shared library count will be increased.

install

インストール方法を指定する

REBOOT_PROTECTED

  • 使用中の場合、再起動時にライブラリを更新する(システム ファイルに対して必要)。
  • Windows ファイル保護によって保護されていない場合は、ライブラリを更新する。

NOREBOOT_PROTECTED

  • ライブラリが使用中の場合、ユーザに警告する。ユーザは、ライブラリを使用しているアプリケーションを閉じる必要がある。
  • Windows ファイル保護によって保護されていない場合は、ライブラリを更新する。

REBOOT_NOTPROTECTED

  • 使用中の場合、再起動時にライブラリを更新する(システム ファイルに対して必要)。
  • Windows ファイル保護をチェックせずにライブラリを更新する。

NOREBOOT_NOTPROTECTED

  • ライブラリが使用中の場合、ユーザに警告する。ユーザは、ライブラリを使用しているアプリケーションを閉じる必要がある。
  • Windows ファイル保護をチェックせずにライブラリを更新する。

localfile

コンパイラ システムにおけるライブラリの場所

destfile

ユーザのシステムにおけるライブラリの保存場所

tempbasedir

システムの再起動が必要な場合に、一時ファイルを保存するためのユーザ システムにおけるディレクトリ

Windows 9x/ME をサポートする場合は、このディレクトリは出力先(destfile)と同じボリュームでなければなりません。Windows の一時ディレクトリはどのボリュームに置くこともできますので、このディレクトリを使用することはできません。

B.2.3 オプション

[原文]

InstallLib マクロの振る舞いを修正するには、マクロを挿入する前に以下を Define してください。

B.2.3.1 LIBRARY_X64

  • Windows x64 用にビルドされた DLL をインストールする。
  • 警告: ファイル システム リダイレクトがリセットされます。

B.2.3.2 LIBRARY_SHELL_EXTENSION

  • 登録後に SHCNE_ASSOCCHANGED で SHChangeNotify を呼び出する場合に定義します。
  • シェル エクステンションをインストールしたとき、あるいはファイルの関連付けを変更したときに、シェルをリフレッシュするために使用します。

B.2.3.3 LIBRARY_COM

  • 登録後に CoFreeUnusedLibraries を呼び出す場合に定義します。
  • COM ライブラリをインストールする場合において、すべての不要なライブラリをメモリからアンロードするために使用します。

B.2.3.4 LIBRARY_IGNORE_VERSION

  • ファイルのバージョン情報を無視し、すでに存在する場合でも常にインストールする場合に定義します。
  • 古いバージョン、あるいは特定のバージョンが要求される場合に使用します。
  • $SYSDIR にインストールされる DLL に対しては推奨されません。

B.2.4 注意点

[原文]

  • Windows 9x/ME をサポートする場合は、短いファイル名だけしか使用できません(8.3)。
  • 警告: DLL を配布する場合は、常に再配布不可能なファイルを使用してください。あなたのシステム ディレクトリからファイルをコピーしてはいけません。

B.2.5 例

[原文]

B.2.5.1 非共有 DLL

 !insertmacro InstallLib REGDLL NOTSHARED REBOOT_NOTPROTECTED dllname.dll $SYSDIR\dllname.dll $SYSDIR

B.2.5.2 共有 DLL

 ;Add code here that sets $ALREADY_INSTALLED to a non-zero value if the application is
 ;already installed. For example:

 IfFileExists "$INSTDIR\MyApp.exe" 0 new_installation ;Replace MyApp.exe with your application filename
   StrCpy $ALREADY_INSTALLED 1
 new_installation:

 !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED dllname.dll $SYSDIR\dllname.dll $SYSDIR

B.3 ライブラリのアンインストール

[原文]

B.3.1 はじめに

[原文]

UnInstallLib マクロを使用するとライブラリをアンインストールすることができます。ライブラリの削除中に何か問題が発生した場合は、エラー フラグがセットされます。

B.3.2 引数

[原文]

libtype shared uninstall file

libtype

ライブラリのタイプy

DLL - ダイナミック リンク ライブラリ(DLL)
REGDLL - 登録が必要なDLL
REGEXE - /regserver による登録が必要なEXE COM サーバ
TLB - タイプ ライブラリ、あるいはタイプ ライブラリを含む DLL
REGDLLTLB - タイプ ライブラリを含む、登録が必要な DLL

shared

他のアプリケーションとライブラリを共有するかどうかを指定する

NOTSHARED - ライブラリを共有しない
SHARED - ライブラリは共有される。共有ライブラリ カウントが、ファイルがすでに利用されていないことを示している場合は削除される。

uninstall

アンインストールの方法を指定する

NOREMOVE

  • ライブラリは削除されません。Visual Basic/C++/MFC ランライムのような重要なシステムファイルに対して、このオプションを使用してください。

REBOOT_PROTECTED

  • 使用中の場合、再起動時にライブラリを削除する(システム ファイルに対して必要)。
  • Windows ファイル保護によって保護されていない場合は、ライブラリを削除する。

NOREBOOT_PROTECTED

  • ライブラリが使用中の場合、ユーザに警告する。ユーザは、ライブラリを使用しているアプリケーションを閉じる必要がある。
  • Windows ファイル保護によって保護されていない場合は、ライブラリを削除する。

REBOOT_NOTPROTECTED

  • 使用中の場合、再起動時にライブラリを削除する(システム ファイルに対して必要)。
  • Windows ファイル保護をチェックせずにライブラリを削除する。

NOREBOOT_NOTPROTECTED

  • ライブラリが使用中の場合、ユーザに警告する。ユーザは、ライブラリを使用しているアプリケーションを閉じる必要がある。
  • Windows ファイル保護をチェックせずにライブラリを削除する。

file

ライブラリの場所

B.3.3 オプション

[原文]

UnInstallLib マクロの振る舞いを修正するには、マクロを挿入する前に以下を Define してください。

B.3.3.1 LIBRARY_X64

  • Windows x64 用にビルドされた DLL をアンインストールする。
  • Warning: SetRegView とファイル システム リダイレクトがリセットされます。

B.3.3.2 LIBRARY_SHELL_EXTENSION

  • 登録解除後に SHCNE_ASSOCCHANGED で SHChangeNotify を呼び出す場合に定義します。シェル エクステンションをアンインストールしたとき、あるいはファイルの関連付けを変更したときに利用します。

B.3.3.3 LIBRARY_COM

  • 登録解除後に CoFreeUnusedLibraries を呼び出す場合に定義します。COM ライブラリをアンインストールする場合において、すべての不要なライブラリをメモリからアンロードするために使用します。

B.3.4 例

[原文]

 !insertmacro UnInstallLib REGDLL SHARED REBOOT_NOTPROTECTED $SYSDIR\dllname.dll

B.4 Visual Basic 6 のランタイム ファイル

[原文]

VB6 ランタイム ファイルをセットアップするには、新しい VB6RunTime.nsh ヘッダ ファイルを利用することができます。最新のランタイム ファイルを取得するには、vb6runtime.zip をダウンロードして展開してください。

 !include VB6RunTime.nsh

 Var AlreadyInstalled

 Section "-Install VB6 run-time files"

   ;Add code here that sets $AlreadyInstalled to a non-zero value if the application is already installed. For example:
   IfFileExists "$INSTDIR\MyApp.exe" 0 new_installation ;Replace MyApp.exe with your application filename
     StrCpy $AlreadyInstalled 1
   new_installation:

   !insertmacro VB6RunTimeInstall C:\vb6runtimes $AlreadyInstalled ;Replace C:\vb6runtimes with the location of the files

 SectionEnd

 Section "-un.Uninstall VB6 run-time files"

   !insertmacro VB6RunTimeUnInstall

 SectionEnd

備考:

  • Visual Basic アプリケーションを動作させるには、追加のファイルをインストールする必要があるかもしれません(例えば、ユーザ インターフェース コントロールのための OCX ファイル)。
  • ランタイム ファイルをインストールするには、管理者権限が必要です。これらの権限が有効かチェックするために、マルチユーザ ヘッダ ファイルを使用してください。
  • 必要な場合にユーザがコンピュータを再起動できるようにするためには、モダン UI の完了ページか他のチェック( IfRebootFlag を参照)を追加してください。

前へ | 目次 | 次へ


SourceForge Logo

A. Modern User Interface - NSIS Users Manual

これはNSIS Users Manualの非公式な日本語ドキュメントです。本コンテンツの利用によって生じたいかなる損害も、著者は一切の責任をとることができませんので、自己責任での利用をお願いします。読みやすさを重視するため必ずしも原文に忠実でない部分があります。また、誤りが含まれている可能性もあります。必ず原文をご確認ください。 訳者:Kawai

前へ | 目次 | 次へ

付録 A: モダンユーザインターフェース

[原文]

NSIS 2 では独自のユーザインターフェースを持ったインストーラを作成することが可能となっています。モダン UI は、最近の Windows バージョンのウィザードのようなスタイルを持ったインタフェースです。この新しいインターフェースには、新しいページ(ようこそ、完了、スタートメニュー)、およびコンポーネントページにおける説明エリアといった特徴もあります。インターフェースとグラフィックは、提供された設定を利用してカスタマイズすることができます。モダン UI マクロと言語ファイルを利用すれば、簡単にモダンインターフェースのスクリプトを記述することができます。

詳細な情報とドキュメントについては、Modern UI 2 Readme を参照してください。

NSIS 2.34 には、モダン UI の新しいバージョン(version 2)が含まれています。より高速、より拡張性が高くなっています。プラグインによって新しいタイプのページを追加することができ、簡単な nsh ファイルによって既存のページを変更することまでも可能です。また、より高速な nsDialogs が使用されています。

詳細な情報と、古いバージョンのドキュメントについては、 Modern UI Readme を参照してください。

前へ | 目次 | 次へ


SourceForge Logo