• 记一次electron打包32位安装程序的过程


    1.首先在package.json文件里面修改打包命令
      "build": "node --max_old_space_size=10192 .electron-vue/build.js && electron-builder --win --ia32"
      关键是后面的:--win --ia32
    2.执行npb run build

      一直提示electron-v2.0.18-win32-ia32.zip包下载失败,是从https://git.xxxxx下载的。
      这个包最终下载到目录:C:\Users\suben\AppData\Local\electron\Cache

    3.后来百度、谷歌,偶然间了解到有可能是全局配置的问题
      所以使用命令:git config --global -l,查看全局配置,发现有一个“url.https://.insteadof”的全局配置,
      然后使用命令:git config --global --unset url.https://.insteadof,删除该全局配置

    C:\Users\suben>git config --global -l
    merge.tool=kdiff3
    diff.guitool=kdiff3
    core.editor="D:/Program Files (x86)/GitExtensions/GitExtensions.exe" fileeditor
    credential.helper=!\"D:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\"
    user.name=君爷
    user.email=junye@126.com
    difftool.kdiff3.path=D:/Program Files (x86)/KDiff3/kdiff3.exe
    mergetool.kdiff3.path=D:/Program Files (x86)/KDiff3/kdiff3.exe
    url.https://.insteadof=git://
    https.https://github.com.proxy=https://127.0.0.1:1080
    url.https://.insteadof=git://
    https.https://github.com.proxy=https://127.0.0.1:1080
    这俩都要删掉,第一个是之前不知道什么原因加的;第二个是我新加的配置,没用到。

    4.重新执行npb run build就可以了
    5.另外,中间还删除了一个默认脚本,不知是否对此有影响,具体操作:
      打开Git Extensions,点击工具->设置->脚本,然后找到name为Open on GitHub的一项,删除。
      它的配置是这样的:
      name:Open on GitHub,
      command:{openurl}
      arguments:https://github.com{cDefaultRemotePathFromUrl}/commit/{sHash}


    参考文章:https://blog.csdn.net/weixin_42232931/article/details/117933869,这篇文章有对全局配置操作的命令,很全,可以参考。

    一、代理设置

    1、全局代理设置

    1.  
      git config --global http.proxy http://127.0.0.1:1080
    2.  
      git config --global https.proxy https://127.0.0.1:1080

    这里可以打开SS查看代理设置,查看自己的端口是否为1080,不是的改为对应的端口。

    2、只对GitHub进行代理

    如果挂了全局代理,克隆coding之类的国内仓库会变慢,所以我建议使用如下命令,只对GitHub进行代理,对国内的仓库不影响。

    1.  
      git config --global http.https://github.com.proxy https://127.0.0.1:1080
    2.  
      git config --global https.https://github.com.proxy https://127.0.0.1:1080

    如果在输入这条命令之前,已经输入全局代理的话,可以按照二、取消代理的方法进行取消。

    注意:以上两点都是对https协议进行代理设置,也就是仅对git clone https://www.github.com/xxxx/xxxx.git这种命令有效。对于SSH协议,也就是git clone git@github.com:xxxxxx/xxxxxx.git这种,依旧是无效的。

    3、sock5代理设置

    之前说的是http代理,有人反映ss暴露的是socks5。下面附上socks5代理的方法。

    1、首先查看自己socks5的端口号,假设为:127.0.0.1:1086

    2、输入以下命令:

    1.  
      git config --global http.https://github.com.proxy socks5://127.0.0.1:1086
    2.  
      git config --global https.https://github.com.proxy socks5://127.0.0.1:1086

    二、取消代理

    1.  
      git config --global --unset http.proxy
    2.  
      git config --global --unset https.proxy

    三、查看已有配置

    git config --global -l
  • 相关阅读:
    HDU 5714
    C++ 中的名称冲突之 "y1"
    FFT 模板
    Modular Query
    找礼物(find)(模拟)
    水流(water)(BFS)(DFS)
    单词接龙(dragon)(BFS)
    细菌(disease) (位运算)(状态压缩)
    Diamond Collector (动态规划)
    超级素数(sprime) (BFS)
  • 原文地址:https://www.cnblogs.com/subendong/p/16285300.html
Copyright © 2020-2023  润新知