Update Mac Compile Guide formatting
This commit is contained in:
parent
436009b3c7
commit
37c230c499
|
@ -2,7 +2,9 @@
|
||||||
# Building Bambu Studio on MacOS
|
# Building Bambu Studio on MacOS
|
||||||
|
|
||||||
## Enviroment setup
|
## Enviroment setup
|
||||||
|
|
||||||
Install Following tools:
|
Install Following tools:
|
||||||
|
|
||||||
- Xcode from app store
|
- Xcode from app store
|
||||||
- Cmake
|
- Cmake
|
||||||
- git
|
- git
|
||||||
|
@ -10,35 +12,56 @@ Install Following tools:
|
||||||
|
|
||||||
Cmake, git, gettext can be installed from brew(brew install cmake git gettext)
|
Cmake, git, gettext can be installed from brew(brew install cmake git gettext)
|
||||||
|
|
||||||
## building the deps
|
## Building the dependencies
|
||||||
You need to build the dependence of BambuStudio first. (Only needs for the first time)
|
|
||||||
|
You need to build the dependencies of BambuStudio first. (Only needs for the first time)
|
||||||
|
|
||||||
|
Suppose you download the codes into `/Users/_username_/work/projects/BambuStudio`.
|
||||||
|
|
||||||
|
Create a directory to store the built dependencies: `/Users/_username_/work/projects/BambuStudio_dep`.
|
||||||
|
**(Please make sure to replace the username with the one on your computer)**
|
||||||
|
|
||||||
|
Then:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cd BambuStudio/deps
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
```
|
||||||
|
|
||||||
Next, for arm64 architecture:
|
Next, for arm64 architecture:
|
||||||
```shell
|
```shell
|
||||||
cmake ../ -DDESTDIR="/Users/username/work/projects/BambuStudio_dep" -DOPENSSL_ARCH="darwin64-arm64-cc"
|
cmake ../ -DDESTDIR="/Users/username/work/projects/BambuStudio_dep" -DOPENSSL_ARCH="darwin64-arm64-cc"
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
Suppose you download the codes into /Users/_username_/work/projects/BambuStudio
|
Or, for x86 architeccture:
|
||||||
create a directory to store the dependence built: /Users/_username_/work/projects/BambuStudio_dep
|
```shell
|
||||||
**(Please make sure to replace the username with the one on your computer)**
|
cmake ../ -DDESTDIR="/Users/username/work/projects/BambuStudio_dep" -DOPENSSL_ARCH="darwin64-x86_64-cc"
|
||||||
|
make -jN
|
||||||
|
```
|
||||||
|
(N can be a number between 1 and the max cpu number)
|
||||||
|
|
||||||
`cd BambuStudio/deps`
|
## Building Bambu Studio
|
||||||
`mkdir build;cd build`
|
|
||||||
|
|
||||||
for x86 architeccture
|
Create a directory to store the installed files at `/Users/username/work/projects/BambuStudio/install_dir`:
|
||||||
`cmake ../ -DDESTDIR="/Users/username/work/projects/BambuStudio_dep" -DOPENSSL_ARCH="darwin64-x86_64-cc"`
|
|
||||||
`make -jN` (N can be a number between 1 and the max cpu number)
|
|
||||||
|
|
||||||
## building the Bambu Studio
|
```shell
|
||||||
create a directory to store the installed files at /Users/username/work/projects/BambuStudio/install_dir
|
cd BambuStudio
|
||||||
`cd BambuStudio`
|
mkdir install_dir
|
||||||
`mkdir install_dir`
|
mkdir build
|
||||||
`mkdir build;cd build`
|
cd build
|
||||||
|
```
|
||||||
|
|
||||||
building it use cmake
|
To build using CMake:
|
||||||
`cmake .. -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="/Users/username/work/projects/BambuStudio_dep/usr/local" -DCMAKE_INSTALL_PREFIX="../install_dir" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="/Users/username/work/projects/BambuStudio_dep/usr/local" -DCMAKE_MACOSX_BUNDLE=on`
|
|
||||||
`cmake --build . --target install --config Release -jN`
|
|
||||||
|
|
||||||
building it use xcode
|
```shell
|
||||||
`cmake .. -GXcode -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="/Users/username/work/projects/BambuStudio_dep/usr/local" -DCMAKE_INSTALL_PREFIX="../install_dir" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="/Users/username/work/projects/BambuStudio_dep/usr/local" -DCMAKE_MACOSX_BUNDLE=on`
|
cmake .. -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="/Users/username/work/projects/BambuStudio_dep/usr/local" -DCMAKE_INSTALL_PREFIX="../install_dir" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="/Users/username/work/projects/BambuStudio_dep/usr/local" -DCMAKE_MACOSX_BUNDLE=on
|
||||||
then building it using Xcode
|
cmake --build . --target install --config Release -jN
|
||||||
|
```
|
||||||
|
|
||||||
|
To build for use with XCode:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cmake .. -GXcode -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="/Users/username/work/projects/BambuStudio_dep/usr/local" -DCMAKE_INSTALL_PREFIX="../install_dir" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="/Users/username/work/projects/BambuStudio_dep/usr/local" -DCMAKE_MACOSX_BUNDLE=on
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue