Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please upload windows portable release with support for --no-gui #388

Closed
siferati opened this issue Feb 7, 2021 · 8 comments
Closed

Please upload windows portable release with support for --no-gui #388

siferati opened this issue Feb 7, 2021 · 8 comments
Labels

Comments

@siferati
Copy link

siferati commented Feb 7, 2021

Hello, like the title says, I would like you to upload a windows portable release with support for the --no-gui option please, as I cannot build it myself.

Also, the path to the icon resource below should read syncplay\\resources\\icon.ico instead of resources\\icon.ico.

syncplay/buildPy2exe.py

Lines 752 to 753 in f57df2c

# *** If you wish to make the Syncplay client use console mode (for --no-gui to work) then comment out the above two lines and uncomment the following line:
# console=['syncplayServer.py', {"script":"syncplayClient.py", "icon_resources":[(1, "resources\\icon.ico")], 'dest_base': "Syncplay"}],

@Et0h
Copy link
Contributor

Et0h commented Feb 12, 2021

To know what to build it would be helpful to know the purpose of having a windows portable --no-gui release. However, I've given it a try and it is available from: https://github.com/Et0h/syncplay/releases/download/console-test/syncplay_v1.6.8_dev_console.zip

Syncplay should operate in console mode but it won't run if you have not specified all of the relevant settings (as it tries to open the configuration window and fails).

You can run Syncplay with something like: syncplay.exe --host syncplay.pl:8995 --room MyRoom --name siferati --player-path "c:\Program Files\mpv\mpv.exe"

You can also modify the settings within syncplay.ini, which will be populated the first time you sucesfully run Syncplay.

@Et0h
Copy link
Contributor

Et0h commented Feb 13, 2021

For future reference, this is how my console build differs from GIT HEAD:

Index: buildPy2exe.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- buildPy2exe.py	(revision 83b65fa7141bc5e348caf85a4e62bc7bc16567cb)
+++ buildPy2exe.py	(date 1613172972019)
@@ -742,20 +742,14 @@
 )
 
 info = dict(
-    common_info,
-    windows=[{
-      "script": "syncplayClient.py",
-      "icon_resources": [(1, "syncplay\\resources\\icon.ico")],
-      'dest_base': "Syncplay"},
-    ],
-    console=['syncplayServer.py'],
+
     # *** If you wish to make the Syncplay client use console mode (for --no-gui to work) then comment out the above two lines and uncomment the following line:
-    # console=['syncplayServer.py', {"script":"syncplayClient.py", "icon_resources":[(1, "resources\\icon.ico")], 'dest_base': "Syncplay"}],
+    console=['syncplayServer.py', {"script":"syncplayClient.py", "icon_resources":[(1, "syncplay\\resources\\icon.ico")], 'dest_base': "Syncplay"}],
 
     options={
         'py2exe': {
             'dist_dir': OUT_DIR,
-            'packages': 'PySide2, cffi, OpenSSL, certifi',
+            'packages': 'cffi, OpenSSL, certifi',
             'includes': 'twisted, sys, encodings, datetime, os, time, math, urllib, ast, unicodedata, _ssl, win32pipe, win32file',
             'excludes': 'venv, doctest, pdb, unittest, win32clipboard, win32pdh, win32security, win32trace, win32ui, winxpgui, win32process, Tkinter',
             'dll_excludes': 'msvcr71.dll, MSVCP90.dll, POWRPROF.dll',
Index: syncplay/ui/ConfigurationGetter.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- syncplay/ui/ConfigurationGetter.py	(revision 83b65fa7141bc5e348caf85a4e62bc7bc16567cb)
+++ syncplay/ui/ConfigurationGetter.py	(date 1613172768002)
@@ -26,7 +26,7 @@
             "name": None,
             "debug": False,
             "forceGuiPrompt": True,
-            "noGui": False,
+            "noGui": True,
             "noStore": False,
             "room": "",
             "roomList": [],

Plus I added syncplay.ini to the built folder to make it a portable release.

@siferati
Copy link
Author

Thanks!

it would be helpful to know the purpose of having a windows portable --no-gui release

I have no need for the syncplay gui - the mpv window alone is enough. Unfortunately, when you close the syncplay gui in the default release it also closes the player. However, with --no-gui I can very easily create a .vbs script to quietly launch syncplay in the background while having only the mpv window visible:

CreateObject("Wscript.Shell").Run "Syncplay.exe --no-gui", 0, True

In the meantime, I was able to more or less compile it in my computer, however I get the warning Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created when running. Any idea of what I'm missing?


I don't think setting "noGui": True is needed, as this completely blocks the gui from appearing. A much better middle ground would be to keep it False. The primary purpose would still be to use syncplay with the --no-gui option, but you would also be able to open the gui when needed - for example, to change settings in an easier fashion rather than directly editing the .ini file.

@Et0h
Copy link
Contributor

Et0h commented Feb 13, 2021

Here is a version with GUI support and without --no-gui by default: https://github.com/Et0h/syncplay/releases/download/console-test/syncplay_v1.6.8_dev_console_v2.zip - you can't control the console while Syncplay GUI is running because of how things work. Use --no-gui to launch in no GUI mode.

@Et0h
Copy link
Contributor

Et0h commented Feb 13, 2021

By the way, those who are controlling Syncplay by mpv may be pleased to know that all of the Syncplay console commands are accessible from within the mpv chat feature if you use / before the message. See https://syncplay.pl/guide/client/#:~:text=Commands%20accessible%20via%20the%20chat%20facility for details.

@siferati
Copy link
Author

What about the Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created warning I get when running the source code on my system? Any clue as to how to fix it? Your releases run fine, but if I run the source code directly or compile it myself it gives that warning.

@daniel-123
Copy link
Contributor

I think that warning is benign - it's has been there for a long time, but doesn't cause any issues that we could see. Not even with high dpi screens since this commit.

@Et0h
Copy link
Contributor

Et0h commented Feb 25, 2021

I agree it is benign, but people keep complaining about it and it sends people down the wrong path to figuring out problems so I've hopefully supressed the error now for future releases.

@Syncplay Syncplay locked and limited conversation to collaborators Aug 1, 2021
@Et0h Et0h closed this as completed Aug 1, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

3 participants