]> sigrok.org Git - sigrok-build.git/commitdiff
Move MXE CI scripts and contrib files
authorFrank Stettner <redacted>
Thu, 30 Mar 2023 17:51:02 +0000 (19:51 +0200)
committerFrank Stettner <redacted>
Thu, 30 Mar 2023 17:51:02 +0000 (19:51 +0200)
21 files changed:
.github/workflows/build.yml
ci/contrib-mxe/FileAssociation.nsh [deleted file]
ci/contrib-mxe/Python34_i686.tar.gz [deleted file]
ci/contrib-mxe/Python34_x86_64.tar.gz [deleted file]
ci/contrib-mxe/pyconfig.patch [deleted file]
ci/contrib-mxe/python34_i686.dll [deleted file]
ci/contrib-mxe/python34_i686.zip [deleted file]
ci/contrib-mxe/python34_x86_64.dll [deleted file]
ci/contrib-mxe/python34_x86_64.zip [deleted file]
ci/mxe/contrib-mxe/FileAssociation.nsh [new file with mode: 0644]
ci/mxe/contrib-mxe/Python34_i686.tar.gz [new file with mode: 0644]
ci/mxe/contrib-mxe/Python34_x86_64.tar.gz [new file with mode: 0644]
ci/mxe/contrib-mxe/pyconfig.patch [new file with mode: 0644]
ci/mxe/contrib-mxe/python34_i686.dll [new file with mode: 0644]
ci/mxe/contrib-mxe/python34_i686.zip [new file with mode: 0644]
ci/mxe/contrib-mxe/python34_x86_64.dll [new file with mode: 0644]
ci/mxe/contrib-mxe/python34_x86_64.zip [new file with mode: 0644]
ci/mxe/sigrok-mxe-build-dependencies.sh [new file with mode: 0755]
ci/mxe/sigrok-mxe-init-toolchain.sh [new file with mode: 0755]
ci/sigrok-mxe-build-dependencies.sh [deleted file]
ci/sigrok-mxe-init-toolchain.sh [deleted file]

index a32418715f1fbea6555eb8a6dfbc6b3581e07294..264fb02ab96614fc62e21aaed406bd5766682a46 100644 (file)
@@ -60,7 +60,7 @@ jobs:
 
       - name: Build dependencies
         run: |
-          cd sigrok-build/ci
+          cd sigrok-build/ci/mxe
           source sigrok-mxe-init-toolchain.sh
           ./sigrok-mxe-build-dependencies.sh
 
@@ -73,7 +73,7 @@ jobs:
 
       - name: Build PulseView
         run: |
-          source sigrok-build/ci/sigrok-mxe-init-toolchain.sh
+          source sigrok-build/ci/mxe/sigrok-mxe-init-toolchain.sh
           mkdir -p pulseview/build
           cd pulseview/build
           $CMAKE \
@@ -87,13 +87,13 @@ jobs:
 
       - name: Build NSIS installer
         run: |
-          source sigrok-build/ci/sigrok-mxe-init-toolchain.sh
+          source sigrok-build/ci/mxe/sigrok-mxe-init-toolchain.sh
 
           # Zadig (we ship this with frontends for easy driver switching).
           $WGET https://github.com/pbatard/libwdi/releases/download/b721/zadig-2.4.exe -O $INSTALL_DIR/zadig.exe
           $WGET https://github.com/pbatard/libwdi/releases/download/v1.2.5/zadig_xp-2.2.exe -O $INSTALL_DIR/zadig_xp.exe
 
-          cp sigrok-build/ci/contrib-mxe/FileAssociation.nsh pulseview/build/contrib
+          cp sigrok-build/ci/mxe/contrib-mxe/FileAssociation.nsh pulseview/build/contrib
           makensis ${{ matrix.target.nsis_param }} pulseview/build/contrib/pulseview_cross.nsi
 
       - name: Rename artifact
@@ -135,7 +135,7 @@ jobs:
 
       - name: Build dependencies
         run: |
-          cd sigrok-build/ci
+          cd sigrok-build/ci/mxe
           source sigrok-mxe-init-toolchain.sh
           ./sigrok-mxe-build-dependencies.sh
 
@@ -147,7 +147,7 @@ jobs:
 
       - name: Build sigrok-cli
         run: |
-          source sigrok-build/ci/sigrok-mxe-init-toolchain.sh
+          source sigrok-build/ci/mxe/sigrok-mxe-init-toolchain.sh
           cd sigrok-cli
           ./autogen.sh
           ./configure $C
@@ -156,13 +156,13 @@ jobs:
 
       - name: Build NSIS installer
         run: |
-          source sigrok-build/ci/sigrok-mxe-init-toolchain.sh
+          source sigrok-build/ci/mxe/sigrok-mxe-init-toolchain.sh
 
           # Zadig (we ship this with frontends for easy driver switching).
           $WGET https://github.com/pbatard/libwdi/releases/download/b721/zadig-2.4.exe -O $INSTALL_DIR/zadig.exe
           $WGET https://github.com/pbatard/libwdi/releases/download/v1.2.5/zadig_xp-2.2.exe -O $INSTALL_DIR/zadig_xp.exe
 
-          cp sigrok-build/ci/contrib-mxe/FileAssociation.nsh sigrok-cli/contrib
+          cp sigrok-build/ci/mxe/contrib-mxe/FileAssociation.nsh sigrok-cli/contrib
           makensis ${{ matrix.target.nsis_param }} sigrok-cli/contrib/sigrok-cli_cross.nsi
 
       - name: Rename artifact
diff --git a/ci/contrib-mxe/FileAssociation.nsh b/ci/contrib-mxe/FileAssociation.nsh
deleted file mode 100644 (file)
index f824516..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
-_____________________________________________________________________________
-
-                       File Association
-_____________________________________________________________________________
-
- Based on code taken from http://nsis.sourceforge.net/File_Association 
-
- Usage in script:
- 1. !include "FileAssociation.nsh"
- 2. [Section|Function]
-      ${FileAssociationFunction} "Param1" "Param2" "..." $var
-    [SectionEnd|FunctionEnd]
-
- FileAssociationFunction=[RegisterExtension|UnRegisterExtension]
-
-_____________________________________________________________________________
-
- ${RegisterExtension} "[executable]" "[extension]" "[description]"
-
-"[executable]"     ; executable which opens the file format
-                   ;
-"[extension]"      ; extension, which represents the file format to open
-                   ;
-"[description]"    ; description for the extension. This will be display in Windows Explorer.
-                   ;
-
-
- ${UnRegisterExtension} "[extension]" "[description]"
-
-"[extension]"      ; extension, which represents the file format to open
-                   ;
-"[description]"    ; description for the extension. This will be display in Windows Explorer.
-                   ;
-
-_____________________________________________________________________________
-
-                         Macros
-_____________________________________________________________________________
-
- Change log window verbosity (default: 3=no script)
-
- Example:
- !include "FileAssociation.nsh"
- !insertmacro RegisterExtension
- ${FileAssociation_VERBOSE} 4   # all verbosity
- !insertmacro UnRegisterExtension
- ${FileAssociation_VERBOSE} 3   # no script
-*/
-
-
-!ifndef FileAssociation_INCLUDED
-!define FileAssociation_INCLUDED
-
-!include Util.nsh
-
-!verbose push
-!verbose 3
-!ifndef _FileAssociation_VERBOSE
-  !define _FileAssociation_VERBOSE 3
-!endif
-!verbose ${_FileAssociation_VERBOSE}
-!define FileAssociation_VERBOSE `!insertmacro FileAssociation_VERBOSE`
-!verbose pop
-
-!macro FileAssociation_VERBOSE _VERBOSE
-  !verbose push
-  !verbose 3
-  !undef _FileAssociation_VERBOSE
-  !define _FileAssociation_VERBOSE ${_VERBOSE}
-  !verbose pop
-!macroend
-
-
-
-!macro RegisterExtensionCall _EXECUTABLE _EXTENSION _DESCRIPTION
-  !verbose push
-  !verbose ${_FileAssociation_VERBOSE}
-  Push `${_DESCRIPTION}`
-  Push `${_EXTENSION}`
-  Push `${_EXECUTABLE}`
-  ${CallArtificialFunction} RegisterExtension_
-  !verbose pop
-!macroend
-
-!macro UnRegisterExtensionCall _EXTENSION _DESCRIPTION
-  !verbose push
-  !verbose ${_FileAssociation_VERBOSE}
-  Push `${_EXTENSION}`
-  Push `${_DESCRIPTION}`
-  ${CallArtificialFunction} UnRegisterExtension_
-  !verbose pop
-!macroend
-
-
-
-!define RegisterExtension `!insertmacro RegisterExtensionCall`
-!define un.RegisterExtension `!insertmacro RegisterExtensionCall`
-
-!macro RegisterExtension
-!macroend
-
-!macro un.RegisterExtension
-!macroend
-
-!macro RegisterExtension_
-  !verbose push
-  !verbose ${_FileAssociation_VERBOSE}
-
-  Exch $R2 ;exe
-  Exch
-  Exch $R1 ;ext
-  Exch
-  Exch 2
-  Exch $R0 ;desc
-  Exch 2
-  Push $0
-  Push $1
-
-  ReadRegStr $1 HKCR $R1 ""  ; read current file association
-  StrCmp "$1" "" NoBackup  ; is it empty
-  StrCmp "$1" "$R0" NoBackup  ; is it our own
-    WriteRegStr HKCR $R1 "backup_val" "$1"  ; backup current value
-NoBackup:
-  WriteRegStr HKCR $R1 "" "$R0"  ; set our file association
-
-  ReadRegStr $0 HKCR $R0 ""
-  StrCmp $0 "" 0 Skip
-    WriteRegStr HKCR "$R0" "" "$R0"
-    WriteRegStr HKCR "$R0\shell" "" "open"
-    WriteRegStr HKCR "$R0\DefaultIcon" "" "$R2,0"
-Skip:
-  WriteRegStr HKCR "$R0\shell\open\command" "" '"$R2" "%1"'
-  WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0"
-  WriteRegStr HKCR "$R0\shell\edit\command" "" '"$R2" "%1"'
-
-  Pop $1
-  Pop $0
-  Pop $R2
-  Pop $R1
-  Pop $R0
-
-  !verbose pop
-!macroend
-
-
-
-!define UnRegisterExtension `!insertmacro UnRegisterExtensionCall`
-!define un.UnRegisterExtension `!insertmacro UnRegisterExtensionCall`
-
-!macro UnRegisterExtension
-!macroend
-
-!macro un.UnRegisterExtension
-!macroend
-
-!macro UnRegisterExtension_
-  !verbose push
-  !verbose ${_FileAssociation_VERBOSE}
-
-  Exch $R1 ;desc
-  Exch
-  Exch $R0 ;ext
-  Exch
-  Push $0
-  Push $1
-
-  ReadRegStr $1 HKCR $R0 ""
-  StrCmp $1 $R1 0 NoOwn ; only do this if we own it
-  ReadRegStr $1 HKCR $R0 "backup_val"
-  StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key
-  DeleteRegKey HKCR $R0
-  Goto NoOwn
-
-Restore:
-  WriteRegStr HKCR $R0 "" $1
-  DeleteRegValue HKCR $R0 "backup_val"
-  DeleteRegKey HKCR $R1 ;Delete key with association name settings
-
-NoOwn:
-
-  Pop $1
-  Pop $0
-  Pop $R1
-  Pop $R0
-
-  !verbose pop
-!macroend
-
-!endif # !FileAssociation_INCLUDED
diff --git a/ci/contrib-mxe/Python34_i686.tar.gz b/ci/contrib-mxe/Python34_i686.tar.gz
deleted file mode 100644 (file)
index 7008b90..0000000
Binary files a/ci/contrib-mxe/Python34_i686.tar.gz and /dev/null differ
diff --git a/ci/contrib-mxe/Python34_x86_64.tar.gz b/ci/contrib-mxe/Python34_x86_64.tar.gz
deleted file mode 100644 (file)
index 12b7de2..0000000
Binary files a/ci/contrib-mxe/Python34_x86_64.tar.gz and /dev/null differ
diff --git a/ci/contrib-mxe/pyconfig.patch b/ci/contrib-mxe/pyconfig.patch
deleted file mode 100644 (file)
index a5ffb1c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-Fix for bug #1195.
-
-Patch taken from the MSYS2 MINGW-packages repo, filename
-0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch,
-but applied to pyconfig.h instead of pyport.h.
-
-Without this, Py_ssize_t ends up being 4 on 64bit Windows (where it
-should be 8) and all kinds of weird issues happen as a result,
-including 4GB allocations for no apparent reason, and none of the
-protocol decoders working (at all).
-
-The respective Py_ssize_t related code is in pyport.h.
-
---- pyconfig.h.orig    2018-09-29 18:06:33.625204450 +0200
-+++ pyconfig.h 2018-09-29 18:34:09.165488139 +0200
-@@ -1,6 +1,21 @@
- #ifndef Py_CONFIG_H\r
- #define Py_CONFIG_H\r
\r
-+#ifdef __MINGW32__\r
-+/* Translate GCC[mingw*] platform specific defines to those\r
-+ * used in python code.\r
-+ */\r
-+#if !defined(MS_WIN64) && defined(_WIN64)\r
-+#  define MS_WIN64\r
-+#endif\r
-+#if !defined(MS_WIN32) && defined(_WIN32)\r
-+#  define MS_WIN32\r
-+#endif\r
-+#if !defined(MS_WINDOWS) && defined(MS_WIN32)\r
-+#  define MS_WINDOWS\r
-+#endif\r
-+#endif /* __MINGW32__*/\r
-+\r
- /* pyconfig.h.  NOT Generated automatically by configure.\r
\r
- This is a manually maintained version used for the Watcom,\r
diff --git a/ci/contrib-mxe/python34_i686.dll b/ci/contrib-mxe/python34_i686.dll
deleted file mode 100644 (file)
index bec0941..0000000
Binary files a/ci/contrib-mxe/python34_i686.dll and /dev/null differ
diff --git a/ci/contrib-mxe/python34_i686.zip b/ci/contrib-mxe/python34_i686.zip
deleted file mode 100644 (file)
index 7f7b0b0..0000000
Binary files a/ci/contrib-mxe/python34_i686.zip and /dev/null differ
diff --git a/ci/contrib-mxe/python34_x86_64.dll b/ci/contrib-mxe/python34_x86_64.dll
deleted file mode 100644 (file)
index 5eaa06f..0000000
Binary files a/ci/contrib-mxe/python34_x86_64.dll and /dev/null differ
diff --git a/ci/contrib-mxe/python34_x86_64.zip b/ci/contrib-mxe/python34_x86_64.zip
deleted file mode 100644 (file)
index 1459ee0..0000000
Binary files a/ci/contrib-mxe/python34_x86_64.zip and /dev/null differ
diff --git a/ci/mxe/contrib-mxe/FileAssociation.nsh b/ci/mxe/contrib-mxe/FileAssociation.nsh
new file mode 100644 (file)
index 0000000..f824516
--- /dev/null
@@ -0,0 +1,190 @@
+/*
+_____________________________________________________________________________
+
+                       File Association
+_____________________________________________________________________________
+
+ Based on code taken from http://nsis.sourceforge.net/File_Association 
+
+ Usage in script:
+ 1. !include "FileAssociation.nsh"
+ 2. [Section|Function]
+      ${FileAssociationFunction} "Param1" "Param2" "..." $var
+    [SectionEnd|FunctionEnd]
+
+ FileAssociationFunction=[RegisterExtension|UnRegisterExtension]
+
+_____________________________________________________________________________
+
+ ${RegisterExtension} "[executable]" "[extension]" "[description]"
+
+"[executable]"     ; executable which opens the file format
+                   ;
+"[extension]"      ; extension, which represents the file format to open
+                   ;
+"[description]"    ; description for the extension. This will be display in Windows Explorer.
+                   ;
+
+
+ ${UnRegisterExtension} "[extension]" "[description]"
+
+"[extension]"      ; extension, which represents the file format to open
+                   ;
+"[description]"    ; description for the extension. This will be display in Windows Explorer.
+                   ;
+
+_____________________________________________________________________________
+
+                         Macros
+_____________________________________________________________________________
+
+ Change log window verbosity (default: 3=no script)
+
+ Example:
+ !include "FileAssociation.nsh"
+ !insertmacro RegisterExtension
+ ${FileAssociation_VERBOSE} 4   # all verbosity
+ !insertmacro UnRegisterExtension
+ ${FileAssociation_VERBOSE} 3   # no script
+*/
+
+
+!ifndef FileAssociation_INCLUDED
+!define FileAssociation_INCLUDED
+
+!include Util.nsh
+
+!verbose push
+!verbose 3
+!ifndef _FileAssociation_VERBOSE
+  !define _FileAssociation_VERBOSE 3
+!endif
+!verbose ${_FileAssociation_VERBOSE}
+!define FileAssociation_VERBOSE `!insertmacro FileAssociation_VERBOSE`
+!verbose pop
+
+!macro FileAssociation_VERBOSE _VERBOSE
+  !verbose push
+  !verbose 3
+  !undef _FileAssociation_VERBOSE
+  !define _FileAssociation_VERBOSE ${_VERBOSE}
+  !verbose pop
+!macroend
+
+
+
+!macro RegisterExtensionCall _EXECUTABLE _EXTENSION _DESCRIPTION
+  !verbose push
+  !verbose ${_FileAssociation_VERBOSE}
+  Push `${_DESCRIPTION}`
+  Push `${_EXTENSION}`
+  Push `${_EXECUTABLE}`
+  ${CallArtificialFunction} RegisterExtension_
+  !verbose pop
+!macroend
+
+!macro UnRegisterExtensionCall _EXTENSION _DESCRIPTION
+  !verbose push
+  !verbose ${_FileAssociation_VERBOSE}
+  Push `${_EXTENSION}`
+  Push `${_DESCRIPTION}`
+  ${CallArtificialFunction} UnRegisterExtension_
+  !verbose pop
+!macroend
+
+
+
+!define RegisterExtension `!insertmacro RegisterExtensionCall`
+!define un.RegisterExtension `!insertmacro RegisterExtensionCall`
+
+!macro RegisterExtension
+!macroend
+
+!macro un.RegisterExtension
+!macroend
+
+!macro RegisterExtension_
+  !verbose push
+  !verbose ${_FileAssociation_VERBOSE}
+
+  Exch $R2 ;exe
+  Exch
+  Exch $R1 ;ext
+  Exch
+  Exch 2
+  Exch $R0 ;desc
+  Exch 2
+  Push $0
+  Push $1
+
+  ReadRegStr $1 HKCR $R1 ""  ; read current file association
+  StrCmp "$1" "" NoBackup  ; is it empty
+  StrCmp "$1" "$R0" NoBackup  ; is it our own
+    WriteRegStr HKCR $R1 "backup_val" "$1"  ; backup current value
+NoBackup:
+  WriteRegStr HKCR $R1 "" "$R0"  ; set our file association
+
+  ReadRegStr $0 HKCR $R0 ""
+  StrCmp $0 "" 0 Skip
+    WriteRegStr HKCR "$R0" "" "$R0"
+    WriteRegStr HKCR "$R0\shell" "" "open"
+    WriteRegStr HKCR "$R0\DefaultIcon" "" "$R2,0"
+Skip:
+  WriteRegStr HKCR "$R0\shell\open\command" "" '"$R2" "%1"'
+  WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0"
+  WriteRegStr HKCR "$R0\shell\edit\command" "" '"$R2" "%1"'
+
+  Pop $1
+  Pop $0
+  Pop $R2
+  Pop $R1
+  Pop $R0
+
+  !verbose pop
+!macroend
+
+
+
+!define UnRegisterExtension `!insertmacro UnRegisterExtensionCall`
+!define un.UnRegisterExtension `!insertmacro UnRegisterExtensionCall`
+
+!macro UnRegisterExtension
+!macroend
+
+!macro un.UnRegisterExtension
+!macroend
+
+!macro UnRegisterExtension_
+  !verbose push
+  !verbose ${_FileAssociation_VERBOSE}
+
+  Exch $R1 ;desc
+  Exch
+  Exch $R0 ;ext
+  Exch
+  Push $0
+  Push $1
+
+  ReadRegStr $1 HKCR $R0 ""
+  StrCmp $1 $R1 0 NoOwn ; only do this if we own it
+  ReadRegStr $1 HKCR $R0 "backup_val"
+  StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key
+  DeleteRegKey HKCR $R0
+  Goto NoOwn
+
+Restore:
+  WriteRegStr HKCR $R0 "" $1
+  DeleteRegValue HKCR $R0 "backup_val"
+  DeleteRegKey HKCR $R1 ;Delete key with association name settings
+
+NoOwn:
+
+  Pop $1
+  Pop $0
+  Pop $R1
+  Pop $R0
+
+  !verbose pop
+!macroend
+
+!endif # !FileAssociation_INCLUDED
diff --git a/ci/mxe/contrib-mxe/Python34_i686.tar.gz b/ci/mxe/contrib-mxe/Python34_i686.tar.gz
new file mode 100644 (file)
index 0000000..7008b90
Binary files /dev/null and b/ci/mxe/contrib-mxe/Python34_i686.tar.gz differ
diff --git a/ci/mxe/contrib-mxe/Python34_x86_64.tar.gz b/ci/mxe/contrib-mxe/Python34_x86_64.tar.gz
new file mode 100644 (file)
index 0000000..12b7de2
Binary files /dev/null and b/ci/mxe/contrib-mxe/Python34_x86_64.tar.gz differ
diff --git a/ci/mxe/contrib-mxe/pyconfig.patch b/ci/mxe/contrib-mxe/pyconfig.patch
new file mode 100644 (file)
index 0000000..a5ffb1c
--- /dev/null
@@ -0,0 +1,37 @@
+Fix for bug #1195.
+
+Patch taken from the MSYS2 MINGW-packages repo, filename
+0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch,
+but applied to pyconfig.h instead of pyport.h.
+
+Without this, Py_ssize_t ends up being 4 on 64bit Windows (where it
+should be 8) and all kinds of weird issues happen as a result,
+including 4GB allocations for no apparent reason, and none of the
+protocol decoders working (at all).
+
+The respective Py_ssize_t related code is in pyport.h.
+
+--- pyconfig.h.orig    2018-09-29 18:06:33.625204450 +0200
++++ pyconfig.h 2018-09-29 18:34:09.165488139 +0200
+@@ -1,6 +1,21 @@
+ #ifndef Py_CONFIG_H\r
+ #define Py_CONFIG_H\r
\r
++#ifdef __MINGW32__\r
++/* Translate GCC[mingw*] platform specific defines to those\r
++ * used in python code.\r
++ */\r
++#if !defined(MS_WIN64) && defined(_WIN64)\r
++#  define MS_WIN64\r
++#endif\r
++#if !defined(MS_WIN32) && defined(_WIN32)\r
++#  define MS_WIN32\r
++#endif\r
++#if !defined(MS_WINDOWS) && defined(MS_WIN32)\r
++#  define MS_WINDOWS\r
++#endif\r
++#endif /* __MINGW32__*/\r
++\r
+ /* pyconfig.h.  NOT Generated automatically by configure.\r
\r
+ This is a manually maintained version used for the Watcom,\r
diff --git a/ci/mxe/contrib-mxe/python34_i686.dll b/ci/mxe/contrib-mxe/python34_i686.dll
new file mode 100644 (file)
index 0000000..bec0941
Binary files /dev/null and b/ci/mxe/contrib-mxe/python34_i686.dll differ
diff --git a/ci/mxe/contrib-mxe/python34_i686.zip b/ci/mxe/contrib-mxe/python34_i686.zip
new file mode 100644 (file)
index 0000000..7f7b0b0
Binary files /dev/null and b/ci/mxe/contrib-mxe/python34_i686.zip differ
diff --git a/ci/mxe/contrib-mxe/python34_x86_64.dll b/ci/mxe/contrib-mxe/python34_x86_64.dll
new file mode 100644 (file)
index 0000000..5eaa06f
Binary files /dev/null and b/ci/mxe/contrib-mxe/python34_x86_64.dll differ
diff --git a/ci/mxe/contrib-mxe/python34_x86_64.zip b/ci/mxe/contrib-mxe/python34_x86_64.zip
new file mode 100644 (file)
index 0000000..1459ee0
Binary files /dev/null and b/ci/mxe/contrib-mxe/python34_x86_64.zip differ
diff --git a/ci/mxe/sigrok-mxe-build-dependencies.sh b/ci/mxe/sigrok-mxe-build-dependencies.sh
new file mode 100755 (executable)
index 0000000..fce0cd0
--- /dev/null
@@ -0,0 +1,137 @@
+#!/bin/sh
+##
+## This file is part of the sigrok-util project.
+##
+## Copyright (C) 2013-2018 Uwe Hermann <uwe@hermann-uwe.de>
+## Copyright (C) 2018-2023 Frank Stettner <frank-stettner@gmx.net>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
+##
+
+set -e
+
+mkdir -p "$INSTALL_DIR"
+
+BUILD_DIR=./build
+mkdir -p $BUILD_DIR
+cd $BUILD_DIR
+
+# Cross-compiling Python is highly non-trivial, so we avoid it for now.
+# The Python32.tar.gz file below is a repackaged tarball of the official
+# Python 3.4.4 MSI installer for Windows:
+#   - https://www.python.org/ftp/python/3.4.4/python-3.4.4.msi
+#   - https://www.python.org/ftp/python/3.4.4/python-3.4.4.amd64.msi
+# The MSI file has been installed on a Windows box and then c:\Python34\libs
+# and c:\Python34\include have been stored in the Python34_*.tar.gz tarball.
+cp ../contrib-mxe/Python34_$TARGET.tar.gz "$INSTALL_DIR"/Python34.tar.gz
+tar xzf "$INSTALL_DIR"/Python34.tar.gz -C "$INSTALL_DIR"
+
+# Fix for bug #1195.
+if [ "$TARGET" = "x86_64" ]; then
+       patch -p1 "$INSTALL_DIR"/Python34/include/pyconfig.h < ../contrib-mxe/pyconfig.patch
+fi
+
+# Create a dummy python3.pc file so that pkg-config finds Python 3.
+mkdir -p "$INSTALL_DIR"/lib/pkgconfig
+cat > "$INSTALL_DIR"/lib/pkgconfig/python3.pc <<EOF
+prefix=$INSTALL_DIR
+exec_prefix=\${prefix}
+libdir=\${exec_prefix}/Python34/libs
+includedir=\${prefix}/Python34/include
+Name: Python
+Description: Python library
+Version: 3.4.4
+Libs: -L\${libdir} -lpython34
+Cflags: -I\${includedir}
+EOF
+
+# The python34.dll and python34.zip files will be shipped in the NSIS
+# Windows installers (required for PulseView/SmuView Python scripts to work).
+# The file python34.dll (NOT the same as python3.dll) is copied from an
+# installed Python 3.4.4 (see above) from c:\Windows\system32\python34.dll.
+# The file python34.zip contains all files from the 'DLLs', 'Lib', and 'libs'
+# subdirectories from an installed Python on Windows (c:\python34), i.e. some
+# libraries and all Python stdlib modules.
+cp ../contrib-mxe/python34_$TARGET.dll "$INSTALL_DIR"/python34.dll
+cp ../contrib-mxe/python34_$TARGET.zip "$INSTALL_DIR"/python34.zip
+
+# In order to link against Python we need libpython34.a.
+# The upstream Python 32bit installer ships this, the x86_64 installer
+# doesn't. Thus, we generate the file manually here.
+if [ "$TARGET" = "x86_64" ]; then
+       cp "$INSTALL_DIR"/python34.dll .
+       "$MXE_DIR"/usr/$TARGET-w64-mingw32.static.posix/bin/gendef python34.dll
+       "$MXE_DIR"/usr/bin/$TARGET-w64-mingw32.static.posix-dlltool \
+               --dllname python34.dll --def python34.def \
+               --output-lib libpython34.a
+       mv -f libpython34.a "$INSTALL_DIR"/Python34/libs
+       rm -f python34.dll
+fi
+
+# We need to include the *.pyd files from python34.zip into the installers,
+# otherwise importing certain modules (e.g. ctypes) won't work (bug #1409).
+unzip -q "$INSTALL_DIR"/python34.zip *.pyd -d "$INSTALL_DIR"
+
+# libserialport
+$GIT_CLONE $LIBSERIALPORT_REPO libserialport
+cd libserialport
+./autogen.sh
+./configure $C $L
+make $PARALLEL $V
+make install $V
+cd ..
+
+# libsigrok
+$GIT_CLONE -b ${LIBSIGROK_BRANCH:-master} $LIBSIGROK_REPO libsigrok
+cd libsigrok
+./autogen.sh
+./configure $C $L
+make $PARALLEL $V
+make install $V
+cd ..
+
+# libsigrokdecode
+$GIT_CLONE $LIBSIGROKDECODE_REPO libsigrokdecode
+cd libsigrokdecode
+./autogen.sh
+./configure $C $L
+make $PARALLEL $V
+make install $V
+cd ..
+
+# sigrok-firmware
+$GIT_CLONE $SIGROK_FIRMWARE_REPO sigrok-firmware
+cd sigrok-firmware
+./autogen.sh
+# Nothing gets cross-compiled here, we just need 'make install' basically.
+./configure --prefix="$INSTALL_DIR"
+make install $V
+cd ..
+
+# sigrok-firmware-fx2lafw
+$GIT_CLONE $SIGROK_FIRMWARE_FX2LAFW_REPO sigrok-firmware-fx2lafw
+cd sigrok-firmware-fx2lafw
+./autogen.sh
+# We're building the fx2lafw firmware on the host, no need to cross-compile.
+./configure --prefix="$INSTALL_DIR"
+make $PARALLEL $V
+make install $V
+cd ..
+
+# sigrok-dumps
+$GIT_CLONE $SIGROK_DUMPS_REPO sigrok-dumps
+cd sigrok-dumps
+make install PREFIX="$INSTALL_DIR" $V
+cd ..
+
diff --git a/ci/mxe/sigrok-mxe-init-toolchain.sh b/ci/mxe/sigrok-mxe-init-toolchain.sh
new file mode 100755 (executable)
index 0000000..abadba4
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/sh
+##
+## This file is part of the sigrok-util project.
+##
+## Copyright (C) 2013-2018 Uwe Hermann <uwe@hermann-uwe.de>
+## Copyright (C) 2018-2021 Frank Stettner <frank-stettner@gmx.net>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
+##
+
+set -e
+
+export PARALLEL="-j$(nproc)"
+
+# We need to find tools in the toolchain.
+export PATH="$MXE_DIR/usr/bin":"$PATH"
+
+TOOLCHAIN_TRIPLET="$TARGET-w64-mingw32.static.posix"
+
+export CMAKE="$TOOLCHAIN_TRIPLET-cmake"
+
+P="$INSTALL_DIR/lib/pkgconfig"
+P2="$MXE_DIR/usr/$TOOLCHAIN_TRIPLET/lib/pkgconfig"
+export C="--host=$TOOLCHAIN_TRIPLET --prefix=$INSTALL_DIR CPPFLAGS=-D__printf__=__gnu_printf__"
+export L="--disable-shared --enable-static"
+#export V="V=1 VERBOSE=1"
+
+if [ "$TARGET" = "i686" ]; then
+       export PKG_CONFIG_PATH_i686_w64_mingw32_static_posix="$P:$P2"
+else
+       export PKG_CONFIG_PATH_x86_64_w64_mingw32_static_posix="$P:$P2"
+fi
+
diff --git a/ci/sigrok-mxe-build-dependencies.sh b/ci/sigrok-mxe-build-dependencies.sh
deleted file mode 100755 (executable)
index fce0cd0..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-#!/bin/sh
-##
-## This file is part of the sigrok-util project.
-##
-## Copyright (C) 2013-2018 Uwe Hermann <uwe@hermann-uwe.de>
-## Copyright (C) 2018-2023 Frank Stettner <frank-stettner@gmx.net>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, see <http://www.gnu.org/licenses/>.
-##
-
-set -e
-
-mkdir -p "$INSTALL_DIR"
-
-BUILD_DIR=./build
-mkdir -p $BUILD_DIR
-cd $BUILD_DIR
-
-# Cross-compiling Python is highly non-trivial, so we avoid it for now.
-# The Python32.tar.gz file below is a repackaged tarball of the official
-# Python 3.4.4 MSI installer for Windows:
-#   - https://www.python.org/ftp/python/3.4.4/python-3.4.4.msi
-#   - https://www.python.org/ftp/python/3.4.4/python-3.4.4.amd64.msi
-# The MSI file has been installed on a Windows box and then c:\Python34\libs
-# and c:\Python34\include have been stored in the Python34_*.tar.gz tarball.
-cp ../contrib-mxe/Python34_$TARGET.tar.gz "$INSTALL_DIR"/Python34.tar.gz
-tar xzf "$INSTALL_DIR"/Python34.tar.gz -C "$INSTALL_DIR"
-
-# Fix for bug #1195.
-if [ "$TARGET" = "x86_64" ]; then
-       patch -p1 "$INSTALL_DIR"/Python34/include/pyconfig.h < ../contrib-mxe/pyconfig.patch
-fi
-
-# Create a dummy python3.pc file so that pkg-config finds Python 3.
-mkdir -p "$INSTALL_DIR"/lib/pkgconfig
-cat > "$INSTALL_DIR"/lib/pkgconfig/python3.pc <<EOF
-prefix=$INSTALL_DIR
-exec_prefix=\${prefix}
-libdir=\${exec_prefix}/Python34/libs
-includedir=\${prefix}/Python34/include
-Name: Python
-Description: Python library
-Version: 3.4.4
-Libs: -L\${libdir} -lpython34
-Cflags: -I\${includedir}
-EOF
-
-# The python34.dll and python34.zip files will be shipped in the NSIS
-# Windows installers (required for PulseView/SmuView Python scripts to work).
-# The file python34.dll (NOT the same as python3.dll) is copied from an
-# installed Python 3.4.4 (see above) from c:\Windows\system32\python34.dll.
-# The file python34.zip contains all files from the 'DLLs', 'Lib', and 'libs'
-# subdirectories from an installed Python on Windows (c:\python34), i.e. some
-# libraries and all Python stdlib modules.
-cp ../contrib-mxe/python34_$TARGET.dll "$INSTALL_DIR"/python34.dll
-cp ../contrib-mxe/python34_$TARGET.zip "$INSTALL_DIR"/python34.zip
-
-# In order to link against Python we need libpython34.a.
-# The upstream Python 32bit installer ships this, the x86_64 installer
-# doesn't. Thus, we generate the file manually here.
-if [ "$TARGET" = "x86_64" ]; then
-       cp "$INSTALL_DIR"/python34.dll .
-       "$MXE_DIR"/usr/$TARGET-w64-mingw32.static.posix/bin/gendef python34.dll
-       "$MXE_DIR"/usr/bin/$TARGET-w64-mingw32.static.posix-dlltool \
-               --dllname python34.dll --def python34.def \
-               --output-lib libpython34.a
-       mv -f libpython34.a "$INSTALL_DIR"/Python34/libs
-       rm -f python34.dll
-fi
-
-# We need to include the *.pyd files from python34.zip into the installers,
-# otherwise importing certain modules (e.g. ctypes) won't work (bug #1409).
-unzip -q "$INSTALL_DIR"/python34.zip *.pyd -d "$INSTALL_DIR"
-
-# libserialport
-$GIT_CLONE $LIBSERIALPORT_REPO libserialport
-cd libserialport
-./autogen.sh
-./configure $C $L
-make $PARALLEL $V
-make install $V
-cd ..
-
-# libsigrok
-$GIT_CLONE -b ${LIBSIGROK_BRANCH:-master} $LIBSIGROK_REPO libsigrok
-cd libsigrok
-./autogen.sh
-./configure $C $L
-make $PARALLEL $V
-make install $V
-cd ..
-
-# libsigrokdecode
-$GIT_CLONE $LIBSIGROKDECODE_REPO libsigrokdecode
-cd libsigrokdecode
-./autogen.sh
-./configure $C $L
-make $PARALLEL $V
-make install $V
-cd ..
-
-# sigrok-firmware
-$GIT_CLONE $SIGROK_FIRMWARE_REPO sigrok-firmware
-cd sigrok-firmware
-./autogen.sh
-# Nothing gets cross-compiled here, we just need 'make install' basically.
-./configure --prefix="$INSTALL_DIR"
-make install $V
-cd ..
-
-# sigrok-firmware-fx2lafw
-$GIT_CLONE $SIGROK_FIRMWARE_FX2LAFW_REPO sigrok-firmware-fx2lafw
-cd sigrok-firmware-fx2lafw
-./autogen.sh
-# We're building the fx2lafw firmware on the host, no need to cross-compile.
-./configure --prefix="$INSTALL_DIR"
-make $PARALLEL $V
-make install $V
-cd ..
-
-# sigrok-dumps
-$GIT_CLONE $SIGROK_DUMPS_REPO sigrok-dumps
-cd sigrok-dumps
-make install PREFIX="$INSTALL_DIR" $V
-cd ..
-
diff --git a/ci/sigrok-mxe-init-toolchain.sh b/ci/sigrok-mxe-init-toolchain.sh
deleted file mode 100755 (executable)
index abadba4..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-##
-## This file is part of the sigrok-util project.
-##
-## Copyright (C) 2013-2018 Uwe Hermann <uwe@hermann-uwe.de>
-## Copyright (C) 2018-2021 Frank Stettner <frank-stettner@gmx.net>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, see <http://www.gnu.org/licenses/>.
-##
-
-set -e
-
-export PARALLEL="-j$(nproc)"
-
-# We need to find tools in the toolchain.
-export PATH="$MXE_DIR/usr/bin":"$PATH"
-
-TOOLCHAIN_TRIPLET="$TARGET-w64-mingw32.static.posix"
-
-export CMAKE="$TOOLCHAIN_TRIPLET-cmake"
-
-P="$INSTALL_DIR/lib/pkgconfig"
-P2="$MXE_DIR/usr/$TOOLCHAIN_TRIPLET/lib/pkgconfig"
-export C="--host=$TOOLCHAIN_TRIPLET --prefix=$INSTALL_DIR CPPFLAGS=-D__printf__=__gnu_printf__"
-export L="--disable-shared --enable-static"
-#export V="V=1 VERBOSE=1"
-
-if [ "$TARGET" = "i686" ]; then
-       export PKG_CONFIG_PATH_i686_w64_mingw32_static_posix="$P:$P2"
-else
-       export PKG_CONFIG_PATH_x86_64_w64_mingw32_static_posix="$P:$P2"
-fi
-