Compiler GUI and other packaging tools

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#41 Post by Gedrean »

Honestly if I can't get it to keep the quotes it's no really big deal, but oh well.

If I don't have any idea by tomorrow how to get those quotes through, I'll just have it pass back and say whatever. As it is, it's still tremendous that I can get this to work that well.

I'm thinking, for checkboxes, I think there MAY be a way to have it be independent of the entries, but I don't know. I'm thinking this program is becoming complex enough I may look into freebasic for it... because that might be faster. :grin:

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#42 Post by technosaurus »

is it \"
?
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#43 Post by amigo »

You need the 'g' global option to sed:

sed 's/\"//g'

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#44 Post by Gedrean »

technosaurus wrote:is it "
?
Sadly, no, inside the string quoted stuff is passed without the loveliness of the backslash. I tried RELIGIOUSLY to change it, but it wouldn't take.

At this point I'm about giving up on keeping those quotes, since it's a compile-time option setting usually quotes shouldn't be there.
amigo wrote:You need the 'g' global option to sed:

sed 's/"//g'
I know /g is a global functionality, I don't require that to nuke things. In fact I've nuked sed from usage entirely except in one instance that I can think of.

At this time I'm gonna go ahead and punch it in as a function and try to see if I can't make it checkbox-independent (meaning that ANY checkboxes, if name-formatted correctly, will be handled by some form of loop to add their function in -- this way furhter editing of the code won't be required if the actual interface is changed to add new 'defaults'.

Oh, and the flags strings you mentioned will be hardcoded - I'm not gonna try to have those pass, simply because they're quote-surrounded, and I'm getting absolutely sick of quotes. ;)

Hope you don't feel bothered that I kinda threadjacked here and started making additions, but you hadn't updated it in a while and I saw room for other niceties <G> Hell maybe my version'll fizzle out and I'll recommend going back to the 0.1.0 (which worked rather well aside from the two glitches I fixed through 0.1.1... ;)

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#45 Post by Gedrean »

So I just realized... since "eval" does some quote stripping all to hell... I don't NEED to strip quotes. I just eval it out, and make it go back out there, and the function instantly shortens in size and in content.

New function code:

Code: Select all

function pc_strip () # pc_strip arg1 arg2.
{
	# arg1 should be the name of the var to strip with.
	# arg2 should be the name of the variable from gtkdialog.
	
	y=\$"$1"   # y becomes "$arg1".
	x=`eval "expr \"$y\" "` # x becomes value of $arg1, so $x = $arg1.
	# finally start our strips.
	x=${x#$2=} # strip out arg2= (no quote) from beginning
	eval "$1=$x" # push value back onto $arg1, stripping quotes
}
I feel efficient. Well, not as efficient, I'm doing memory dereferences in a function in bash, but theoretically since all these functions are bash-internals, they should run much faster than an outside program like sed! :)

EDIT: Oooh, and single quotes are fine!!! I think that'll do pig! That'll do! HAHAHAHHA!

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#46 Post by Gedrean »

Alright, new question. Are underscores "_" (not dashes "-") ever used in ./configure options, that we know of?

EDIT: Better yet. What characters are not able to be used in a bash command line string, for example as arguments of ./configure. That is to say, they must be \-escaped first, or just will not work b/c bash will interpret them as something else and screw up the command?

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#47 Post by Gedrean »

Wow, okay. I'm sorry to say that with decent documentation (documenting out in detail how I got my tricks to work, for example) the file size is HUGEMONGOUS for pcompile.

That being said, in pet form it'll be much smaller, but I expect overall the project may grow to single-digit kilobyte size.

At least, my submission for it.

HOWEVER -- I'm building it so that if we add another checkbox later for default options, then no additional code will need to be added to pcompile - thus the only changes need be done to the window file...
Oh, did I mention, I split off the dialogbox description into a separate file, so it's easier to read and manage?

If you want me to stop mutilating your project, techno, please say so. I hate to trod on toes. :)

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#48 Post by technosaurus »

I wouldn't really worry about size/speed too much. Speed should still be insignificant when compared to compile time and size will still be smaller than the smallest binary used during compilation. Keep in mind that it would require the devx anyway. Just wondering - have you gotten src2all to work with python programs?
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#49 Post by Gedrean »

technosaurus wrote:I wouldn't really worry about size/speed too much. Speed should still be insignificant when compared to compile time and size will still be smaller than the smallest binary used during compilation. Keep in mind that it would require the devx anyway. Just wondering - have you gotten src2all to work with python programs?
I got nothing on that front.

As it is, I've got a while do done loop doing the checkboxes... With a little work... I finished the loop.

Now I've just got to reiterate my previous question:

Are there any characters in Bash which are UNABLE to be used in arguments by default, like % or whatever, that are unlikely to be included in ./configure arguments?

Thanks!

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#50 Post by Gedrean »

And if the % is an acceptable flag... I now have a loop that decodes checkboxes in a certain format. And if they're true, adds them to the config string.

And then outputs the whole thing to the file, then src2all does it.

And is made of win.

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#51 Post by Gedrean »

Alright, only question now is how does one work with a radio button? I'm not sure what all the returns are like from it... anyhow, it's getting there, the window at least. I got them as checkboxes, but I want to replace one or two of the prefix options with radiobuttons, to choose which locations to put stuff in.

Anyhow, building it up there.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#52 Post by technosaurus »

I've been meaning to add that to the template.

From Pmetatagger... looked for it in Pawdioconverter what happened to it???

<radiobutton active=\"true\">
<label>Select a directory</label>
<variable>RADIOBUTTON1</variable>
<action>if true enable:DIRENTRY</action>
<action>if true enable:FILE_BROWSE_DIRECTORY</action>
<action>if false disable:DIRENTRY</action>
<action>if false disable:FILE_BROWSE_DIRECTORY</action>
<action>if true enable:WORD</action>
</radiobutton>
<radiobutton active=\"false\">
<label>or select a single file</label>
<variable>RADIOBUTTON2</variable>
<action>if true enable:ENTRY1</action>
<action>if true enable:FILE_BROWSE_FILENAME</action>
<action>if false disable:ENTRY1</action>
<action>if false disable:FILE_BROWSE_FILENAME</action>
<action>if true disable:WORD</action>
</radiobutton>
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#53 Post by Gedrean »

God I wish I knew all the options to radiobutton.

There SHOULD be an attrib called Group, which would link a radio button to other radio buttons, all grouped to one primary (the default) so that they all control eachother.

Because I want multiple groups of Rbtns in this.

I'm thinking of moving to Glade, but I don't know that I wanna do it...
I really don't wanna redo this whole damn thing considering how far I've gotten so far... btw, here, uploading the latest version 0.1.3 - but it's not properly working, some things are commented out for debugging and it will throw up on a few things...

Oh and that window file will go in /usr/share/pcompile and be referenced from there in actual release, but for now it's designed to be run from terminal and in directory, not as installed...

uploading it as a tgz for that reason... I'll be honest the options tab looks crappy right now but I'm trying to do formatting and cleanup - but as I do formatting and try to make it look pretty it ungroups some of the RB's!

For now though, all the files that are currently up-to-date (still may be in a state of debug/repair) are in root/my-applications/bin I think... the usr folder just has stuff in there for placeholding I think...
Attachments
pcompile-0.1.3.tar.gz
TGZ format, not for working install/release, though it'll run as a dialog I think...
(7.43 KiB) Downloaded 494 times

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#54 Post by Gedrean »

So, I was dicking around in Glade, noticing that radio button options had a Group attribute like I had hoped. It groups multiple sub-radio buttons to one, meaning that one of them is the default and the "master" of that group, whereas the others are all "slave" or sub items of that group...

With that I grouped radio buttons that were out of order, found it neat.

Then saved teh file.

Then on a whim opened it in Geany.

Something interesting, here's some output:

Code: Select all

                  <widget class="GtkRadioButton" id="radiobutton2">
                    <property name="label" translatable="yes">radiobutton</property>
                    <property name="visible">True</property>
                    <property name="can_focus">True</property>
                    <property name="receives_default">False</property>
                    <property name="active">True</property>
                    <property name="draw_indicator">True</property>
                    <property name="group">radiobutton1</property>
So, each of those property names seem like tag names in the XML-like markup used by the standard gtkdialog markup... This demands testing...
More in a bit...

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#55 Post by Gedrean »

Well that was a bust.
I tried a dozen different ways to introduce an id or group tag or attribute or property in there -- no luck.

Damn the lack of proper documentation for gtkdialog.

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#56 Post by Gedrean »

I seem to recall reading something about the various action functions available from buttons like radiobuttons...

Tell me there's one for "set false" another radiobutton... and that'll work well enough (though VERY inefficient)

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#57 Post by technosaurus »

I'll have to look at it when I get home tonight. I started in a different direction (merging src2all) also noted that I need to look at dump2pet to bring it up to 4.3 for database entries (I also want it to >> to a separate file that will keep all of the database entries, since Nicoedit hiccups with files of the same name -- which was not an issue with the old naming scheme, but now they all have pet.specs vs. a named one)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#58 Post by Gedrean »

technosaurus wrote:I'll have to look at it when I get home tonight. I started in a different direction (merging src2all) also noted that I need to look at dump2pet to bring it up to 4.3 for database entries (I also want it to >> to a separate file that will keep all of the database entries, since Nicoedit hiccups with files of the same name -- which was not an issue with the old naming scheme, but now they all have pet.specs vs. a named one)
Well now isn't that a pickle.

I'd really recommend against merging, but that's just my claim of wanting to make sure that any individual file remains its own set of functionality, but that's just my programmer's instinct kicking in. Plus, with how complicated pcompile may become trying to build such a defined interface, it may grow very large -- and very large single file scripts do take more memory, I thought, unless it's something else about large single-file scripts that was a problem... I could be nuts there.

Oh well, anyhow, hope you have fun playing with the version I compiled so far. If you really want to merge src2all, it does keep the added benefit of not making a temp output file for the config options, though definitely one should be made in the base directory -- ALSO: I'd like to request that we output confopts to the base directory instead of tmp, since that gives a good reading later when custom configures can be made... maybe making it confopts.txt , I dunno if that's only a windows thing but I believe the use of the . extension makes it a bit easier to determine if a file should be something the user should read, or if it's just some data file that won't make much sense to the avg user...

I don't like the formatting I've got so far on the options tab, but I can't figure out how to make sure those buttons are linked together. I may just end up ditching the my-applications radio button idea and stick to some default compile options as checkboxes. Maybe do a little work to make them fit together clean.

Yeah I think ditching the radio button's gonna have to be it.

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

Pcompile 0.1.4.a?

#59 Post by Gedrean »

Alright, I played with alignment for some time and I think I like it enough to submit it as my suggestion for how it should look.

Removed the rbutton for prefix, and put one in for --build, choosing between pc and t2 (I have seen NO difference, really, in the two for any puppies, so whatever).

There's no "none" option, though in pcompile it details a "standard format" for checkboxes and Radiobuttons, so others can be added if that format is followed and it will ALWAYS work. :)

Pcompile has been removed from "debug" mode.

I've put everything back in the /usr/bin directory (it should go in there anyways, to be compatible with previous versions).

The /usr/share/pcompile/window file is updated to the newest version.

src2all still does builds from pcompile_build -- it's very useful for some tools which will not build from their main directories.

If you don't like some of these behaviors, well I tried to comment things up some so it's cleaner, but it should be detailed where changes were made so you can remove them.

Once you've got src2all integrated into Pcompile, it's commented in pcompile where it'd work to integrate it, and what vars are.

The easiest way would be to put <src2allvar>=$<pcompilevar> for a lot of those src2all vars, and have src2all's code NOT read from the file (still keep the file there for good reference).

Also, I'd like to again request having the confopts output to the package directory - for later perusing and easier finding than in /tmp!

After it's all integrated, I'd like permission to go in and document/comment areas so it's clear what's happening, if code ever gets changed again. :)

Here's my TGZ for 0.1.4, not a pet yet since it still needs integrated, but right now it's fully functional as is (short of dump2pet and the pet.specs files)

Actually, might I suggest:
When making that separate database file, stick it in /usr/share/pcompile -- what a convenient location! ;)
Attachments
pcompile-0.1.4.tar.gz
pcompile with formatting fixes, pcompile out of debug.
It's ready to go I think! :)
(7.42 KiB) Downloaded 481 times

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#60 Post by technosaurus »

Actually I only did a simple fix - use $1 $2 and $3 as before, but use them to set the default values, if you use it the same as src2all and all is good just click OK and you get the same behavior. I did have to set up a slightly different case for when there were no entries. The only difference is that there is a GUI there that will let you make some quick changes in a more readable interface before you let it go through the hours long process of compiling Wine-2.0 or whatever without NLS or some other useful feature because of a typo or something.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply