GithubHelp home page GithubHelp logo

isabella232 / fx-meta-installer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clear-code/fx-meta-installer

0.0 0.0 0.0 4.12 MB

Fx Meta Installer

Home Page: http://www.clear-code.com/

License: Other

Shell 12.99% C 0.18% Makefile 0.33% NSIS 80.23% Batchfile 6.28%

fx-meta-installer's Introduction

Fx Meta Installer

Abstract

This installs Firefox or Thunderbird automatically and configure installed instance as you like. This helps that you distribute customized Firefox or Thunderbird to PCs in a specific organization.

To use this, you need to do following steps:

  1. Setup your environment to build NSIS2 binary.
  2. Prepare configuration files and resouces (addons, CSS files, etc.) to include the final installer package.
  3. Build the binary of Fx Meta Instlaler (fainstall) and the final installer package.

Required Plugins

Fx Meta Installer is written as a NSIS script, and depends on these plugins.

How to build

Setup to build NSIS binary

Fx Meta Installer is written as a NSIS script. You need to setup build environments at first.

Windows

  1. Setup MSYS2 environment and install additional software.

    For example:

    $ pacman -Syu
    $ pacman -S git gcc make zip
    $ wget https://ja.osdn.net/projects/nkf/downloads/70406/nkf-2.1.5.tar.gz
    $ tar xf nkf-2.1.5.tar.gz
    $ cd nkf-2.1.5
    $ make install
    
  2. Download the installer v2.x and instlal it. See NSIS wiki. (If you want to debug Fx Meta Installer with detailed logs, you should use the "advanced logging" build of the NSIS. See Special Builds.)

  3. Install plugins. Download zip files, decompress them, move ".dll" files to "c:\Program Files\NSIS\Plugins", and move ".nsh" files to "c:\Program Files\NSIS\Include". NOTE that NSIS 2.x is 32 bit program, so you need to 32 bit plugins.

    For example:

    $ cp AccessControl/Plugins/i386-unicode/AccessControl.dll /c/Program\ Files\ \(x86\)/NSIS/Plugins/
    $ cp CustomLicense/Plugins/Unicode/CustomLicense.dll /c/Program\ Files\ \(x86\)/NSIS/Plugins/
    $ cp FindProc/FindProcDLL.dll /c/Program\ Files\ \(x86\)/NSIS/Plugins/
    $ cp Inetc/Plugins/x86-unicode/INetC.dll /c/Program\ Files\ \(x86\)/NSIS/Plugins/
    $ cp LogEx/Plugins/Unicode/LogEx.dll /c/Program\ Files\ \(x86\)/NSIS/Plugins/
    $ cp Md5dll/UNICODE/md5dll.dll /c/Program\ Files\ \(x86\)/NSIS/Plugins/
    $ cp NSISArray/Unicode/Plugins/NSISArray.dll /c/Program\ Files\\)/NSIS/Include/
    $ cp NSISArray/Include/NSISArray.nsh /c/Program\ Files\ \(x86\)/NSIS/Plugins/
    $ cp UAC/Plugins/x86-unicode/UAC.dll /c/Program\ Files\ \(x86\)/NSIS/Plugins/
    $ cp UserMgr/UserMgr.dll /c/Program\ Files\ \(x86\)/NSIS/Plugins/
    $ cp Xml/Include/XML.nsh /c/Program\ Files\ \(x86\)/NSIS/Include/
    $ cp Xml/Plugin/xml.dll /c/Program\ Files\ \(x86\)/NSIS/Plugins/
    $ cp ZipDLL/ZipDLL.dll /c/Program\ Files\ \(x86\)/NSIS/Plugins/
    

Linux (Debian, Ubuntu)

  1. Install required packages "nsis", "pwgen" and "uuid-runtime". Please note that "nsis" version 3.0 and later (default on Ubuntu 20.04LTS or others) is not supported yet and you need to install version 2.x (default on Ubuntu 18.04LTS or others).

    $ sudo apt-get install nsis pwgen uuid-runtime
    
  2. Install plugins. Download zip files, decompress them, move ".dll" files to "/usr/share/nsis/Plugins/", and move ".nsh" files to "/usr/share/nsis/Include". For example:

    $ ls *.zip | sed -e 's/\.zip$//' | xargs -i unzip {}.zip -d {}
    $ find . -name "*.dll" | grep -v -i "unicode" | sudo xargs mv -t /usr/share/nsis/Plugins/
    $ find . -name "*.nsh" | sudo xargs mv -t /usr/share/nsis/Include/
    

OS X (Homebrew)

  1. Install required a package "nsis".

    $ brew install makensis
    
  2. Install plugins. Download zip files, decompress them, move ".dll" files to "/usr/local/share/nsis/Plugins/", and move ".nsh" files to "/usr/local/share/nsis/Include". For example:

    $ unzip *.zip
    $ find . -name "*.dll" | grep -v -i "unicode" | xargs -J % mv % /usr/local/share/nsis/Plugins/
    $ find . -name "*.nsh" | xargs -J % mv % /usr/local/share/nsis/Include/
    
  3. install GNU origin commands.

    $ brew install gnu-tar coreutils
    

Preparing configuration files and resources

  1. Copy "config.bat.sample" to "config.bat", and copy "config.nsh.sample" to "config.nsh".
  2. Modify both files as you like.
  3. Put .xpi, .css, .js, .cfg, .exe, and other resources to the directory "resources".

Build the binary

  1. Run "make.bat" (Windows) or "make.sh" (Linux).
  2. Then, the kit to generate the final installer executable is saved as a new directory "FxMetaInstaller-source".
  3. Copy the directory "FxMetaInstaller-source" to a local disk of Windows environment.
  4. Confirm files in the "resources" directory and the "fainstall.ini". If there is no problem, run the batch file "FxMetaInstaller.bat". Then, the final installer executable "FxMetaInstaller.exe" is generated.

Notes for developers

About MSI (Microsoft Windows Installer)

MSI doesn't cover full features of NSIS, so we cannot convert Fx Meta Installer from .exe to .msi. However, you can run NSIS .exe files from .msi.

How to change icons? / How to update 7-Zip self-extraction module?

This repository includes binaries of 7-Zip self extraction: 7zSD.sfx and 7zS.sfx. You can update them by following steps:

  1. Download new self extraction binaries (7zSD.sfx and 7zS.sfx). Go to the download page in the 7-Zip project site and extract binaries.
  2. Replace old .sfx files with new one.
  3. Replace icon resources in those .sfx files with fainstal.ico, by IconReset or similar tool.

最終生成物のライセンス

Fx Meta Installerによって生成された、インストールを行うモジュール(fainstall.exe)は、無保証にて自由に利用できます。

fainstall.exeを含める形で作成した最終生成物の実行ファイル(以下、メタインストーラ)の使用および利用の許諾条件は、そのメタインストーラによってインストールされるソフトウェアの使用および利用の許諾条件に依存します。例えば、以下のような制限があり得ます。

  • 同梱したアドオンやプラグインの利用許諾条件として、非営利での利用が必須条件となっている場合、メタインストーラを有償で販売することはできません。
  • Firefoxを自動的にインストールするように設定した場合、メタインストーラを不特定多数に向けて無断で一般公開することはできません。一般公開のためにはMozillaの許諾を得る必要があります。詳しくは法人向けFAQの「製品をカスタマイズして配布しても構わないのですか?」の項を参照して下さい。 (なお、公式のFirefoxのバイナリではなく、Firefoxのロゴなどを含まない独自ビルドのバイナリであれば、この限りではありません。)

fx-meta-installer's People

Contributors

cosmo0920 avatar fujimotos avatar kenhys avatar min-shin avatar mooz avatar piroor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.