ets2_dashboard_v2 icon indicating copy to clipboard operation
ets2_dashboard_v2 copied to clipboard

New DLL

Open Hopfenkutscher opened this issue 5 years ago • 24 comments

Hello, its not possible for me to create a new .dll-File with new telemetry data.

Can you help me?

Hopfenkutscher avatar Nov 22 '20 15:11 Hopfenkutscher

Hello Hopfenkutscher,

please tell us more details.

Metaln00b avatar Jan 03 '21 02:01 Metaln00b

Hallo Metaln00b, vielen Dank für deine Antwort. Da dein Standort in D ist versuch ich es einfach gleich mal in deutsch.

Ich habe die Pfade in der build.bat geändert. Wenn ich diese per Administratir ausführe kommt in der Console diese Meldung:

C:\Windows\system32>cl /nologo /W4 /LD /MD /EHsc /O2 /IC:\Users\van-s\Desktop\ats_dashboard-master\originalsource\scs_sdk_1_5\include ..\source\ets2_plugin\plugin.def ..\source\ets2_plugin\plugin.cpp ..\source\ets2_plugin\serial.cpp ..\source\ets2_plugin\options.cpp /link /OUT:dash_plugin.dll
Der Befehl "cl" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

C:\Windows\system32>xcopy dash_plugin.dll "C:\Program Files (x86)\Steam\steamapps\common\American Truck Simulator\bin\win_x64\plugins" /D
Datei dash_plugin.dll nicht gefunden
0 Datei(en) kopiert

C:\Windows\system32>pause
Drücken Sie eine beliebige Taste . . .

Oder braucht es da andere Programme? Und wenn das funktioniert, woher weiß ich welcher Byte das ist den ich dann im Arduino-Programm eingeben muss? Und gibt es Möglichkeiten die Kombiniert sind? Wie Blinker Links && Blinker Rechts = Warnblink.

Vielen Dank und Grüße

PS: VisualBasic2010 hab ich.

Hopfenkutscher avatar Jan 07 '21 15:01 Hopfenkutscher

Hier musst du anders vorgehen.

  • Du musst die "scs SDK" herunterladen und entpacken. https://modding.scssoft.com/wiki/Documentation/Engine/SDK/Telemetry](scs SDK)

  • Im Ordner "source" von "ets2_dashboard_v2_master" die CMakeLists.txt folgendes ergänzen "project(ETS2_DASHBOARD_V2)"

  • In der Datei "ets2_dashboard_v2-master\source\plugin\CMakeLists.txt" die Pfade anpassen.

  • "cmake" installieren und im "ets2_dashboard_v2_master"-Ordner über PowerShell folgenden Befehl eingeben "cmake .\source".

Anschließend kannst du das Projekt über Visual Basic öffnen und anstelle von "Debug" ein "Release" erstellen.

Metaln00b avatar Jan 07 '21 17:01 Metaln00b

Hallo, vielen Dank für deine schnelle Anwort.

CMake ist installiert und in der PowerShell habe ich jetzt folgendes eingegeben: PS C:\Users\van-s\desktop\ets2_dashboard_v2-master> cmake .\source

Ist das so richtig? Weil ich einen Fehler bekomme.

CMake Error at CMakeLists.txt:4 (project):
  Failed to run MSBuild command:

    C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe

  to get the value of VCTargetsPath:

    Microsoft (R)-Buildmodul, Version 4.8.4084.0

    [Microsoft .NET Framework, Version 4.0.30319.42000]

    Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

    

    Der Buildvorgang wurde am 07.01.2021 20:10:27 gestartet.

    Projekt "C:\Users\van-s\Desktop\ets2_dashboard_v2-master\build\CMakeFiles\3.19.2\VCTargetsPath.vcxproj" auf Knoten "1" (Standardziele).

    C:\Users\van-s\Desktop\ets2_dashboard_v2-master\build\CMakeFiles\3.19.2\VCTargetsPath.vcxproj(14,2): error MSB4019: Das importierte Projekt "C:\Microsoft.Cpp.Default.props" wurde nicht gefunden. Vergewissern Sie sich, dass der Pfad in der <Import>-Deklaration korrekt und die Datei auf dem Datentr„ger vorhanden ist.

    Die Erstellung des Projekts "C:\Users\van-s\Desktop\ets2_dashboard_v2-master\build\CMakeFiles\3.19.2\VCTargetsPath.vcxproj" ist abgeschlossen (Standardziele) -- FEHLER.

    

    Fehler beim Buildvorgang.

    

    "C:\Users\van-s\Desktop\ets2_dashboard_v2-master\build\CMakeFiles\3.19.2\VCTargetsPath.vcxproj" (Standardziel) (1) ->

      C:\Users\van-s\Desktop\ets2_dashboard_v2-master\build\CMakeFiles\3.19.2\VCTargetsPath.vcxproj(14,2): error MSB4019: Das importierte Projekt "C:\Microsoft.Cpp.Default.props" wurde nicht gefunden. Vergewissern Sie sich, dass der Pfad in der <Import>-Deklaration korrekt und die Datei auf dem Datentr„ger vorhanden ist.

    

        0 Warnung(en)

        1 Fehler

    

    Verstrichene Zeit 00:00:00.20

    

  Exit code: 1



Configuring incomplete, errors occurred!
See also "C:/Users/van-s/Desktop/ets2_dashboard_v2-master/build/CMakeFiles/CMakeOutput.log".

Hopfenkutscher avatar Jan 07 '21 19:01 Hopfenkutscher

PowerShell-Fehler:

cmake : Die Benennung "cmake" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines
ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern
enthalten), und wiederholen Sie den Vorgang.
In Zeile:1 Zeichen:1
+ cmake .\source
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (cmake:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Hopfenkutscher avatar Jan 07 '21 19:01 Hopfenkutscher

PowerShell-Fehler:

cmake : Die Benennung "cmake" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines
ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern
enthalten), und wiederholen Sie den Vorgang.
In Zeile:1 Zeichen:1
+ cmake .\source
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (cmake:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Hast du bei der Installation von cmake daran gedacht, dass ein %PATH% angelegt wird? Das macht es möglich, cmake von einem beliebigen ordner aus auszuführen.

Metaln00b avatar Jan 08 '21 10:01 Metaln00b

    Projekt "C:\Users\van-s\Desktop\ets2_dashboard_v2-master\build\CMakeFiles\3.19.2\VCTargetsPath.vcxproj" auf Knoten "1" (Standardziele).

    C:\Users\van-s\Desktop\ets2_dashboard_v2-master\build\CMakeFiles\3.19.2\VCTargetsPath.vcxproj(14,2): error MSB4019: Das importierte Projekt "C:\Microsoft.Cpp.Default.props" wurde nicht gefunden. Vergewissern Sie sich, dass der Pfad in der <Import>-Deklaration korrekt und die Datei auf dem Datentr„ger vorhanden ist.

    Die Erstellung des Projekts "C:\Users\van-s\Desktop\ets2_dashboard_v2-master\build\CMakeFiles\3.19.2\VCTargetsPath.vcxproj" ist abgeschlossen (Standardziele) -- FEHLER.

    

    Fehler beim Buildvorgang.
  • Nutze /, anstelle \ in deinem Pfad.

So sieht meine Datei aus.

cmake_minimum_required(VERSION 3.0)

find_path(SCSSDK_INC scssdk.h
  HINTS "D:/van-s/Downloads/scs_sdk_1_12/include"
)

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
  set(ETS2_HINT_PATH "D:/Program Files (x86)/Steam/SteamApps/common/Euro Truck Simulator 2/bin/win_x64")
else()
  set(ETS2_HINT_PATH "D:/Program Files (x86)/Steam/SteamApps/common/Euro Truck Simulator 2/bin/win_x86")
endif()

find_path(ETS2_PATH eurotrucks2.exe
  HINTS "${ETS2_HINT_PATH}"
)

include_directories("${SCSSDK_INC}")

add_library(ets2_dash_v2_plugin SHARED
  cJSON.h
  cJSON.c
  plugin.cpp
  plugin.def
)

target_link_libraries(ets2_dash_v2_plugin
  Ws2_32
)

install(TARGETS ets2_dash_v2_plugin
  DESTINATION "${ETS2_PATH}/plugins"
  CONFIGURATIONS Release
)

Metaln00b avatar Jan 08 '21 10:01 Metaln00b

Das ist meine

cmake_minimum_required(VERSION 3.0)

find_path(SCSSDK_INC scssdk.h
  HINTS "C:/Users/van-s/Desktop/ets2_dashboard_v2-master/SDK/include"
)

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
  set(ETS2_HINT_PATH "C:/Program Files (x86)/Steam/SteamApps/common/Euro Truck Simulator 2/bin/win_x64")
else()
  set(ETS2_HINT_PATH "C:/Program Files (x86)/Steam/SteamApps/common/Euro Truck Simulator 2/bin/win_x86")
endif()

find_path(ETS2_PATH eurotrucks2.exe
  HINTS "${ETS2_HINT_PATH}"
)

include_directories("${SCSSDK_INC}")

add_library(ets2_dash_v2_plugin SHARED
  cJSON.h
  cJSON.c
  plugin.cpp
  plugin.def
)

target_link_libraries(ets2_dash_v2_plugin
  Ws2_32
)

install(TARGETS ets2_dash_v2_plugin
  DESTINATION "${ETS2_PATH}/plugins"
  CONFIGURATIONS Release
)

CMake neu installiert und jetzt erkennt er das in der PowerShell, allerdings nun folgendes:

PS C:\Users\van-s\desktop\ets2_dashboard_v2-master> cmake .\source
-- Building for: NMake Makefiles
CMake Warning (dev) at plugin/CMakeLists.txt:19 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:5 (project):
  The CMAKE_C_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:5 (project):
  The CMAKE_CXX_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!

Hopfenkutscher avatar Jan 08 '21 15:01 Hopfenkutscher

Nach ewigem hin und her hat mit C-Make nun die Projekt-Dateien erstellt.

PS C:\Users\van-s\desktop\ets2_dashboard_v2-master> cmake .\source
-- Building for: Visual Studio 10 2010
-- The C compiler identification is MSVC 16.0.30319.1
-- The CXX compiler identification is MSVC 16.0.30319.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/van-s/Desktop/ets2_dashboard_v2-master

Jetzt habe ich das in VB2010 C++ geladen und als Release erstellt.

Das Programm 
"C:\Users\van-s\Desktop\ets2_dashboard_v2-master\Release\ALL_BUILD" kann nicht gestartet werden.

Das System kann die angegebene Datei nicht finden.

Hopfenkutscher avatar Jan 08 '21 16:01 Hopfenkutscher

Ist die Datei vorhanden? Bei mir ist sie im Hauptordner mit weiteren folgende Dateien:


    Verzeichnis: D:\van-s\Downloads\ets2_dashboard_v2-master


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        04.02.2016     20:34                build
d-----        03.01.2021     03:31                CMakeFiles
d-----        03.01.2021     03:31                plugin
d-----        04.02.2016     20:34                source
d-----        03.01.2021     03:31                x64
------        04.02.2016     20:34            378 .gitattributes
------        04.02.2016     20:34            981 .gitignore
-a----        03.01.2021     03:30          40546 ALL_BUILD.vcxproj
-a----        03.01.2021     03:30            307 ALL_BUILD.vcxproj.filters
-a----        03.01.2021     03:31            168 ALL_BUILD.vcxproj.user
-a----        03.01.2021     03:30          14141 CMakeCache.txt
-a----        03.01.2021     03:30           1674 cmake_install.cmake
-a----        03.01.2021     03:30           4167 ETS2_DASHBOARD_V2.sln
-a----        03.01.2021     03:30          11953 INSTALL.vcxproj
-a----        03.01.2021     03:30            536 INSTALL.vcxproj.filters
-a----        03.01.2021     03:30          40804 ZERO_CHECK.vcxproj
-a----        03.01.2021     03:30            537 ZERO_CHECK.vcxproj.filters

Metaln00b avatar Jan 08 '21 21:01 Metaln00b

Ich habe jetzt über die VS-Eingabeaufforderung jetzt mal dieses probiert: https://github.com/skyhisi/ets2_dashboard mit dem Download http://downloads.silasparker.co.uk/ets2_dashboard_v3.zip

Das Plugin wird erstellt und auch vom ETS erkannt, allerdings NUR in 32Bit-Ausführung da die Eingabeaufforderung folgendes zeigt : Setting environment for using Microsoft Visual Studio 2010 x86 tools.

Gibt es sowas auch für x64 damit es für 64Bit erstellt wird?

Hopfenkutscher avatar Jan 09 '21 08:01 Hopfenkutscher

Sicherlich wird es das auch in 64 bit geben. Frage mich nur warum es nicht mit der v2 funktioniert, trotz fehlender beispiele konnte ich ohne Probleme das Projekt mit cmake erstellen. Bei den anderen Plugins weiss ich gerade selber nicht mehr wie die gebaut werden.

Metaln00b avatar Jan 09 '21 13:01 Metaln00b

Wenn du dein Plugin machst, funktioniert das dann auch im ETS? Nimmst du dafür das beigelegte Arduino-Programm? Und weist du, wie ich herausfinde welcher Kanal welcher Byte ist? Z.B.

digitalWriteFromBit(LEFT_INDICATOR, serial_byte, 5);

Hopfenkutscher avatar Jan 16 '21 09:01 Hopfenkutscher

Ich habe es nicht als Plugin geladen nur gebaut. Habe einen anderen Weg gewählt. Um die ganzen Pakete zu entschlüsseln, schaust du dir am besten die ETS telemetry server doku an.

Metaln00b avatar Jan 16 '21 12:01 Metaln00b

Wo finde ich die Doku? Bei SCS selber?

Hopfenkutscher avatar Jan 16 '21 14:01 Hopfenkutscher

Wo finde ich die Doku? Bei SCS selber?

https://github.com/Funbit/ets2-telemetry-server

Metaln00b avatar Jan 16 '21 14:01 Metaln00b

Das hab ich mir schon mal angeschaut, finde ich da was dazu was ich brauche? Welchen Weg hast du gewählt?

Hopfenkutscher avatar Jan 16 '21 15:01 Hopfenkutscher

Das hab ich mir schon mal angeschaut, finde ich da was dazu was ich brauche? Welchen Weg hast du gewählt?

Ja sollte.

Ich hab mich erstmal entschieden mit SimHub zu arbeiten. Nutzt unter der Haube auch den ETS Telemetry Server.

Metaln00b avatar Jan 16 '21 16:01 Metaln00b

Ok, naja ich brauch das über den Arduino weil ich LED‘s ansteuern will/muss.

Ich werde mal bisschen weiter probieren. Durch deine Antworten bin ich auf jeden Fall schon mal weiter gekommen.

Vielen Dank dafür :)

Hopfenkutscher avatar Jan 17 '21 19:01 Hopfenkutscher

Hello, how did it end? did you manage to create the file?

Sergeymxsf1 avatar Nov 03 '21 21:11 Sergeymxsf1

Hello, how did it end? did you manage to create the file?

What Hopfenkutscher is doing now, i do not know. But i am using Simhub, it is running very well.

Please use a translator and follow my steps. The most problems are some wrong paths, unavailable files or tools like cmake.

I do not want spent more time in this issue. The developer seems to be uninterested.

Thank you and please use simhub, it is the easiest way. You can control an arduino via serial connection etc.

Metaln00b avatar Nov 03 '21 22:11 Metaln00b

hello, I was thinking about simhub, but I don't know if it supports the latest sdk changes, such as the lifting axle and a few more new ones, and how to configure everything through it?? \

чт, 4 нояб. 2021 г. в 01:22, Florian @.***>:

Hello, how did it end? did you manage to create the file?

What Hopfenkutscher is doing now, i do not know. But i am using Simhub, it is running very well.

Please use a translator and follow my steps. The most problems are some wrong paths, unavailable files or tools like cmake.

I do not want spent more time in this issue. The developer seems to be uninterested.

Thank you and please use simhub, it is the easiest way. You can control an arduino via serial connection etc.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/skyhisi/ets2_dashboard_v2/issues/1#issuecomment-960240558, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJPK4CF2PTBWJYAJS4F4O3UKGY2DANCNFSM4T6RY7IQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Sergeymxsf1 avatar Nov 03 '21 22:11 Sergeymxsf1

I will try to study the issue regarding SIMHub and I will be glad if I can contact you for help.

Sergeymxsf1 avatar Nov 03 '21 22:11 Sergeymxsf1

Simhub is very good supported and up to date. Please use the documentation of simhub to find an answer for your questions.

Thank you

Metaln00b avatar Nov 03 '21 22:11 Metaln00b