Check-in [2c1f681145]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:add imgjp2 module to undroid/vanillawish build scripts for win32/64
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2c1f68114515b29f71ed420b309052ab075b7520
User & Date: chw 2019-09-08 16:02:51
Context
2019-09-09
06:55
update imgjp2: add format options for writing, add brief readme file check-in: ab072025de user: chw tags: trunk
2019-09-08
16:04
merge with trunk check-in: 643ca4b9c0 user: chw tags: wtf-8-experiment
16:02
add imgjp2 module to undroid/vanillawish build scripts for win32/64 check-in: 2c1f681145 user: chw tags: trunk
14:19
add imgjp2 module to undroid/vanillawish build scripts for macosx check-in: c92120396a user: chw tags: trunk
Changes

Changes to undroid/build-undroidwish-win32.sh.

133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
...
182
183
184
185
186
187
188



189
190
191
192
193
194
195
...
307
308
309
310
311
312
313










314
315
316
317
318
319
320
321
....
1453
1454
1455
1456
1457
1458
1459












































1460
1461
1462
1463
1464
1465
1466
....
1593
1594
1595
1596
1597
1598
1599

1600
1601
1602
1603
1604
1605
1606
SUBDIRS="${SUBDIRS} tls libwebsockets"
SUBDIRS="${SUBDIRS} Memchan TclCurl freetype SDL2 sdl2tk blt jpeg-turbo"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg trf tktable tktreectrl tkpath itk tkhtml"
SUBDIRS="${SUBDIRS} twapi tclx tclwmf libdmtx ZBar zint snack tkvnc tksvg"
SUBDIRS="${SUBDIRS} VecTcl tclral tclepeg xotcl nsf vu rl_json mpexpr"
SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl"
SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus tserialport"
SUBDIRS="${SUBDIRS} topcua parse_args tkvlc tclJBlend Tix"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
................................................................................
        ;;
      snap7)
        rm -f ${i}/build/win/build-stamp
        ;;
      libwebsockets)
        rm -f ${i}/build/build-stamp
        ;;



      *)
        rm -f ${i}/build-stamp
        ;;
     esac
  done
}

................................................................................
          if test "$ACTION" = "distclean" ; then
            rm -rf libwebsockets/build
          else
            make -C libwebsockets/build ${ACTION} || true
          fi
        ) || true
        ;;










     *)
        (
          exec >> build.log 2>&1
          make -C $i ${ACTION} || true
        ) || true
        ;;
     esac
  done
................................................................................
  rm ${HERE}/sdl2tk/sdl/tkConfig.sh
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  cp -rp demos ${PFX_HERE}/lib/Tix*
  touch build-stamp
  echo >&3 "done"
) || fail













































echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll
................................................................................
  cp -rp ${PFX_HERE}/lib/lmdb* assets
  cp -rp ${PFX_HERE}/lib/DiffUtil* assets
  cp -rp ${PFX_HERE}/lib/parser* assets
  cp -rp ${PFX_HERE}/lib/tclcompiler* assets
  cp -rp ${PFX_HERE}/lib/tclJBlend* assets
  cp -rp ${AWDIR}/assets/tdbcjdbc* assets
  cp -rp ${PFX_HERE}/lib/Tix* assets

  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'







|







 







>
>
>







 







>
>
>
>
>
>
>
>
>
>
|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>







133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
...
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
...
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
....
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
....
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
SUBDIRS="${SUBDIRS} tls libwebsockets"
SUBDIRS="${SUBDIRS} Memchan TclCurl freetype SDL2 sdl2tk blt jpeg-turbo"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg trf tktable tktreectrl tkpath itk tkhtml"
SUBDIRS="${SUBDIRS} twapi tclx tclwmf libdmtx ZBar zint snack tkvnc tksvg"
SUBDIRS="${SUBDIRS} VecTcl tclral tclepeg xotcl nsf vu rl_json mpexpr"
SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl"
SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus tserialport"
SUBDIRS="${SUBDIRS} topcua parse_args tkvlc tclJBlend Tix openjpeg imgjp2"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
................................................................................
        ;;
      snap7)
        rm -f ${i}/build/win/build-stamp
        ;;
      libwebsockets)
        rm -f ${i}/build/build-stamp
        ;;
      openjpeg)
        rm -f ${i}/build/build-stamp
        ;;
      *)
        rm -f ${i}/build-stamp
        ;;
     esac
  done
}

................................................................................
          if test "$ACTION" = "distclean" ; then
            rm -rf libwebsockets/build
          else
            make -C libwebsockets/build ${ACTION} || true
          fi
        ) || true
        ;;
      openjpeg)
        (
          exec >> build.log 2>&1
          if test "$ACTION" = "distclean" ; then
            rm -rf openjpeg/build
          else
            make -C openjpeg/build ${ACTION} || true
          fi
        ) || true
        ;;
      *)
        (
          exec >> build.log 2>&1
          make -C $i ${ACTION} || true
        ) || true
        ;;
     esac
  done
................................................................................
  rm ${HERE}/sdl2tk/sdl/tkConfig.sh
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  cp -rp demos ${PFX_HERE}/lib/Tix*
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build openjpeg (static, pic) ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  mkdir -p openjpeg/build
  cd openjpeg/build
  test -e build-stamp && echo >&3 "already done" && exit 0
  cat >cross.cmake <<EOD
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
EOD
  cmake .. -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" \
    -DCMAKE_TOOLCHAIN_FILE=$(pwd)/cross.cmake \
    -DCMAKE_INSTALL_PREFIX=${PFX_HERE}/extra -DBUILD_SHARED_LIBS:bool=off \
    -DBUILD_PKGCONFIG_FILES=on -DOPJ_USE_THREAD:bool=off || exit 1
  make VERBOSE=1 COLOR=0 openjp2/fast || exit 1
  make VERBOSE=1 COLOR=0 opj_compress/fast || exit 1
  make VERBOSE=1 COLOR=0 opj_decompress/fast || exit 1
  make VERBOSE=1 COLOR=0 opj_dump/fast || exit 1
  make VERBOSE=1 COLOR=0 install/fast || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build imgjp2 ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd imgjp2
  test -e build-stamp && echo >&3 "already done" && exit 0
  CC="${CC} -DOPJ_STATIC=1"
  PKG_CONFIG_PATH=${PFX_HERE}/extra/lib/pkgconfig DESTDIR=${HERE} \
    ./configure --prefix=${PFX} --build=i386-windows-mingw32 \
      --with-tcl=${HERE}/tcl/win --with-tk=${HERE}/sdl2tk/sdl \
      --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll
................................................................................
  cp -rp ${PFX_HERE}/lib/lmdb* assets
  cp -rp ${PFX_HERE}/lib/DiffUtil* assets
  cp -rp ${PFX_HERE}/lib/parser* assets
  cp -rp ${PFX_HERE}/lib/tclcompiler* assets
  cp -rp ${PFX_HERE}/lib/tclJBlend* assets
  cp -rp ${AWDIR}/assets/tdbcjdbc* assets
  cp -rp ${PFX_HERE}/lib/Tix* assets
  cp -rp ${PFX_HERE}/lib/imgjp2* assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'

Changes to undroid/build-undroidwish-win64.sh.

125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
...
174
175
176
177
178
179
180



181
182
183
184
185
186
187
...
299
300
301
302
303
304
305










306
307
308
309
310
311
312
313
....
1433
1434
1435
1436
1437
1438
1439












































1440
1441
1442
1443
1444
1445
1446
....
1573
1574
1575
1576
1577
1578
1579

1580
1581
1582
1583
1584
1585
1586
SUBDIRS="${SUBDIRS} tls libwebsockets"
SUBDIRS="${SUBDIRS} Memchan TclCurl freetype SDL2 sdl2tk blt jpeg-turbo"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg trf tktable tktreectrl tkpath itk tkhtml"
SUBDIRS="${SUBDIRS} twapi tclx tclwmf libdmtx ZBar zint snack tkvnc tksvg"
SUBDIRS="${SUBDIRS} VecTcl tclral tclepeg xotcl nsf vu rl_json mpexpr"
SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl"
SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus tserialport"
SUBDIRS="${SUBDIRS} topcua parse_args tkvlc tclJBlend Tix"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
................................................................................
        ;;
      snap7)
        rm -f ${i}/build/win/build-stamp
        ;;
      libwebsockets)
        rm -f ${i}/build/build-stamp
        ;;



      *)
        rm -f ${i}/build-stamp
        ;;
     esac
  done
}

................................................................................
          if test "$ACTION" = "distclean" ; then
            rm -rf libwebsockets/build
          else
            make -C libwebsockets/build ${ACTION} || true
          fi
        ) || true
        ;;










     *)
        (
          exec >> build.log 2>&1
          make -C $i ${ACTION} || true
        ) || true
        ;;
     esac
  done
................................................................................
  rm ${HERE}/sdl2tk/sdl/tkConfig.sh
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  cp -rp demos ${PFX_HERE}/lib/Tix*
  touch build-stamp
  echo >&3 "done"
) || fail













































echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll
................................................................................
  cp -rp ${PFX_HERE}/lib/lmdb* assets
  cp -rp ${PFX_HERE}/lib/DiffUtil* assets
  cp -rp ${PFX_HERE}/lib/parser* assets
  cp -rp ${PFX_HERE}/lib/tclcompiler* assets
  cp -rp ${PFX_HERE}/lib/tclJBlend* assets
  cp -rp ${AWDIR}/assets/tdbcjdbc* assets
  cp -rp ${PFX_HERE}/lib/Tix* assets

  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'







|







 







>
>
>







 







>
>
>
>
>
>
>
>
>
>
|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>







125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
...
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
...
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
....
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
....
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
SUBDIRS="${SUBDIRS} tls libwebsockets"
SUBDIRS="${SUBDIRS} Memchan TclCurl freetype SDL2 sdl2tk blt jpeg-turbo"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg trf tktable tktreectrl tkpath itk tkhtml"
SUBDIRS="${SUBDIRS} twapi tclx tclwmf libdmtx ZBar zint snack tkvnc tksvg"
SUBDIRS="${SUBDIRS} VecTcl tclral tclepeg xotcl nsf vu rl_json mpexpr"
SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl"
SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus tserialport"
SUBDIRS="${SUBDIRS} topcua parse_args tkvlc tclJBlend Tix openjpeg imgjp2"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
................................................................................
        ;;
      snap7)
        rm -f ${i}/build/win/build-stamp
        ;;
      libwebsockets)
        rm -f ${i}/build/build-stamp
        ;;
      openjpeg)
        rm -f ${i}/build/build-stamp
        ;;
      *)
        rm -f ${i}/build-stamp
        ;;
     esac
  done
}

................................................................................
          if test "$ACTION" = "distclean" ; then
            rm -rf libwebsockets/build
          else
            make -C libwebsockets/build ${ACTION} || true
          fi
        ) || true
        ;;
      openjpeg)
        (
          exec >> build.log 2>&1
          if test "$ACTION" = "distclean" ; then
            rm -rf openjpeg/build
          else
            make -C openjpeg/build ${ACTION} || true
          fi
        ) || true
        ;;
      *)
        (
          exec >> build.log 2>&1
          make -C $i ${ACTION} || true
        ) || true
        ;;
     esac
  done
................................................................................
  rm ${HERE}/sdl2tk/sdl/tkConfig.sh
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  cp -rp demos ${PFX_HERE}/lib/Tix*
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build openjpeg (static, pic) ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  mkdir -p openjpeg/build
  cd openjpeg/build
  test -e build-stamp && echo >&3 "already done" && exit 0
  cat >cross.cmake <<EOD
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
EOD
  cmake .. -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" \
    -DCMAKE_TOOLCHAIN_FILE=$(pwd)/cross.cmake \
    -DCMAKE_INSTALL_PREFIX=${PFX_HERE}/extra -DBUILD_SHARED_LIBS:bool=off \
    -DBUILD_PKGCONFIG_FILES=on -DOPJ_USE_THREAD:bool=off || exit 1
  make VERBOSE=1 COLOR=0 openjp2/fast || exit 1
  make VERBOSE=1 COLOR=0 opj_compress/fast || exit 1
  make VERBOSE=1 COLOR=0 opj_decompress/fast || exit 1
  make VERBOSE=1 COLOR=0 opj_dump/fast || exit 1
  make VERBOSE=1 COLOR=0 install/fast || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build imgjp2 ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd imgjp2
  test -e build-stamp && echo >&3 "already done" && exit 0
  CC="${CC} -DOPJ_STATIC=1"
  PKG_CONFIG_PATH=${PFX_HERE}/extra/lib/pkgconfig DESTDIR=${HERE} \
    ./configure --prefix=${PFX} --build=x86_64-windows-mingw32 \
      --with-tcl=${HERE}/tcl/win --with-tk=${HERE}/sdl2tk/sdl \
      --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll
................................................................................
  cp -rp ${PFX_HERE}/lib/lmdb* assets
  cp -rp ${PFX_HERE}/lib/DiffUtil* assets
  cp -rp ${PFX_HERE}/lib/parser* assets
  cp -rp ${PFX_HERE}/lib/tclcompiler* assets
  cp -rp ${PFX_HERE}/lib/tclJBlend* assets
  cp -rp ${AWDIR}/assets/tdbcjdbc* assets
  cp -rp ${PFX_HERE}/lib/Tix* assets
  cp -rp ${PFX_HERE}/lib/imgjp2* assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'

Changes to undroid/build-vanilla-win32.sh.

133
134
135
136
137
138
139
140

141
142
143
144
145
146
147
...
179
180
181
182
183
184
185



186
187
188
189
190
191
192
...
294
295
296
297
298
299
300










301
302
303
304
305
306
307
....
1389
1390
1391
1392
1393
1394
1395












































1396
1397
1398
1399
1400
1401
1402
....
1535
1536
1537
1538
1539
1540
1541

1542
1543
1544
1545
1546
1547
1548
SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan TclCurl sdl2tk blt jpeg-turbo 3dcanvas"
SUBDIRS="${SUBDIRS} tkimg trf tktable tktreectrl tkpath itk tkhtml twapi"
SUBDIRS="${SUBDIRS} tclx tclwmf libdmtx ZBar zint snack winico tkvnc tksvg"
SUBDIRS="${SUBDIRS} VecTcl tclral tclepeg xotcl nsf vu rl_json tkdnd mpexpr"
SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl"
SUBDIRS="${SUBDIRS} tclparser tclcompiler tdkwin32 snap7 libmodbus"
SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend twv Tix"


ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
................................................................................
        ;;
      mpexpr)
        rm -f ${i}/unix/build-stamp
        ;;
      snap7)
        rm -f ${i}/build/win/build-stamp
        ;;



      *)
        rm -f ${i}/build-stamp
        ;;
     esac
  done
}

................................................................................
        ;;
      snap7)
        (
          exec >> build.log 2>&1
          make -C snap7/build/win -f win.mk clean || true
        ) || true
        ;;










      *)
        (
          exec >> build.log 2>&1
          make -C $i ${ACTION} || true
        ) || true
        ;;
     esac
................................................................................
  rm ${HERE}/sdl2tk/sdl/tkConfig.sh
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  cp -rp demos ${PFX_HERE}/lib/Tix*
  touch build-stamp
  echo >&3 "done"
) || fail













































echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll
................................................................................
  cp -rp ${PFX_HERE}/lib/tclcompiler* assets
  cp -rp ${PFX_HERE}/lib/win32* assets
  cp -rp ${PFX_HERE}/lib/tclJBlend* assets
  cp -rp ${AWDIR}/assets/tdbcjdbc* assets
  cp -rp ${PFX_HERE}/lib/twv* assets
  cp -rp ${AWDIR}/undroid/tsb* assets/tsb0
  cp -rp ${PFX_HERE}/lib/Tix* assets

  # add stripped down TDK
  cp -rp ${AWDIR}/undroid/TDK assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'







|
>







 







>
>
>







 







>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>







133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
...
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
...
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
....
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
....
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan TclCurl sdl2tk blt jpeg-turbo 3dcanvas"
SUBDIRS="${SUBDIRS} tkimg trf tktable tktreectrl tkpath itk tkhtml twapi"
SUBDIRS="${SUBDIRS} tclx tclwmf libdmtx ZBar zint snack winico tkvnc tksvg"
SUBDIRS="${SUBDIRS} VecTcl tclral tclepeg xotcl nsf vu rl_json tkdnd mpexpr"
SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl"
SUBDIRS="${SUBDIRS} tclparser tclcompiler tdkwin32 snap7 libmodbus"
SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend twv"
SUBDIRS="${SUBDIRS} Tix openjpeg imgjp2"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
................................................................................
        ;;
      mpexpr)
        rm -f ${i}/unix/build-stamp
        ;;
      snap7)
        rm -f ${i}/build/win/build-stamp
        ;;
      openjpeg)
        rm -f ${i}/build/build-stamp
        ;;
      *)
        rm -f ${i}/build-stamp
        ;;
     esac
  done
}

................................................................................
        ;;
      snap7)
        (
          exec >> build.log 2>&1
          make -C snap7/build/win -f win.mk clean || true
        ) || true
        ;;
      openjpeg)
        (
          exec >> build.log 2>&1
          if test "$ACTION" = "distclean" ; then
            rm -rf openjpeg/build
          else
            make -C openjpeg/build ${ACTION} || true
          fi
        ) || true
        ;;
      *)
        (
          exec >> build.log 2>&1
          make -C $i ${ACTION} || true
        ) || true
        ;;
     esac
................................................................................
  rm ${HERE}/sdl2tk/sdl/tkConfig.sh
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  cp -rp demos ${PFX_HERE}/lib/Tix*
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build openjpeg (static, pic) ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  mkdir -p openjpeg/build
  cd openjpeg/build
  test -e build-stamp && echo >&3 "already done" && exit 0
  cat >cross.cmake <<EOD
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
EOD
  cmake .. -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" \
    -DCMAKE_TOOLCHAIN_FILE=$(pwd)/cross.cmake \
    -DCMAKE_INSTALL_PREFIX=${PFX_HERE}/extra -DBUILD_SHARED_LIBS:bool=off \
    -DBUILD_PKGCONFIG_FILES=on -DOPJ_USE_THREAD:bool=off || exit 1
  make VERBOSE=1 COLOR=0 openjp2/fast || exit 1
  make VERBOSE=1 COLOR=0 opj_compress/fast || exit 1
  make VERBOSE=1 COLOR=0 opj_decompress/fast || exit 1
  make VERBOSE=1 COLOR=0 opj_dump/fast || exit 1
  make VERBOSE=1 COLOR=0 install/fast || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build imgjp2 ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd imgjp2
  test -e build-stamp && echo >&3 "already done" && exit 0
  CC="${CC} -DOPJ_STATIC=1"
  PKG_CONFIG_PATH=${PFX_HERE}/extra/lib/pkgconfig DESTDIR=${HERE} \
    ./configure --prefix=${PFX} --build=i386-windows-mingw32 \
      --with-tcl=${HERE}/tcl/win --with-tk=${HERE}/sdl2tk/win \
      --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll
................................................................................
  cp -rp ${PFX_HERE}/lib/tclcompiler* assets
  cp -rp ${PFX_HERE}/lib/win32* assets
  cp -rp ${PFX_HERE}/lib/tclJBlend* assets
  cp -rp ${AWDIR}/assets/tdbcjdbc* assets
  cp -rp ${PFX_HERE}/lib/twv* assets
  cp -rp ${AWDIR}/undroid/tsb* assets/tsb0
  cp -rp ${PFX_HERE}/lib/Tix* assets
  cp -rp ${PFX_HERE}/lib/imgjp2* assets
  # add stripped down TDK
  cp -rp ${AWDIR}/undroid/TDK assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'

Changes to undroid/build-vanilla-win64.sh.

125
126
127
128
129
130
131
132

133
134
135
136
137
138
139
...
171
172
173
174
175
176
177



178
179
180
181
182
183
184
...
286
287
288
289
290
291
292










293
294
295
296
297
298
299
....
1369
1370
1371
1372
1373
1374
1375












































1376
1377
1378
1379
1380
1381
1382
....
1515
1516
1517
1518
1519
1520
1521

1522
1523
1524
1525
1526
1527
1528
SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan TclCurl sdl2tk blt jpeg-turbo 3dcanvas"
SUBDIRS="${SUBDIRS} tkimg trf tktable tktreectrl tkpath itk tkhtml twapi"
SUBDIRS="${SUBDIRS} tclx tclwmf libdmtx ZBar zint snack winico tkvnc tksvg"
SUBDIRS="${SUBDIRS} VecTcl tclral tclepeg xotcl nsf vu rl_json tkdnd mpexpr"
SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl"
SUBDIRS="${SUBDIRS} tclparser tclcompiler tdkwin32 snap7 libmodbus"
SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend twv Tix"


ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
................................................................................
        ;;
      mpexpr)
        rm -f ${i}/unix/build-stamp
        ;;
      snap7)
        rm -f ${i}/build/win/build-stamp
        ;;



      *)
        rm -f ${i}/build-stamp
        ;;
     esac
  done
}

................................................................................
        ;;
      snap7)
        (
          exec >> build.log 2>&1
          make -C snap7/build/win -f win.mk clean || true
        ) || true
        ;;










      *)
        (
          exec >> build.log 2>&1
          make -C $i ${ACTION} || true
        ) || true
        ;;
     esac
................................................................................
  rm ${HERE}/sdl2tk/sdl/tkConfig.sh
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  cp -rp demos ${PFX_HERE}/lib/Tix*
  touch build-stamp
  echo >&3 "done"
) || fail













































echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll
................................................................................
  cp -rp ${PFX_HERE}/lib/tclcompiler* assets
  cp -rp ${PFX_HERE}/lib/win32* assets
  cp -rp ${PFX_HERE}/lib/tclJBlend* assets
  cp -rp ${AWDIR}/assets/tdbcjdbc* assets
  cp -rp ${PFX_HERE}/lib/twv* assets
  cp -rp ${AWDIR}/undroid/tsb* assets/tsb0
  cp -rp ${PFX_HERE}/lib/Tix* assets

  # add stripped down TDK
  cp -rp ${AWDIR}/undroid/TDK assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'







|
>







 







>
>
>







 







>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>







125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
...
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
...
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
....
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
....
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan TclCurl sdl2tk blt jpeg-turbo 3dcanvas"
SUBDIRS="${SUBDIRS} tkimg trf tktable tktreectrl tkpath itk tkhtml twapi"
SUBDIRS="${SUBDIRS} tclx tclwmf libdmtx ZBar zint snack winico tkvnc tksvg"
SUBDIRS="${SUBDIRS} VecTcl tclral tclepeg xotcl nsf vu rl_json tkdnd mpexpr"
SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl"
SUBDIRS="${SUBDIRS} tclparser tclcompiler tdkwin32 snap7 libmodbus"
SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend twv"
SUBDIRS="${SUBDIRS} Tix openjpeg imgjp2"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
................................................................................
        ;;
      mpexpr)
        rm -f ${i}/unix/build-stamp
        ;;
      snap7)
        rm -f ${i}/build/win/build-stamp
        ;;
      openjpeg)
        rm -f ${i}/build/build-stamp
        ;;
      *)
        rm -f ${i}/build-stamp
        ;;
     esac
  done
}

................................................................................
        ;;
      snap7)
        (
          exec >> build.log 2>&1
          make -C snap7/build/win -f win.mk clean || true
        ) || true
        ;;
      openjpeg)
        (
          exec >> build.log 2>&1
          if test "$ACTION" = "distclean" ; then
            rm -rf openjpeg/build
          else
            make -C openjpeg/build ${ACTION} || true
          fi
        ) || true
        ;;
      *)
        (
          exec >> build.log 2>&1
          make -C $i ${ACTION} || true
        ) || true
        ;;
     esac
................................................................................
  rm ${HERE}/sdl2tk/sdl/tkConfig.sh
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  cp -rp demos ${PFX_HERE}/lib/Tix*
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build openjpeg (static, pic) ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  mkdir -p openjpeg/build
  cd openjpeg/build
  test -e build-stamp && echo >&3 "already done" && exit 0
  cat >cross.cmake <<EOD
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
EOD
  cmake .. -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" \
    -DCMAKE_TOOLCHAIN_FILE=$(pwd)/cross.cmake \
    -DCMAKE_INSTALL_PREFIX=${PFX_HERE}/extra -DBUILD_SHARED_LIBS:bool=off \
    -DBUILD_PKGCONFIG_FILES=on -DOPJ_USE_THREAD:bool=off || exit 1
  make VERBOSE=1 COLOR=0 openjp2/fast || exit 1
  make VERBOSE=1 COLOR=0 opj_compress/fast || exit 1
  make VERBOSE=1 COLOR=0 opj_decompress/fast || exit 1
  make VERBOSE=1 COLOR=0 opj_dump/fast || exit 1
  make VERBOSE=1 COLOR=0 install/fast || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build imgjp2 ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd imgjp2
  test -e build-stamp && echo >&3 "already done" && exit 0
  CC="${CC} -DOPJ_STATIC=1"
  PKG_CONFIG_PATH=${PFX_HERE}/extra/lib/pkgconfig DESTDIR=${HERE} \
    ./configure --prefix=${PFX} --build=x86_64-windows-mingw32 \
      --with-tcl=${HERE}/tcl/win --with-tk=${HERE}/sdl2tk/win \
      --enable-threads || exit 1
  make || exit 1
  make install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/*.exe ${PFX_HERE}/lib/*/*.dll
................................................................................
  cp -rp ${PFX_HERE}/lib/tclcompiler* assets
  cp -rp ${PFX_HERE}/lib/win32* assets
  cp -rp ${PFX_HERE}/lib/tclJBlend* assets
  cp -rp ${AWDIR}/assets/tdbcjdbc* assets
  cp -rp ${PFX_HERE}/lib/twv* assets
  cp -rp ${AWDIR}/undroid/tsb* assets/tsb0
  cp -rp ${PFX_HERE}/lib/Tix* assets
  cp -rp ${PFX_HERE}/lib/imgjp2* assets
  # add stripped down TDK
  cp -rp ${AWDIR}/undroid/TDK assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'