在Windows環境中安裝

From FreeCAD Documentation
Revision as of 10:41, 15 December 2021 by FuzzyBot (talk | contribs) (Updating to match new version of source page)

在Windows上安裝FreeCAD的最簡單方法是下載下面的一個安裝程序。

Template:DownloadWindowsStable

下載.msi(Microsoft Installer)文件後,雙擊它啟動安裝過程。

以下是有關技術選項的更多信息。如果它看起來令人生畏,不要擔心!大多數Windows用戶不需要上述.msi以外的任何東西來完成安裝並入門FreeCAD!

簡單的Microsoft Installer安裝

在Windows上安裝FreeCAD的最簡單方法是使用上面的可下載安裝程序包。本頁介紹了Microsoft Installer的用法和功能,以獲取更多安裝選項。

The easiest way to install FreeCAD on Windows is by using the downloadable installer bundle above. This page describes the usage and features of the NSIS Installer for more installation options.

如果要下載開發版本(程序運行可能不穩定),請參閱下載頁面。

Chocolatey

However, it is highly recommended that you use a package manager such as Chocolatey to keep your software updated. You can installed Chocolatey following these instructions and then open a PowerShell terminal as admin and run:

choco install freecad

every once in a while you can update your software with

choco upgrade freecad

to get the latest version available on Chocolatey repository. If there are any issues with the chocolatey package, you may contact maintainers on this page.

命令行安裝

使用msiexec.exe命令行實用程序,可以使用其他功能,例如非交互式安裝和管理安裝。見下面的例子。

With the msiexec.exe command line utility, additional features such as non-interactive installation and administrative installation are available. See examples below.

非交互式安裝

使用命令行進行非交互式安裝

With the command line

msiexec /i FreeCAD<version>.msi

安裝可以通過編程方式啟動。例如,可以在命令行的末尾傳遞附加參數。

msiexec /i FreeCAD-2.5.msi TARGETDIR=R:\FreeCAD25

有限的用戶界面

可以使用/q選項控制安裝程序允許呈現的用戶控制界面:

The amount of user control permitted by the installer can be controlled with /q options:

  • /qn - 沒有界面
  • /qb - 基本界面 - 僅顯示帶取消按鈕的進度對話框
  • /qb - 和/qb一樣,但隱藏取消按鈕
  • /qr - 簡化界面 - 顯示所有不需要用戶交互的對話框(跳過所有模態對話框)
  • /qn+ -和/qn一樣,但最後顯示「已完成」對話框
  • /qb+ -和/qb一樣,但最後顯示「已完成」對話框

Target directory

The property TARGETDIR determines the root directory of the FreeCAD installation. For example, a different installation drive can be specified with

TARGETDIR=R:\FreeCAD25

The default TARGETDIR is [WindowsVolume\Programm Files\]FreeCAD<version>.

Installation for All Users

Adding

ALLUSERS=1

causes an installation usable by all users. By default, a non-interactive (/i) installation makes the package usable by the current user (the one performing the installation) only; an interactive installation presents a dialog which defaults to "all users" if the user performing the installation is sufficiently privileged.

功能選擇

FreeCAD 安裝器提供了安裝,重裝,卸載選項:

A number of properties allow selection of features to be installed, reinstalled, or removed. The set of features for the FreeCAD installer is

  • DefaultFeature - 安裝適當的軟件,再加上核心庫。
  • Documentation - 安裝文檔。
  • Source code - 安裝源碼
  • ... ToDo

此外,ALL 指定的所有功能。所有的特性依賴於默認功能 DefaultFeature,所以安裝任何功能都會安裝 DefaultFeature,下面的參數為指定重裝或者卸載

  • ADDLOCAL - 指定需要安裝的功能
  • REMOVE - 指定需要卸載的功能
  • ADDDEFAULT - list of features added in their default configuration (which is local for all FreeCAD features)
  • REINSTALL - 指定需要重裝/修復的功能
  • ADVERTISE - 指定需要廣告方式安裝的功能

There are a few additional properties available; see the MSDN documentation for details.

With these options, adding

ADDLOCAL=Extensions

installs the interpreter itself and registers the extensions, but does not install anything else.

Uninstallation

With

msiexec /x FreeCAD<version>.msi

FreeCAD can be uninstalled. It is not necessary to have the MSI file available for uninstallation; alternatively, the package or product code can also be specified. You can find the product code by looking at the properties of the Uninstall shortcut that FreeCAD installs in the start menu.

Administrative installation

With

msiexec /a FreeCAD<version>.msi

an "administrative" (network) installation can be initiated. The files get unpacked into the target directory (which should be a network directory), but no other modification is made to the local system. In addition, another (smaller) msi file is generated in the target directory, which clients can then use to perform a local installation (future versions may also offer to keep some features on the network drive altogether).

Currently, there is no user interface for administrative installations, so the target directory must be passed on the command line.

There is no specific uninstall procedure for an administrative install - simply delete the target directory if no client uses it anymore.

With

msiexec /jm FreeCAD<version>.msi

it would be possible, in principle, to "advertise" FreeCAD to a machine (with /ju to a user). This would cause the icons to appear in the start menu and the extensions to become registered, without the software actually being installed. The first usage of a feature would cause that feature to be installed.

The FreeCAD installer currently only supports advertisement of start menu entries, but no advertisement of shortcuts.

Automatic installation on a group of machines

With Windows Group Policy, it is possible to automatically install FreeCAD on a group of machines. To do so, perform the following steps:

  1. Log on to the domain controller
  2. Copy the MSI file into a folder that is shared with access granted to all target machines.
  3. Open the MMC snapin "Active Directory users and computers"
  4. Navigate to the group of computers that need FreeCAD
  5. Open Properties
  6. Open Group Policies
  7. Add a new policy, and edit it
  8. In Computer Configuration/Software Installation, choose New/Package
  9. Select the MSI file through the network path
  10. Optionally, select that you want FreeCAD to be de-installed if the computer leaves the scope of the policy.

Group policy propagation typically takes some time - to reliably deploy the package, all machines should be rebooted.

Installation on Linux using Crossover Office

You can install the windows version of FreeCAD on a Linux system using CXOffice 5.0.1. Run msiexec from the CXOffice command line. Assuming the install package is in the "software" directory on drive "Y:":

msiexec /i Y:\\software\\FreeCAD<version>.msi

FreeCAD is running, but it has been reported that the OpenGL display does not work, like with other programs running under Wine i.e. Google SketchUp.


Feature list/zh
Install on Unix/zh