xbzstudio / Timeless-Sydney

好用的New Bing web客户端,功能众多~
https://xbzstudio.github.io/Timeless-Sydney
MIT License
664 stars 169 forks source link

新增打包为二进制相关脚本 #27

Closed FrozenBicycle closed 1 year ago

FrozenBicycle commented 1 year ago

主要变更内容如下:

  1. 新增了 release 和 build 文件夹用于打包源码为可执行程序。
  2. 为 BingServer.py 增加了运行 1 秒后自动打开对话页面的功能。
  3. 根据我个人习惯的调整(请忽略这些变更):
    • 锁死端口为 1145
    • 更换对话背景图:原先的背景图有些淡,字体也是白色,看不太清。
    • 允许对话框调整高度:对于大量文本输入有帮助

备注 第一次使用 github,生疏,请见谅。本想作为一个新的分支插入,但不清楚怎么做。

xbzstudio commented 1 year ago

怎么只保存部分文件的更改呢。。。我不会用github也不大清楚。。。

xbzstudio commented 1 year ago

算了,我先把我做好的1.7预发布版本上传吧,等会再来弄一下你这个pr

xbzstudio commented 1 year ago

卧槽,github怎么提示我有冲突?

xbzstudio commented 1 year ago

要不这样吧,明天我自己手动合并去

FrozenBicycle commented 1 year ago

要不这样吧,明天我自己手动合并去

  1. BingServer.py 的冲突:删除我写的 HOST = '0.0.0.0'; PORT = 80 那是图方便写死在代码里的
  2. main.css 的冲突:1.6.2 版本没有 img{ border-radius: 10px; } 而你的更新新增了,所以保留即可。
xbzstudio commented 1 year ago

ok

xy-cloud-cn commented 1 year ago

你那边git stash一下,然后Pull之后再恢复

主要变更内容如下:

  1. 新增了 release 和 build 文件夹用于打包源码为可执行程序。
  2. 为 BingServer.py 增加了运行 1 秒后自动打开对话页面的功能。
  3. 根据我个人习惯的调整(请忽略这些变更):

    • 锁死端口为 1145
    • 更换对话背景图:原先的背景图有些淡,字体也是白色,看不太清。
    • 允许对话框调整高度:对于大量文本输入有帮助

备注 第一次使用 github,生疏,请见谅。本想作为一个新的分支插入,但不清楚怎么做。

xbzstudio commented 1 year ago

我是真麻了!!!我弄了一堆还是显示冲突

xbzstudio commented 1 year ago

气死我了,算了我直接手动更改吧

xy-cloud-cn commented 1 year ago

冲突的话要pr那里改,你手动改吧

xy-cloud-cn commented 1 year ago

或等你等他上线

FrozenBicycle commented 1 year ago

我昨天晚上看不就2个冲突吗😳怎么变得问题很严重了?然后我昨天晚上resolve conficts之后有两个选项,一个是合并到main,一个是新增分支,我不知道选哪个,我以为 xbzsyudio 会知道怎么处理更好,所以没有 commit。

xy-cloud-cn commented 1 year ago

我昨天晚上看不就2个冲突吗😳怎么变得问题很严重了?然后我昨天晚上resolve conficts之后有两个选项,一个是合并到main,一个是新增分支,我不知道选哪个,我以为 xbzsyudio 会知道怎么处理更好,所以没有 commit。

你需要在你那里同步一下新版本更改 git stash git pull git stash pop

FrozenBicycle commented 1 year ago

好...不过得稍晚点,我会尽量解决冲突的

xbzstudio commented 1 year ago

Traceback (most recent call last): File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\runpy.py", line 86, in _run_code exec(code, run_globals) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\Scripts\pyinstaller.exe__main.py", line 7, in File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller__main__.py", line 194, in _console_script_run run() ^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller__main__.py", line 161, in run parser = generate_parser() ^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\main__.py", line 128, in generate_parser import PyInstaller.building.build_main ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\building\build_main.py", line 28, in from PyInstaller.building.api import COLLECT, EXE, MERGE, PYZ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\building\api.py", line 26, in from PyInstaller.archive.writers import CArchiveWriter, ZlibArchiveWriter ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\archive\writers.py", line 22, in from PyInstaller.building.utils import get_code_object, strip_paths_in_code ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\building\utils.py", line 33, in from PyInstaller.depend.bindepend import match_binding_redirect ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\depend\bindepend.py", line 27, in from PyInstaller.depend import dylib, utils ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\depend\utils.py", line 28, in from PyInstaller.depend import bytecode ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\depend\bytecode.py", line 130, in _cache_instruction_filter = bytecode_regex(rb"(CACHE.)|(..)") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\depend\bytecode.py", line 53, in bytecode_regex pattern = re.sub( ^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\re.py", line 187, in sub return _compile(pattern, flags).sub(repl, string, count) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\depend\bytecode.py", line 55, in lambda m: _instruction_to_regex(m[1].decode()), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\depend\bytecode.py", line 36, in _instruction_to_regex return re.escape(bytes([opmap[x]]))


KeyError: 'CACHE'
xbzstudio commented 1 year ago

在运行build-binary.bat时出现该问题

xbzstudio commented 1 year ago

一同出现的还有“找不到文件newbing-sydney”

xy-cloud-cn commented 1 year ago

我建议基于我的easy_start来打包,会更容易,而且bug更少 而且要我说直接给release加个带环境的安装包得了( 另外,个人习惯的如果你真的想忽略的话,请不要add

主要变更内容如下:

  1. 新增了 release 和 build 文件夹用于打包源码为可执行程序。
  2. 为 BingServer.py 增加了运行 1 秒后自动打开对话页面的功能。
  3. 根据我个人习惯的调整(请忽略这些变更):

    • 锁死端口为 1145
    • 更换对话背景图:原先的背景图有些淡,字体也是白色,看不太清。
    • 允许对话框调整高度:对于大量文本输入有帮助

备注 第一次使用 github,生疏,请见谅。本想作为一个新的分支插入,但不清楚怎么做。

xy-cloud-cn commented 1 year ago

Traceback (most recent call last): File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\runpy.py", line 86, in _run_code exec(code, run_globals) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\Scripts\pyinstaller.exemain.py", line 7, in File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstallermain.py", line 194, in _console_script_run run() ^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstallermain.py", line 161, in run parser = generate_parser() ^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstallermain.py", line 128, in generate_parser import PyInstaller.building.build_main ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\building\build_main.py", line 28, in from PyInstaller.building.api import COLLECT, EXE, MERGE, PYZ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\building\api.py", line 26, in from PyInstaller.archive.writers import CArchiveWriter, ZlibArchiveWriter ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\archive\writers.py", line 22, in from PyInstaller.building.utils import get_code_object, strip_paths_in_code ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\building\utils.py", line 33, in from PyInstaller.depend.bindepend import match_binding_redirect ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\depend\bindepend.py", line 27, in from PyInstaller.depend import dylib, utils ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\depend\utils.py", line 28, in from PyInstaller.depend import bytecode ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\depend\bytecode.py", line 130, in _cache_instruction_filter = bytecode_regex(rb"(CACHE.)|(..)") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\depend\bytecode.py", line 53, in bytecode_regex pattern = re.sub( ^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\re.py", line 187, in sub return _compile(pattern, flags).sub(repl, string, count) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\depend\bytecode.py", line 55, in lambda m: _instruction_to_regex(m[1].decode()), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\33664\AppData\Local\Programs\Python\Python311\lib\site-packages\PyInstaller\depend\bytecode.py", line 36, in _instruction_to_regex return re.escape(bytes([opmap[x]])) ~^^^ KeyError: 'CACHE'

我仔细看了一下,你别合并了,关了吧,他直接改的主配置,而且用的自己的conda环境,你可以发release的时候自己打包一下

FrozenBicycle commented 1 year ago

一同出现的还有“找不到文件newbing-sydney”

这么多问题的吗😂可我都是远程仓库下载了压缩包自己测试过能用,神奇。反正这个也关了,我再考虑更好的方式吧。

xbzstudio commented 1 year ago

谢谢你的好意...希望你找到更好的方法后重新再来pr哦。