努力したWiki

推敲の足りないメモ書き多数

ユーザ用ツール

サイト用ツール


documents:other:other-042

NicoFox 1.0b6pre アドオンファイル クイック生成

2015/12/23
『もっとお手軽な手順をくれ』と言われたので頑張ってみた。

説明

Windows標準機能では nicofox.xpi 作成時に圧縮レベルの指定ができないので、7-zipのコマンドラインを利用する。

手順

WindowsでNicoFox 1.0b6preのアドオンファイル nicofox.xpi を作成する手順。

  1. 7-zipインストール
  2. GitHubから nicofox-master.zip 取得
  3. build.bat 実行
  4. Firefox にD&D

7-zipインストール

https://sevenzip.osdn.jp/

この説明では 64bit版を Cドライブに導入したことを前提にしている。

GitHubから nicofox-master.zip 取得

https://github.com/littlebtc/nicofox の“Download ZIP”ボタンを押して NicoFox 1.0b6pre のアーカイブ nicofox-master.zip をダウンロードする。

build.bat 実行

ダウンロードした nicofox-master.zip と同じフォルダに以下のバッチファイル build.bat をコピーし、このバッチファイルを実行する。
見ての通り、nicofox-master.zip に含まれる build.sh をバッチファイルのコマンドラインに置き換えしたもの。

build.bat
@ECHO OFF
 
SET sevenZipCmd="C:\Program Files\7-zip\7z"
 
RD  /S /Q nicofox-master
DEL /Q nicofox.xpi
 
%sevenZipCmd%  x nicofox-master.zip
CD nicofox-master
 
MD build
MD build\content
MD build\skin
MD build\components
MD build\modules
MD build\defaults
MD build\defaults\preferences
MD build\locale
 
COPY /Y install.rdf      build\
COPY /Y chrome.manifest  build\
COPY /Y LICENSE.md       build\
COPY /Y content\*.js     build\content\
COPY /Y content\*.xul    build\content\
COPY /Y content\*.xml    build\content\
COPY /Y content\*.swf    build\content\
COPY /Y skin\*.css       build\skin\
COPY /Y skin\*.png       build\skin\
COPY /Y components\*.js  build\components\
COPY /Y modules\*.jsm    build\modules\
COPY /Y defaults\preferences\*.js  build\defaults\preferences\
 
FOR /D %%d IN ( locale\* ) DO (
  MD build\%%d
  COPY /Y %%d\*.dtd         build\%%d\
  COPY /Y %%d\*.properties  build\%%d\
)
 
CD build
 
%sevenZipCmd%   a -r -tzip -mx=1 ..\nicofox.xpi *
CD ..
RD /S /Q build
 
PAUSE

Firefox にD&D

フォルダ nicofox-master の中に作成された nicofox.xpi をFirefoxにD&Dする。

なお、Firefox43 はデフォルトで署名なしアドオンを無効にしているので、あらかじめ about:config から設定名 xpinstall.signatures.required の値を false にしておく必要がある。
また、Firefox44 は xpinstall.signatures.required 自体をサポートしなくなる(署名なしアドオンインストール不可)と思われるので、Firefox43を使い続けるか、別のアドオンを探す方がいい。

documents/other/other-042.txt · 最終更新: 2023/04/14 02:32 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki