Giter VIP home page Giter VIP logo

Comments (55)

t3nk3y avatar t3nk3y commented on May 27, 2024 1

Working on some of these now.

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

FYI, I forked, this in to a git, and added a pull request as well

from retc.

MartB avatar MartB commented on May 27, 2024

Hey, thanks for your effort i appreciate it!
I feel like the project is now mature enough to provide an installer as it should be safe to use.
I will review your pull request #7 and keep you updated.

Kind regards
MartB

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

Great, thanks. I had sent this to you in an email as well. But I figured I'll put this here as well, just to be clear on what the install does now, and what might be needed:

What it does:

  • Installs the main RETC executable in a Program Files/RETC (or dir of user choice)
  • 32/64 bit OS is detected, and binaries are selected based on the bittage
  • Option to copy the RzChromaSDL DLLs to the Overwatch folders
  • Overwatch folders are detected using installer registry keys.
  • Overwatch PTR is supported as well, and files will be copied to it as well, if requested.
  • NSSM is used to install RETC as a system service.
  • Service is started after install.
  • Uninstaller included, that supports stopping and removing the service, the executables, and DLLs from Overwatch(optional)
  • If RETC is already installed, service will be stopped before overwriting files, this makes updates clean and simple.
  • Checks for RzChromaSDK.dll and RzChromaSDK64.dll in the Windows System(32 and 64 bit) folders during install, and offers to remove them for you, warning that they should never be put there.
  • Binary, and all necessary libraries are included in the installer,

Things to do:

  • Review verbiage.
  • Possibly add a license.
  • Possibly supply localized(different language) installers.
  • Possibly switch some third party libraries to a, "Let me download and extract that for you", methodology, instead of including them. Not sure where Razr and Corsair stand policy wise for including the SDKs.
  • Comment up the NSI, it isn't very clear right now.
  • Maybe add other shortcuts, to a readme, or perhaps to start/stop the service.
  • If you ever want to add support for more games, they should be added as sections similar to the Overwatch section, as the RzChromaSDK's need copied to each game in the appropriate folder.

Requirements/Use:

  • You will need to download and install NSIS: http://prdownloads.sourceforge.net/nsis/nsis-3.01-setup.exe?download
  • Once you install NSIS you can open it's script compiler, select the nsi file, and it will then compile it(done)
  • I personally use Notepad++ to work with NSIS(be sure to get the 32bit version, the 64bit version is lacking a lot of plugins).
  • Instructions for setting up NPP for working with NSIS: http://nsis.sourceforge.net/Notepad_Plus_Plus
  • Alternatively both Visual Studio and Eclipse have plugins for working with NSIS, instructions can be found for both on the NSIS sourceforge wiki.

from retc.

MartB avatar MartB commented on May 27, 2024

Issues found:

  • If you have registry entries for Overwatch pointing to a detached hdd it will throw an File opening error.

A possible fix would be validating the path and disabling the section checkbox within nsis (same for the uninstaller), this would also provide better user feedback if Overwatch is not installed.

  • NSSM is hard coded to the 64 bit executable make it default to whatever architecture the user is using.

  • Critical the RzSdk Wrapper dlls should not be stored next to the executable otherwise this ends up in an endless loop due to the rzpassthrough sdk!

Also im not too sure if we should add support for games using the sections at all a small gui tool would be beneficial in the future but for now lets fix the issue with the section and keep it like that.

General remarks:

Licensing:

I checked on the corsair cue license agreement a bit and found a section related to "export"
doc/CUE SDK - Overview and Reference.pdf

You will not export or re-export any CORSAIR
software, services, technology, or any derivatives thereof, or permit the
shipment of same. This section will survive the expiration or
termination of this Agreement for any reason.

Although this seems more like physical copies it could apply to online distribution too.
However if this was the case i would need to remove all the header files.
Furthermore i hope we can rely on the recently released public version of the CUE2 Software to ship the binaries to our users (http://forum.corsair.com/v3/forumdisplay.php?f=267)

I would say we just redistribute them for now until i find more informations about that matter.
I contacted corsair about it.

Texts

  • Change Razr -> Razer
  • Add link to this github repo (Useful for updates etc.)
  • Add a license (Not sure if we need that but we should atleast include the gpl license of this repo)
  • Change dialog text on system32 dll deletion to better reflect that they should not be deleted if the user did not copy them there in the first place. (e.g when having the razer chroma sdk installed)

Additional stuff (nice to have but not critical for this merge)

  • Add link to github repo to the uninstaller informations. (reg key)
  • Notify the user that he had already installed RETC and is about to overwrite it.

BuildScript

Once we have the english version fleshed out we can start accepting translations as pull requests
(I will do the german version.)

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

Just added a commit to fix several of these things:

  • Added gitignores to allow compiling the script without dirtying git
  • Added license and readme, both will be added to the installation folder
  • Script now expects license and readme.md to be in /files (should likely add some script that copies binaries, DLLs, and license/readme to /files before compiling nsis script)
  • Check if Overwatch directories exist before trying to copy or delete files to/from it. This should fix error thrown for offline drives.
  • Added shortcut to github repo. Both as a shortcut, and as a link on the finish page.
  • Fixed all instances referring to Razr, to be Razer instead, this is not for a smartphone...

from retc.

MartB avatar MartB commented on May 27, 2024

Thanks great job.
I agree we could use a powershell / any other shell script to make the setup building process easier.
If you dont want to spend time on it i can do that before i merge your commits in.

Edit: Im preparing a simple python script.

I checked on the corsair cue license agreement a bit details above.

from retc.

MartB avatar MartB commented on May 27, 2024

Another thing i just noticed that the deletion of RZSDK dlls from the windows/system32 folder breaks the razer passthrough support.
We would need some way to verify if these are our dlls and not the ones from razer.
A quick solution would be adding a warning message like
"If you have the razer chroma sdk installed choose no here!"

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

I took a look at some options for the RzChomaSDK thing. The DLL files have detail info when right clicking them. The ProductName detail can be used to ID the DLL from Razer, and then skip it if the DLL belongs to Razer.

There are a couple of NSIS plugins for reading this data. I'll modify the installer to check for this in the case that the DLL is found in system, and only offer to delete if it's not the Razer version.

Additionally, I think we should add text to tell the user that if they DID have the SDK installed already, they should likely re-install afterwards, as the incorrect DLL was put in the System folder.

Alternatively, this feature is one that is intended to help resolve a user error situation, and if it is more likely to cause problems, as opposed to solve problems, we could remove the feature, all together, and leave this issue as one users need to seek help for only in the case that they have made the mistake.

Thoughts?

from retc.

MartB avatar MartB commented on May 27, 2024

If we could detect and warn the user reliably that would be great.
(Using the fileinfo method you mentioned would be sufficient).

Im thinking about adding a similar method to the server so it rejects loading the "wrong" dlls.

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

Committed some changes.

  • Fixed uninstall not removing registry keys
  • Added alert during install if already installed
  • Added check to System RzChromaSDK check to only offer uninstall if DLL ProductName is empty(prevents removal of Razer official SDK files)

IMPORTANT
MoreInfo plugin is now required to compile RETC installer
http://nsis.sourceforge.net/MoreInfo_plug-in

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

Also added a link to github on the uninstall entry in Add/Remove programs.
Note, there are several other things that can be set, that we might want to consider setting.
Let me know what you want set, and what you want it set to:

  • InstallLocation (string) - Installation directory ($INSTDIR)
  • DisplayIcon (string) - Path, filename and index of of the icon that will be displayed next to your application name
  • Publisher (string) - (Company) name of the publisher
  • ModifyPath (string) - Path and filename of the application modify program
  • InstallSource (string) - Location where the application was installed from
  • ProductID (string) - Product ID of the application
  • Readme (string) - Path (File or URL) to readme information
  • RegOwner (string) - Registered owner of the application
  • RegCompany (string) - Registered company of the application
  • HelpLink (string) - Link to the support website
  • HelpTelephone (string) - Telephone number for support
  • URLUpdateInfo (string) - Link to the website for application updates
  • URLInfoAbout (string) - Link to the application home page
  • DisplayVersion (string) - Displayed version of the application
  • VersionMajor (DWORD) - Major version number of the application
  • VersionMinor (DWORD) - Minor version number of the application
  • NoModify (DWORD) - 1 if uninstaller has no option to modify the installed application
  • NoRepair (DWORD) - 1 if the uninstaller has no option to repair the installation
  • SystemComponent (DWORD) - Set 1 to prevents display of the application in the Programs List of the Add/Remove Programs in the Control Panel.
  • EstimatedSize (DWORD) - The size of the installed files (in KB)
  • Comments (string) - A comment describing the installer package

from retc.

MartB avatar MartB commented on May 27, 2024

Hey thanks for that update, i changed the above status post to better reflect whats still missing:

I would like the following options to be set, what do you think about that ?
URLUpdateInfo => https://github.com/MartB/RETC/releases
URLInfoAbout => https://martb.github.io/RETC/
HelpLink => https://github.com/MartB/RETC/issues
DisplayVersion => (make it a dynamic define) aka makensis.exe /DVERSION=3.X
EstimatedSize => Can we let nsis calculate that somehow ?

from retc.

Jaazzy avatar Jaazzy commented on May 27, 2024

Hi! @t3nk3y , I try your installer but i have a issue with it, it work fine but when you leave overwatch(or any game) my keyboard still black and is not possible to get any lightning effect if the retc service is on.

But if i launch the exe only without any service on i can get lightning effect when leaving overwatch.

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

Jaazzy, do you know if the installer asked to, and DID remove the RazerChroma DLL from your system directory?

from retc.

Jaazzy avatar Jaazzy commented on May 27, 2024

Saying nothing because i don't have any Razer DLL in my system directory.

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

Can you check Task Manager and see if Overwatch is still running, or if it shutdown?

from retc.

Jaazzy avatar Jaazzy commented on May 27, 2024

Overwatch is shutdown, when i relaunch it the keyboard still black no razer effect.

Retc service is on.

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

Try restarting the service from windows services, see if it that fixes it(for the moment)

Can you paste the content of your server.log file as well? It will be in the folder you installed RETC to, usually C:\Program Files\RETC

from retc.

Jaazzy avatar Jaazzy commented on May 27, 2024

When restart service with windows services, every lightning effect come back my personnal effect and razer effect when launch overwatch.

Content of server.log:
[2017-06-11 02:26:06.151] [error] [LightingSDK::init] RazerPassthrough failed to load.
[2017-06-11 02:26:06.156] [error] [LightingSDK::init] CorsairCueSDK failed to load.
[2017-06-11 02:27:25.464] [error] [SDKManager::initialize] SDKManager already initialized.
[2017-06-11 02:30:08.964] [error] [SDKManager::initialize] SDKManager already initialized.
[2017-06-11 02:31:01.769] [error] [LightingSDK::init] CorsairCueSDK failed to load.
[2017-06-11 02:31:01.770] [error] [LightingSDK::init] RazerPassthrough failed to load.

from retc.

Jaazzy avatar Jaazzy commented on May 27, 2024

Oh and when leaving overwatch , the processus still runing but this time i don't know why but my personnal lightning effect is here when leaving overwatch.

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

MartB, I'm actually having this same issue. Well similar, my keyboard doesn't go black, but Overwatch gets stuck running in the background, and until I kill retc server, OW doesn't close, and things don't go back to normal until I RETC is closed(Whether run from NSSM or natively).

I don't see how this would be related to the installer, any thoughts? Should this be moved to another issues?
Here is my server.log

[2017-06-10 20:37:06.717] [error] [LightingSDK::init] CorsairCueSDK failed to load.
[2017-06-10 20:37:06.719] [error] [LightingSDK::init] RazerPassthrough failed to load.

RETC Release version: 3.1.1
CUE version: 2.13.80
CUE SDK Version: 2.4.67.0 x64
I have the Razer SDK installed, and it's DLL's, not the ones from RETC are in the System32 folder.

from retc.

Jaazzy avatar Jaazzy commented on May 27, 2024

@t3nk3y It's only happened when you use RETC as a service.

When launching Retc-server-64.exe i don't have any problem(overwatch process is end and personnal keyboard lightning come back).

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

@Jaazzy for me, it happens whether I run it manually or via the service.
When you run it manually, are you running the one from the install, or another copy?

from retc.

MartB avatar MartB commented on May 27, 2024

@t3nk3y
The issue you are describing sounds like the thing i fixed yday.
5200523
You could rebase your develop branch against mine.

For the dll loading as a service maybe we need to set a working directory ?
The new build should have more detailed error codes on dll load failure.

Important:
The RZSdk dlls should not be inside the application directory as mentioned above this will trigger endless thread spawning and most likely halt / crash the application. Move them to a "wrappers" subfolder or something.

from retc.

Jaazzy avatar Jaazzy commented on May 27, 2024

@t3nk3y The one from the last release.

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

@MartB that seems to have been the issue. I had the installer placing those DLL's in the same folder. I've pushed some fixes:

  • Changed RzChromaSDK files to be installed to a wrappers subdirectory. These cause a loop if they are in the same directory as the EXE.
  • Added a check, during install, for the presence of RzChomeSDK in the RETC folder. Installer will delete these files from the folder if found during install.
  • Fixed issue with nssm being pointed to the 64 bit dll on 32 bit systems

from retc.

MartB avatar MartB commented on May 27, 2024

Looks good, nice work the important stuff is done imho.
Now if we add that uninstall extra reg keys i can squash and merge your pull request to develop.

Any additional changes would go in a new pull request should there be the need to.
As soon as i gave it a few test installs / removes etc I will start shipping this.

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

LoL, 30 seconds after I pushed the fix.

from retc.

MartB avatar MartB commented on May 27, 2024

@Jaazzy can you verify its working for you with the latest builds ?

How to get the latest code:

git checkout develop
git checkout -b installer develop
git pull https://github.com/t3nk3y/RETC.git develop
git rebase develop

Just build the installer like you did before. (Dont forget to recompile all the projects)

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

For DisplayVersion I could use a define, like you mentioned, or I could make the installer read the version information from the RETC exe file. Right now RETC doesn't have a version defined though. Do you think we should go that route, or should I use the compile time define?

I've made the changes to the URL links and added EstimatedSize, which is calculated based on the install options selected.

One other thing that we might want to add for Add/Remove; "Publisher", it's one of the columns displayed in the Add/Remove screen, and it looks a little bare without it. Not sure what you would want to put there though.

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

I went ahead and added version number support.
You can use /DVERSION=1.2.3.4 or whatever version.

I also added some code that is commented out right now. It will get the version number from the EXE. However, since the EXE doesn't have a version number right now, NSIS will fail to compile the script(and there is no error checking I can do with the native functions to prevent this). Can uncomment if version number is added to the EXE.

from retc.

MartB avatar MartB commented on May 27, 2024

Just set the publisher to RETC Project
I added automated versioning to the build process with 28d66c8 it should be possible to read the version from the dll + exe now.

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

Okay, committed changes for publisher, and enabled version checking.

I don't have visual studio installed right now, so I can't compile the solution to test the version detection. I'm installing VS now, but if you test it, let me know if it isn't working.

from retc.

MartB avatar MartB commented on May 27, 2024

Latest build with fileinfos

It works okay i just needed to remove !insertmacro before !getdllversion, so if you could fix that.

Also what exactly is this on the show information screen ?
image
I suppose its from nsExec::ExecToLog with all the nssm calls. Can we fix them somehow and if not remove output ?

from retc.

Jaazzy avatar Jaazzy commented on May 27, 2024

@MartB trying your last build everything work but overwatch process still running in background.

Nevermind , if i close overwatch with task manager and relaunch it effect is missing.

Server.log:
[2017-06-11 17:41:25.093] [error] [LightingSDK::init] CorsairCueSDK failed to load.
[2017-06-11 17:41:25.094] [error] [LightingSDK::init] RazerPassthrough failed to load.
[2017-06-11 17:43:02.503] [error] [SDKManager::initialize] SDKManager already initialized.

Using RETC_installer.

from retc.

MartB avatar MartB commented on May 27, 2024

Are you sure thats the latest build :o ?
It should output more detailed error messages.

Also: SDKManager already initialized. indicates that you need to move the RzSDK dlls to a wrapper folder.
Make sure they are not in the same directory as the server executable.

Can you try the executables from above (Latest build with fileinfos)

from retc.

Jaazzy avatar Jaazzy commented on May 27, 2024

I creating the installer with Latest build with fileinfos

For Rzsdk i cannot remove Rzdll from server directory because exe using it.

from retc.

MartB avatar MartB commented on May 27, 2024

Yeah thats the problem stop the service and move em

Edit: wrong button hehe.

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

Okay, pushed change to fix the version detection. I had accidentally left the definemacro from a previous attempt to detect the version without it throwing an error when missing. I also added RETC for ProductName identification of the RzChromaDLLs.
Also moved the step to stop the service if it's running to the top of the section so it stops it before trying to remove bad RzChromaSDK files.

As for the log detail you are seeing, it looks like some graphical glitch, this is how mine looks:
image

I've temporarily set it to not jump to the finish page upon completion, so you can get a better look. Those logs CAN be disabled if needed.

from retc.

MartB avatar MartB commented on May 27, 2024

Thanks!
Thats interesting which version of nsis are you using ?

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

MakeNSIS is 2.3.3
Running install on Windows 10 64bit enUS.
There is an option on ExecToLog to convert OEM to ANSI text. As this bit works by getting its input through a console pipe, maybe we need this conversion. Maybe your OS is running with a different character set? German edition?

If you want to try the OEM option, then update the nsExec lines like so:
FROM:
nsExec::ExecToLog '"$INSTDIR\nssm.exe" set RETC AppDirectory "$INSTDIR"'
TO:
nsExec::ExecToLog /OEM '"$INSTDIR\nssm.exe" set RETC AppDirectory "$INSTDIR"'

Adding the /OEM doesn't cause any issues on my system.

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

Actually, since it doesnt cause issues for me with /OEM on there, I'm going to go ahead and push the /OEM version

from retc.

MartB avatar MartB commented on May 27, 2024

Yeah german edition + 3. nsis.
Thanks for adding that!

Edit:
I just tried that and it didnt work might be the new nsis.

R
Extract: retc-rpc-server-64.exe... 100%
Extract: CUESDK.x64_2015.dll... 100%
Extract: nssm.exe... 100%
Extract: nssm.exe... 100%
Extract: LICENSE... 100%
Extract: README.md... 100%
Output folder: C:\Program Files\RETC\wrappers
Extract: RzChromaSDK.dll... 100%
Extract: RzChromaSDK64.dll... 100%
E
S
R
S
S
S
S
S
S
S
R
S
S
R
Created uninstaller: C:\Program Files\RETC\uninstall.exe
Output folder: C:\Program Files\Overwatch
Extract: RzChromaSDK.dll... 100%
Extract: RzChromaSDK64.dll... 100%
Create folder: C:\Users\Martin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\RETC
Create shortcut: C:\Users\Martin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\RETC\Uninstall.lnk
Create shortcut: C:\Users\Martin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\RETC\RETC Github Repo.lnk
Completed

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

No problem. If it's working now, let me know if you want me to set it back to automatically go to the finish page.

Also, FYI, I am running NSIS 3.01, but the version number on makensis is 2.3.3

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

I'm using the same version of NSIS.
Not sure what's up with that. I've worked with capturing output of console apps before, and at times it's strangely troubling. I guess this is one of those times.

Want me to just turn off the logging for those commands?

from retc.

Jaazzy avatar Jaazzy commented on May 27, 2024

@MartB Everything work great if i delete Rzdll from the server directory thanks you.

from retc.

MartB avatar MartB commented on May 27, 2024

@Jaazzy glad it works!
@t3nk3y nah just keep em for now if it works for some thats okay.

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

Shall I re-enable automatically going to the finish page, then?

from retc.

MartB avatar MartB commented on May 27, 2024

yup!

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

Done

from retc.

MartB avatar MartB commented on May 27, 2024

@t3nk3y Thanks for your great contribution i merged it into develop and will proceed to merge it into master when the deadline is up.

@Jaazzy thanks for testing!

from retc.

t3nk3y avatar t3nk3y commented on May 27, 2024

@MartB glad to help. Thank you very much for taking the time to write and maintain RETC.
Feel free to reach out if you need any other assistance. I've got quite a few years of experience writing code in many languages.

from retc.

MartB avatar MartB commented on May 27, 2024

You are welcome if you have ideas to make this project better just drop me issues :)
I will come back to that offer should i need any assistance.

from retc.

Jaazzy avatar Jaazzy commented on May 27, 2024

@MartB No problem , Contact me if u need any help for testing with future version of RETC.

from retc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.