mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 01:25:56 +08:00
Create actions for automatic build for windows, linux & mac
but i don't know how to create a good package for mac. A zip with the exe is enough? restrict cmake MAP_IMPORTED_CONFIG_RELWITHDEBINFO to windows only. missing #include <numeric> & <boost/log/trivial.hpp> & "libslic3r/PrintConfig.hpp" in some files for macos to compile
This commit is contained in:
parent
43c13a8168
commit
2c5298e618
51
.github/workflows/ccpp_mac.yml
vendored
Normal file
51
.github/workflows/ccpp_mac.yml
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
name: C/C++ CI macos
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: mkdir in deps
|
||||
run: mkdir deps/build
|
||||
- name: cmake deps
|
||||
working-directory: ./deps/build
|
||||
run: cmake ..
|
||||
- name: make deps
|
||||
working-directory: ./deps/build
|
||||
run: make
|
||||
- name: mkdir build
|
||||
run: mkdir build
|
||||
- name: cmake
|
||||
working-directory: ./build
|
||||
run: cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local" -DSLIC3R_STATIC=1
|
||||
- name: make slic3r
|
||||
working-directory: ./build
|
||||
run: make slic3r
|
||||
- name: create directory and copy into it
|
||||
working-directory: ./build
|
||||
run: |
|
||||
mkdir Slic3r++
|
||||
mkdir Slic3r++/Slic3r++.app
|
||||
mkdir Slic3r++/Slic3r++.app/Contents
|
||||
mkdir Slic3r++/Slic3r++.app/Contents/_CodeSignature
|
||||
mkdir Slic3r++/Slic3r++.app/Contents/Frameworks
|
||||
mkdir Slic3r++/Slic3r++.app/Contents/MacOS
|
||||
- name: copy resources
|
||||
working-directory: ./build
|
||||
run: cp -Rf ../resources Slic3r++/Slic3r++.app/Contents/resources
|
||||
- name: copy bin
|
||||
working-directory: ./build
|
||||
run: cp -f src/slic3r++ Slic3r++/Slic3r++.app/Contents/MacOS/slic3r++
|
||||
# - name: signing resources (creating CodeResources inside _CodeSignature)
|
||||
# working-directory: .
|
||||
# run: codesign -s <identity> resources
|
||||
# maybe i should just try to do that on a separate pc and copy the file here, more secure as a signing process.
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v1.0.0
|
||||
with:
|
||||
name: nightly_macos
|
||||
path: build/Slic3r++/
|
48
.github/workflows/ccpp_ubuntu.yml
vendored
Normal file
48
.github/workflows/ccpp_ubuntu.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
name: C/C++ CI ubuntu
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install gtk2 glew
|
||||
run: sudo apt-get install libgtk2.0-dev libglew-dev
|
||||
- name: mkdir in deps
|
||||
run: mkdir deps/build
|
||||
- name: cmake deps
|
||||
working-directory: ./deps/build
|
||||
run: cmake ..
|
||||
- name: make deps
|
||||
working-directory: ./deps/build
|
||||
run: make
|
||||
- name: mkdir build
|
||||
run: mkdir build
|
||||
- name: cmake
|
||||
working-directory: ./build
|
||||
run: cmake .. -DCMAKE_PREFIX_PATH="/home/runner/work/Slic3r/Slic3r/deps/build/destdir/usr/local" -DSLIC3R_STATIC=1
|
||||
- name: make slic3r
|
||||
working-directory: ./build
|
||||
run: make slic3r
|
||||
- name: create directory and copy into it
|
||||
working-directory: ./build
|
||||
run: |
|
||||
mkdir package
|
||||
mkdir package/bin
|
||||
- name: copy resources
|
||||
working-directory: ./build
|
||||
run: cp -Rf ../resources package/resources
|
||||
- name: copy bin
|
||||
working-directory: ./build
|
||||
run: cp -f src/slic3r++ package/bin/slic3r++
|
||||
- name: create sh from echo
|
||||
working-directory: ./build/package
|
||||
run: echo -e '#!/bin/bash\nDIR=$(readlink -f "$0" | xargs dirname)\nexport LD_LIBRARY_PATH="$DIR/bin"\nexec "$DIR/bin/slic3r++" "$@"' >slic3r++
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v1.0.0
|
||||
with:
|
||||
name: nightly_linux
|
||||
path: build/package/
|
71
.github/workflows/ccpp_win.yml
vendored
Normal file
71
.github/workflows/ccpp_win.yml
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
name: C/C++ CI windows x64
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
- name: mkdir in deps
|
||||
run: mkdir deps/build
|
||||
- name: cmake deps
|
||||
working-directory: ./deps/build
|
||||
run: |
|
||||
cmake .. -G "Visual Studio 16 2019" -A x64
|
||||
msbuild /m ALL_BUILD.vcxproj
|
||||
- name: mkdir
|
||||
run: mkdir build
|
||||
- name: cmake
|
||||
working-directory: ./build
|
||||
run: |
|
||||
cmake .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH="d:\a\Slic3r\Slic3r\deps\build\destdir\usr\local"
|
||||
#msbuild /m /P:Configuration=Release ALL_BUILD.vcxproj
|
||||
msbuild /m /P:Configuration=Release INSTALL.vcxproj
|
||||
- name: create directory and copy into it
|
||||
working-directory: ./build
|
||||
run: ls
|
||||
- name: create directory and copy into it
|
||||
working-directory: ./build
|
||||
shell: powershell
|
||||
#todo: add the opengl folder
|
||||
run: mkdir package
|
||||
- name: copy from release
|
||||
working-directory: ./build
|
||||
shell: powershell
|
||||
run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/supermerill/Slic3r/releases/download/2.1.45.0/Slic3r++_2.1.45.0_win64_191104.zip", "Slic3r++_2.1.45.0_win64_191104.zip")'
|
||||
- name: unzip
|
||||
working-directory: ./build
|
||||
shell: cmd
|
||||
run: '"C:/Program Files/7-Zip/7z.exe" x Slic3r++_2.1.45.0_win64_191104.zip'
|
||||
- name: copy old release content
|
||||
working-directory: ./build
|
||||
shell: cmd
|
||||
run: xcopy /RCYIE Slic3r++_2.1.45.0_win64_191104\* package\
|
||||
- name: copy new resources
|
||||
working-directory: ./build
|
||||
shell: cmd
|
||||
run: xcopy /RCYIE ..\resources package\resources
|
||||
- name: copy dll
|
||||
working-directory: ./build
|
||||
shell: cmd
|
||||
run: xcopy /RCYIE src\release\*.dll package\
|
||||
- name: copy exe
|
||||
working-directory: ./build
|
||||
shell: cmd
|
||||
run: xcopy /RCYIE src\release\*.exe package\
|
||||
- name: copy ms runtime
|
||||
working-directory: ./build
|
||||
shell: cmd
|
||||
run: xcopy /RCYIE c:\windows\system32\VCRUNTIME140* package\
|
||||
# - name: create zip
|
||||
# working-directory: ./build
|
||||
# shell: cmd
|
||||
# run: '"C:/Program Files/7-Zip/7z.exe" a -tzip nightly.zip *'
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v1.0.0
|
||||
with:
|
||||
name: nightly_win64
|
||||
path: build/package/
|
@ -256,7 +256,9 @@ if(NOT WIN32)
|
||||
endif()
|
||||
find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS system filesystem thread log locale regex)
|
||||
# boost compile only in release & debug. We have to force the release version for RELWITHDEBINFO compilation
|
||||
set_target_properties(${Boost_LIBRARIES} PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)
|
||||
if (MSVC)
|
||||
set_target_properties(${Boost_LIBRARIES} PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)
|
||||
endif()
|
||||
|
||||
add_library(boost_libs INTERFACE)
|
||||
add_library(boost_headeronly INTERFACE)
|
||||
|
@ -10,10 +10,12 @@
|
||||
#include <cmath>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <numeric>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include <stack>
|
||||
#include <vector>
|
||||
#include <boost/log/trivial.hpp>
|
||||
|
||||
#ifdef SLIC3R_DEBUG
|
||||
#include "SVG.hpp"
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef slic3r_GUI_wxExtensions_hpp_
|
||||
#define slic3r_GUI_wxExtensions_hpp_
|
||||
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
|
||||
#include <wx/checklst.h>
|
||||
#include <wx/combo.h>
|
||||
#include <wx/dataview.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user