1

私のメインアプリケーションは、Main.jarを持つJavaで書かれています。デプロイするための最終パッケージを準備しています。

ただし、サードパーティライブラリを最初に利用可能にする必要がある/ Windowsオペレーティングシステムにプリインストールする必要があるなど、他の依存関係があります。インストールすると、アプリケーションを実行できます。そうしないと、エラーが表示され、機能しません。だから私は苦労しています、エンドユーザーはしなければなりません:

1) Thirdparty.library.msi (install manually) which is a GUI installer itself already
2) Then setup my Main.jar
3) Once it started it looks first for the third party libraries, if does not exist, software fails.

そのような場合、ステップ1、次にステップ2としてジョブを実行できる1つのインストーラーを作成する適切な方法はありますが、どちらも1つのインストールのように見えますか?

フォローアップ:プレゼンテーションの目的で、エンドユーザーにサードパーティが表示されないようにする必要もあります。だから私はmsiと呼ばれるツールが存在するのを見ました

1)インストーラーはBATCHの準備をします

Windows ® Installer. V 3.01.4000.1823 

msiexec /Option <Required Parameter> [Optional Parameter]

Install Options
    </package | /i> <Product.msi>
        Installs or configures a product
    /a <Product.msi>
        Administrative install - Installs a product on the network
    /j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]
        Advertises a product - m to all users, u to current user
    </uninstall | /x> <Product.msi | ProductCode>
        Uninstalls the product
Display Options
    /quiet
        Quiet mode, no user interaction
    /passive
        Unattended mode - progress bar only
    /q[n|b|r|f]
        Sets user interface level
        n - No UI
        b - Basic UI
        r - Reduced UI
        f - Full UI (default)
    /help
        Help information
Restart Options
    /norestart
        Do not restart after the installation is complete
    /promptrestart
        Prompts the user for restart if necessary
    /forcerestart
        Always restart the computer after installation
Logging Options
    /l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>
        i - Status messages
        w - Nonfatal warnings
        e - All error messages
        a - Start up of actions
        r - Action-specific records
        u - User requests
        c - Initial UI parameters
        m - Out-of-memory or fatal exit information
        o - Out-of-disk-space messages
        p - Terminal properties
        v - Verbose output
        x - Extra debugging information
        + - Append to existing log file
        ! - Flush each line to the log
        * - Log all information, except for v and x options
    /log <LogFile>
        Equivalent of /l* <LogFile>
Update Options
    /update <Update1.msp>[;Update2.msp]
        Applies update(s)
    /uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>
        Remove update(s) for a product
Repair Options
    /f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>
        Repairs a product
        p - only if file is missing
        o - if file is missing or an older version is installed (default)
        e - if file is missing or an equal or older version is installed
        d - if file is missing or a different version is installed
        c - if file is missing or checksum does not match the calculated value
        a - forces all files to be reinstalled
        u - all required user-specific registry entries (default)
        m - all required computer-specific registry entries (default)
        s - all existing shortcuts (default)
        v - runs from source and recaches local package
Setting Public Properties
    [PROPERTY=PropertyValue]

また ここに画像の説明を入力してください

2)実用/サンプル

# Install Silently [works]:
C:\windows\system32\msiexec.exe /I "C:\Documents and Settings\sun\My Documents\Downloads\10.70.msi" /QN
C:\windows\system32\msiexec.exe /I "C:\Documents and Settings\sun\My Documents\Downloads\10.71.msi" /QN

# For future reference [not tested]
start /wait msiexec /i O12Conv.msi /qb
start /wait msiexec /p O12Convsp1-en-us.msp /qb
start /wait msiexec /i mpsetupedp.msi

# other samples [not tested]
msiexec /package Application.msi /quiet
msiexec /uninstall Application.msi /quiet
msiexec /update msipatch.msp /quiet
msiexec /uninstall msipatch.msp /package Application.msi / quiet
4

3 に答える 3

1

すべての UI ベースのインストール ツールには、外部プログラムを実行する機能と、コマンド ライン引数によって制御されるバッチ モードで実行する機能があります。

したがって、thirdparty.msi を使用する必要がある場合は、バッチ モードで実行する機能を見つけることをお勧めします。次に、このサード パーティの MSI を呼び出す独自のインストール プロシージャを作成します。

UI ベースのインストール プログラム (InstallShield、InstallAnywhere など) を作成するためのさまざまなツールがあります。

于 2011-12-25T15:28:19.883 に答える
0

DOSバッチスクリプト(.bat)を作成し、そこからその特定の順序でmsiインストーラーとJARを呼び出すのはどうですか?

于 2011-12-25T15:22:59.027 に答える
0

依存アプリがインストールされているかどうかを確認する方法があります [環境変数が設定されているように]。そうでない場合は、パッケージ化スクリプトでインストールできます。これは Install Shield で行いました。他のツールについてはわかりません。

于 2011-12-25T15:27:42.707 に答える