Scite + g++ properties and Build issues

Recommended Posts

adabo 0

adabo 0

Hey. When I installed g++ from cygwin, scite immediately started building and running my c++ code. Very good so far.

However, I want to take it a step further. I want to make Scite + g++ portable. All of it in one folder to put on anyones computer without changing system variables like PATH. Just run scite > write code > F5 > Output in scite console.

Only problem is that I don't know how to do it I can get scite to see python and autohotkey, which is all portable without any system changes.

The first thing you should know is that I don't have cygwin in the PATH variable. Scite will build the cpp file normally when I put cygwin back in PATH environment variable.

You might be asking "why am I removing the path?". The reason is because I'm trying to make a portable programming environment. Something you can put in a USB drive and run on another windows machine that doesn't have anything installed (Python, cygwin/g++, AutoHotkey). For example, if I run Scite.exe from the usb, I want to write some c++ code and run it without any problems. Actually, it's working for python and ahk. But g++ is where I have problems.

Share this post

Link to post

Share on other sites

Jos 1,553

Jos 1,553

It does. It is indeed much better to use the Full version as a base as that contains all the Scitilla lexers.
So to make it portable and default to the drive SciTE is ran from you simply add the $(SciteDefaultHome) to the path for g++.exe.

Share this post

Link to post

Share on other sites

Jos 1,553

Jos 1,553

Looks like the g++ compiler is started fine as far as I can see.... right?
I have no experience with making cygwin portable, so that is the next thing to look for on the Internet as I am sure you aren't the first one to try.

Share this post

Link to post

Share on other sites

adabo 0

adabo 0

Looks like the g++ compiler is started fine as far as I can see.... right?
I have no experience with making cygwin portable, so that is the next thing to look for on the Internet as I am sure you aren't the first one to try.

Jos

That's exactly what I was thinking while I was out driving. Surely somebody's had some success. And, yes, the it looks like the compiler is starting.

Share this post

Link to post

Share on other sites

Jos 1,553

Jos 1,553

I have done something similar for another compiler and made life easy by using a batch file and ensuring that the workdir was set correctly as that compiler needed it.SciTE leaves the workdir to the Sourcefile being edited, so that could cause this. In case you proceed this way you need to use the fully qualified name for the input source file so use "$(FilePath)" in stead of "$(FileNameExt)"

You can see it thinks I put two paths. When in fact it's one path split up at the space in `\Programming Tutorial`. The next discovery is that g++ is giving the error. Whereas before it was `cc1plus.exe` with the error. That leads me to believe that g++.exe is working, and that whatever g++ needs to compile gets stopped for whatever reason.

My first search for "portable cygwin" had promising results. One is a git repo with instructions. But it wants to lock it to the USB drive. The other result was this. I haven't finished reading, but so far it sounds like it's what I want, because I want to make this "toolbox of goodies" something I can share and people can save it to whichever directory they want and it should just work.

Share this post

Link to post

Share on other sites

adabo 0

adabo 0

The second link wants to change some environment variables. I don't want that. In fact, if that is the only way g++ will work, then I need to find an alternative compiler.

Can you think of a portable c++ compiler I can throw in my little box of goodies?

This is the "toolbox" I'm trying to build: (Sorry. I couldn't inline the image for some reason) The folder named "DownloandSetup" will be what I will zip and share with students. Thankfully the license agreement allows this. Plus I'm not a business, just a volunteer.

Share this post

Link to post

Share on other sites

Melba23 2,898

Melba23 2,898

So just to be clear - you are asking for help on the AutoIt forum to package AHK? Good job we are open-minded here!

M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort---- Sort arrays on multiple columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area

Share this post

Link to post

Share on other sites

Jos 1,553

Jos 1,553

I had seen that too, and it is even worse, there is no AutoIt3 on that ThumbDrive, but we're in the general Developers forum so let that slide as not everybody is aware about the past of these 2 products.

Share this post

Link to post

Share on other sites

adabo 0

adabo 0

So just to be clear - you are asking for help on the AutoIt forum to package AHK? Good job we are open-minded here!

M23

Not at all. Hmm, the post is about g++ and scite. I understand this is autoit, but since you mentioned it: When I was searching google for help with scite, I couldn't find a forum. Not even IRC. The only forum that showed up in relation to scite was this forum. So I looked through the different sub forums for one suitable for this off topic situation. And now here I am. Does this help? If I'm missing a joke here, sarcasm is kind of hard to detect through text. But I understand it now if it is

Share this post

Link to post

Share on other sites

Melba23 2,898

Melba23 2,898

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort---- Sort arrays on multiple columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area

Share this post

Link to post

Share on other sites

Jos 1,553

Jos 1,553

The second link wants to change some environment variables. I don't want that. In fact, if that is the only way g++ will work, then I need to find an alternative compiler.

I honestly don't see any issue with this blog and is more or less like I mentioned in one of the previous posts.
The Blog explains how to set some Enviroment variable temporarily, and then puts everything back as it was. Actually simple setting some environment variables in a batch file which is shelled by SciTE wouldn't make any permanent changes anyways. So why not give that a try?