Skip to content

Commit

Permalink
New feature - Native POV file generation based on LDView #77
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorsandy committed Sep 3, 2018
1 parent 6b1d4e7 commit f9063ef
Show file tree
Hide file tree
Showing 769 changed files with 232,502 additions and 4,089 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Describe your issue here.
- AppImage (Linux): `~/.config/LPub3D Software/<AppImage File Name>.conf`
* Renderer configuration files
- `[Application data path]/3rdParty\ldglite-1.3\config\ldglite.ini`
- `[Application data path]/3rdParty\ldglite-1.3\config\nativePOV.ini`
- `[Application data path]/3rdParty\ldview-4.3\config\ldview.ini`
- `[Application data path]/3rdParty\ldview-4.3\config\ldviewPOV.ini`
- `[Application data path]/3rdParty\lpub3d_trace_cui-3.8\config\povray.conf`
Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
*.jar
*.rar
*.tar
*.zip
#*.zip

# Logs and databases
*.log
Expand Down Expand Up @@ -97,15 +97,22 @@ builds/windows/release/*
builds/linux/debbuild/*
builds/linux/rpmbuild/*
builds/linux/pkgbuild/*
mainApp/LDViewMessages.h
mainApp/StudLogo.h
ldvlib/LDViewMessages.ini

# Makefiles
mainApp/Makefile
ldrawini/Makefile
quazip/Makefile
.vs
LPub3D.sln

# Build artefacts
builds/windows/release/*
builds/windows/libs/*
mainApp/lpub3dsd_plugin_import.cpp
mainApp/uic_wrapper.bat

# Windows setup archives
builds/windows/archives/*
Expand Down
171 changes: 148 additions & 23 deletions LPub3D.pro
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
TEMPLATE=subdirs
CONFIG += ordered # This tells Qt to compile the following SUBDIRS in order
SUBDIRS += \
$$PWD/quazip \
$$PWD/ldrawini \
$$PWD/mainApp

quazip.subdir = $$PWD/quazip
quazip.target = sub-quazip
quazip.depends =

ldrawini.subdir = $$PWD/ldrawini
ldrawini.target = sub-ldrawini
ldrawini.depends =

mainApp.subdir = $$PWD/mainApp
mainApp.target = sub-mainApp
mainApp.depends = quazip
mainApp.depends = ldrawini

RESOURCES += \
qsimpleupdater/res/qsu_resources.qrc \
mainApp/lpub3d.qrc
CONFIG+=ordered # This tells Qt to compile the following SUBDIRS in order

win32:HOST = $$system(systeminfo | findstr /B /C:\"OS Name\")
unix:!macx:HOST = $$system(. /etc/os-release 2>/dev/null; [ -n \"$PRETTY_NAME\" ] && echo \"$PRETTY_NAME\" || echo `uname`)
Expand All @@ -31,5 +10,151 @@ BUILD_ARCH = $$(TARGET_CPU)
!contains(QT_ARCH, unknown): BUILD_ARCH = $$QT_ARCH
else: isEmpty(BUILD_ARCH): BUILD_ARCH = UNKNOWN ARCH
CONFIG(debug, debug|release): BUILD = DEBUG BUILD
else: BUILD = RELEASE BUILD
else: BUILD = RELEASE BUILD

message("~~~ LPUB3D $$upper($$BUILD_ARCH) $${BUILD} ON $$upper($$HOST) ~~~")

SUBDIRS = 3rdParty_ldrawini
3rdParty_ldrawini.subdir = $$PWD/ldrawini
3rdParty_ldrawini.makefile = Makefile.ldrawini
3rdParty_ldrawini.target = sub-ldrawini
3rdParty_ldrawini.depends =

isEmpty(quazipnobuild) {
SUBDIRS += 3rdParty_quazip
3rdParty_quazip.subdir = $$PWD/quazip
3rdParty_quazip.makefile = Makefile.quazip
3rdParty_quazip.target = sub-quazip
3rdParty_quazip.depends =
}

if (unix:exists(/usr/include/gl2ps.h)|exists(/usr/local/include/gl2ps.h)) {
message("~~~ Library gl2ps found ~~~")
} else {
!win32:message("~~~ ALERT: library gl2ps not found, building it in... ~~~")
CONFIG+=BUILD_GL2PS
}
if (unix:exists(/usr/include/png.h)|exists(/usr/local/include/png.h)|BUILD_GL2PS) {
if (contains(HOST, Ubuntu):contains(HOST, 14.04.5)) {
message("~~~ $$HOST detected, building in libpng version 1.6.28... ~~~")
CONFIG+=BUILD_PNG
} else:BUILD_GL2PS {
CONFIG+=BUILD_PNG
}
} else {
!win32:message("~~~ ALERT: library libpng not found, building it in... ~~~")
CONFIG+=BUILD_PNG
}
if (unix:exists(/usr/include/jpeglib.h)|exists(/usr/local/include/jpeglib.h)) {
message("~~~ Library jpeglib found ~~~")
} else {
!win32:message("~~~ ALERT: library jpeglib not found, building it in... ~~~")
CONFIG+=BUILD_JPEG
}
if (unix:exists(/usr/include/tinyxml.h)|exists(/usr/local/include/tinyxml.h)) {
message("~~~ Library tinyxml found ~~~")
} else {
!win32:message("~~~ ALERT: library tinyxml not found, building it in... ~~~")
CONFIG+=BUILD_TINYXML
}

if (BUILD_PNG) {
SUBDIRS += 3rdParty_png
3rdParty_png.subdir = $$PWD/ldvlib/libpng
3rdParty_png.makefile = Makefile.libpng
3rdParty_png.target = sub-3rdParty_png
3rdParty_png.depends =
}

if (BUILD_TINYXML) {
SUBDIRS += 3rdParty_tinyxml
3rdParty_tinyxml.subdir = $$PWD/ldvlib/tinyxml
3rdParty_tinyxml.makefile = Makefile.libtinyxml
3rdParty_tinyxml.target = sub-3rdParty_tinyxml
3rdParty_tinyxml.depends =
}

if (BUILD_GL2PS) {
SUBDIRS += 3rdParty_gl2ps
3rdParty_gl2ps.subdir = $$PWD/ldvlib/gl2ps
3rdParty_gl2ps.makefile = Makefile.libgl2ps
3rdParty_gl2ps.target = sub-3rdParty_gl2ps
3rdParty_gl2ps.depends = 3rdParty_png
}

if (BUILD_JPEG) {
SUBDIRS += 3rdParty_jpeg
3rdParty_jpeg.subdir = $$PWD/ldvlib/libjpeg
3rdParty_jpeg.makefile = Makefile.libjpeg
3rdParty_jpeg.target = sub-3rdParty_jpeg
3rdParty_jpeg.depends =
}

SUBDIRS += tcfoundation
tcfoundation.subdir = $$PWD/ldvlib/TCFoundation
tcfoundation.makefile = Makefile.tcfoundation
tcfoundation.target = sub-tcfoundation
if (BUILD_PNG) {
tcfoundation.depends = 3rdParty_png
}
if (BUILD_JPEG) {
tcfoundation.depends = 3rdParty_jpeg
}

SUBDIRS += tre
tre.subdir = $$PWD/ldvlib/TRE
tre.makefile = Makefile.tre
tre.target = sub-tre
tre.depends = tcfoundation
if (BUILD_GL2PS) {
tre.depends = 3rdParty_gl2ps
}

SUBDIRS += ldloader
ldloader.subdir = $$PWD/ldvlib/LDLoader
ldloader.makefile = Makefile.ldloader
ldloader.target = sub-ldloader
ldexporter.depends = tre

SUBDIRS += ldexporter
ldexporter.subdir = $$PWD/ldvlib/LDExporter
ldexporter.makefile = Makefile.ldexporter
ldexporter.target = sub-ldexporter
ldexporter.depends = ldloader
if (BUILD_TINYXML) {
ldexporter.depends = 3rdParty_tinyxml
}

SUBDIRS += ldlib
ldlib.subdir = $$PWD/ldvlib/LDLib
ldlib.makefile = Makefile.ldlib
ldlib.target = sub-ldlib
ldlib.depends = ldexporter
if (BUILD_GL2PS) {
ldlib.depends = 3rdParty_gl2ps
}

SUBDIRS += ldvqt
ldvqt.subdir = $$PWD/ldvlib/LDVQt
ldvqt.makefile = Makefile.ldvqt
ldvqt.target = sub-ldvqt
ldvqt.depends = ldlib

SUBDIRS += lclib
lclib.subdir = $$PWD/lclib
lclib.makefile = Makefile.lc
lclib.target = sub-lclib
lclib.depends =

SUBDIRS += mainApp
mainApp.subdir = $$PWD/mainApp
mainApp.makefile = Makefile.mainapp
mainApp.target = sub-mainApp
mainApp.depends = quazip
mainApp.depends = ldrawini
mainApp.depends = ldlib
mainApp.depends = ldvqt

RESOURCES += \
qsimpleupdater/res/qsu_resources.qrc \
mainApp/lpub3d.qrc
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ LEGO® is a trademark of the LEGO Group of companies which does not sponsor, aut
[univention-icon]: https://raw.githubusercontent.com/trevorsandy/lpub3d/master/builds/utilities/icons/univention.png
[windows-icon]: https://raw.githubusercontent.com/trevorsandy/lpub3d/master/builds/utilities/icons/windows.png

[windows-url]: https://github.com/trevorsandy/lpub3d/releases/download/v2.3.0/LPub3D-2.3.0.1.854_20180903.exe
[macos-url]: https://github.com/trevorsandy/lpub3d/releases/download/v2.3.0/LPub3D-2.3.0.1.854_20180903-macos.dmg
[appimage-url]: https://github.com/trevorsandy/lpub3d/releases/download/v2.3.0/LPub3D-2.3.0.1.854_20180903-x86_64.AppImage
[windows-url]: https://github.com/trevorsandy/lpub3d/releases/download/v2.3.0/LPub3D-2.3.0.1.855_20180903.exe
[macos-url]: https://github.com/trevorsandy/lpub3d/releases/download/v2.3.0/LPub3D-2.3.0.1.855_20180903-macos.dmg
[appimage-url]: https://github.com/trevorsandy/lpub3d/releases/download/v2.3.0/LPub3D-2.3.0.1.855_20180903-x86_64.AppImage

[arch-url]: https://download.opensuse.org/repositories/home:/trevorsandy/Arch_Extra/
[centos-url]: https://download.opensuse.org/repositories/home:/trevorsandy/CentOS_7/
Expand Down
21 changes: 4 additions & 17 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ clone_script: echo skip

# We're caching:
# LDraw parts library - used for testing renderers
# Qt5 for MinGW i386 and x86_64 in lp3d_librepo - enable building MinGW and MSBild in same job
# Built renderers - LDGLite, LDView, and LPub3D-Trace (POV-Ray)
cache:
- '$(APPVEYOR_BUILD_FOLDER)\LDraw'
- '$(APPVEYOR_BUILD_FOLDER)\LDrawLibs'
- '$(APPVEYOR_BUILD_FOLDER)\$(lp3d_librepo)'
- '$(APPVEYOR_BUILD_FOLDER)\$(LP3D_DIST_DIR)'

#shallow_clone: true

image: Visual Studio 2017
image: Visual Studio 2015

skip_commits:
files:
Expand Down Expand Up @@ -55,12 +53,8 @@ environment:
LP3D_PACKAGE_PATH: builds\windows\$(configuration)
LP3D_DIST_DIR: lpub3d_windows_3rdparty
LP3D_DIST_DIR_PATH: $(APPVEYOR_BUILD_FOLDER)\$(LP3D_DIST_DIR)
LP3D_QT32_MSYS2: c:\msys64\MINGW32\bin
LP3D_QT64_MSYS2: c:\msys64\MINGW64\bin
LP3D_QT32_LIBS: mingw-w64-i686-qt5-5.9.2-2-any.pkg.tar.xz
LP3D_QT64_LIBS: mingw-w64-x86_64-qt5-5.9.2-2-any.pkg.tar.xz
lp3d_librepo: lpub3d_mingw-Qt5_libs
lp3d_librepodir: /c/projects/$(APPVEYOR_PROJECT_NAME)/$(lp3d_librepo)
LP3D_QT32_MSVC: C:\Qt\5.11.0\msvc2015\bin
LP3D_QT64_MSVC: C:\Qt\5.11.0\msvc2015_64\bin
LP3D_SECURE_DIR: builds\utilities\ci\secure
SECURE_AV_SECRET:
secure: nQtdZL7czHUCbI5HicAKEwLHmW88oGm9Y55LPalj8L4=
Expand Down Expand Up @@ -145,10 +139,7 @@ init:
- ps: $env:LP3D_RELEASE_LABEL = ("LPub3D " + ([TimeZoneInfo]::ConvertTimeBySystemTimeZoneId([DateTime]::UtcNow, "Central European Standard Time").ToString('dd.MM.yyyy')))
- ps: Get-ChildItem Env:LP3D_* | Sort-Object name

# This is where we install MinGW Qt5 for x86 and x86_64 builds. The Qt builds are necessarey because we are using VS image which
# does not have Qt x86 but it does have Msys2/Mingw. As there is no x86_64 MinGW Qt, we build both the x86 and x86_64 architectures.
# The source for these items are cached but if not then they are downloded - I prepared a special archive with only release binaries
# that are about 33MB for each archive. After setting up these items, we proceed to fetch the commit that triggered the AppVeyor build.
# Fetch the commit that triggered the AppVeyor build.
# We don't use git clone because the 'clone_directory' is not empty (restored cached components were added in previous steps) - so the
# git clone command will fail. Instead we use fetch and checkout to pretty much replicate the same behaviour as the default git clone.
# This includes setting the clone depth, and fetching the last commit and previous tags. Lastly, we manage 3rd party items cache -
Expand All @@ -160,13 +151,9 @@ install:
- cmd: git remote add origin https://github.com/%APPVEYOR_REPO_NAME%.git
- cmd: git fetch -qfup --depth=200 origin +%APPVEYOR_REPO_BRANCH% +refs/tags/*:refs/tags/*
- cmd: git checkout -qf %APPVEYOR_REPO_COMMIT%
- cmd: bash -lc "if ! test -d \"${lp3d_librepodir}\"; then curl -sL -o ${lp3d_librepo}.tar.gz https://github.com/trevorsandy/${lp3d_librepo}/archive/master.tar.gz; fi"
- cmd: bash -lc "if ! test -d \"${lp3d_librepodir}\" && test -f \"${lp3d_librepo}.tar.gz\"; then mkdir -p ${lp3d_librepodir} && tar -xzf ${lp3d_librepo}.tar.gz -C ${lp3d_librepodir} --strip-components=1; fi"
- cmd: bash -lc "if ! test -d \"${lp3d_librepodir}\"; then echo repository ${lp3d_librepodir} not found; else echo library repository available at ${lp3d_librepodir}; fi"
- cmd: bash -lc "if test \"$LP3D_BUILD_LDGLITE\" = \"1\" && test -d \"$LP3D_LDGLITE\"; then rm -rf $LP3D_LDGLITE; if ! test -d \"$LP3D_LDGLITE\"; then echo cached $LP3D_LDGLITE deleted; fi; fi"
- cmd: bash -lc "if test \"$LP3D_BUILD_LDVIEW\" = \"1\" && test -d \"$LP3D_LDVIEW\"; then rm -rf $LP3D_LDVIEW; if ! test -d \"$LP3D_LDVIEW\"; then echo cached $LP3D_LDVIEW deleted; fi; fi"
- cmd: bash -lc "if test \"$LP3D_BUILD_TRACE\" = \"1\" && test -d \"$LP3D_LPUB3D_TRACE\"; then rm -rf $LP3D_LPUB3D_TRACE; if ! test -d \"$LP3D_LPUB3D_TRACE\"; then echo cached $LP3D_LPUB3D_TRACE deleted; fi; fi"
- cmd: C:\msys64\usr\bin\bash -lc "cd ${lp3d_librepodir}/qt-5.9.2-2-release; pacman -U --needed --noconfirm ${LP3D_QT32_LIBS} ${LP3D_QT64_LIBS} > InstallQtBuildEnv.log 2>&1"
- cmd: C:\msys64\usr\bin\bash -lc "pacman -S --needed --noconfirm openssh rsync > InstallSecureTransfer.log 2>&1"

# There are 2 modes of execution 1. build the full package or 2. compile the source.
Expand Down
Loading

0 comments on commit f9063ef

Please sign in to comment.