Skip to content
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

Feature/installer #255

Closed
wants to merge 2 commits into from
Closed

Conversation

dutchie032
Copy link

@dutchie032 dutchie032 commented Jan 30, 2024

fixes #213

A simple installer for dcs-grpc.
Version agnostic for simplicity and minimal rebuilding effort.

Can write some info in main README.md if required, but can also understand if main maintainers wants to update himself after creating the artifact.

installer/Readme.md:

Installer of DCS-gRPC

To Build

#pyinstaller --clean --onefile -y -n "DCS-gRPC-Installer" .\main.py

What

  1. It collects all releases from the Github api.
  2. Makes the user select the version (latest probably 99% percent of the time), but fallback possibilities might be nice.
  3. Downloads the .zip artifact and unzips in install location (selected by user)
  4. Updates the missionscripting.lua file.
    • MissionScripting.lua needs to be selected. No other lua file will be accepted as DCS only reads that file.
    • dofile(lfs.writedir()..[[Scripts\DCS-gRPC\grpc-mission.lua]]) is on the first line below dofile('Scripts/ScriptingSystem.lua')
    • all other dofile(lfs.writedir()..[[Scripts\DCS-gRPC\grpc-mission.lua]]) or similar (grpc-mission.lua) will be removed so in case of reinstall any possible error will be reset

@dutchie032
Copy link
Author

dutchie032 commented Jan 30, 2024

I saw no CD action that actually build the artifact so kinda assumed it was a manual artifact upload.
Please correct me if I'm wrong and I will also create a CD for publishing the .exe.

I could only find a ci.yml, but didn't seem to upload the .zip artifact.
If there is another .yml file, or I overlooked it in ci.yml please let me know

Copy link
Contributor

@rurounijones rurounijones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given how this is structured I think this would be better suited to a separate Installer repo in the DCS-gRPC project group. The advantages being that you can then update it on your own cadence and not require PR reviews from us in a language we are not necessarily up-to-date on.

When we do a rust-server release we can then also include a link to the installer for people who want to use it.

Whaddaya think?

import urllib.request


def __UpdateMissionScriptingLua(path):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be missing something but won't this add the GRPC line every time the program is run? (e.g. someone using it to update versions)

@dutchie032 dutchie032 closed this Mar 9, 2024
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.

Create one-click installer
2 participants