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

Configs/Profiles #1

Closed
muk0r opened this issue Nov 26, 2016 · 14 comments
Closed

Configs/Profiles #1

muk0r opened this issue Nov 26, 2016 · 14 comments

Comments

@muk0r
Copy link
Owner

muk0r commented Nov 26, 2016

Currently the user has to input their desired settings every time they run Qompiler.

Id like for the user to be able to create configs as they run Qompiler. Users could then also handwrite configs, as well.

Im thinking I will first need to figure out how to load a predefined set of parameters into "_qbsp", "_vis", and "_light". Then, from there, figure out how to save the settings the user defines.

This whole thing is a learning process for me so help is appreciated!

@muk0r muk0r modified the milestone: Load configs Nov 26, 2016
@khreathor
Copy link

Parsing ini shouldn't be hard to do, but I would start with simple txt files with settings for qbsp/vis/light, so you don't have to type them every time.

@muk0r
Copy link
Owner Author

muk0r commented Nov 26, 2016

Im trying to figure out how to have it search for the .txt.

I know how to create parameters. Is there a way to use "set /p _config=[PROMPT]" to load a config?

I know i need to have the user input a config name and it then search for that .txt and I can set that txt file to set the _qbsp _vis and _light parameters. But not sure how to do it.

@muk0r
Copy link
Owner Author

muk0r commented Nov 26, 2016

my test config is:

set _light= -extra4 -bounce 1 goto Qompile

I think this would work, if I knew how to set it up to call it/open it.

@muk0r
Copy link
Owner Author

muk0r commented Nov 26, 2016

Ive figured out how to prompt the user to enter a name for a config and to create a text file of the same name. Ive also figured out how to dump the settings for one process into the text file.

Echo set _qbsp= %_qbsp%>>%_cfgname%.txt

This dumps the settings in once, but doesnt work from there out.

@khreathor
Copy link

Reading works kinda the same:

@Echo Off

If Not Exist text.txt GoTo Default

set /p Text=<text.txt
Echo %Text%
GoTo End

:Default
Echo Default values.

:End
Echo Finished!
Pause

but if you need multi-line reading you have to use FOR

@muk0r
Copy link
Owner Author

muk0r commented Nov 26, 2016

Ive figured out how to get it to create a text file with all the parameters. My test that it created looks like:

set _vis= -v
set _qbsp= -bsp2
set _light= -extra4

Now to figure out how to make it call for these settings when they input a name.

@muk0r
Copy link
Owner Author

muk0r commented Nov 26, 2016

@khreathor
Copy link

I'm not sure what you want to achieve. Can you explain?

@muk0r
Copy link
Owner Author

muk0r commented Nov 27, 2016

When you start Qompiler, the user is prompted to enter a config name to load or type new to create a new config. Id like for Qompiler to load or create a simple .txt of the name the user enters.

After assigning a config name, tge user is displayed the settings for qbsp and can then enter their desired settings (e.g. -bsp2) and its assigned to a parameter "_qbsp" . This is repeated for vis and light and assigned to the parameters _vis and, _light.

The values the user set are then saved to a .txt of the mame they entered for their config.

For example:

-bsp2
-vv
-extra4

Id like for Qompiler to load these .txt files and set each line to its respective parameter.

@muk0r
Copy link
Owner Author

muk0r commented Nov 27, 2016

This is in the Qompilerv0.75 branch, by the way.

@muk0r
Copy link
Owner Author

muk0r commented Nov 27, 2016

I guess the problem is that i dont know what a batch file would need to say to supply values for the _qbsp, _vis, _light parameters

I only know how to prompt the user to input a value for these parameters. For example:

Set /p _qbsp=Input any desired qbsp settings....

What would a config batch file need to say to set the _qbsp parameter in qompiler.batch to, for example, -bsp2?

@muk0r
Copy link
Owner Author

muk0r commented Nov 27, 2016

So I got it working...kind of.

It will load a config and it applies the settings to the compiling tools. It will then load and run the compiling tools BUT, it doesnt process the .map.

Hit the v0.75 branch.

Theres a sample config you can use cause it seems like creating a new config is broken now. :D

#3 is in there as well. Check the readme as youll have to create some folders and but some the decsription.bats in them. ?Im not sure how to make folders on here?

Im not sure why I found it so confusing to set a .bat to set a value for a variable. I think it not actually loading the .bsp is an easy issue. So im still content!

@muk0r
Copy link
Owner Author

muk0r commented Nov 27, 2016

Finished!

@muk0r muk0r closed this as completed Nov 27, 2016
@muk0r
Copy link
Owner Author

muk0r commented Nov 27, 2016

Also, you can now just put all the files in branch v0.75 and Qompiler will organize them for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants