Skip to content

Conversation

@brindosch
Copy link
Contributor

@brindosch brindosch commented Mar 25, 2020

Summary

  • The code is now ready to compile and run on Windows 7+
  • Added a basic note to compile howTo. It installs 3x cmake, in my case i used just the Visual Studio 2017 cmake but with Visual Studio Code
  • The compiler is Microsoft Visual Studio Community 2017 - amd64, Other compiler archs may/will fail, the pre compiled Qt and Python libs are the limitations
  • QtGrabber works, but performance is weird and the image is shifted

Details

  • General
    ssize_t replaced with size_t for all targets. Follow up issues?
    avahi is disabled on windows for the moment
    Cmake: automoc is off for generated files
  • LedDevices
    • UDPE131 & UDPArtNet
      MSVC doesn't unterstand __packed__((packed)), replaced with #pragma push/pack
      Links to ws2_32 for windows replacement of htons htonl
    • DMX (Serialport)
      There is no concept of nanosleep in windows. Disabled, the _rs232Port.setBreakEnabled(false) and _rs232Port.setBreakEnabled(true) are still there but without sleep. Might be an issue or not
  • Logger
    LogLevel::ERROR a clash with #define ERROR 0, i didn't found this definition, but it claimed it is there and collides. Renamed to ERRORR for now
    There is no syslog on windows, disabled for windows until a solution is found if required
    Name of the binary as prefix is set to unknown - windows solution required
  • PythonInit
    There is a problem with the search path injection (crash). Disabled on windows (Needs to be fixed for packaging)
  • SSL broken
    qt.network.ssl QSslSocket: Can't resolve function d2i_x509. Missmatch of the ssl dependency, nothing special
  • Refactor SysInfo
    Replaced backported SysInfo with Qt SysInfo as we reached the minimum qt version and the backport wasn't windows ready

BREAKING

To update with the .deb package you need to remove the previous installed Hyperion version first

  • Check for the package name apt-cache search hyperion. You may see now a entry like hyperion-x86, hyperion-rpi
  • Remove with the correct name sudo apt-get remove hyperion-XX
  • Now install the new .deb as usual. From now on the package is just called hyperion

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of web configuration, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing setups:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's body (e.g. Fixes: #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated (docs/docs/en)
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@hyperion-project
Copy link

Hello @brindosch 👋

I'm your friendly neighborhood bot and would like to say thank you for
submitting a pull request to Hyperion!

So that you and other users can test your changes more quickly,
you can find your workflow artifacts here.

If you make changes to your PR, i create a new link to your workflow artifacts.

Best regards,
Hyperion-Project

@brindosch brindosch mentioned this pull request Mar 25, 2020
12 tasks
@Paulchen-Panther
Copy link
Member

Ich werde leider erst am WE dazu kommen es zu testen.
Hier ein paar kurze Recherchen (falls nicht schon gelesen):
https://gist.github.com/Youka/4153f12cf2e17a77314c
https://stackoverflow.com/a/35368387/12749851

Danke für den PR 👍

@brindosch
Copy link
Contributor Author

Danke für die links, ssize_t hab ich mal eingesetzt. Ich hab gestern versucht ein nachinstalliertes cmake zu verwenden, die Versuche sind aber gescheitert an include paths. Ich sehe im Editor wo die Dateien liegen, er nimmt die Pfade aber nicht an.

In jedem Fall mal das msvc-cmake verwenden, da ist das irgendwie vorbereitet.

Bzw der code influx ist sehr überschaubar

@Paulchen-Panther
Copy link
Member

@brindosch
Werde jetzt (wieder) versuchen diesen PR zu testen. Habe ich zwar letzte Woche schon versucht, da hat mir aber Visual Studio Enterprise einen Strich durch die Rechnung gemacht.

@brindosch
Copy link
Contributor Author

Fehlt es an includes/libs?
Zum Ausführen von hyperiond musst du die qt.dlls neben hyperiond werfen (die sind nicht im PATH by default).

Ansonsten mal Visual Studio Code starten und den hyperion.code-workspace öffnen. Der Workspace schlägt dir die Extensions vor und schon sollte msvc cmake zur Auswahl.

Visual Studio (Community) hab ich bisher nicht ausprobiert und kann daher nichts zu sagen.

@Paulchen-Panther
Copy link
Member

Zum Ausführen von hyperiond musst du die qt.dlls neben hyperiond werfen (die sind nicht im PATH by default).

Das hat soweit funktioniert.
Welche Umgebung benutzt du?
https://prnt.sc/rtlk9q

@brindosch
Copy link
Contributor Author

Sieht bei mir etwas anders aus. msvc-x64 vermute ich.

vscode amd64

@Paulchen-Panther
Copy link
Member

Paulchen-Panther commented Apr 5, 2020

Also ich benutze Windows 10 und Visual Studio Community 2019.
Kompilieren tut die Sache schon. Nur beim ausführen kommen Fehler.
Ich mach mal ein Screenshot

edit: Ich werd mal Visual Studio Code installieren.

@brindosch
Copy link
Contributor Author

Was für ein Fehler kommt denn?

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@brindosch
Copy link
Contributor Author

Ah super @Paulchen-Panther .

Da der PR eigentlich schon mehr verändert als angedacht, wird es Zeit zu mergen.

  • Aus den docs fliegt die Erwähnung von Windows
  • Stand wird notiert im tracking issue
  • Wir sehen ggf davon ab Windows in den release Zyklus einzureihen

@Paulchen-Panther
Copy link
Member

  • Wir sehen ggf davon ab Windows in den release Zyklus einzureihen

Wie kommt du zu dieser Kehrtwende?

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@brindosch
Copy link
Contributor Author

brindosch commented May 12, 2020

Wie kommt du zu dieser Kehrtwende?

Ist mir noch zu wackelig, ihr dürft mich aber überstimmen! Zum Beispiel könnte man sagen, wenn man es nicht zumindest mit anbietet gehen viele issues auf die das compile setup nicht zum Laufen bekommen

@Paulchen-Panther
Copy link
Member

gehen viele issues auf die das compile setup nicht zum Laufen bekommen

Wie wäre es mit einer CMakeSettings.json datei. Da braucht es nicht viel um es zu kompilieren. Da reichen auch die Build Tools aus (incl. Cmake, QT5 und Python).

@tpmodding
Copy link
Collaborator

die frage ist meiner meinung nach:

a) ist es besser zu warten, bis ihr euch sicher seid und danach die fehler auszumerzen
oder
b) die user drauf zu scheuchen in der hoffnung (segen und fluch zu gleich) direkt mehr fehler gefunden werden können und ihr sie dann nach und nach fixen könnt?

bin für a...

@Paulchen-Panther
Copy link
Member

Selbst im Linux Build sind Leute zu doof zum kompilieren, obwohl es dort klar definiert ist.
Ich bin eher dafür die fertigen Releases anzubieten. Eine Debug Version könnte man bei Problemen immer noch zur Verfügung stellen.

@Paulchen-Panther
Copy link
Member

Oder ein Compile Script?

@brindosch
Copy link
Contributor Author

Kann man alles machen.

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@brindosch brindosch merged commit 510bb90 into hyperion-project:master May 12, 2020
@brindosch
Copy link
Contributor Author

Ich hab mal eine Zwischenfrage. Schafft es jemand die "Visual Studio 2019 Build Tools" herunterzuladen? Ich benötige eine Anleitung.

  • Runter scrollen Alle Downloads -> Tools für Visual Studio 2019 -> Buildtools für Visual Studio 2019 -> Download.
  • Und jetzt?

@brindosch
Copy link
Contributor Author

Voll toll, wie bist du an den Link gekommen? Ich hab 4 Browser durch...

@tpmodding
Copy link
Collaborator

Weiss was du meinst...geht einfach immer wieder hoch...

hab einfach auf "Vorgehensweise bei der Offlineinstallation" geklickt...neugier/zufall...et voila

@brindosch
Copy link
Contributor Author

Cool danke,
das Bedienkonzept scheint super modern. Bin wohl aus der Zeit gefallen.

Lord-Grey pushed a commit to Lord-Grey/hyperion.ng that referenced this pull request May 15, 2020
* Disable AVAHI

* Replace SysInfo backport with Qt SysInfo

* Update vscode config

* Update LedDevices

* Update Logger

* Update hyperiond

* Update hyperion-remote

* Exclude avahi

* Empty definition for Process

* PythonInit path broken

* Exclude PiBlaster and link ws2_32

* more avahi

* resolve ui bug

* Update Compile howto

* JsonAPI QtGrabber missing

* fix error

* ssize_t replacement

* Nope, doesn't work

* Adjust compile description and verify winSDK

* Update ci script

* Update ci script

* Update ci

* Update ci script

* update Logger

* Update PythonInit

* added Azure & GitHub Actions, Logger, PythonInit

* resolve merge conflicts

* revert ssize_t in FadeCandy

* look at registry for QT5 & use find_package(Python) if cmake >= 3.12

* second try

* another try

* and yet another test

* qt5 registry search undone

* Package creation test

* finished package creation. only fine tuning is required :-)

Signed-off-by: Paulchen-Panther <[email protected]>

* Dependencies for Windows finished

Signed-off-by: Paulchen-Panther <[email protected]>

* use 'add_definitions()' until CMake 3.12

Signed-off-by: Paulchen-Panther <[email protected]>

* Update .github/workflows/pull-request.yml

Co-Authored-By: Paulchen Panther <[email protected]>

* Update cmake/Dependencies.cmake

Co-Authored-By: brindosch <[email protected]>

* fix typo/ add VCINSTALLDIR var

* fix again

* Undo change again (Not working)

* fix QT grabber

Signed-off-by: Paulchen-Panther <[email protected]>

* first NSIS test

Signed-off-by: Paulchen-Panther <[email protected]>

* Update NSIS package

* surprise :-)

Signed-off-by: Paulchen-Panther <[email protected]>

* Update NSIS package

* fix: NSIS .bmps

* Add nsis templates

* Force windows gui app

* fix: QSysInfo required Qt5.6, now it's 5.4 again

* Update: Remove platform component and adjust package name

* Add macOS as system name

* Update docs

* fix: Allow gh actions ci also for forks with branches

* Add ReadMe docs, mention windows, add vscode linux debug config

* fix: readme visual

* reduce/hide banner/copyright/log message

Infos here: https://docs.microsoft.com/de-de/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2019#switches

* Fix PythonInit

* vscode: Add runner task

* fix(vscode): compiler path gcc ver independent

* fix azure

* vscode: add windows run tasks

* move process detection

* main: add windows process detection

* Azure file shredder

* Update docs

Co-authored-by: Paulchen Panther <[email protected]>
Co-authored-by: Paulchen-Panther <[email protected]>
@brindosch brindosch deleted the windows branch June 4, 2020 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants