From dba031643c7ec8ef3a2894e43e6aedacfb29e254 Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 30 Dec 2024 18:42:05 +1300 Subject: [PATCH 1/4] genbindings: move all large int constants to a 64-bit only build file --- cmd/genbindings/emitgo.go | 51 +++++++++++++++++++++++++++++++++++---- cmd/genbindings/main.go | 9 ++++++- 2 files changed, 54 insertions(+), 6 deletions(-) diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index 5490e2aa..2cb07b8d 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -5,8 +5,10 @@ import ( "fmt" "go/format" "log" + "math" "path" "sort" + "strconv" "strings" ) @@ -643,7 +645,7 @@ func (gfs *goFileState) emitCabiToGo(assignExpr string, rt CppParameter, rvalue } -func emitGo(src *CppParsedHeader, headerName string, packageName string) (string, error) { +func emitGo(src *CppParsedHeader, headerName string, packageName string) (string, string, error) { ret := strings.Builder{} ret.WriteString(`package ` + path.Base(packageName) + ` @@ -664,6 +666,8 @@ import "C" currentPackageName: packageName, } + var bigints []string + // Check if short-named enums are allowed. // We only allow short names if there are no conflicts anywhere in the whole // file. This doesn't fully defend against cross-file conflicts but those @@ -716,13 +720,41 @@ import "C" if len(e.Entries) > 0 { - ret.WriteString("const (\n") + var smallvalues []string for _, ee := range e.Entries { - ret.WriteString(titleCase(cabiClassName(goEnumShortName+"::"+ee.EntryName)) + " " + goEnumName + " = " + ee.EntryValue + "\n") + + isBigInt := false + + if e.UnderlyingType.IntType() { + // Int-type enums need special handling in case of 64-bit + // overflow, that would prevent using miqt on 32-bit platforms + + entryValueI64, err := strconv.ParseInt(ee.EntryValue, 10, 64) + if err != nil { + panic("Enum " + ee.EntryName + " has non-parseable integer value") + } + + if entryValueI64 > math.MaxInt32 || entryValueI64 < math.MinInt32 { + isBigInt = true + } + } + + enumConstDeclaration := titleCase(cabiClassName(goEnumShortName+"::"+ee.EntryName)) + " " + goEnumName + " = " + ee.EntryValue + + if isBigInt { + bigints = append(bigints, "const "+enumConstDeclaration+"\n") + } else { + smallvalues = append(smallvalues, enumConstDeclaration+"\n") + } + } + + if len(smallvalues) > 0 { + ret.WriteString("const (\n") + ret.WriteString(strings.Join(smallvalues, "")) + ret.WriteString("\n)\n\n") } - ret.WriteString("\n)\n\n") } } @@ -1085,5 +1117,14 @@ import "C" formattedSrc = []byte(goSrc) } - return string(formattedSrc), nil + // Determine if we need to produce a _64bit.go file + bigintSrc := "" + if len(bigints) > 0 { + bigintSrc = `//go:build !386 && !arm +// +build !386,!arm + +package ` + path.Base(packageName) + "\n\n" + strings.Join(bigints, "") + "\n" + } + + return string(formattedSrc), bigintSrc, nil } diff --git a/cmd/genbindings/main.go b/cmd/genbindings/main.go index c951ae27..308915cc 100644 --- a/cmd/genbindings/main.go +++ b/cmd/genbindings/main.go @@ -222,7 +222,7 @@ func generate(packageName string, srcDirs []string, allowHeaderFn func(string) b counter++ } - goSrc, err := emitGo(parsed, filepath.Base(parsed.Filename), packageName) + goSrc, go64Src, err := emitGo(parsed, filepath.Base(parsed.Filename), packageName) if err != nil { panic(err) } @@ -232,6 +232,13 @@ func generate(packageName string, srcDirs []string, allowHeaderFn func(string) b panic(err) } + if len(go64Src) > 0 { + err = os.WriteFile(outputName+"_64bit.go", []byte(go64Src), 0644) + if err != nil { + panic(err) + } + } + bindingCppSrc, err := emitBindingCpp(parsed, filepath.Base(parsed.Filename)) if err != nil { panic(err) From 421013ccb8fedf8cbdffa694a0ce5cf773d40e5f Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 30 Dec 2024 18:42:18 +1300 Subject: [PATCH 2/4] qt: rebuild (move 64-bit constants to separate build file) --- .../qscintilla/gen_qsciscintillabase.go | 1 - .../qscintilla/gen_qsciscintillabase_64bit.go | 7 ++ .../qscintilla6/gen_qsciscintillabase.go | 1 - .../gen_qsciscintillabase_64bit.go | 7 ++ qt/gen_qaccessible.go | 9 +- qt/gen_qaccessible_64bit.go | 7 ++ qt/gen_qgraphicsitem.go | 4 - qt/gen_qgraphicsitem_64bit.go | 7 ++ qt/gen_qnamespace.go | 94 ++++++++-------- qt/gen_qnamespace_64bit.go | 14 +++ qt/gen_qpaintengine.go | 2 - qt/gen_qpaintengine_64bit.go | 8 ++ qt/gen_qstyle.go | 9 -- qt/gen_qstyle_64bit.go | 15 +++ qt/gen_qtextcodec.go | 7 +- qt/gen_qtextcodec_64bit.go | 7 ++ qt/gen_qtextedit.go | 1 - qt/gen_qtextedit_64bit.go | 7 ++ qt/gen_qtextoption.go | 1 - qt/gen_qtextoption_64bit.go | 7 ++ qt/gen_qvariant.go | 1 - qt/gen_qvariant_64bit.go | 7 ++ qt/script/gen_qscriptvalue.go | 1 - qt/script/gen_qscriptvalue_64bit.go | 7 ++ qt6/gen_qaccessible_base.go | 9 +- qt6/gen_qaccessible_base_64bit.go | 7 ++ qt6/gen_qgraphicsitem.go | 4 - qt6/gen_qgraphicsitem_64bit.go | 7 ++ qt6/gen_qnamespace.go | 100 ++++++++---------- qt6/gen_qnamespace_64bit.go | 14 +++ qt6/gen_qpaintengine.go | 2 - qt6/gen_qpaintengine_64bit.go | 8 ++ qt6/gen_qstyle.go | 9 -- qt6/gen_qstyle_64bit.go | 15 +++ qt6/gen_qtextedit.go | 1 - qt6/gen_qtextedit_64bit.go | 7 ++ qt6/gen_qtextoption.go | 1 - qt6/gen_qtextoption_64bit.go | 7 ++ qt6/gen_qvariant.go | 1 - qt6/gen_qvariant_64bit.go | 7 ++ 40 files changed, 272 insertions(+), 158 deletions(-) create mode 100644 qt-restricted-extras/qscintilla/gen_qsciscintillabase_64bit.go create mode 100644 qt-restricted-extras/qscintilla6/gen_qsciscintillabase_64bit.go create mode 100644 qt/gen_qaccessible_64bit.go create mode 100644 qt/gen_qgraphicsitem_64bit.go create mode 100644 qt/gen_qnamespace_64bit.go create mode 100644 qt/gen_qpaintengine_64bit.go create mode 100644 qt/gen_qstyle_64bit.go create mode 100644 qt/gen_qtextcodec_64bit.go create mode 100644 qt/gen_qtextedit_64bit.go create mode 100644 qt/gen_qtextoption_64bit.go create mode 100644 qt/gen_qvariant_64bit.go create mode 100644 qt/script/gen_qscriptvalue_64bit.go create mode 100644 qt6/gen_qaccessible_base_64bit.go create mode 100644 qt6/gen_qgraphicsitem_64bit.go create mode 100644 qt6/gen_qnamespace_64bit.go create mode 100644 qt6/gen_qpaintengine_64bit.go create mode 100644 qt6/gen_qstyle_64bit.go create mode 100644 qt6/gen_qtextedit_64bit.go create mode 100644 qt6/gen_qtextoption_64bit.go create mode 100644 qt6/gen_qvariant_64bit.go diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.go b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.go index 92dd112a..7d6833eb 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.go +++ b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.go @@ -845,7 +845,6 @@ const ( QsciScintillaBase__SC_MARKNUM_FOLDERSUB QsciScintillaBase__ = 29 QsciScintillaBase__SC_MARKNUM_FOLDER QsciScintillaBase__ = 30 QsciScintillaBase__SC_MARKNUM_FOLDEROPEN QsciScintillaBase__ = 31 - QsciScintillaBase__SC_MASK_FOLDERS QsciScintillaBase__ = 4261412864 QsciScintillaBase__SC_MARGIN_SYMBOL QsciScintillaBase__ = 0 QsciScintillaBase__SC_MARGIN_NUMBER QsciScintillaBase__ = 1 QsciScintillaBase__SC_MARGIN_BACK QsciScintillaBase__ = 2 diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintillabase_64bit.go b/qt-restricted-extras/qscintilla/gen_qsciscintillabase_64bit.go new file mode 100644 index 00000000..969e3c42 --- /dev/null +++ b/qt-restricted-extras/qscintilla/gen_qsciscintillabase_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qscintilla + +const QsciScintillaBase__SC_MASK_FOLDERS QsciScintillaBase__ = 4261412864 + diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.go b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.go index e4229772..71b6ea69 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.go +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.go @@ -845,7 +845,6 @@ const ( QsciScintillaBase__SC_MARKNUM_FOLDERSUB QsciScintillaBase__ = 29 QsciScintillaBase__SC_MARKNUM_FOLDER QsciScintillaBase__ = 30 QsciScintillaBase__SC_MARKNUM_FOLDEROPEN QsciScintillaBase__ = 31 - QsciScintillaBase__SC_MASK_FOLDERS QsciScintillaBase__ = 4261412864 QsciScintillaBase__SC_MARGIN_SYMBOL QsciScintillaBase__ = 0 QsciScintillaBase__SC_MARGIN_NUMBER QsciScintillaBase__ = 1 QsciScintillaBase__SC_MARGIN_BACK QsciScintillaBase__ = 2 diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase_64bit.go b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase_64bit.go new file mode 100644 index 00000000..e75462a1 --- /dev/null +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qscintilla6 + +const QsciScintillaBase__SC_MASK_FOLDERS QsciScintillaBase__ = 4261412864 + diff --git a/qt/gen_qaccessible.go b/qt/gen_qaccessible.go index a77c40e3..7e32085b 100644 --- a/qt/gen_qaccessible.go +++ b/qt/gen_qaccessible.go @@ -185,11 +185,10 @@ const ( type QAccessible__RelationFlag int const ( - QAccessible__Label QAccessible__RelationFlag = 1 - QAccessible__Labelled QAccessible__RelationFlag = 2 - QAccessible__Controller QAccessible__RelationFlag = 4 - QAccessible__Controlled QAccessible__RelationFlag = 8 - QAccessible__AllRelations QAccessible__RelationFlag = 4294967295 + QAccessible__Label QAccessible__RelationFlag = 1 + QAccessible__Labelled QAccessible__RelationFlag = 2 + QAccessible__Controller QAccessible__RelationFlag = 4 + QAccessible__Controlled QAccessible__RelationFlag = 8 ) type QAccessible__InterfaceType int diff --git a/qt/gen_qaccessible_64bit.go b/qt/gen_qaccessible_64bit.go new file mode 100644 index 00000000..83755a66 --- /dev/null +++ b/qt/gen_qaccessible_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt + +const QAccessible__AllRelations QAccessible__RelationFlag = 4294967295 + diff --git a/qt/gen_qgraphicsitem.go b/qt/gen_qgraphicsitem.go index 245d7b57..9735f97d 100644 --- a/qt/gen_qgraphicsitem.go +++ b/qt/gen_qgraphicsitem.go @@ -103,10 +103,6 @@ const ( type QGraphicsItem__Extension int -const ( - QGraphicsItem__UserExtension QGraphicsItem__Extension = 2147483648 -) - type QGraphicsPathItem__ int const ( diff --git a/qt/gen_qgraphicsitem_64bit.go b/qt/gen_qgraphicsitem_64bit.go new file mode 100644 index 00000000..eac69dbb --- /dev/null +++ b/qt/gen_qgraphicsitem_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt + +const QGraphicsItem__UserExtension QGraphicsItem__Extension = 2147483648 + diff --git a/qt/gen_qnamespace.go b/qt/gen_qnamespace.go index 6bd59fc7..cfa37bc9 100644 --- a/qt/gen_qnamespace.go +++ b/qt/gen_qnamespace.go @@ -41,14 +41,13 @@ const ( type KeyboardModifier int const ( - NoModifier KeyboardModifier = 0 - ShiftModifier KeyboardModifier = 33554432 - ControlModifier KeyboardModifier = 67108864 - AltModifier KeyboardModifier = 134217728 - MetaModifier KeyboardModifier = 268435456 - KeypadModifier KeyboardModifier = 536870912 - GroupSwitchModifier KeyboardModifier = 1073741824 - KeyboardModifierMask KeyboardModifier = 4261412864 + NoModifier KeyboardModifier = 0 + ShiftModifier KeyboardModifier = 33554432 + ControlModifier KeyboardModifier = 67108864 + AltModifier KeyboardModifier = 134217728 + MetaModifier KeyboardModifier = 268435456 + KeypadModifier KeyboardModifier = 536870912 + GroupSwitchModifier KeyboardModifier = 1073741824 ) type Modifier int @@ -58,50 +57,48 @@ const ( SHIFT Modifier = 33554432 CTRL Modifier = 67108864 ALT Modifier = 134217728 - MODIFIER_MASK Modifier = 4261412864 UNICODE_ACCEL Modifier = 0 ) type MouseButton int const ( - NoButton MouseButton = 0 - LeftButton MouseButton = 1 - RightButton MouseButton = 2 - MiddleButton MouseButton = 4 - MidButton MouseButton = 4 - BackButton MouseButton = 8 - XButton1 MouseButton = 8 - ExtraButton1 MouseButton = 8 - ForwardButton MouseButton = 16 - XButton2 MouseButton = 16 - ExtraButton2 MouseButton = 16 - TaskButton MouseButton = 32 - ExtraButton3 MouseButton = 32 - ExtraButton4 MouseButton = 64 - ExtraButton5 MouseButton = 128 - ExtraButton6 MouseButton = 256 - ExtraButton7 MouseButton = 512 - ExtraButton8 MouseButton = 1024 - ExtraButton9 MouseButton = 2048 - ExtraButton10 MouseButton = 4096 - ExtraButton11 MouseButton = 8192 - ExtraButton12 MouseButton = 16384 - ExtraButton13 MouseButton = 32768 - ExtraButton14 MouseButton = 65536 - ExtraButton15 MouseButton = 131072 - ExtraButton16 MouseButton = 262144 - ExtraButton17 MouseButton = 524288 - ExtraButton18 MouseButton = 1048576 - ExtraButton19 MouseButton = 2097152 - ExtraButton20 MouseButton = 4194304 - ExtraButton21 MouseButton = 8388608 - ExtraButton22 MouseButton = 16777216 - ExtraButton23 MouseButton = 33554432 - ExtraButton24 MouseButton = 67108864 - AllButtons MouseButton = 134217727 - MaxMouseButton MouseButton = 67108864 - MouseButtonMask MouseButton = 4294967295 + NoButton MouseButton = 0 + LeftButton MouseButton = 1 + RightButton MouseButton = 2 + MiddleButton MouseButton = 4 + MidButton MouseButton = 4 + BackButton MouseButton = 8 + XButton1 MouseButton = 8 + ExtraButton1 MouseButton = 8 + ForwardButton MouseButton = 16 + XButton2 MouseButton = 16 + ExtraButton2 MouseButton = 16 + TaskButton MouseButton = 32 + ExtraButton3 MouseButton = 32 + ExtraButton4 MouseButton = 64 + ExtraButton5 MouseButton = 128 + ExtraButton6 MouseButton = 256 + ExtraButton7 MouseButton = 512 + ExtraButton8 MouseButton = 1024 + ExtraButton9 MouseButton = 2048 + ExtraButton10 MouseButton = 4096 + ExtraButton11 MouseButton = 8192 + ExtraButton12 MouseButton = 16384 + ExtraButton13 MouseButton = 32768 + ExtraButton14 MouseButton = 65536 + ExtraButton15 MouseButton = 131072 + ExtraButton16 MouseButton = 262144 + ExtraButton17 MouseButton = 524288 + ExtraButton18 MouseButton = 1048576 + ExtraButton19 MouseButton = 2097152 + ExtraButton20 MouseButton = 4194304 + ExtraButton21 MouseButton = 8388608 + ExtraButton22 MouseButton = 16777216 + ExtraButton23 MouseButton = 33554432 + ExtraButton24 MouseButton = 67108864 + AllButtons MouseButton = 134217727 + MaxMouseButton MouseButton = 67108864 ) type Orientation int @@ -255,7 +252,6 @@ const ( MacWindowToolBarButtonHint WindowType = 268435456 BypassGraphicsProxyWidget WindowType = 536870912 NoDropShadowWindowHint WindowType = 1073741824 - WindowFullscreenButtonHint WindowType = 2147483648 ) type WindowState int @@ -1305,9 +1301,7 @@ const ( ImEnterKeyType InputMethodQuery = 8192 ImAnchorRectangle InputMethodQuery = 16384 ImInputItemClipRectangle InputMethodQuery = 32768 - ImPlatformData InputMethodQuery = 2147483648 ImQueryInput InputMethodQuery = 16570 - ImQueryAll InputMethodQuery = 4294967295 ) type InputMethodHint int @@ -1335,7 +1329,6 @@ const ( ImhEmailCharactersOnly InputMethodHint = 2097152 ImhUrlCharactersOnly InputMethodHint = 4194304 ImhLatinOnly InputMethodHint = 8388608 - ImhExclusiveInputMask InputMethodHint = 4294901760 ) type EnterKeyType int @@ -1561,7 +1554,6 @@ const ( PinchGesture GestureType = 4 SwipeGesture GestureType = 5 CustomGesture GestureType = 256 - LastGestureType GestureType = 4294967295 ) type GestureFlag int diff --git a/qt/gen_qnamespace_64bit.go b/qt/gen_qnamespace_64bit.go new file mode 100644 index 00000000..11d461e8 --- /dev/null +++ b/qt/gen_qnamespace_64bit.go @@ -0,0 +1,14 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt + +const KeyboardModifierMask KeyboardModifier = 4261412864 +const MODIFIER_MASK Modifier = 4261412864 +const MouseButtonMask MouseButton = 4294967295 +const WindowFullscreenButtonHint WindowType = 2147483648 +const ImPlatformData InputMethodQuery = 2147483648 +const ImQueryAll InputMethodQuery = 4294967295 +const ImhExclusiveInputMask InputMethodHint = 4294901760 +const LastGestureType GestureType = 4294967295 + diff --git a/qt/gen_qpaintengine.go b/qt/gen_qpaintengine.go index d53d37f1..b0734eda 100644 --- a/qt/gen_qpaintengine.go +++ b/qt/gen_qpaintengine.go @@ -21,7 +21,6 @@ const ( QTextItem__Overline QTextItem__RenderFlag = 16 QTextItem__Underline QTextItem__RenderFlag = 32 QTextItem__StrikeOut QTextItem__RenderFlag = 64 - QTextItem__Dummy QTextItem__RenderFlag = 4294967295 ) type QPaintEngine__PaintEngineFeature int @@ -46,7 +45,6 @@ const ( QPaintEngine__ObjectBoundingModeGradients QPaintEngine__PaintEngineFeature = 65536 QPaintEngine__RasterOpModes QPaintEngine__PaintEngineFeature = 131072 QPaintEngine__PaintOutsidePaintEvent QPaintEngine__PaintEngineFeature = 536870912 - QPaintEngine__AllFeatures QPaintEngine__PaintEngineFeature = 4294967295 ) type QPaintEngine__DirtyFlag int diff --git a/qt/gen_qpaintengine_64bit.go b/qt/gen_qpaintengine_64bit.go new file mode 100644 index 00000000..b72296cc --- /dev/null +++ b/qt/gen_qpaintengine_64bit.go @@ -0,0 +1,8 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt + +const QTextItem__Dummy QTextItem__RenderFlag = 4294967295 +const QPaintEngine__AllFeatures QPaintEngine__PaintEngineFeature = 4294967295 + diff --git a/qt/gen_qstyle.go b/qt/gen_qstyle.go index 8704fb1e..65f3d507 100644 --- a/qt/gen_qstyle.go +++ b/qt/gen_qstyle.go @@ -156,7 +156,6 @@ const ( QStyle__CE_ColumnViewGrip QStyle__ControlElement = 44 QStyle__CE_ItemViewItem QStyle__ControlElement = 45 QStyle__CE_ShapedFrame QStyle__ControlElement = 46 - QStyle__CE_CustomBase QStyle__ControlElement = 4026531840 ) type QStyle__SubElement int @@ -222,7 +221,6 @@ const ( QStyle__SE_TabBarScrollRightButton QStyle__SubElement = 55 QStyle__SE_TabBarTearIndicatorRight QStyle__SubElement = 56 QStyle__SE_PushButtonBevel QStyle__SubElement = 57 - QStyle__SE_CustomBase QStyle__SubElement = 4026531840 ) type QStyle__ComplexControl int @@ -237,7 +235,6 @@ const ( QStyle__CC_Dial QStyle__ComplexControl = 6 QStyle__CC_GroupBox QStyle__ComplexControl = 7 QStyle__CC_MdiControls QStyle__ComplexControl = 8 - QStyle__CC_CustomBase QStyle__ComplexControl = 4026531840 ) type QStyle__SubControl int @@ -284,8 +281,6 @@ const ( QStyle__SC_MdiMinButton QStyle__SubControl = 1 QStyle__SC_MdiNormalButton QStyle__SubControl = 2 QStyle__SC_MdiCloseButton QStyle__SubControl = 4 - QStyle__SC_CustomBase QStyle__SubControl = 4026531840 - QStyle__SC_All QStyle__SubControl = 4294967295 ) type QStyle__PixelMetric int @@ -389,7 +384,6 @@ const ( QStyle__PM_HeaderDefaultSectionSizeVertical QStyle__PixelMetric = 93 QStyle__PM_TitleBarButtonIconSize QStyle__PixelMetric = 94 QStyle__PM_TitleBarButtonSize QStyle__PixelMetric = 95 - QStyle__PM_CustomBase QStyle__PixelMetric = 4026531840 ) type QStyle__ContentsType int @@ -418,7 +412,6 @@ const ( QStyle__CT_GroupBox QStyle__ContentsType = 20 QStyle__CT_MdiControls QStyle__ContentsType = 21 QStyle__CT_ItemViewItem QStyle__ContentsType = 22 - QStyle__CT_CustomBase QStyle__ContentsType = 4026531840 ) type QStyle__RequestSoftwareInputPanel int @@ -550,7 +543,6 @@ const ( QStyle__SH_ComboBox_AllowWheelScrolling QStyle__StyleHint = 115 QStyle__SH_SpinBox_ButtonsInsideFrame QStyle__StyleHint = 116 QStyle__SH_SpinBox_StepModifier QStyle__StyleHint = 117 - QStyle__SH_CustomBase QStyle__StyleHint = 4026531840 ) type QStyle__StandardPixmap int @@ -634,7 +626,6 @@ const ( QStyle__SP_DialogRetryButton QStyle__StandardPixmap = 75 QStyle__SP_DialogIgnoreButton QStyle__StandardPixmap = 76 QStyle__SP_RestoreDefaultsButton QStyle__StandardPixmap = 77 - QStyle__SP_CustomBase QStyle__StandardPixmap = 4026531840 ) type QStyle struct { diff --git a/qt/gen_qstyle_64bit.go b/qt/gen_qstyle_64bit.go new file mode 100644 index 00000000..f2a1e881 --- /dev/null +++ b/qt/gen_qstyle_64bit.go @@ -0,0 +1,15 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt + +const QStyle__CE_CustomBase QStyle__ControlElement = 4026531840 +const QStyle__SE_CustomBase QStyle__SubElement = 4026531840 +const QStyle__CC_CustomBase QStyle__ComplexControl = 4026531840 +const QStyle__SC_CustomBase QStyle__SubControl = 4026531840 +const QStyle__SC_All QStyle__SubControl = 4294967295 +const QStyle__PM_CustomBase QStyle__PixelMetric = 4026531840 +const QStyle__CT_CustomBase QStyle__ContentsType = 4026531840 +const QStyle__SH_CustomBase QStyle__StyleHint = 4026531840 +const QStyle__SP_CustomBase QStyle__StandardPixmap = 4026531840 + diff --git a/qt/gen_qtextcodec.go b/qt/gen_qtextcodec.go index 8272d202..9755f383 100644 --- a/qt/gen_qtextcodec.go +++ b/qt/gen_qtextcodec.go @@ -16,10 +16,9 @@ import ( type QTextCodec__ConversionFlag int const ( - QTextCodec__DefaultConversion QTextCodec__ConversionFlag = 0 - QTextCodec__ConvertInvalidToNull QTextCodec__ConversionFlag = 2147483648 - QTextCodec__IgnoreHeader QTextCodec__ConversionFlag = 1 - QTextCodec__FreeFunction QTextCodec__ConversionFlag = 2 + QTextCodec__DefaultConversion QTextCodec__ConversionFlag = 0 + QTextCodec__IgnoreHeader QTextCodec__ConversionFlag = 1 + QTextCodec__FreeFunction QTextCodec__ConversionFlag = 2 ) type QTextCodec struct { diff --git a/qt/gen_qtextcodec_64bit.go b/qt/gen_qtextcodec_64bit.go new file mode 100644 index 00000000..6c2c1b23 --- /dev/null +++ b/qt/gen_qtextcodec_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt + +const QTextCodec__ConvertInvalidToNull QTextCodec__ConversionFlag = 2147483648 + diff --git a/qt/gen_qtextedit.go b/qt/gen_qtextedit.go index a8268a2c..f7288687 100644 --- a/qt/gen_qtextedit.go +++ b/qt/gen_qtextedit.go @@ -28,7 +28,6 @@ type QTextEdit__AutoFormattingFlag int const ( QTextEdit__AutoNone QTextEdit__AutoFormattingFlag = 0 QTextEdit__AutoBulletList QTextEdit__AutoFormattingFlag = 1 - QTextEdit__AutoAll QTextEdit__AutoFormattingFlag = 4294967295 ) type QTextEdit struct { diff --git a/qt/gen_qtextedit_64bit.go b/qt/gen_qtextedit_64bit.go new file mode 100644 index 00000000..9b0e9d35 --- /dev/null +++ b/qt/gen_qtextedit_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt + +const QTextEdit__AutoAll QTextEdit__AutoFormattingFlag = 4294967295 + diff --git a/qt/gen_qtextoption.go b/qt/gen_qtextoption.go index a0ae401c..d676f48e 100644 --- a/qt/gen_qtextoption.go +++ b/qt/gen_qtextoption.go @@ -40,7 +40,6 @@ const ( QTextOption__AddSpaceForLineAndParagraphSeparators QTextOption__Flag = 4 QTextOption__SuppressColors QTextOption__Flag = 8 QTextOption__ShowDocumentTerminator QTextOption__Flag = 16 - QTextOption__IncludeTrailingSpaces QTextOption__Flag = 2147483648 ) type QTextOption struct { diff --git a/qt/gen_qtextoption_64bit.go b/qt/gen_qtextoption_64bit.go new file mode 100644 index 00000000..d5c79e3a --- /dev/null +++ b/qt/gen_qtextoption_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt + +const QTextOption__IncludeTrailingSpaces QTextOption__Flag = 2147483648 + diff --git a/qt/gen_qvariant.go b/qt/gen_qvariant.go index bc656f02..ad5306a6 100644 --- a/qt/gen_qvariant.go +++ b/qt/gen_qvariant.go @@ -77,7 +77,6 @@ const ( QVariant__LastGuiType QVariant__Type = 87 QVariant__SizePolicy QVariant__Type = 121 QVariant__UserType QVariant__Type = 1024 - QVariant__LastType QVariant__Type = 4294967295 ) type QVariant struct { diff --git a/qt/gen_qvariant_64bit.go b/qt/gen_qvariant_64bit.go new file mode 100644 index 00000000..ed0f0bb6 --- /dev/null +++ b/qt/gen_qvariant_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt + +const QVariant__LastType QVariant__Type = 4294967295 + diff --git a/qt/script/gen_qscriptvalue.go b/qt/script/gen_qscriptvalue.go index 770e071f..f891e706 100644 --- a/qt/script/gen_qscriptvalue.go +++ b/qt/script/gen_qscriptvalue.go @@ -33,7 +33,6 @@ const ( QScriptValue__PropertySetter QScriptValue__PropertyFlag = 16 QScriptValue__QObjectMember QScriptValue__PropertyFlag = 32 QScriptValue__KeepExistingFlags QScriptValue__PropertyFlag = 2048 - QScriptValue__UserRange QScriptValue__PropertyFlag = 4278190080 ) type QScriptValue__SpecialValue int diff --git a/qt/script/gen_qscriptvalue_64bit.go b/qt/script/gen_qscriptvalue_64bit.go new file mode 100644 index 00000000..a0dfa088 --- /dev/null +++ b/qt/script/gen_qscriptvalue_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package script + +const QScriptValue__UserRange QScriptValue__PropertyFlag = 4278190080 + diff --git a/qt6/gen_qaccessible_base.go b/qt6/gen_qaccessible_base.go index 3af55afc..2baa26da 100644 --- a/qt6/gen_qaccessible_base.go +++ b/qt6/gen_qaccessible_base.go @@ -184,11 +184,10 @@ const ( type QAccessible__RelationFlag int const ( - QAccessible__Label QAccessible__RelationFlag = 1 - QAccessible__Labelled QAccessible__RelationFlag = 2 - QAccessible__Controller QAccessible__RelationFlag = 4 - QAccessible__Controlled QAccessible__RelationFlag = 8 - QAccessible__AllRelations QAccessible__RelationFlag = 4294967295 + QAccessible__Label QAccessible__RelationFlag = 1 + QAccessible__Labelled QAccessible__RelationFlag = 2 + QAccessible__Controller QAccessible__RelationFlag = 4 + QAccessible__Controlled QAccessible__RelationFlag = 8 ) type QAccessible__InterfaceType int diff --git a/qt6/gen_qaccessible_base_64bit.go b/qt6/gen_qaccessible_base_64bit.go new file mode 100644 index 00000000..8dfaec77 --- /dev/null +++ b/qt6/gen_qaccessible_base_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt6 + +const QAccessible__AllRelations QAccessible__RelationFlag = 4294967295 + diff --git a/qt6/gen_qgraphicsitem.go b/qt6/gen_qgraphicsitem.go index 88b34896..eecb382d 100644 --- a/qt6/gen_qgraphicsitem.go +++ b/qt6/gen_qgraphicsitem.go @@ -102,10 +102,6 @@ const ( type QGraphicsItem__Extension int -const ( - QGraphicsItem__UserExtension QGraphicsItem__Extension = 2147483648 -) - type QGraphicsPathItem__ int const ( diff --git a/qt6/gen_qgraphicsitem_64bit.go b/qt6/gen_qgraphicsitem_64bit.go new file mode 100644 index 00000000..e3cf1137 --- /dev/null +++ b/qt6/gen_qgraphicsitem_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt6 + +const QGraphicsItem__UserExtension QGraphicsItem__Extension = 2147483648 + diff --git a/qt6/gen_qnamespace.go b/qt6/gen_qnamespace.go index 7e1c528d..a179741a 100644 --- a/qt6/gen_qnamespace.go +++ b/qt6/gen_qnamespace.go @@ -41,42 +41,41 @@ const ( type MouseButton int const ( - NoButton MouseButton = 0 - LeftButton MouseButton = 1 - RightButton MouseButton = 2 - MiddleButton MouseButton = 4 - BackButton MouseButton = 8 - XButton1 MouseButton = 8 - ExtraButton1 MouseButton = 8 - ForwardButton MouseButton = 16 - XButton2 MouseButton = 16 - ExtraButton2 MouseButton = 16 - TaskButton MouseButton = 32 - ExtraButton3 MouseButton = 32 - ExtraButton4 MouseButton = 64 - ExtraButton5 MouseButton = 128 - ExtraButton6 MouseButton = 256 - ExtraButton7 MouseButton = 512 - ExtraButton8 MouseButton = 1024 - ExtraButton9 MouseButton = 2048 - ExtraButton10 MouseButton = 4096 - ExtraButton11 MouseButton = 8192 - ExtraButton12 MouseButton = 16384 - ExtraButton13 MouseButton = 32768 - ExtraButton14 MouseButton = 65536 - ExtraButton15 MouseButton = 131072 - ExtraButton16 MouseButton = 262144 - ExtraButton17 MouseButton = 524288 - ExtraButton18 MouseButton = 1048576 - ExtraButton19 MouseButton = 2097152 - ExtraButton20 MouseButton = 4194304 - ExtraButton21 MouseButton = 8388608 - ExtraButton22 MouseButton = 16777216 - ExtraButton23 MouseButton = 33554432 - ExtraButton24 MouseButton = 67108864 - AllButtons MouseButton = 134217727 - MaxMouseButton MouseButton = 67108864 - MouseButtonMask MouseButton = 4294967295 + NoButton MouseButton = 0 + LeftButton MouseButton = 1 + RightButton MouseButton = 2 + MiddleButton MouseButton = 4 + BackButton MouseButton = 8 + XButton1 MouseButton = 8 + ExtraButton1 MouseButton = 8 + ForwardButton MouseButton = 16 + XButton2 MouseButton = 16 + ExtraButton2 MouseButton = 16 + TaskButton MouseButton = 32 + ExtraButton3 MouseButton = 32 + ExtraButton4 MouseButton = 64 + ExtraButton5 MouseButton = 128 + ExtraButton6 MouseButton = 256 + ExtraButton7 MouseButton = 512 + ExtraButton8 MouseButton = 1024 + ExtraButton9 MouseButton = 2048 + ExtraButton10 MouseButton = 4096 + ExtraButton11 MouseButton = 8192 + ExtraButton12 MouseButton = 16384 + ExtraButton13 MouseButton = 32768 + ExtraButton14 MouseButton = 65536 + ExtraButton15 MouseButton = 131072 + ExtraButton16 MouseButton = 262144 + ExtraButton17 MouseButton = 524288 + ExtraButton18 MouseButton = 1048576 + ExtraButton19 MouseButton = 2097152 + ExtraButton20 MouseButton = 4194304 + ExtraButton21 MouseButton = 8388608 + ExtraButton22 MouseButton = 16777216 + ExtraButton23 MouseButton = 33554432 + ExtraButton24 MouseButton = 67108864 + AllButtons MouseButton = 134217727 + MaxMouseButton MouseButton = 67108864 ) type Orientation int @@ -229,7 +228,6 @@ const ( MacWindowToolBarButtonHint WindowType = 268435456 BypassGraphicsProxyWidget WindowType = 536870912 NoDropShadowWindowHint WindowType = 1073741824 - WindowFullscreenButtonHint WindowType = 2147483648 ) type WindowState int @@ -911,24 +909,22 @@ const ( type KeyboardModifier int const ( - NoModifier KeyboardModifier = 0 - ShiftModifier KeyboardModifier = 33554432 - ControlModifier KeyboardModifier = 67108864 - AltModifier KeyboardModifier = 134217728 - MetaModifier KeyboardModifier = 268435456 - KeypadModifier KeyboardModifier = 536870912 - GroupSwitchModifier KeyboardModifier = 1073741824 - KeyboardModifierMask KeyboardModifier = 4261412864 + NoModifier KeyboardModifier = 0 + ShiftModifier KeyboardModifier = 33554432 + ControlModifier KeyboardModifier = 67108864 + AltModifier KeyboardModifier = 134217728 + MetaModifier KeyboardModifier = 268435456 + KeypadModifier KeyboardModifier = 536870912 + GroupSwitchModifier KeyboardModifier = 1073741824 ) type Modifier int const ( - META Modifier = 268435456 - SHIFT Modifier = 33554432 - CTRL Modifier = 67108864 - ALT Modifier = 134217728 - MODIFIER_MASK Modifier = 4261412864 + META Modifier = 268435456 + SHIFT Modifier = 33554432 + CTRL Modifier = 67108864 + ALT Modifier = 134217728 ) type ArrowType int @@ -1279,9 +1275,7 @@ const ( ImAnchorRectangle InputMethodQuery = 16384 ImInputItemClipRectangle InputMethodQuery = 32768 ImReadOnly InputMethodQuery = 65536 - ImPlatformData InputMethodQuery = 2147483648 ImQueryInput InputMethodQuery = 16570 - ImQueryAll InputMethodQuery = 4294967295 ) type InputMethodHint int @@ -1309,7 +1303,6 @@ const ( ImhEmailCharactersOnly InputMethodHint = 2097152 ImhUrlCharactersOnly InputMethodHint = 4194304 ImhLatinOnly InputMethodHint = 8388608 - ImhExclusiveInputMask InputMethodHint = 4294901760 ) type EnterKeyType int @@ -1533,7 +1526,6 @@ const ( PinchGesture GestureType = 4 SwipeGesture GestureType = 5 CustomGesture GestureType = 256 - LastGestureType GestureType = 4294967295 ) type GestureFlag int diff --git a/qt6/gen_qnamespace_64bit.go b/qt6/gen_qnamespace_64bit.go new file mode 100644 index 00000000..b287e76a --- /dev/null +++ b/qt6/gen_qnamespace_64bit.go @@ -0,0 +1,14 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt6 + +const MouseButtonMask MouseButton = 4294967295 +const WindowFullscreenButtonHint WindowType = 2147483648 +const KeyboardModifierMask KeyboardModifier = 4261412864 +const MODIFIER_MASK Modifier = 4261412864 +const ImPlatformData InputMethodQuery = 2147483648 +const ImQueryAll InputMethodQuery = 4294967295 +const ImhExclusiveInputMask InputMethodHint = 4294901760 +const LastGestureType GestureType = 4294967295 + diff --git a/qt6/gen_qpaintengine.go b/qt6/gen_qpaintengine.go index cfb9d694..0d4e171d 100644 --- a/qt6/gen_qpaintengine.go +++ b/qt6/gen_qpaintengine.go @@ -21,7 +21,6 @@ const ( QTextItem__Overline QTextItem__RenderFlag = 16 QTextItem__Underline QTextItem__RenderFlag = 32 QTextItem__StrikeOut QTextItem__RenderFlag = 64 - QTextItem__Dummy QTextItem__RenderFlag = 4294967295 ) type QPaintEngine__PaintEngineFeature int @@ -46,7 +45,6 @@ const ( QPaintEngine__ObjectBoundingModeGradients QPaintEngine__PaintEngineFeature = 65536 QPaintEngine__RasterOpModes QPaintEngine__PaintEngineFeature = 131072 QPaintEngine__PaintOutsidePaintEvent QPaintEngine__PaintEngineFeature = 536870912 - QPaintEngine__AllFeatures QPaintEngine__PaintEngineFeature = 4294967295 ) type QPaintEngine__DirtyFlag int diff --git a/qt6/gen_qpaintengine_64bit.go b/qt6/gen_qpaintengine_64bit.go new file mode 100644 index 00000000..7d0231e9 --- /dev/null +++ b/qt6/gen_qpaintengine_64bit.go @@ -0,0 +1,8 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt6 + +const QTextItem__Dummy QTextItem__RenderFlag = 4294967295 +const QPaintEngine__AllFeatures QPaintEngine__PaintEngineFeature = 4294967295 + diff --git a/qt6/gen_qstyle.go b/qt6/gen_qstyle.go index 95461fc3..39ae7801 100644 --- a/qt6/gen_qstyle.go +++ b/qt6/gen_qstyle.go @@ -154,7 +154,6 @@ const ( QStyle__CE_ColumnViewGrip QStyle__ControlElement = 44 QStyle__CE_ItemViewItem QStyle__ControlElement = 45 QStyle__CE_ShapedFrame QStyle__ControlElement = 46 - QStyle__CE_CustomBase QStyle__ControlElement = 4026531840 ) type QStyle__SubElement int @@ -218,7 +217,6 @@ const ( QStyle__SE_TabBarScrollRightButton QStyle__SubElement = 54 QStyle__SE_TabBarTearIndicatorRight QStyle__SubElement = 55 QStyle__SE_PushButtonBevel QStyle__SubElement = 56 - QStyle__SE_CustomBase QStyle__SubElement = 4026531840 ) type QStyle__ComplexControl int @@ -233,7 +231,6 @@ const ( QStyle__CC_Dial QStyle__ComplexControl = 6 QStyle__CC_GroupBox QStyle__ComplexControl = 7 QStyle__CC_MdiControls QStyle__ComplexControl = 8 - QStyle__CC_CustomBase QStyle__ComplexControl = 4026531840 ) type QStyle__SubControl int @@ -280,8 +277,6 @@ const ( QStyle__SC_MdiMinButton QStyle__SubControl = 1 QStyle__SC_MdiNormalButton QStyle__SubControl = 2 QStyle__SC_MdiCloseButton QStyle__SubControl = 4 - QStyle__SC_CustomBase QStyle__SubControl = 4026531840 - QStyle__SC_All QStyle__SubControl = 4294967295 ) type QStyle__PixelMetric int @@ -382,7 +377,6 @@ const ( QStyle__PM_TitleBarButtonSize QStyle__PixelMetric = 92 QStyle__PM_LineEditIconSize QStyle__PixelMetric = 93 QStyle__PM_LineEditIconMargin QStyle__PixelMetric = 94 - QStyle__PM_CustomBase QStyle__PixelMetric = 4026531840 ) type QStyle__ContentsType int @@ -411,7 +405,6 @@ const ( QStyle__CT_GroupBox QStyle__ContentsType = 20 QStyle__CT_MdiControls QStyle__ContentsType = 21 QStyle__CT_ItemViewItem QStyle__ContentsType = 22 - QStyle__CT_CustomBase QStyle__ContentsType = 4026531840 ) type QStyle__RequestSoftwareInputPanel int @@ -544,7 +537,6 @@ const ( QStyle__SH_TabBar_AllowWheelScrolling QStyle__StyleHint = 117 QStyle__SH_Table_AlwaysDrawLeftTopGridLines QStyle__StyleHint = 118 QStyle__SH_SpinBox_SelectOnStep QStyle__StyleHint = 119 - QStyle__SH_CustomBase QStyle__StyleHint = 4026531840 ) type QStyle__StandardPixmap int @@ -630,7 +622,6 @@ const ( QStyle__SP_RestoreDefaultsButton QStyle__StandardPixmap = 77 QStyle__SP_TabCloseButton QStyle__StandardPixmap = 78 QStyle__NStandardPixmap QStyle__StandardPixmap = 79 - QStyle__SP_CustomBase QStyle__StandardPixmap = 4026531840 ) type QStyle struct { diff --git a/qt6/gen_qstyle_64bit.go b/qt6/gen_qstyle_64bit.go new file mode 100644 index 00000000..b001fe69 --- /dev/null +++ b/qt6/gen_qstyle_64bit.go @@ -0,0 +1,15 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt6 + +const QStyle__CE_CustomBase QStyle__ControlElement = 4026531840 +const QStyle__SE_CustomBase QStyle__SubElement = 4026531840 +const QStyle__CC_CustomBase QStyle__ComplexControl = 4026531840 +const QStyle__SC_CustomBase QStyle__SubControl = 4026531840 +const QStyle__SC_All QStyle__SubControl = 4294967295 +const QStyle__PM_CustomBase QStyle__PixelMetric = 4026531840 +const QStyle__CT_CustomBase QStyle__ContentsType = 4026531840 +const QStyle__SH_CustomBase QStyle__StyleHint = 4026531840 +const QStyle__SP_CustomBase QStyle__StandardPixmap = 4026531840 + diff --git a/qt6/gen_qtextedit.go b/qt6/gen_qtextedit.go index 90c46732..86f45e91 100644 --- a/qt6/gen_qtextedit.go +++ b/qt6/gen_qtextedit.go @@ -28,7 +28,6 @@ type QTextEdit__AutoFormattingFlag int const ( QTextEdit__AutoNone QTextEdit__AutoFormattingFlag = 0 QTextEdit__AutoBulletList QTextEdit__AutoFormattingFlag = 1 - QTextEdit__AutoAll QTextEdit__AutoFormattingFlag = 4294967295 ) type QTextEdit struct { diff --git a/qt6/gen_qtextedit_64bit.go b/qt6/gen_qtextedit_64bit.go new file mode 100644 index 00000000..3931ff20 --- /dev/null +++ b/qt6/gen_qtextedit_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt6 + +const QTextEdit__AutoAll QTextEdit__AutoFormattingFlag = 4294967295 + diff --git a/qt6/gen_qtextoption.go b/qt6/gen_qtextoption.go index e64f9210..140ada32 100644 --- a/qt6/gen_qtextoption.go +++ b/qt6/gen_qtextoption.go @@ -40,7 +40,6 @@ const ( QTextOption__AddSpaceForLineAndParagraphSeparators QTextOption__Flag = 4 QTextOption__SuppressColors QTextOption__Flag = 8 QTextOption__ShowDocumentTerminator QTextOption__Flag = 16 - QTextOption__IncludeTrailingSpaces QTextOption__Flag = 2147483648 ) type QTextOption struct { diff --git a/qt6/gen_qtextoption_64bit.go b/qt6/gen_qtextoption_64bit.go new file mode 100644 index 00000000..20c3b942 --- /dev/null +++ b/qt6/gen_qtextoption_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt6 + +const QTextOption__IncludeTrailingSpaces QTextOption__Flag = 2147483648 + diff --git a/qt6/gen_qvariant.go b/qt6/gen_qvariant.go index 6bec3e92..c6ddcbaf 100644 --- a/qt6/gen_qvariant.go +++ b/qt6/gen_qvariant.go @@ -75,7 +75,6 @@ const ( QVariant__LastGuiType QVariant__Type = 4119 QVariant__SizePolicy QVariant__Type = 8192 QVariant__UserType QVariant__Type = 65536 - QVariant__LastType QVariant__Type = 4294967295 ) type QVariant struct { diff --git a/qt6/gen_qvariant_64bit.go b/qt6/gen_qvariant_64bit.go new file mode 100644 index 00000000..5153f00c --- /dev/null +++ b/qt6/gen_qvariant_64bit.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm +// +build !386,!arm + +package qt6 + +const QVariant__LastType QVariant__Type = 4294967295 + From 185246e902dd4230d9c63df61a64069fdda0a398 Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 30 Dec 2024 18:42:35 +1300 Subject: [PATCH 3/4] docker: add 32-bit mingw docker containers --- ...n32-cross-go1.23-qt5.15-dynamic.Dockerfile | 22 +++++++++++++++++++ ...in32-cross-go1.23-qt5.15-static.Dockerfile | 22 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 docker/win32-cross-go1.23-qt5.15-dynamic.Dockerfile create mode 100644 docker/win32-cross-go1.23-qt5.15-static.Dockerfile diff --git a/docker/win32-cross-go1.23-qt5.15-dynamic.Dockerfile b/docker/win32-cross-go1.23-qt5.15-dynamic.Dockerfile new file mode 100644 index 00000000..44ecbb73 --- /dev/null +++ b/docker/win32-cross-go1.23-qt5.15-dynamic.Dockerfile @@ -0,0 +1,22 @@ +FROM golang:1.23-bookworm + +RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ + apt-get install -qyy gnupg2 ca-certificates && \ + apt-get clean + +RUN DEBIAN_FRONTEND=noninteractive \ + echo "deb https://pkg.mxe.cc/repos/apt buster main" >/etc/apt/sources.list.d/mxeapt.list && \ + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 86B72ED9 && \ + apt-get update && \ + apt-get install -qyy mxe-i686-w64-mingw32.shared-qt5 && \ + apt-get clean + +ENV PATH=/usr/lib/mxe/usr/bin:$PATH + +ENV CXX=i686-w64-mingw32.shared-g++ +ENV CC=i686-w64-mingw32.shared-gcc +ENV PKG_CONFIG=i686-w64-mingw32.shared-pkg-config +ENV GOOS=windows +ENV GOARCH=386 +ENV CGO_ENABLED=1 +ENV GOFLAGS=-buildvcs=false diff --git a/docker/win32-cross-go1.23-qt5.15-static.Dockerfile b/docker/win32-cross-go1.23-qt5.15-static.Dockerfile new file mode 100644 index 00000000..f8e9490c --- /dev/null +++ b/docker/win32-cross-go1.23-qt5.15-static.Dockerfile @@ -0,0 +1,22 @@ +FROM golang:1.23-bookworm + +RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ + apt-get install -qyy gnupg2 ca-certificates && \ + apt-get clean + +RUN DEBIAN_FRONTEND=noninteractive \ + echo "deb https://pkg.mxe.cc/repos/apt buster main" >/etc/apt/sources.list.d/mxeapt.list && \ + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 86B72ED9 && \ + apt-get update && \ + apt-get install -qyy mxe-i686-w64-mingw32.static-qt5 && \ + apt-get clean + +ENV PATH=/usr/lib/mxe/usr/bin:$PATH + +ENV CXX=i686-w64-mingw32.static-g++ +ENV CC=i686-w64-mingw32.static-gcc +ENV PKG_CONFIG=i686-w64-mingw32.static-pkg-config +ENV GOOS=windows +ENV GOARCH=386 +ENV CGO_ENABLED=1 +ENV GOFLAGS=-buildvcs=false From 6036380daabeeee9460c3002849894090b9b0aed Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 31 Dec 2024 16:49:18 +1300 Subject: [PATCH 4/4] cflags/windowsqtstatic: update for new 32-bit containers --- qt/cflags_windowsqtstatic.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt/cflags_windowsqtstatic.go b/qt/cflags_windowsqtstatic.go index 33052722..2a06231a 100644 --- a/qt/cflags_windowsqtstatic.go +++ b/qt/cflags_windowsqtstatic.go @@ -12,6 +12,7 @@ package qt /* #cgo windowsqtstatic CXXFLAGS: -DMIQT_WINDOWSQTSTATIC -#cgo LDFLAGS: -L/usr/lib/mxe/usr/x86_64-w64-mingw32.static/qt5/plugins/platforms -lqwindows -lQt5FontDatabaseSupport -lQt5EventDispatcherSupport -lQt5ThemeSupport -lQt5PlatformCompositorSupport -lQt5AccessibilitySupport -lQt5WindowsUIAutomationSupport -lwtsapi32 -L/usr/lib/mxe/usr/x86_64-w64-mingw32.static/qt5/plugins/styles -lqwindowsvistastyle -luxtheme +#cgo amd64 LDFLAGS: -L/usr/lib/mxe/usr/x86_64-w64-mingw32.static/qt5/plugins/platforms -lqwindows -lQt5FontDatabaseSupport -lQt5EventDispatcherSupport -lQt5ThemeSupport -lQt5PlatformCompositorSupport -lQt5AccessibilitySupport -lQt5WindowsUIAutomationSupport -lwtsapi32 -L/usr/lib/mxe/usr/x86_64-w64-mingw32.static/qt5/plugins/styles -lqwindowsvistastyle -luxtheme +#cgo 386 LDFLAGS: -L/usr/lib/mxe/usr/i686-w64-mingw32.static/qt5/plugins/platforms -lqwindows -lQt5FontDatabaseSupport -lQt5EventDispatcherSupport -lQt5ThemeSupport -lQt5PlatformCompositorSupport -lQt5AccessibilitySupport -lQt5WindowsUIAutomationSupport -lwtsapi32 -L/usr/lib/mxe/usr/i686-w64-mingw32.static/qt5/plugins/styles -lqwindowsvistastyle -luxtheme */ import "C"