Skip to content

Commit

Permalink
Merge pull request #1311 from KLayout/wip
Browse files Browse the repository at this point in the history
Wip
  • Loading branch information
klayoutmatthias authored Jan 20, 2024
2 parents 82d0c28 + 9a52095 commit f1f92e5
Show file tree
Hide file tree
Showing 895 changed files with 108,608 additions and 69,618 deletions.
4 changes: 3 additions & 1 deletion macbuild/build4mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,7 @@ def Deploy_Binaries_For_Bundle(config, parameters):
# | +-- 'klayout'
# | +-- db_plugins/
# | +-- lay_plugins/
# | +-- pymod/
# +-- Buddy/+
# | +-- 'strm2cif'
# | +-- 'strm2dxf'
Expand Down Expand Up @@ -1304,7 +1305,7 @@ def Deploy_Binaries_For_Bundle(config, parameters):
# Copy the contents of the plugin directories to a place next to
# the application binary
#-------------------------------------------------------------------
for piDir in [ "db_plugins", "lay_plugins" ]:
for piDir in [ "db_plugins", "lay_plugins", "pymod" ]:
os.makedirs( os.path.join( targetDirM, piDir ))
dynamicLinkLibs = glob.glob( os.path.join( MacBinDir, piDir, "*.dylib" ) )
for item in dynamicLinkLibs:
Expand Down Expand Up @@ -1354,6 +1355,7 @@ def Deploy_Binaries_For_Bundle(config, parameters):
# | +-- 'klayout'
# | +-- db_plugins/
# | +-- lay_plugins/
# | +-- pymod/
# :
#----------------------------------------------------------------------------------
os.chdir( targetDirF )
Expand Down
4 changes: 2 additions & 2 deletions macbuild/macQAT.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ def ExportEnvVariables():
MyEnviron[ 'TESTSRC' ] = ".."
MyEnviron[ 'TESTTMP' ] = WorkDir
if System == "Darwin":
MyEnviron[ 'DYLD_LIBRARY_PATH' ] = "%s:%s/db_plugins:%s/lay_plugins" % (ProjectDir, ProjectDir, ProjectDir)
MyEnviron[ 'DYLD_LIBRARY_PATH' ] = "%s:%s/db_plugins:%s/lay_plugins:%s/pymod" % (ProjectDir, ProjectDir, ProjectDir, ProjectDir)
for env in [ 'TESTSRC', 'TESTTMP', 'DYLD_LIBRARY_PATH' ]:
os.environ[env] = MyEnviron[env]
else:
MyEnviron[ 'LD_LIBRARY_PATH' ] = "%s:%s/db_plugins:%s/lay_plugins" % (ProjectDir, ProjectDir, ProjectDir)
MyEnviron[ 'LD_LIBRARY_PATH' ] = "%s:%s/db_plugins:%s/lay_plugins:%s/pymod" % (ProjectDir, ProjectDir, ProjectDir, ProjectDir)
for env in [ 'TESTSRC', 'TESTTMP', 'LD_LIBRARY_PATH' ]:
os.environ[env] = MyEnviron[env]

Expand Down
2 changes: 1 addition & 1 deletion macbuild/macQAT.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ logfile=QATest_${gitSHA1}_${timestamp}__${presentDir}.log
#----------------------------------------------------------------
export TESTSRC=..
export TESTTMP=QATest_${gitSHA1}_${timestamp}__${presentDir}
export DYLD_LIBRARY_PATH=$(pwd):$(pwd)/db_plugins:$(pwd)/lay_plugins
export DYLD_LIBRARY_PATH=$(pwd):$(pwd)/db_plugins:$(pwd)/lay_plugins:$(pwd)/pymod

#----------------------------------------------------------------
# Environment variables for "ut_runner"
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy-win-mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ echo "Making .zip file $zipname.zip .."

rm -rf $zipname $zipname.zip
mkdir $zipname
cp -Rv strm*.exe *.dll cert.pem .*-paths.txt db_plugins lay_plugins $plugins lib $zipname | sed -u 's/.*/echo -n ./' | sh
cp -Rv strm*.exe *.dll cert.pem .*-paths.txt db_plugins lay_plugins pymod $plugins lib $zipname | sed -u 's/.*/echo -n ./' | sh
cp klayout.exe $zipname/klayout_app.exe
cp klayout.exe $zipname/klayout_vo_app.exe
echo ""
Expand Down
1 change: 1 addition & 0 deletions scripts/klayout-inst.nsis
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ section
file cert.pem
file /r db_plugins
file /r lay_plugins
file /r pymod
file /r audio
file /r generic
file /r iconengines
Expand Down
3 changes: 3 additions & 0 deletions scripts/makedeb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ mkdir -p makedeb-tmp/${sharedir}/applications
mkdir -p makedeb-tmp/${sharedir}/pixmaps
mkdir -p makedeb-tmp/${libdir}/db_plugins
mkdir -p makedeb-tmp/${libdir}/lay_plugins
mkdir -p makedeb-tmp/${libdir}/pymod
mkdir -p makedeb-tmp/${bindir}

cp etc/klayout.desktop makedeb-tmp/${sharedir}/applications
Expand All @@ -111,6 +112,7 @@ cp -pd $bininstdir/klayout makedeb-tmp/${bindir}
cp -pd $bininstdir/lib*so* makedeb-tmp/${libdir}
cp -pd $bininstdir/db_plugins/lib*so* makedeb-tmp/${libdir}/db_plugins
cp -pd $bininstdir/lay_plugins/lib*so* makedeb-tmp/${libdir}/lay_plugins
cp -rpd $bininstdir/pymod/* makedeb-tmp/${libdir}/pymod

cd makedeb-tmp

Expand All @@ -136,6 +138,7 @@ echo "Modifying control file .."
strip ${bindir}/*
strip ${libdir}/db_plugins/*.so*
strip ${libdir}/lay_plugins/*.so*
strip ${libdir}/pymod/klayout/*.so*

size=`du -ck usr | grep total | sed "s/ *total//"`

Expand Down
2 changes: 1 addition & 1 deletion scripts/mkqtdecl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ update=0
diff=0
reuse=0
qt="/opt/qt/4.6.3/include"
qt5="/opt/qt/5.5.1/include"
qt5="/opt/qt/5.12.12/include"
qt6="/opt/qt/6.2.1/include"
inst_dir_common=`pwd`/scripts/mkqtdecl_common
inst_dir4=`pwd`/scripts/mkqtdecl4
Expand Down
21 changes: 19 additions & 2 deletions scripts/mkqtdecl4/mkqtdecl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,9 @@ drop_method "QPixmap", /QPixmap::handle/ # not available on WIN
drop_method "QPixmap", /QPixmap::fromX11Pixmap/ # not available on WIN
drop_method "QTabletEvent", /QTabletEvent::QTabletEvent/ # TODO: too many arguments
drop_method "QGraphicsProxyWidget", /QGraphicsProxyWidget::setGeometry\(double/ # not available as override (private or protected inheritance?)
drop_method "QPixmap", /QPixmap::QPixmap\(const\s+char\s+\*\s*const\s*\w*\s*\[\s*\]/ # no const char *[] - TODO: provide differen implementation?
drop_method "QPixmap", /QPixmap::QPixmap\(const\s+char\s+\*\s*const\s*xpm\s*\[\s*\]/ # no const char *[] - TODO: provide differen implementation?
drop_method "QImage", /QImage::QImage\(.*unsigned\s+char\s+\*\s*data\W/ # not binary data constructor - done in native implementation
add_native_impl_QImage()
drop_method "QImage", /QImage::QImage\(const\s+char\s+\*\s*const\s*xpm\s*\[\s*\]/ # no const char *[] - TODO: provide differen implementation?
drop_method "QImage", /QImage::QImage\(const\s+char\s+\*\s*fileName/ # not available for QT_NO_CAST_TO_ASCII
drop_method "QAccessibleInterface", /QAccessibleInterface::imageInterface/ # Interface is not officially available
Expand Down Expand Up @@ -635,11 +637,26 @@ drop_method "Qimage", /Qimage::text\(const\s+QString/ # clashes with const char
rename "QDialogButtonBox", /QDialogButtonBox::QDialogButtonBox\(QFlags/, "new_buttons"
rename "QIcon", /QIcon::pixmap\(int\s+extent/, "pixmap_ext"
rename "QKeySequence", /QKeySequence::QKeySequence\(QKeySequence::StandardKey/, "new_std"

# TODO: basically, the layout object only takes ownership over the objects when
# it has a QWidget parent itself. This is not reflected in the following simple scheme
keep_arg "QBoxLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QBoxLayout", /::addSpacerItem/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::insertItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertLayout/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertSpacerItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertWidget/, 1 # will take ownership of item
keep_arg "QGridLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QWidget", /::setLayout\s*\(/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addItem/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addWidget/, 0 # will take ownership of layout
keep_arg "QLayout", /::addChildLayout/, 0 # will take ownership of layout
keep_arg "QLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::insertWidget/, 1 # will take ownership of item

keep_arg "QWidget", /::setLayout\s*\(/, 0 # will take ownership of layout
keep_arg "QTreeWidgetItem", /::addChild\(/, 0 # will take ownership of the child
keep_arg "QTreeWidgetItem", /::addChildren\(/, 0 # will take ownership of the children
keep_arg "QTreeWidgetItem", /::insertChild\(/, 1 # will take ownership of the child
Expand Down
39 changes: 33 additions & 6 deletions scripts/mkqtdecl5/QtCore/allofqt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
#include "QtCore/QAtomicPointer"
#include "QtCore/QBasicMutex"
#include "QtCore/QBasicTimer"
#include "QtCore/QBBSystemLocaleData"
#include "QtCore/QBEInteger"
#include "QtCore/QBigEndianStorageType"
#include "QtCore/QBitArray"
#include "QtCore/QBitRef"
#include "QtCore/QBuffer"
Expand All @@ -31,13 +32,22 @@
#include "QtCore/QByteArrayMatcher"
#include "QtCore/QByteRef"
#include "QtCore/QCache"
#include "QtCore/QCborArray"
#include "QtCore/QCborError"
#include "QtCore/QCborMap"
#include "QtCore/QCborParserError"
#include "QtCore/QCborStreamReader"
#include "QtCore/QCborStreamWriter"
#include "QtCore/QCborValue"
#include "QtCore/QCborValueRef"
#include "QtCore/QChar"
#include "QtCore/QCharRef"
#include "QtCore/QChildEvent"
#include "QtCore/QCollator"
#include "QtCore/QCollatorSortKey"
#include "QtCore/QCommandLineOption"
#include "QtCore/QCommandLineParser"
// #include "QtCore/QConstOverload"
#include "QtCore/QContiguousCache"
#include "QtCore/QContiguousCacheData"
#include "QtCore/QContiguousCacheTypedData"
Expand All @@ -46,6 +56,7 @@
#include "QtCore/QDataStream"
#include "QtCore/QDate"
#include "QtCore/QDateTime"
#include "QtCore/QDeadlineTimer"
#include "QtCore/QDebug"
#include "QtCore/QDebugStateSaver"
#include "QtCore/QDeferredDeleteEvent"
Expand All @@ -71,7 +82,7 @@
#include "QtCore/QFinalState"
#include "QtCore/QFlag"
#include "QtCore/QFlags"
#include "QtCore/QForeachContainer"
#include "QtCore/QFloat16"
#include "QtCore/QFunctionPointer"
#include "QtCore/QFuture"
#include "QtCore/QFutureInterface"
Expand All @@ -86,6 +97,7 @@
#include "QtCore/QHash"
#include "QtCore/QHashData"
#include "QtCore/QHashDummyValue"
#include "QtCore/QHashFunctions"
#include "QtCore/QHashIterator"
#include "QtCore/QHashNode"
#include "QtCore/QHistoryState"
Expand All @@ -105,9 +117,11 @@
#include "QtCore/QJsonValuePtr"
#include "QtCore/QJsonValueRef"
#include "QtCore/QJsonValueRefPtr"
// #include "QtCore/QKeyValueIterator"
#include "QtCore/QLatin1Char"
#include "QtCore/QLatin1Literal"
#include "QtCore/QLatin1String"
#include "QtCore/QLEInteger"
#include "QtCore/QLibrary"
#include "QtCore/QLibraryInfo"
#include "QtCore/QLine"
Expand All @@ -120,6 +134,7 @@
#include "QtCore/QListData"
#include "QtCore/QListIterator"
#include "QtCore/QListSpecialMethods"
#include "QtCore/QLittleEndianStorageType"
#include "QtCore/QLocale"
#include "QtCore/QLockFile"
#include "QtCore/QLoggingCategory"
Expand All @@ -140,9 +155,6 @@
#include "QtCore/QMetaObject"
#include "QtCore/QMetaProperty"
#include "QtCore/QMetaType"
#include "QtCore/QMetaTypeId"
#include "QtCore/QMetaTypeId2"
#include "QtCore/QMetaTypeIdQObject"
#include "QtCore/QMimeData"
#include "QtCore/QMimeDatabase"
#include "QtCore/QMimeType"
Expand All @@ -162,11 +174,13 @@
#include "QtCore/QMutex"
#include "QtCore/QMutexLocker"
#include "QtCore/QNoDebug"
// #include "QtCore/QNonConstOverload"
#include "QtCore/QObject"
#include "QtCore/QObjectCleanupHandler"
#include "QtCore/QObjectData"
#include "QtCore/QObjectList"
#include "QtCore/QObjectUserData"
#include "QtCore/QOperatingSystemVersion"
#include "QtCore/QPair"
#include "QtCore/QParallelAnimationGroup"
#include "QtCore/QPauseAnimation"
Expand All @@ -180,6 +194,8 @@
#include "QtCore/QProcessEnvironment"
#include "QtCore/QPropertyAnimation"
#include "QtCore/QQueue"
#include "QtCore/QRandomGenerator"
#include "QtCore/QRandomGenerator64"
#include "QtCore/QReadLocker"
#include "QtCore/QReadWriteLock"
#include "QtCore/QRect"
Expand All @@ -200,7 +216,10 @@
#include "QtCore/QScopedPointerObjectDeleteLater"
#include "QtCore/QScopedPointerPodDeleter"
#include "QtCore/QScopedValueRollback"
#include "QtCore/QScopeGuard"
// #include "QtCore/Q_SECURITY_ATTRIBUTES"
#include "QtCore/QSemaphore"
#include "QtCore/QSemaphoreReleaser"
#include "QtCore/QSequentialAnimationGroup"
#include "QtCore/QSequentialIterable"
#include "QtCore/QSet"
Expand All @@ -217,29 +236,35 @@
#include "QtCore/QSizeF"
#include "QtCore/QSocketNotifier"
#include "QtCore/QSortFilterProxyModel"
#include "QtCore/QSpecialInteger"
#include "QtCore/QStack"
#include "QtCore/QStandardPaths"
// #include "QtCore/Q_STARTUPINFO"
#include "QtCore/QState"
#include "QtCore/QStateMachine"
#include "QtCore/QStaticArrayData"
#include "QtCore/QStaticAssertFailure"
#include "QtCore/QStaticByteArrayData"
#include "QtCore/QStaticByteArrayMatcherBase"
#include "QtCore/QStaticPlugin"
#include "QtCore/QStaticStringData"
#include "QtCore/QStorageInfo"
#include "QtCore/QString"
#include "QtCore/QStringAlgorithms"
#include "QtCore/QStringBuilder"
#include "QtCore/QStringData"
#include "QtCore/QStringDataPtr"
#include "QtCore/QStringList"
#include "QtCore/QStringListIterator"
#include "QtCore/QStringListModel"
#include "QtCore/QStringLiteral"
#include "QtCore/QStringMatcher"
#include "QtCore/QStringRef"
#include "QtCore/QStringView"
#include "QtCore/QSysInfo"
#include "QtCore/QSystemSemaphore"
#include "QtCore/Qt"
#include "QtCore/QtAlgorithms"
#include "QtCore/QtCborCommon"
#include "QtCore/QtCleanUpFunction"
#include "QtCore/QtConfig"
#include "QtCore/QtContainerFwd"
Expand Down Expand Up @@ -277,6 +302,7 @@
#include "QtCore/QTranslator"
#include "QtCore/QTypeInfo"
#include "QtCore/QTypeInfoMerger"
// #include "QtCore/QTypeInfoQuery"
#include "QtCore/QUnhandledException"
#include "QtCore/QUrl"
#include "QtCore/QUrlQuery"
Expand All @@ -291,6 +317,7 @@
#include "QtCore/QVarLengthArray"
#include "QtCore/QVector"
#include "QtCore/QVectorIterator"
#include "QtCore/QVersionNumber"
#include "QtCore/QWaitCondition"
#include "QtCore/QWeakPointer"
#include "QtCore/QWinEventNotifier"
Expand Down
7 changes: 5 additions & 2 deletions scripts/mkqtdecl5/QtDesigner/allofqt.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#if 0
// No designer support, except QFormBuilder
#include "QtDesigner/QAbstractExtensionFactory"
#include "QtDesigner/QAbstractExtensionManager"
#include "QtDesigner/QAbstractFormBuilder"
#if 0
// No designer support, except QFormBuilder
#include "QtDesigner/QDesignerActionEditorInterface"
#include "QtDesigner/QDesignerComponents"
#include "QtDesigner/QDesignerContainerExtension"
#include "QtDesigner/QDesignerCustomWidgetCollectionInterface"
#include "QtDesigner/QDesignerCustomWidgetInterface"
#include "QtDesigner/QDesignerDnDItemInterface"
#include "QtDesigner/QDesignerDynamicPropertySheetExtension"
#include "QtDesigner/QDesignerExportWidget"
#include "QtDesigner/QDesignerExtraInfoExtension"
#include "QtDesigner/QDesignerFormEditorInterface"
#include "QtDesigner/QDesignerFormEditorPluginInterface"
Expand Down
Loading

0 comments on commit f1f92e5

Please sign in to comment.