Skip to content

Commit

Permalink
merge latest fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Apr 30, 2024
2 parents d59bfb9 + 453386f commit c0faf97
Show file tree
Hide file tree
Showing 17 changed files with 547 additions and 178 deletions.
59 changes: 26 additions & 33 deletions .github/workflows/ccpp_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,11 @@ on:
- Nigthly
- nightly_dev
- nightly_master
- debug_win

jobs:
build_dep:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- name: mkdir in deps
run: mkdir deps/build
- name: cmake and make deps
working-directory: ./deps/build
run: |
cmake .. -G "Visual Studio 16 2019" -A x64
msbuild /m ALL_BUILD.vcxproj
- name: Upload artifact
uses: actions/[email protected]
with:
name: deps_win
path: ./deps/build/destdir/

build:
runs-on: windows-2019
needs: build_dep

steps:
- uses: actions/checkout@v1
Expand All @@ -41,19 +21,32 @@ jobs:
- name: change date in version
shell: powershell
run: (Get-Content version.inc) | Foreach-Object {$_ -replace "\+UNKNOWN", ("_" + [datetime]::Today.ToString("yyyy-MM-dd"))} | Set-Content version.inc
- name: mkdir in deps directory
run: mkdir deps/destdir
- name: download deps
uses: actions/download-artifact@v1
with:
name: deps_win
path: deps/destdir
- name: echo dir deps
run: dir deps
- name: echo dir deps destdir
run: dir deps/destdir
- name: mkdir
run: mkdir build
- run: mkdir deps/destdir
- name: copy deps
working-directory: ./deps/destdir
shell: powershell
run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/supermerill/SuperSlicer_deps/releases/download/deps_25/deps_win.zip", "deps_win.zip")'
- name: unzip deps
working-directory: ./deps/destdir
shell: cmd
run: '"C:/Program Files/7-Zip/7z.exe" x deps_win.zip'
- run: dir deps
- run: dir deps/destdir
- run: dir deps/destdir/usr
- run: mkdir msgfmt_bin
- name: copy gettext
working-directory: ./msgfmt_bin
shell: powershell
run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/supermerill/SuperSlicer_deps/releases/download/gettext/gettext-tools-static-0.18.1.1.zip", "gettext.zip")'
- name: unzip
working-directory: ./msgfmt_bin
shell: cmd
run: '"C:/Program Files/7-Zip/7z.exe" x gettext.zip'
- name: add msgfmt to path
shell: powershell
working-directory: msgfmt_bin
run: echo "$pwd;" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: mkdir build
- name: cmake
working-directory: ./build
run: cmake .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH="d:\a\${{ github.event.repository.name }}\${{ github.event.repository.name }}\deps\destdir\usr\local"
Expand Down
69 changes: 63 additions & 6 deletions .github/workflows/ccpp_win_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,55 @@ on:
- debug_win

jobs:

build_pot:
runs-on: windows-2019

steps:
- uses: actions/checkout@v1
- uses: ilammy/msvc-dev-cmd@v1
- name: update submodule profiles
working-directory: ./resources/profiles
run: git submodule update --init
- run: mkdir deps/destdir
- name: copy deps
working-directory: ./deps/destdir
shell: powershell
run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/supermerill/SuperSlicer_deps/releases/download/deps_25/deps_win.zip", "deps_win.zip")'
- name: unzip deps
working-directory: ./deps/destdir
shell: cmd
run: '"C:/Program Files/7-Zip/7z.exe" x deps_win.zip'
- run: dir deps
- run: dir deps/destdir
- run: dir deps/destdir/usr
- run: mkdir msgfmt_bin
- name: copy gettext
working-directory: ./msgfmt_bin
shell: powershell
run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/supermerill/SuperSlicer_deps/releases/download/gettext/gettext-tools-static-0.18.1.1.zip", "gettext.zip")'
- name: unzip
working-directory: ./msgfmt_bin
shell: cmd
run: '"C:/Program Files/7-Zip/7z.exe" x gettext.zip'
- name: add msgfmt to path
shell: powershell
working-directory: msgfmt_bin
run: echo "$pwd;" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: mkdir build
- name: cmake
working-directory: ./build
run: cmake .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH="d:\a\${{ github.event.repository.name }}\${{ github.event.repository.name }}\deps\destdir\usr\local"
- name: make .mo
working-directory: ./build
run: msbuild /m /P:Configuration=RelWithDebInfo gettext_po_to_mo.vcxproj
- name: make .pot
working-directory: ./build
run: msbuild /m /P:Configuration=RelWithDebInfo gettext_make_pot.vcxproj

build_dep:
runs-on: windows-2019
needs: build_pot

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -47,12 +94,22 @@ jobs:
with:
name: deps_win
path: deps/destdir
- name: echo dir deps
run: dir deps
- name: echo dir deps destdir
run: dir deps/destdir
- name: mkdir
run: mkdir build
- run: dir deps
- run: dir deps/destdir
- run: mkdir msgfmt_bin
- name: copy gettext
working-directory: ./msgfmt_bin
shell: powershell
run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/supermerill/SuperSlicer_deps/releases/download/gettext/gettext-tools-static-0.18.1.1.zip", "gettext.zip")'
- name: unzip
working-directory: ./msgfmt_bin
shell: cmd
run: '"C:/Program Files/7-Zip/7z.exe" x gettext.zip'
- name: add msgfmt to path
shell: powershell
working-directory: msgfmt_bin
run: echo "$pwd;" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: mkdir build
- name: cmake
working-directory: ./build
run: cmake .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH="d:\a\${{ github.event.repository.name }}\${{ github.event.repository.name }}\deps\destdir\usr\local"
Expand Down
118 changes: 118 additions & 0 deletions .github/workflows/ccpp_win_deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: C/C++ dep build windows x64

on:
push:
branches:
- debug_win

jobs:
build_dep:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- name: mkdir in deps
run: mkdir deps/build
- name: cmake and make deps
working-directory: ./deps/build
run: |
cmake .. -G "Visual Studio 16 2019" -A x64
msbuild /m ALL_BUILD.vcxproj
- name: Upload artifact
uses: actions/[email protected]
with:
name: deps_win
path: ./deps/build/destdir/

build:
runs-on: windows-2019
needs: build_dep

steps:
- uses: actions/checkout@v1
- uses: ilammy/msvc-dev-cmd@v1
- name: update submodule profiles
working-directory: ./resources/profiles
run: git submodule update --init
- name: change date in version
shell: powershell
run: (Get-Content version.inc) | Foreach-Object {$_ -replace "\+UNKNOWN", ("_" + [datetime]::Today.ToString("yyyy-MM-dd"))} | Set-Content version.inc
- run: mkdir deps/destdir
- name: download deps
uses: actions/download-artifact@v1
with:
name: deps_win
path: deps/destdir
- run: dir deps
- run: dir deps/destdir
- run: mkdir msgfmt_bin
- name: copy gettext
working-directory: ./msgfmt_bin
shell: powershell
run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/supermerill/SuperSlicer_deps/releases/download/gettext/gettext-tools-static-0.18.1.1.zip", "gettext.zip")'
- name: unzip
working-directory: ./msgfmt_bin
shell: cmd
run: '"C:/Program Files/7-Zip/7z.exe" x gettext.zip'
- name: add msgfmt to path
shell: powershell
working-directory: msgfmt_bin
run: echo "$pwd;" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: mkdir build
- name: cmake
working-directory: ./build
run: cmake .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH="d:\a\${{ github.event.repository.name }}\${{ github.event.repository.name }}\deps\destdir\usr\local"
- name: make
working-directory: ./build
run: msbuild /m /P:Configuration=RelWithDebInfo INSTALL.vcxproj
- name: make .mo
working-directory: ./build
run: msbuild /m /P:Configuration=RelWithDebInfo gettext_po_to_mo.vcxproj
- name: make .pot
working-directory: ./build
run: msbuild /m /P:Configuration=RelWithDebInfo gettext_make_pot.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/SuperSlicer_deps/releases/download/1.75/Slic3r_win_build.zip", "Slic3r_win_build.zip")'
- name: unzip
working-directory: ./build
shell: cmd
run: '"C:/Program Files/7-Zip/7z.exe" x Slic3r_win_build.zip'
- name: copy missing dll content from old release
working-directory: ./build
shell: cmd
run: |
xcopy /RCYIE Slic3r_win_build\*.dll package\
xcopy /RCYIE Slic3r_win_build\local-settings.bat package\${{ github.event.repository.name }}_local-settings.bat
xcopy /RCYIE Slic3r_win_build\mesa package\
- name: copy new resources
working-directory: ./build
shell: cmd
run: xcopy /RCYIE ..\resources package\resources
- name: copy dll & exe
working-directory: ./build
shell: cmd
run: |
xcopy /RCYIE src\RelWithDebInfo\*.dll package\
xcopy /RCYIE src\RelWithDebInfo\*.exe package\
xcopy /RCYIE c:\windows\system32\VCRUNTIME140* package\
del package\opengl32.dll
# - 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/[email protected]
with:
name: nightly_win64
path: build/package/
60 changes: 26 additions & 34 deletions .github/workflows/ccpp_win_rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,9 @@ on:
- rc

jobs:
build_dep:
runs-on: windows-2019

steps:
- uses: actions/checkout@v2
with:
ref: 'rc'
- uses: ilammy/msvc-dev-cmd@v1
- name: mkdir in deps
run: mkdir deps/build
- name: cmake and make deps
working-directory: ./deps/build
run: |
cmake .. -G "Visual Studio 16 2019" -A x64
msbuild /m ALL_BUILD.vcxproj
- name: Upload artifact
uses: actions/[email protected]
with:
name: deps_win
path: ./deps/build/destdir/

build:
runs-on: windows-2019
needs: build_dep

steps:
- uses: actions/checkout@v1
Expand All @@ -40,19 +19,32 @@ jobs:
- name: change date in version
shell: powershell
run: (Get-Content version.inc) | Foreach-Object {$_ -replace "\+UNKNOWN", ("")} | Set-Content version.inc
- name: mkdir in deps directory
run: mkdir deps/destdir
- name: download deps
uses: actions/download-artifact@v1
with:
name: deps_win
path: deps/destdir
- name: echo dir deps
run: dir deps
- name: echo dir deps destdir
run: dir deps/destdir
- name: mkdir
run: mkdir build
- run: mkdir deps/destdir
- name: copy deps
working-directory: ./deps/destdir
shell: powershell
run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/supermerill/SuperSlicer_deps/releases/download/deps_25/deps_win.zip", "deps_win.zip")'
- name: unzip deps
working-directory: ./deps/destdir
shell: cmd
run: '"C:/Program Files/7-Zip/7z.exe" x deps_win.zip'
- run: dir deps
- run: dir deps/destdir
- run: dir deps/destdir/usr
- run: mkdir msgfmt_bin
- name: copy gettext
working-directory: ./msgfmt_bin
shell: powershell
run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/supermerill/SuperSlicer_deps/releases/download/gettext/gettext-tools-static-0.18.1.1.zip", "gettext.zip")'
- name: unzip
working-directory: ./msgfmt_bin
shell: cmd
run: '"C:/Program Files/7-Zip/7z.exe" x gettext.zip'
- name: add msgfmt to path
shell: powershell
working-directory: msgfmt_bin
run: echo "$pwd;" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: mkdir build
- name: cmake
working-directory: ./build
run: cmake .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH="d:\a\${{ github.event.repository.name }}\${{ github.event.repository.name }}\deps\destdir\usr\local"
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/Config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ class ConfigOptionVectorBase : public ConfigOption {
virtual bool empty() const = 0;
// Get if the size of this vector is/should be the same as nozzle_diameter
bool is_extruder_size() const { return (flags & FCO_EXTRUDER_ARRAY) != 0; }
ConfigOptionVectorBase* set_is_extruder_size(bool is_extruder_size) {
ConfigOptionVectorBase* set_is_extruder_size(bool is_extruder_size = true) {
if (is_extruder_size) this->flags |= FCO_EXTRUDER_ARRAY; else this->flags &= uint8_t(0xFF ^ FCO_EXTRUDER_ARRAY);
return this;
}
Expand Down
4 changes: 0 additions & 4 deletions src/libslic3r/Flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ double Flow::extrusion_width(const std::string& opt_key, const ConfigOptionFloat
}

if (opt->percent) {
auto opt_key_layer_height = first_layer ? "first_layer_height" : "layer_height";
auto opt_layer_height = config.option(opt_key_layer_height);
if (opt_layer_height == nullptr)
throw_on_missing_variable(opt_key, opt_key_layer_height);
// first_layer_height depends on first_printing_extruder
auto opt_nozzle_diameters = config.option<ConfigOptionFloats>("nozzle_diameter");
if (opt_nozzle_diameters == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/Preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ static std::vector<std::string> s_Preset_print_options {
"compatible_printers", "compatible_printers_condition", "inherits",
"infill_dense", "infill_dense_algo",
"no_perimeter_unsupported_algo",
"exact_last_layer_height",
// "exact_last_layer_height",
"perimeter_loop",
"perimeter_loop_seam",
"infill_connection", "infill_connection_solid", "infill_connection_top", "infill_connection_bottom", "infill_connection_bridge",
Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ double Print::get_object_first_layer_height(const PrintObject& object) const {
object_first_layer_height = std::min(object_first_layer_height, object.config().first_layer_height.get_abs_value(nozzle_diameter));
}
}
assert(object_first_layer_height < 1000000000);
return object_first_layer_height;
}

Expand Down
Loading

0 comments on commit c0faf97

Please sign in to comment.