remi durand 3 лет назад
Родитель
Сommit
1b35362991

+ 3 - 3
.github/workflows/ccpp_mac.yml

@@ -48,7 +48,7 @@ jobs:
       run: cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.13" -DSLIC3R_STATIC=1
     - name: make SuperSlicer
       working-directory: ./build
-      run: make SuperSlicer
+      run: make Slic3r
     - name: update Info.plist
       working-directory: ./build/src
       run: sed "s/+UNKNOWN/_$(date '+%F')/" Info.plist >Info.date.plist
@@ -66,7 +66,7 @@ jobs:
       working-directory: ./build
       run: |
         cp -Rf ../resources pack/SuperSlicer/SuperSlicer.app/Contents/Resources
-        cp pack/SuperSlicer/SuperSlicer.app/Contents/Resources/icons/slic3r.icns pack/SuperSlicer/SuperSlicer.app/Contents/resources/Slic3r.icns
+        cp pack/SuperSlicer/SuperSlicer.app/Contents/Resources/icons/SuperSlicer.icns pack/SuperSlicer/SuperSlicer.app/Contents/resources/SuperSlicer.icns
         cp src/Info.date.plist pack/SuperSlicer/SuperSlicer.app/Contents/Info.plist
         echo -n -e 'APPL????\x0a' > PkgInfo
         cp PkgInfo pack/SuperSlicer/SuperSlicer.app/Contents/PkgInfo
@@ -74,7 +74,7 @@ jobs:
     - name: copy bin and do not let it lower case
       working-directory: ./build
       run: |
-        cp -f src/SuperSlicer pack/SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
+        cp -f src/superslicer pack/SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
         chmod u+x pack/SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
         tar -cvf SuperSlicer.tar pack/SuperSlicer
     - name: create dmg

+ 3 - 3
.github/workflows/ccpp_ubuntu.yml

@@ -49,7 +49,7 @@ jobs:
       run: cmake .. -DCMAKE_PREFIX_PATH="/home/runner/work/SuperSlicer/SuperSlicer/deps/build/destdir/usr/local" -DSLIC3R_STATIC=1
     - name: make SuperSlicer
       working-directory: ./build
-      run: make SuperSlicer
+      run: make Slic3r
     - name: create directory and copy into it
       working-directory: ./build
       run: |
@@ -75,8 +75,8 @@ jobs:
     - name: build appimage
       working-directory: ./build/package
       run: |
-        chmod +x ../../src/platform/unix/build_appimage.sh
-        ../../src/platform/unix/build_appimage.sh SuperSlicer_ubu64.AppImage
+        chmod +x ../build_appimage.sh
+        ../build_appimage.sh
     - name: Upload appimage
       uses: actions/upload-artifact@v1.0.0
       with:

+ 22 - 17
CMakeLists.txt

@@ -514,21 +514,26 @@ if(SLIC3R_BUILD_TESTS)
     add_subdirectory(tests)
 endif()
 
+if (NOT WIN32 AND NOT APPLE)
+    configure_file(${LIBDIR}/platform/unix/build_appimage.sh.in ${CMAKE_CURRENT_BINARY_DIR}/build_appimage.sh @ONLY)
+endif()
 
 # Resources install target, configure fhs.hpp on UNIX
 if (WIN32)
     install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources")
 elseif (SLIC3R_FHS)
     # CMAKE_INSTALL_FULL_DATAROOTDIR: read-only architecture-independent data root (share)
-    set(SLIC3R_FHS_RESOURCES "${CMAKE_INSTALL_FULL_DATAROOTDIR}/Slic3r")
+    set(SLIC3R_FHS_RESOURCES "${CMAKE_INSTALL_FULL_DATAROOTDIR}/${SLIC3R_APP_KEY}")
     install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${SLIC3R_FHS_RESOURCES}")
-    install(FILES src/platform/unix/Slic3r.desktop DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/applications)
-    install(FILES src/platform/unix/Gcodeviewer.desktop DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/applications)
-    install(FILES resources/icons/Slic3r_192px.png DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/pixmaps RENAME Slic3r.png)
-    install(FILES resources/icons/PrusaSlicer-gcodeviewer_192px.png DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/pixmaps RENAME Slic3r-gcodeviewer.png)
+    configure_file(${LIBDIR}/platform/unix/Slic3r.desktop.in ${LIBDIR_BIN}/${SLIC3R_APP_KEY}.desktop @ONLY)
+    configure_file(${LIBDIR}/platform/unix/Gcodeviewer.desktop.in ${LIBDIR_BIN}/${SLIC3R_APP_KEY}-Gcodeviewer.desktop @ONLY)
+    install(FILES ${LIBDIR_BIN}/${SLIC3R_APP_KEY}.desktop DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/applications)
+    install(FILES ${LIBDIR_BIN}/${SLIC3R_APP_KEY}-Gcodeviewer.desktop DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/applications)
+    install(FILES resources/icons/${SLIC3R_APP_KEY}_192px.png DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/pixmaps RENAME ${SLIC3R_APP_KEY}.png)
+    install(FILES resources/icons/${SLIC3R_APP_KEY}-gcodeviewer_192px.png DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/pixmaps RENAME ${SLIC3R_APP_KEY}-gcodeviewer.png)
 else ()
-    install(FILES src/platform/unix/Slic3r.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications)
-    install(FILES src/platform/unix/Gcodeviewer.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications)
+    install(FILES ${LIBDIR}/platform/unix/Slic3r.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications)
+    install(FILES ${LIBDIR}/platform/unix/Gcodeviewer.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications)
     install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources")
 endif ()
 
@@ -537,17 +542,17 @@ configure_file(${LIBDIR}/platform/unix/fhs.hpp.in ${LIBDIR_BIN}/platform/unix/fh
 if (WIN32)
 else () 
     set(CPACK_GENERATOR "STGZ;TGZ;TZ")
-    set(CPACK_NSIS_DISPLAY_NAME "Slic3r 2.0")
+    set(CPACK_NSIS_DISPLAY_NAME "${SLIC3R_APP_NAME} ${SLIC3R_VERSION}")
     set(CPACK_OUTPUT_CONFIG_FILE "${CMAKE_SOURCE_DIR}/cmake/CPackConfig.cmake")
     set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
     set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
-    set(CPACK_PACKAGE_EXECUTABLES "Slic3r")
-    set(CPACK_PACKAGE_FILE_NAME "slic3r-2.0-Linux-x86_64")
-    set(CPACK_PACKAGE_INSTALL_DIRECTORY "Slic3r 2.0")
-    set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Slic3r 2.0.0")
-    set(CPACK_PACKAGE_NAME "Slic3r")
-    set(CPACK_PACKAGE_VENDOR "Slic3r")
-    set(CPACK_PACKAGE_VERSION "2.0.0")
+    set(CPACK_PACKAGE_EXECUTABLES "${SLIC3R_APP_CMD}")
+    set(CPACK_PACKAGE_FILE_NAME "${SLIC3R_APP_KEY}-${SLIC3R_VERSION}-Linux-x86_64")
+    set(CPACK_PACKAGE_INSTALL_DIRECTORY "${SLIC3R_APP_KEY} ${SLIC3R_VERSION}")
+    set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${SLIC3R_BUILD_ID}")
+    set(CPACK_PACKAGE_NAME "${SLIC3R_APP_KEY}")
+    set(CPACK_PACKAGE_VENDOR "${SLIC3R_APP_NAME}")
+    set(CPACK_PACKAGE_VERSION "${SLIC3R_VERSION_FULL}")
     set(CPACK_PACKAGE_VERSION_MAJOR "2")
     set(CPACK_PACKAGE_VERSION_MINOR "0")
     set(CPACK_PACKAGE_VERSION_PATCH "0")
@@ -555,9 +560,9 @@ else ()
     set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
     set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
     set(CPACK_SOURCE_GENERATOR "TGZ;TZ")
-    set(CPACK_SOURCE_PACKAGE_FILE_NAME "Slic3r-2.0.0")
+    set(CPACK_SOURCE_PACKAGE_FILE_NAME "${SLIC3R_APP_KEY}-${SLIC3R_VERSION_FULL}")
     set(CPACK_SOURCE_STRIP_FILES "")
-    set(CPACK_STRIP_FILES "bin/Slic3r")
+    set(CPACK_STRIP_FILES "bin/${SLIC3R_APP_CMD}")
     set(CPACK_SYSTEM_NAME "Linux-x86_64")
     set(CPACK_TOPLEVEL_TAG "Linux-x86_64")
 endif()

+ 16 - 1
doc/How to build - Linux et al.md

@@ -1,11 +1,12 @@
 
 # Building SuperSlicer on UNIX/Linux
 
+
 SuperSlicer uses the CMake build system and requires several dependencies.
 The dependencies can be listed in `deps/deps-linux.cmake` and `deps/deps-unix-common.cmake`, although they don't necessarily need to be as recent
 as the versions listed - generally versions available on conservative Linux distros such as Debian stable or CentOS should suffice.
 
-Perl is not required any more.
+Perl is not required anymore.
 
 In a typical situation, one would open a command line, go to the SuperSlicer sources, create a directory called `build` or similar,
 `cd` into it and call:
@@ -17,6 +18,20 @@ where `N` is the number of CPU cores available.
 
 Additional CMake flags may be applicable as explained below.
 
+### How to get the source code
+
+You have to gitclone  the repository
+```
+git clone https://github.com/supermerill/SuperSlicer.git
+```
+
+and then you have to clone the profiles submodules
+
+```
+cd resources/profiles
+git submodule update
+```
+
 ## How to build, the easy way
 
 You can follow the [script](https://github.com/supermerill/SuperSlicer/blob/master/.github/workflows/ccpp_ubuntu.yml) the build server use to create the ubuntu release.

+ 13 - 0
doc/How to build - Mac OS.md

@@ -11,6 +11,19 @@ To build SuperSlicer on Mac OS, you will need the following software:
 XCode is available through Apple's App Store, the other three tools are available on
 [brew](https://brew.sh/) (use `brew install cmake git gettext` to install them).
 
+### How to get the source code
+
+You have to gitclone  the repository
+```
+git clone https://github.com/supermerill/SuperSlicer.git
+```
+
+and then you have to clone the profiles submodules
+
+```
+cd resources/profiles
+git submodule update
+```
 ### How to build
 
 You can follow the [script](https://github.com/supermerill/SuperSlicer/blob/master/.github/workflows/ccpp_mac.yml) the build server use to create the ubuntu release.

+ 14 - 0
doc/How to build - Windows.md

@@ -6,6 +6,20 @@ CMake installer can be downloaded from [the official website](https://cmake.org/
 
 Building with [Visual Studio 2017 Community Edition](https://www.visualstudio.com/vs/older-downloads/). should work too.
 
+### How to get the source code
+
+You have to gitclone  the repository
+```
+git clone https://github.com/supermerill/SuperSlicer.git
+```
+
+and then you have to clone the profiles submodules
+
+```
+cd resources/profiles
+git submodule update
+```
+
 ### How to build
 
 You have to build the dependancies (in ./deps/build)

+ 4 - 4
src/CMakeLists.txt

@@ -107,9 +107,9 @@ if (MINGW)
     set_target_properties(Slic3r PROPERTIES PREFIX "")
 endif (MINGW)
 
-if (NOT WIN32 AND NOT APPLE)
+if (NOT WIN32)
     # Binary name on unix like systems (Linux, Unix)
-    set_target_properties(Slic3r PROPERTIES OUTPUT_NAME "Slic3r")
+    set_target_properties(Slic3r PROPERTIES OUTPUT_NAME "${SLIC3R_APP_CMD}")
 endif ()
 
 target_link_libraries(Slic3r libslic3r cereal)
@@ -160,7 +160,7 @@ if (WIN32)
     endif()
     target_compile_definitions(Slic3r_app_gui PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE)
     add_dependencies(Slic3r_app_gui Slic3r)
-    set_target_properties(Slic3r_app_gui PROPERTIES OUTPUT_NAME "slic3r")
+    set_target_properties(Slic3r_app_gui PROPERTIES OUTPUT_NAME ${SLIC3R_APP_CMD})
     target_link_libraries(Slic3r_app_gui PRIVATE boost_headeronly)
 
     add_executable(Slic3r_app_console PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/${SLIC3R_APP_KEY}.rc)
@@ -224,7 +224,7 @@ else ()
             COMMAND ln -sf Slic3r prusa-gcodeviewer
             COMMAND ln -sf Slic3r PrusaGCodeViewer
             WORKING_DIRECTORY "$<TARGET_FILE_DIR:Slic3r>"
-            COMMENT "Symlinking the G-code viewer to Slic3r, symlinking to slic3r and prusa-gcodeviewer"
+            COMMENT "Symlinking the G-code viewer to Slic3r, symlinking to slic3r and gcodeviewer"
             VERBATIM)
     else ()
         add_custom_command(TARGET Slic3r POST_BUILD

+ 1 - 1
src/platform/msw/gcodeviewer.rc.in

@@ -22,4 +22,4 @@ PRODUCTVERSION @SLIC3R_RC_VERSION@
  }
 }
 2 ICON "@SLIC3R_RESOURCES_DIR@/icons/PrusaSlicer-gcodeviewer.ico"
-1 24 "Slic3r.manifest" 
+1 24 "@SLIC3R_APP_KEY@.manifest" 

+ 1 - 1
src/platform/unix/Slic3r.desktop.in

@@ -1,5 +1,5 @@
 [Desktop Entry]
-Name=@SLIC3R_APP_KEY@
+Name=@SLIC3R_APP_NAME@
 GenericName=3D Printing Software
 Comment=G-code generator for 3D printers
 Icon=@SLIC3R_APP_KEY@

+ 2 - 2
src/platform/unix/build_appimage.sh.in

@@ -2,7 +2,7 @@
 APPIMAGETOOLURL="https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-x86_64.AppImage"
 
 
-APP_IMAGE=$1
+APP_IMAGE="@SLIC3R_APP_KEY@_ubu64.AppImage"
 
 wget ${APPIMAGETOOLURL} -O ../appimagetool.AppImage
 chmod +x ../appimagetool.AppImage
@@ -24,5 +24,5 @@ EOF
 
 
 ../appimagetool.AppImage .
-mv Slic3r-x86_64.AppImage ${APP_IMAGE}
+mv @SLIC3R_APP_KEY@-x86_64.AppImage ${APP_IMAGE}
 chmod +x ${APP_IMAGE}