找回密码
 立即注册
楼主: 饕***

STC-ISP 有计划支持 Linux macOS 系统吗?| 用 wine 即可

[复制链接]
  • TA的每日心情
    奋斗
    2024-9-27 09:44
  • 签到天数: 9 天

    [LV.3]偶尔看看II

    2

    主题

    11

    回帖

    86

    积分

    注册会员

    积分
    86
     楼主| 发表于 2024-6-11 09:42:35 | 显示全部楼层
    根据大家提供的信息在 AUR 上维护了一个 stc-isp-wine 的包:https://aur.archlinux.org/pkgbase/stc-isp-wine

    源码内容
    1. # Maintainer: taotieren <admin@taotieren.com>
    2. pkgbase=stc-isp-wine
    3. pkgname=(stc-isp{,-tiny}-wine)
    4. pkgver=6.93
    5. pkgrel=1
    6. arch=('x86_64')
    7. url="http://www.stcmcudata.com"
    8. license=('unknow')
    9. provides=('STC-ISP')
    10. conflicts=('stc-isp' 'stc-isp-bin')
    11. replaces=('stc-isp-bin')
    12. depends=('wine' 'wqy-microhei' 'winetricks' 'wine-mono' 'wine-gecko')
    13. optdepends=()
    14. makedepends=('libarchive')
    15. backup=()
    16. options=('!strip')
    17. install=${pkgname}.install
    18. source=("${pkgname%-wine}-v${pkgver}.zip::${url}/STCISP/${pkgname%-wine}-15xx-v${pkgver}.zip"
    19.         "${pkgname%-wine}-tiny-v${pkgver}.zip::${url}/STCISP/${pkgname%-wine}-15xx-v${pkgver}-tiny.zip"
    20.         "stc-isp-wine.install"
    21.         "stc-isp-tiny-wine.install"
    22.         "icon.svg")
    23. sha256sums=('e1b018e286837895ed6dd6c22d9f6aecaf8966ffe7f5ef5f19a91c5b80c48dd0'
    24.             '5fb97da5c17a8e2732f4ffd7083854865403b050bb01b1688f12eb08e52acdb7'
    25.             'b2a93211b74f6e23a9c4dd508c65bf374c0a03c11174092f6ccec3e9194e47a6'
    26.             'b2a93211b74f6e23a9c4dd508c65bf374c0a03c11174092f6ccec3e9194e47a6'
    27.             'c04d3cf704c9055e4b0bb010d946c5e90710677c459def826f762c8e9d717538')
    28. # noextract=("${pkgname%-wine}-v${pkgver}.zip"
    29. #             "${pkgname%-wine}-tiny-v${pkgver}.zip")
    30. # prepare() {
    31. #     unar -e GBK "${srcdir}/${pkgname%-wine}-v${pkgver}.zip"
    32. #     unar -e GBK "${srcdir}/${pkgname%-wine}-tiny-v${pkgver}.zip"
    33. #     bsdtar -xf  "${srcdir}/${pkgname%-wine}-v${pkgver}.zip"
    34. #     bsdtar -xf  "${srcdir}/${pkgname%-wine}-tiny-v${pkgver}.zip"
    35. # }
    36. package_stc-isp-wine() {
    37.     export LC_CTYPE="zh_CN.UTF-8"
    38.     pkgdesc="Wine STC-ISP 下载编程烧录软件"
    39.     _stc="opt/STCMCU"
    40.     _ftname="wqy-microhei.ttc"
    41.     install -dm0755 "${pkgdir}/${_stc}/${pkgname%-wine}"
    42.     install -Dm6644 "${srcdir}/icon.svg" "${pkgdir}/usr/share/pixmaps/${pkgname%-wine}.svg"
    43. #     cp -ra "${srcdir}/${pkgname%-wine}-v${pkgver}/${pkgname%-wine}-v${pkgver}.exe" "${pkgdir}/${_stc}/${pkgname%-wine}"
    44.     cp -ra "${srcdir}/${pkgname%-wine}-v${pkgver}.exe" "${pkgdir}/${_stc}/${pkgname%-wine}"
    45.     find "${pkgdir}/${_stc}" -type f -exec chmod 644 "{}" \;
    46.     find "${pkgdir}/${_stc}" -type d -exec chmod 755 "{}" \;
    47.     install -Dm0644 /dev/stdin "${pkgdir}/${_stc}/${pkgname%-wine}/regpatch.reg" << EOF
    48. REGEDIT4
    49. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
    50. "Lucida Sans Unicode"="${_ftname}"
    51. "Microsoft Sans Serif"="${_ftname}"
    52. "MS Sans Serif"="${_ftname}"
    53. "Tahoma"="${_ftname}"
    54. "Tahoma Bold"="${_ftname}"
    55. "SimSun"="${_ftname}"
    56. "Arial"="${_ftname}"
    57. "Arial Black"="${_ftname}"
    58. "Lucida Sans Unicode"=str(7):"${_ftname}"
    59. "Microsoft Sans Serif"=str(7):"${_ftname}"
    60. "Tahoma"=str(7):"${_ftname}"
    61. "Lucida Sans Unicode"="${_ftname}"
    62. "Microsoft Sans Serif"="${_ftname}"
    63. "Microsoft YaHei"="${_ftname}"
    64. "微软雅黑"="${_ftname}"
    65. "宋体"="${_ftname}"
    66. "新細明體"="${_ftname}"
    67. "DFKai-SB"="${_ftname}"
    68. "FangSong"="${_ftname}"
    69. "KaiTi"="${_ftname}"
    70. "Microsoft JhengHei"="${_ftname}"
    71. "Microsoft YaHei"="${_ftname}"
    72. "MingLiU"="${_ftname}"
    73. "NSimSun"="${_ftname}"
    74. "PMingLiU"="${_ftname}"
    75. "SimHei"="${_ftname}"
    76. "SimKai"="${_ftname}"
    77. "SimSun"="${_ftname}"
    78. [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
    79. "ClientSideAntiAliasWithCore"="N"
    80. "ClientSideAntiAliasWithRender"="N"
    81. "ClientSideWithRender"="N"
    82. [HKEY_CURRENT_USER\Control Panel\Desktop]
    83. "FontSmoothing"="2"
    84. "FontSmoothingOrientation"=dword:00000001
    85. "FontSmoothingType"=dword:00000002
    86. "FontSmoothingGamma"=dword:00000578
    87. [HKEY_LOCAL_MACHINE\Software\Wine\Ports]
    88. "COM1"="/dev/ttyUSB0"
    89. "COM2"="/dev/ttyUSB1"
    90. "COM3"="/dev/ttyUSB2"
    91. "COM4"="/dev/ttyUSB3"
    92. "COM5"="/dev/ttyUSB4"
    93. "COM6"="/dev/ttyUSB5"
    94. "COM7"="/dev/ttyUSB6"
    95. "COM8"="/dev/ttyUSB7"
    96. "COM9"="/dev/ttyUSB8"
    97. "COM10"="/dev/ttyACM0"
    98. "COM11"="/dev/ttyACM1"
    99. "COM12"="/dev/ttyACM2"
    100. "COM13"="/dev/ttyACM3"
    101. "COM14"="/dev/ttyACM4"
    102. "COM15"="/dev/ttyACM5"
    103. "COM16"="/dev/ttyACM6"
    104. "COM17"="/dev/ttyACM7"
    105. "COM18"="/dev/ttyACM8"
    106. "COM19"="/dev/ttyACM9"
    107. EOF
    108.     install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/${pkgname%-wine}" << EOF
    109. #!/bin/bash
    110. export LC_CTYPE="zh_CN.UTF-8"
    111. export WINEARCH=win32 WINEPREFIX="$HOME/.${pkgname%-wine}/wine"
    112. export WINEDLLOVERRIDES="mscoree,mshtml="
    113. if [ ! -d "$HOME"/.${pkgname%-wine} ] ; then
    114.     mkdir -p "$HOME"/.${pkgname%-wine}/wine || exit 1
    115.     cp -r /${_stc}/${pkgname%-wine}/regpatch.reg "$HOME"/.${pkgname%-wine}/wine || exit 1
    116.     ln -s /${_stc}/${pkgname%-wine}/${pkgname%-wine}-v${pkgver}.exe "$HOME"/.${pkgname%-wine}/${pkgname%-wine} || exit 1
    117. fi
    118. if [ ! -f "$HOME"/.${pkgname%-wine}/regpatchok ] ; then
    119.     touch "$HOME"/.${pkgname%-wine}/regpatchok || exit 1
    120.     cd "$HOME"/.${pkgname%-wine}/wine && regedit regpatch.reg && wineserver -k
    121.     winetricks -q mfc42
    122. fi
    123. wine "$HOME"/.${pkgname%-wine}/${pkgname%-wine} "\$@"
    124. EOF
    125.     install -Dm0644 /dev/stdin "${pkgdir}/usr/share/applications/${pkgname%-wine}.desktop" << EOF
    126. [Desktop Entry]
    127. Name=${pkgname%-wine}
    128. Name[zh_CN]=${pkgname%-wine}
    129. Comment=${pkgdesc}
    130. #MimeType=application/x-${pkgname%-wine};
    131. Exec=${pkgname%-wine} %f
    132. Type=Application
    133. Categories=Development;Tool;
    134. Terminal=false
    135. Icon=${pkgname%-wine}.svg
    136. Version=${pkgver}
    137. EOF
    138. }
    139. package_stc-isp-tiny-wine() {
    140.     export LC_CTYPE="zh_CN.UTF-8"
    141.     pkgdesc="Wine STC-ISP 简化版下载编程烧录软件"
    142.     _stc="opt/STCMCU"
    143.     _ftname="wqy-microhei.ttc"
    144.     install -dm0755 "${pkgdir}/${_stc}/${pkgname%-wine}"
    145.     install -Dm6644 "${srcdir}/icon.svg" "${pkgdir}/usr/share/pixmaps/${pkgname%-wine}.svg"
    146. #     cp -ra "${srcdir}/${pkgname%-wine}-v${pkgver}/${pkgname%-tiny-wine}-v${pkgver}-tiny.exe" "${pkgdir}/${_stc}/${pkgname%-wine}/${pkgname%-wine}-${pkgver}.exe"
    147.     cp -ra "${srcdir}/${pkgname%-tiny-wine}-v${pkgver}-tiny.exe" "${pkgdir}/${_stc}/${pkgname%-wine}/${pkgname%-wine}-${pkgver}.exe"
    148.     find "${pkgdir}/${_stc}" -type f -exec chmod 644 "{}" \;
    149.     find "${pkgdir}/${_stc}" -type d -exec chmod 755 "{}" \;
    150.     install -Dm0644 /dev/stdin "${pkgdir}/${_stc}/${pkgname%-wine}/regpatch.reg" << EOF
    151. REGEDIT4
    152. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
    153. "Lucida Sans Unicode"="${_ftname}"
    154. "Microsoft Sans Serif"="${_ftname}"
    155. "MS Sans Serif"="${_ftname}"
    156. "Tahoma"="${_ftname}"
    157. "Tahoma Bold"="${_ftname}"
    158. "SimSun"="${_ftname}"
    159. "Arial"="${_ftname}"
    160. "Arial Black"="${_ftname}"
    161. "Lucida Sans Unicode"=str(7):"${_ftname}"
    162. "Microsoft Sans Serif"=str(7):"${_ftname}"
    163. "Tahoma"=str(7):"${_ftname}"
    164. "Lucida Sans Unicode"="${_ftname}"
    165. "Microsoft Sans Serif"="${_ftname}"
    166. "Microsoft YaHei"="${_ftname}"
    167. "微软雅黑"="${_ftname}"
    168. "宋体"="${_ftname}"
    169. "新細明體"="${_ftname}"
    170. "DFKai-SB"="${_ftname}"
    171. "FangSong"="${_ftname}"
    172. "KaiTi"="${_ftname}"
    173. "Microsoft JhengHei"="${_ftname}"
    174. "Microsoft YaHei"="${_ftname}"
    175. "MingLiU"="${_ftname}"
    176. "NSimSun"="${_ftname}"
    177. "PMingLiU"="${_ftname}"
    178. "SimHei"="${_ftname}"
    179. "SimKai"="${_ftname}"
    180. "SimSun"="${_ftname}"
    181. [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
    182. "ClientSideAntiAliasWithCore"="N"
    183. "ClientSideAntiAliasWithRender"="N"
    184. "ClientSideWithRender"="N"
    185. [HKEY_CURRENT_USER\Control Panel\Desktop]
    186. "FontSmoothing"="2"
    187. "FontSmoothingOrientation"=dword:00000001
    188. "FontSmoothingType"=dword:00000002
    189. "FontSmoothingGamma"=dword:00000578
    190. [HKEY_LOCAL_MACHINE\Software\Wine\Ports]
    191. "COM1"="/dev/ttyUSB0"
    192. "COM2"="/dev/ttyUSB1"
    193. "COM3"="/dev/ttyUSB2"
    194. "COM4"="/dev/ttyUSB3"
    195. "COM5"="/dev/ttyUSB4"
    196. "COM6"="/dev/ttyUSB5"
    197. "COM7"="/dev/ttyUSB6"
    198. "COM8"="/dev/ttyUSB7"
    199. "COM9"="/dev/ttyUSB8"
    200. "COM10"="/dev/ttyACM0"
    201. "COM11"="/dev/ttyACM1"
    202. "COM12"="/dev/ttyACM2"
    203. "COM13"="/dev/ttyACM3"
    204. "COM14"="/dev/ttyACM4"
    205. "COM15"="/dev/ttyACM5"
    206. "COM16"="/dev/ttyACM6"
    207. "COM17"="/dev/ttyACM7"
    208. "COM18"="/dev/ttyACM8"
    209. "COM19"="/dev/ttyACM9"
    210. EOF
    211.     install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/${pkgname%-wine}" << EOF
    212. #!/bin/bash
    213. export LC_CTYPE="zh_CN.UTF-8"
    214. export WINEARCH=win32 WINEPREFIX="$HOME/.${pkgname%-wine}/wine"
    215. export WINEDLLOVERRIDES="mscoree,mshtml="
    216. if [ ! -d "$HOME"/.${pkgname%-wine} ] ; then
    217.     mkdir -p "$HOME"/.${pkgname%-wine}/wine || exit 1
    218.     cp -r /${_stc}/${pkgname%-wine}/regpatch.reg "$HOME"/.${pkgname%-wine}/wine || exit 1
    219.     ln -s /${_stc}/${pkgname%-wine}/${pkgname%-wine}-v${pkgver}.exe "$HOME"/.${pkgname%-wine}/${pkgname%-wine} || exit 1
    220. fi
    221. if [ ! -f "$HOME"/.${pkgname%-wine}/regpatchok ] ; then
    222.     touch "$HOME"/.${pkgname%-wine}/regpatchok || exit 1
    223.     cd "$HOME"/.${pkgname%-wine}/wine && regedit regpatch.reg && wineserver -k
    224.     winetricks -q mfc42
    225. fi
    226. wine "$HOME"/.${pkgname%-wine}/${pkgname%-wine} "\$@"
    227. EOF
    228.     install -Dm0644 /dev/stdin "${pkgdir}/usr/share/applications/${pkgname%-wine}.desktop" << EOF
    229. [Desktop Entry]
    230. Name=${pkgname%-wine}
    231. Name[zh_CN]=${pkgname%-wine}
    232. Comment=${pkgdesc}
    233. #MimeType=application/x-${pkgname%-wine};
    234. Exec=${pkgname%-wine} %f
    235. Type=Application
    236. Categories=Development;Tool;
    237. Terminal=false
    238. Icon=${pkgname%-wine}.svg
    239. Version=${pkgver}
    240. EOF
    241. }
    复制代码

    1. info() {
    2.     echo -e "STC-ISP 下载编程烧录软件"
    3. }
    4. post_install() {
    5.     info
    6. }
    7. post_upgrade() {
    8.     echo "deleting the stc-isp bottle..."
    9.     find /home -maxdepth 2 -name ".stc-isp" -exec rm -rf {} \;
    10.     info
    11. }
    12. pre_remove() {
    13.     echo "deleting the stc-isp bottle..."
    14.     find /home -maxdepth 2 -name ".stc-isp" -exec rm -rf {} \;
    15. }
    复制代码

    1. info() {
    2.     echo -e "STC-ISP 下载编程烧录软件"
    3. }
    4. post_install() {
    5.     info
    6. }
    7. post_upgrade() {
    8.     echo "deleting the stc-isp bottle..."
    9.     find /home -maxdepth 2 -name ".stc-isp" -exec rm -rf {} \;
    10.     info
    11. }
    12. pre_remove() {
    13.     echo "deleting the stc-isp bottle..."
    14.     find /home -maxdepth 2 -name ".stc-isp" -exec rm -rf {} \;
    15. }
    复制代码
    回复 支持 反对 送花

    使用道具 举报

  • TA的每日心情
    奋斗
    2024-9-27 09:44
  • 签到天数: 9 天

    [LV.3]偶尔看看II

    2

    主题

    11

    回帖

    86

    积分

    注册会员

    积分
    86
     楼主| 发表于 2024-7-2 14:51:22 | 显示全部楼层
    更新后支持 STCAI-ISP

    AUR stcai-isp-wine 的包:https://aur.archlinux.org/pkgbase/stc-isp-wine


    源码:

    1. # Maintainer: taotieren <admin@taotieren.com>
    2. pkgbase=stc-isp-wine
    3. pkgname=(stcai-isp{,-tiny}-wine)
    4. pkgver=6.94F
    5. pkgrel=1
    6. arch=('x86_64')
    7. url="http://www.stcmcudata.com/INDEX-CHANGE.HTM"
    8. license=('unknow')
    9. provides=('STC-ISP' 'STCAI-ISP')
    10. conflicts=('stc-isp' 'stcai-isp' 'stc-isp-bin')
    11. replaces=('stc-isp-bin')
    12. depends=('wine' 'wqy-microhei' 'winetricks' 'wine-mono' 'wine-gecko')
    13. optdepends=()
    14. makedepends=('libarchive')
    15. backup=()
    16. options=('!strip' '!debug')
    17. source=("${pkgname%-wine}-v${pkgver}.zip::http://www.stcmcudata.com/STCISP/${pkgname%-wine}-v${pkgver}.zip"
    18.         "${pkgname%-wine}-tiny-v${pkgver}.zip::http://www.stcmcudata.com/STCISP/${pkgname%-wine}-v${pkgver}-tiny.zip"
    19.         "stcai-isp-wine.install"
    20.         "stcai-isp-tiny-wine.install"
    21.         "icon.svg")
    22. sha256sums=('0df31c85113c31c85cb87921aa8f378af6252d16f6a301f8ab38b5e5559cc3b8'
    23.             '147983cc306f11731d1ae8c2509984d1c057f22ca9b09a9dc2258b27fc024236'
    24.             'b52b0ed04b26922dad6e00725cf84da0597cc15346c68202b4bd54274dbb0b39'
    25.             '33565feb7c5d7c5f50f4d0ea6c514e084776b72b662e21614bb95d7b26baa42f'
    26.             'c04d3cf704c9055e4b0bb010d946c5e90710677c459def826f762c8e9d717538')
    27. # noextract=("${pkgname%-wine}-v${pkgver}.zip"
    28. #             "${pkgname%-wine}-tiny-v${pkgver}.zip")
    29. # prepare() {
    30. #     unar -e GBK "${srcdir}/${pkgname%-wine}-v${pkgver}.zip"
    31. #     unar -e GBK "${srcdir}/${pkgname%-wine}-tiny-v${pkgver}.zip"
    32. #     bsdtar -xf  "${srcdir}/${pkgname%-wine}-v${pkgver}.zip"
    33. #     bsdtar -xf  "${srcdir}/${pkgname%-wine}-tiny-v${pkgver}.zip"
    34. # }
    35. package_stcai-isp-wine() {
    36.     export LC_CTYPE="zh_CN.UTF-8"
    37.     pkgdesc="Wine STCAI-ISP 下载编程烧录软件"
    38.     install=${pkgname}.install
    39.     _stc="opt/STCMCU"
    40.     _ftname="wqy-microhei.ttc"
    41.     install -dm0755 "${pkgdir}/${_stc}/${pkgname%-wine}"
    42.     install -Dm6644 "${srcdir}/icon.svg" "${pkgdir}/usr/share/pixmaps/${pkgname%-wine}.svg"
    43. #     cp -ra "${srcdir}/${pkgname%-wine}-v${pkgver}/${pkgname%-wine}-v${pkgver}.exe" "${pkgdir}/${_stc}/${pkgname%-wine}"
    44.     cp -ra "${srcdir}/${pkgname%-wine}-v${pkgver}.exe" "${pkgdir}/${_stc}/${pkgname%-wine}"
    45.     find "${pkgdir}/${_stc}" -type f -exec chmod 644 "{}" \;
    46.     find "${pkgdir}/${_stc}" -type d -exec chmod 755 "{}" \;
    47.     install -Dm0644 /dev/stdin "${pkgdir}/${_stc}/${pkgname%-wine}/regpatch.reg" << EOF
    48. REGEDIT4
    49. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
    50. "Lucida Sans Unicode"="${_ftname}"
    51. "Microsoft Sans Serif"="${_ftname}"
    52. "MS Sans Serif"="${_ftname}"
    53. "Tahoma"="${_ftname}"
    54. "Tahoma Bold"="${_ftname}"
    55. "SimSun"="${_ftname}"
    56. "Arial"="${_ftname}"
    57. "Arial Black"="${_ftname}"
    58. "Lucida Sans Unicode"=str(7):"${_ftname}"
    59. "Microsoft Sans Serif"=str(7):"${_ftname}"
    60. "Tahoma"=str(7):"${_ftname}"
    61. "Lucida Sans Unicode"="${_ftname}"
    62. "Microsoft Sans Serif"="${_ftname}"
    63. "Microsoft YaHei"="${_ftname}"
    64. "微软雅黑"="${_ftname}"
    65. "宋体"="${_ftname}"
    66. "新細明體"="${_ftname}"
    67. "DFKai-SB"="${_ftname}"
    68. "FangSong"="${_ftname}"
    69. "KaiTi"="${_ftname}"
    70. "Microsoft JhengHei"="${_ftname}"
    71. "Microsoft YaHei"="${_ftname}"
    72. "MingLiU"="${_ftname}"
    73. "NSimSun"="${_ftname}"
    74. "PMingLiU"="${_ftname}"
    75. "SimHei"="${_ftname}"
    76. "SimKai"="${_ftname}"
    77. "SimSun"="${_ftname}"
    78. [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
    79. "ClientSideAntiAliasWithCore"="N"
    80. "ClientSideAntiAliasWithRender"="N"
    81. "ClientSideWithRender"="N"
    82. [HKEY_CURRENT_USER\Control Panel\Desktop]
    83. "FontSmoothing"="2"
    84. "FontSmoothingOrientation"=dword:00000001
    85. "FontSmoothingType"=dword:00000002
    86. "FontSmoothingGamma"=dword:00000578
    87. [HKEY_LOCAL_MACHINE\Software\Wine\Ports]
    88. "COM1"="/dev/ttyUSB0"
    89. "COM2"="/dev/ttyUSB1"
    90. "COM3"="/dev/ttyUSB2"
    91. "COM4"="/dev/ttyUSB3"
    92. "COM5"="/dev/ttyUSB4"
    93. "COM6"="/dev/ttyUSB5"
    94. "COM7"="/dev/ttyUSB6"
    95. "COM8"="/dev/ttyUSB7"
    96. "COM9"="/dev/ttyUSB8"
    97. "COM10"="/dev/ttyACM0"
    98. "COM11"="/dev/ttyACM1"
    99. "COM12"="/dev/ttyACM2"
    100. "COM13"="/dev/ttyACM3"
    101. "COM14"="/dev/ttyACM4"
    102. "COM15"="/dev/ttyACM5"
    103. "COM16"="/dev/ttyACM6"
    104. "COM17"="/dev/ttyACM7"
    105. "COM18"="/dev/ttyACM8"
    106. "COM19"="/dev/ttyACM9"
    107. EOF
    108.     install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/${pkgname%-wine}" << EOF
    109. #!/bin/bash
    110. export LC_CTYPE="zh_CN.UTF-8"
    111. export WINEARCH=win32 WINEPREFIX="\$HOME/.${pkgname%-wine}/wine"
    112. export WINEDLLOVERRIDES="mscoree,mshtml="
    113. if [ ! -d "\$HOME"/.${pkgname%-wine} ] ; then
    114.     mkdir -p "\$HOME"/.${pkgname%-wine}/wine || exit 1
    115.     cp -r /${_stc}/${pkgname%-wine}/regpatch.reg "\$HOME"/.${pkgname%-wine}/wine || exit 1
    116.     ln -s /${_stc}/${pkgname%-wine}/${pkgname%-wine}-v${pkgver}.exe "\$HOME"/.${pkgname%-wine}/${pkgname%-wine} || exit 1
    117. fi
    118. if [ ! -f "\$HOME"/.${pkgname%-wine}/regpatchok ] ; then
    119.     touch "\$HOME"/.${pkgname%-wine}/regpatchok || exit 1
    120.     cd "\$HOME"/.${pkgname%-wine}/wine && regedit regpatch.reg && wineserver -k
    121.     winetricks -q mfc42
    122. fi
    123. wine "\$HOME"/.${pkgname%-wine}/${pkgname%-wine} "\$@"
    124. EOF
    125.     install -Dm0644 /dev/stdin "${pkgdir}/usr/share/applications/${pkgname%-wine}.desktop" << EOF
    126. [Desktop Entry]
    127. Name=${pkgname%-wine}
    128. Name[zh_CN]=${pkgname%-wine}
    129. Comment=${pkgdesc}
    130. #MimeType=application/x-${pkgname%-wine};
    131. Exec=${pkgname%-wine} %f
    132. Type=Application
    133. Categories=Development;Tool;
    134. Terminal=false
    135. Icon=${pkgname%-wine}.svg
    136. Version=${pkgver}
    137. EOF
    138. }
    139. package_stcai-isp-tiny-wine() {
    140.     export LC_CTYPE="zh_CN.UTF-8"
    141.     pkgdesc="Wine STCAI-ISP 简化版下载编程烧录软件"
    142.     install=${pkgname}.install
    143.     _stc="opt/STCMCU"
    144.     _ftname="wqy-microhei.ttc"
    145.     install -dm0755 "${pkgdir}/${_stc}/${pkgname%-wine}"
    146.     install -Dm6644 "${srcdir}/icon.svg" "${pkgdir}/usr/share/pixmaps/${pkgname%-wine}.svg"
    147. #     cp -ra "${srcdir}/${pkgname%-wine}-v${pkgver}/${pkgname%-tiny-wine}-v${pkgver}-tiny.exe" "${pkgdir}/${_stc}/${pkgname%-wine}/${pkgname%-wine}-${pkgver}.exe"
    148.     cp -ra "${srcdir}/${pkgname%-tiny-wine}-v${pkgver}-tiny.exe" "${pkgdir}/${_stc}/${pkgname%-wine}/${pkgname%-wine}-${pkgver}.exe"
    149.     find "${pkgdir}/${_stc}" -type f -exec chmod 644 "{}" \;
    150.     find "${pkgdir}/${_stc}" -type d -exec chmod 755 "{}" \;
    151.     install -Dm0644 /dev/stdin "${pkgdir}/${_stc}/${pkgname%-wine}/regpatch.reg" << EOF
    152. REGEDIT4
    153. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
    154. "Lucida Sans Unicode"="${_ftname}"
    155. "Microsoft Sans Serif"="${_ftname}"
    156. "MS Sans Serif"="${_ftname}"
    157. "Tahoma"="${_ftname}"
    158. "Tahoma Bold"="${_ftname}"
    159. "SimSun"="${_ftname}"
    160. "Arial"="${_ftname}"
    161. "Arial Black"="${_ftname}"
    162. "Lucida Sans Unicode"=str(7):"${_ftname}"
    163. "Microsoft Sans Serif"=str(7):"${_ftname}"
    164. "Tahoma"=str(7):"${_ftname}"
    165. "Lucida Sans Unicode"="${_ftname}"
    166. "Microsoft Sans Serif"="${_ftname}"
    167. "Microsoft YaHei"="${_ftname}"
    168. "微软雅黑"="${_ftname}"
    169. "宋体"="${_ftname}"
    170. "新細明體"="${_ftname}"
    171. "DFKai-SB"="${_ftname}"
    172. "FangSong"="${_ftname}"
    173. "KaiTi"="${_ftname}"
    174. "Microsoft JhengHei"="${_ftname}"
    175. "Microsoft YaHei"="${_ftname}"
    176. "MingLiU"="${_ftname}"
    177. "NSimSun"="${_ftname}"
    178. "PMingLiU"="${_ftname}"
    179. "SimHei"="${_ftname}"
    180. "SimKai"="${_ftname}"
    181. "SimSun"="${_ftname}"
    182. [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
    183. "ClientSideAntiAliasWithCore"="N"
    184. "ClientSideAntiAliasWithRender"="N"
    185. "ClientSideWithRender"="N"
    186. [HKEY_CURRENT_USER\Control Panel\Desktop]
    187. "FontSmoothing"="2"
    188. "FontSmoothingOrientation"=dword:00000001
    189. "FontSmoothingType"=dword:00000002
    190. "FontSmoothingGamma"=dword:00000578
    191. [HKEY_LOCAL_MACHINE\Software\Wine\Ports]
    192. "COM1"="/dev/ttyUSB0"
    193. "COM2"="/dev/ttyUSB1"
    194. "COM3"="/dev/ttyUSB2"
    195. "COM4"="/dev/ttyUSB3"
    196. "COM5"="/dev/ttyUSB4"
    197. "COM6"="/dev/ttyUSB5"
    198. "COM7"="/dev/ttyUSB6"
    199. "COM8"="/dev/ttyUSB7"
    200. "COM9"="/dev/ttyUSB8"
    201. "COM10"="/dev/ttyACM0"
    202. "COM11"="/dev/ttyACM1"
    203. "COM12"="/dev/ttyACM2"
    204. "COM13"="/dev/ttyACM3"
    205. "COM14"="/dev/ttyACM4"
    206. "COM15"="/dev/ttyACM5"
    207. "COM16"="/dev/ttyACM6"
    208. "COM17"="/dev/ttyACM7"
    209. "COM18"="/dev/ttyACM8"
    210. "COM19"="/dev/ttyACM9"
    211. EOF
    212.     install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/${pkgname%-wine}" << EOF
    213. #!/bin/bash
    214. export LC_CTYPE="zh_CN.UTF-8"
    215. export WINEARCH=win32 WINEPREFIX="\$HOME/.${pkgname%-wine}/wine"
    216. export WINEDLLOVERRIDES="mscoree,mshtml="
    217. if [ ! -d "\$HOME"/.${pkgname%-wine} ] ; then
    218.     mkdir -p "\$HOME"/.${pkgname%-wine}/wine || exit 1
    219.     cp -r /${_stc}/${pkgname%-wine}/regpatch.reg "\$HOME"/.${pkgname%-wine}/wine || exit 1
    220.     ln -s /${_stc}/${pkgname%-wine}/${pkgname%-wine}-v${pkgver}.exe "\$HOME"/.${pkgname%-wine}/${pkgname%-wine} || exit 1
    221. fi
    222. if [ ! -f "\$HOME"/.${pkgname%-wine}/regpatchok ] ; then
    223.     touch "\$HOME"/.${pkgname%-wine}/regpatchok || exit 1
    224.     cd "\$HOME"/.${pkgname%-wine}/wine && regedit regpatch.reg && wineserver -k
    225.     winetricks -q mfc42
    226. fi
    227. wine "\$HOME"/.${pkgname%-wine}/${pkgname%-wine} "\$@"
    228. EOF
    229.     install -Dm0644 /dev/stdin "${pkgdir}/usr/share/applications/${pkgname%-wine}.desktop" << EOF
    230. [Desktop Entry]
    231. Name=${pkgname%-wine}
    232. Name[zh_CN]=${pkgname%-wine}
    233. Comment=${pkgdesc}
    234. #MimeType=application/x-${pkgname%-wine};
    235. Exec=${pkgname%-wine} %f
    236. Type=Application
    237. Categories=Development;Tool;
    238. Terminal=false
    239. Icon=${pkgname%-wine}.svg
    240. Version=${pkgver}
    241. EOF
    242. }
    复制代码

    1. info() {
    2.     echo -e "STCAI-ISP 下载编程烧录软件"
    3.     echo -e "非 root 用户需要将用户添加到 uucp 用户组:"
    4.     echo -e "sudo gpasswd -a \$USER uucp"
    5. }
    6. post_install() {
    7.     info
    8. }
    9. post_upgrade() {
    10.     echo "deleting the stcai-isp bottle..."
    11.     find /home -maxdepth 2 -name ".stcai-isp" -exec rm -rf {} \;
    12.     info
    13. }
    14. pre_remove() {
    15.     echo "deleting the stcai-isp bottle..."
    16.     find /home -maxdepth 2 -name ".stcai-isp" -exec rm -rf {} \;
    17. }
    复制代码

    1. info() {
    2.     echo -e "STCAI-ISP-TINY 下载编程烧录软件"
    3.     echo -e "非 root 用户需要将用户添加到 uucp 用户组:"
    4.     echo -e "sudo gpasswd -a \$USER uucp"
    5. }
    6. post_install() {
    7.     info
    8. }
    9. post_upgrade() {
    10.     echo "deleting the stcai-isp-tiny bottle..."
    11.     find /home -maxdepth 2 -name ".stcai-isp-tiny" -exec rm -rf {} \;
    12.     info
    13. }
    14. pre_remove() {
    15.     echo "deleting the stcai-isp-tiny bottle..."
    16.     find /home -maxdepth 2 -name ".stcai-isp-tiny" -exec rm -rf {} \;
    17. }
    复制代码
    回复 支持 反对 送花

    使用道具 举报

  • TA的每日心情
    开心
    2024-8-23 08:43
  • 签到天数: 34 天

    [LV.5]常住居民I

    0

    主题

    14

    回帖

    174

    积分

    注册会员

    积分
    174
    发表于 2024-8-2 19:37:46 | 显示全部楼层
    jacksonjim 发表于 2023-12-7 10:10
    ISP 还好处理的,但是编译器不支持,目前没有独立的编译器,keil只有arm的支持linux, 51系列都没有 ...

    51有sdcc,但是251难搞
    回复 支持 反对 送花

    使用道具 举报

  • TA的每日心情
    开心
    2024-8-23 08:43
  • 签到天数: 34 天

    [LV.5]常住居民I

    0

    主题

    14

    回帖

    174

    积分

    注册会员

    积分
    174
    发表于 2024-8-2 19:38:44 | 显示全部楼层
    神农鼎 发表于 2023-10-31 11:19
    STC-ISP 要跑 Linux 先 用虚拟机运行,工作量大

    但 STC8H8K64U/STC32G12K128的烧录协议是开放的,大家可以 ...

    有stcgal,支持很全面,现在就在用
    回复 支持 反对 送花

    使用道具 举报

  • TA的每日心情

    昨天 09:45
  • 签到天数: 61 天

    [LV.6]常住居民II

    11

    主题

    39

    回帖

    441

    积分

    中级会员

    积分
    441
    发表于 2024-8-23 11:14:10 | 显示全部楼层
    UnknownMp 发表于 2024-8-2 19:38
    有stcgal,支持很全面,现在就在用

    硬件参数这块不支持哎,这个之前 就有研究过的
    回复 支持 反对 送花

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|手机版|深圳国芯人工智能有限公司 ( 粤ICP备2022108929号-2 )

    GMT+8, 2024-11-1 08:37 , Processed in 0.076483 second(s), 54 queries .

    Powered by Discuz! X3.5

    © 2001-2024 Discuz! Team.

    快速回复 返回顶部 返回列表