SourceTree Silent Installation - Windows

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

PAGE NO LONGER VALID WITH THE RELEASE OF SOURCETREE FOR WINDOWS 1.8

 

目的

There's multiple occasions where you would like to push a pre-configured copy of Sourcetree to a computer lab or within an organization. Here we will take an example scenario and configuration to accomplish this. 

ソリューション

Preparation:

  • .NET 4.5+ is installed.
  • Version Control System(s) is installed before Sourcetree.

Please feel free to open a support case with us if you have further questions or face troubles with this guide.

Configuring SourceTree: 

For the purpose of this article we will assume the following:

  • .NET 4.5+ is installed
  • You only want git
  • git is installed before sourcetree
  • You are happy to pre-agree all your user's to the
    • EULA
    • Analytics

Then the following should give you a 'silent' install ZIP:

1. Take an existing installation, e.g. c:\program files (x86)\Atlassian\SourceTree
2. Edit the SourceTree.exe.config as follows
*NB.* SourceTree.exe.config contains the default settings, when a user edits them their edits are saved in the user.config file.

Pre-Agree to the EULA 

<setting name="AgreedToEULA" serializeAs="String">
<value>True</value>
</setting>

 

Skip the Welcome wizard. 

<setting name="FirstLaunch" serializeAs="String">
<value>False</value>
</setting>

 

Pre-Agree to Analytics 

<setting name="AnalyticsHasAgreed" serializeAs="String">
<value>True</value>
</setting>
<setting name="AnalyticsDisplayOptIn" serializeAs="String">
<value>False</value>
</setting>

 

Configure to use System installed Git 

<setting name="GitWhichOne" serializeAs="String">
<value>1</value>
</setting>
...
<setting name="GitSystemPath" serializeAs="String">
<value>C:\Program Files (x86)\Git</value>
</setting>

*NB.* You don't need to define the Git System Path if it is in the standard location as SourceTree will find it there.

Disable Hg support 

<setting name="HgWhichOne" serializeAs="String">
<value>0</value>
</setting>
...
<setting name="EnableHgSupport" serializeAs="String">
<value>False</value>
</setting>
...
<setting name="FirstLaunchSinceHgAdded" serializeAs="String">
<value>False</value>
</setting>

 

Configure PuTTY 

<setting name="SSHClientType" serializeAs="String">
<value>PuTTY</value>
</setting>

3. Zip the SourceTree folder

4. Unzip on the target machine

The %localappdata% folders, including the user.config will be created when SourceTree first runs.

Note: There are many more options and configurations you can use and edit in the SourceTree.exe.config.

Pushing SourceTree license:

There's a file called sourcetree.license in %USERPROFILE%\AppData\Local\Atlassian\SourceTree which gets created when you register SourceTree. You can either automatically distribute that to the right location, or you can put a copy of this file on a fileserver somewhere and let the users to to use the Import License option in the Registration page if they get prompted.

 

 

最終更新日 2017 年 11 月 2 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.