最小限のリブランディング
こちらの例では、最小限の作業で、インストーラーのリブランディングを行います。インストーラーのユーザーインターフェースにおける「Yellowfin」の参照は置き換えられ、一部のイメージもリブランディングバージョンに置き換えられます。
まずは、インストーラーに表示されるアプリケーションの名前を設定します。
installer.appname=Real Reports
「Yellowfin」を参照するテキストプロパティを上書きします。
installer.footer.msg= -= www.realreports.com =- installer.licencefilepanel.msg=A valid licence file is required to install and use Real Reports. If you do not have a licence file, please see your software provider. installer.finishpanel.supportlink.url=http://www.example.com/support
Windowsサービスの名前と、説明を上書きします。
installer.winservice.name=Real Reports installer.winservice.description=This service starts the Real Reports Server
Yellowfinブランドのサンプルコンテンツをインストールしないように、インストーラーを設定します。
action.yellowfincontent=false
グラフィックインストーラーの起動時に表示する新しいhtmlファイルを作成し、その新しいhtmlを使用するためのプロパティを追加します。
resource.infopanel.html=resources/installsplash.html
グラフィックインストーラーでパックアイコンとして使用する新しいイメージを作成します(パックごとに1つずつ)。これらの新しいイメージを使用するために、プロパティを追加します。
resource.pack.core.img=resources/corepack.png resource.pack.tutorial.img=resources/tutorialpack.png resource.pack.geopack.us.img=resources/usgeopack.png resource.pack.geopack.world.img=resources/worldgeopack.png
上記すべてのプロパティを、「custom.properties」
という名前のファイルに記述します。
# text properties installer.appname=Real Reports installer.footer.msg= -= www.realreports.com =- installer.licencefilepanel.msg=A valid licence file is required to install and use Real Reports. If you do not have a licence file, please see your software provider. installer.finishpanel.supportlink.url=http://www.example.com/support installer.winservice.name=Real Reports installer.winservice.description=This service starts the Real Reports Server # installer actions action.yellowfincontent=false # resources resource.infopanel.html=resources/installsplash.html resource.pack.core.img=resources/corepack.png resource.pack.tutorial.img=resources/tutorialpack.png resource.pack.geopack.us.img=resources/usgeopack.png resource.pack.geopack.world.img=resources/worldgeopack.png
カスタマイズされたインストーラーを作成するためには、
既存のインストーラーjarファイルのコンテンツを抽出します。
jar xvf /path/to/yellowfin-yyyymmdd-full.jar
- 「resources」という名前の新しいディレクトリを作成し、そこに新しいhtmlファイル、およびイメージファイルをコピーします。
上述のカスタムプロパティファイルを、インストールフォルダー構造のルートディレクトリにコピーします。
ディレクトリには、以下のように、インストーラーアーカイブからの既存ファイルと、新しいファイルが含まれます。META-INF/MANIFEST.MF custom.properties com/ default.properties resources/corepack.png resources/tutorialpack.png resources/usgeopack.png resources/worldgeopack.png resources/installsplash.html ...
変更されたjarファイルを作成します。
jar cvmf META-INF/MANIFEST.MF /path/to/yellowfin-modified.jar
リブランドされたアプリケーション
最小限のリブランティングの例では、インストーラーの要素はリブランドされましたが、Yellowfinアプリケーション自体は変更されていません。こちらの例では、さらに変更を加えることで、一部のアプリケーションUI要素をリブランドします。
インストーラーではなく、Yellowfinアプリケーション内で表示されるアプリケーション名を設定します。
action.config.appname=Real Reports
インストールディレクトリに作成される一部のファイルの名前を変更します。
installer.warfilename=realreports.war installer.applogfilename=realreports.log
サポートの電子メールアドレスを変更します。
action.config.supportemail=support@example.com
ブロードキャスト電子メールの送信元になる電子メールアドレス、および名前を変更します。
action.config.broadcastemail=noreply@example.com action.config.broadcastname=Real Reports
デフォルトの管理者ログオンアカウントの資格情報を変更します。
action.adminuser.username=admin@example.com action.adminuser.password=secret action.adminuser.email=admin@example.com
Yellowfinアプリケーションで使用される、Yellowfinブランドのイメージを置き換えます。まず、resources
の配下に、「customimages」
という名前のサブディレクトリを作成します。次に、置き換えるイメージごとに、新しいイメージを作成し、元のイメージと同じファイル名を使用して、customimages
ディレクトリに保存します。こちらの例では、ファイル「header_logo.gif」、「logo.png」、および「logoFooter.png」の新しいバージョンを作成し、customimages
ディレクトリに保存します。
action.customimagespath=resources/customimages
カスタムログインページを作成し、resourcesディレクトリに追加します。
action.customindexpage=resources/login.html
カスタムログインページでは、Yellowfinに含まれていないイメージファイルをいくつか使用します。これらのファイルは、上述で作成したcustomimages
ディレクトリに追加することで、自動的にアプリケーションに追加されます。
これらのプロパティと一番目の例のプロパティを組み合わせた、完全なカスタムプロパティファイルは以下の通りです。
# text properties installer.appname=Real Reports installer.footer.msg= -= www.realreports.com =- installer.licencefilepanel.msg=A valid licence file is required to install and use Real Reports. If you do not have a licence file, please see your software provider. installer.finishpanel.supportlink.url=http://www.example.com/support installer.winservice.name=Real Reports installer.winservice.description=This service starts the Real Reports Server # installer actions action.yellowfincontent=false installer.warfilename=realreports.war installer.applogfilename=realreports.log # post-installation application behaviour action.config.appname=Real Reports action.config.supportemail=support@example.com action.config.broadcastemail=noreply@example.com action.config.broadcastname=Real Reports action.adminuser.username=admin@example.com action.adminuser.password=secret action.adminuser.email=admin@example.com action.customindexpage=resources/login.html action.customimagespath=resources/customimages # resources resource.infopanel.html=resources/installsplash.html resource.pack.core.img=resources/corepack.png resource.pack.tutorial.img=resources/tutorialpack.png resource.pack.geopack.us.img=resources/usgeopack.png resource.pack.geopack.world.img=resources/worldgeopack.png
jarファイルは、以下のようになります。
META-INF/MANIFEST.MF custom.properties com/ default.properties resources/corepack.png resources/tutorialpack.png resources/usgeopack.png resources/worldgeopack.png resources/installsplash.html resources/login.html resources/customimages/header_logo.gif resources/customimages/logo.png resources/customimages/logoFooter.png resources/customimages/loginimage1.png resources/customimages/loginimage2.png resources/customimages/loginimage3.png
最小限のユーザーインタラクション
こちらの例では、大部分のユーザーインタラクションがバイパスされるように、インストーラーを作成する方法について説明します。ユーザーは、ターゲットインストールディレクトリを選択するだけです。その他すべてのオプションはあらかじめ選択されており、ユーザーからは非表示になっています。
カスタムプロパティファイルのコンテンツは、以下の通りです。
# Set default values for installation options option.pack.tutorial=true option.pack.geopack.us=false option.pack.geopack.world=false option.serverport=8181 option.winservice=false option.db.dbtype=POSTGRESQL option.db.hostname=localhost option.db.dbname=yellowfin option.db.createdb=true option.db.username=yfuser option.db.userpassword=yfpassword option.db.createuser=true option.db.dbausername=postgres option.db.dbapassword=secret # Tell the installer to hide various options from the user action.hidedboptions=true action.hidepacks=true action.hideserverport=true action.hidewinservice=true # Embed a licence file in the installer resource.licencefile=resources/licence.lic
こちらの例で、インストーラーは、「yellowfin」という名前のlocalhost(のデフォルトポート)上で稼働しているPostgreSQLサーバーに、新しいYellowfin構成データベースを作成します。インストーラーはユーザー名「postgres」と、パスワード「secret」を使用して接続し、データベースを作成して、ユーザー「yfuser」を、パスワード「yfpassword」で作成します。
インストーラーアーカイブには、インストールで有効なライセンスファイルが「resources/licence.lic」に含まれていなくてはいけません。