assetto-corsa-web / acweb

Assetto Corsa Server Management Tool via Web Interface.
MIT License
58 stars 9 forks source link

Fix for correct exec command arguments #24

Closed macedot closed 7 years ago

macedot commented 7 years ago

Last code didn't pass custom ini files for acServer at the command line.

This commit also moves ini creation for /config/ instead of cfg (const).

json can be ignored. (sry :)

Kugelschieber commented 7 years ago

Have you actually tested your changes?

macedot commented 7 years ago

Yes, i've test it and it's running fine since yesterday at our serve: http://i.imgur.com/JHzek0b.png not using docker image due port forwarding issue i've posted.

Other pull request from veny may conflict with some changes here.

Kugelschieber commented 7 years ago

Yeah I have seen that, but your pull request fixes some issues with the current version, so I'll merge it tomorrow.

macedot commented 7 years ago

I've adapted venyii pull #25.

I've also changed cfg config and ini path generation to exported methods inside instance package.

Kugelschieber commented 7 years ago

@venyii Maybe you want to add an error message to the UI if an error occures while creating the zip file on download.

vntw commented 7 years ago

Umm.... why was #25 cherry-picked (and changed) in this PR?

Kugelschieber commented 7 years ago

I don't know, maybe @macedot should just remove that one commit from this branch, if still possible.

macedot commented 7 years ago

Because @venyii changed write ini into a create ini buffer. Even though the same logic was applied to both download and save process, it would not be consistent: downloading ini files would result in "downloading reconstructed ini", not current ini in use.

Say you've started a server with config (A0) Then you change something at config A so now it differs (A1) Using @venyii commit, download process would reconstruct A1, but current instance is running with A0.

From my perspective, user would like to Download currently in-use ini, not Export most up-to-date instance config.

vntw commented 7 years ago

My plan was to download the latest saved version of a configuration which is 'rebuilt' fresh from the DB on every download.

Kugelschieber commented 7 years ago

We could add a download button on the configuration and on the instances page. The one on the instances page downloads the configuration in use and the one on the configuration page downloads the lastest configuration.

macedot commented 7 years ago

I've finished coding merge from @venyii commit. I've reverted back into its code and extended the interface as requested. I've also created the button into instance page to download current instance files using @venyii code. I'm finishing tests on it. should be done soon.

macedot commented 7 years ago

Finally, it is done :)

i hereby declare to whom it may concern that i'll stop making changes in master without branching first.

Both zip files from ini files from instance and current configuration state will be generated with same name, coz it inherit from config.name. Maybe it shall add instance name to it in the future.

:o)

macedot commented 7 years ago

Job's done. :)

vntw commented 7 years ago

Thanks for the work @macedot and continuing the download PR 👍