I recently installed the Ubuntu subsystem onto win10. It isn’t full-featured or up-to-date, so I have to install and build software, which I don’t like due to the lack of experience and talent. I feel like I am thrashing in the dark, brute forcing my way until something happens. Very time consuming.
Anyway, I have decided to make a thread where I shall ask questions from time to time. Others may do so as well. Not all of us are pros, right?
First question:
Several years ago, I hacked a *.cpp file to save an image. I know nothing about c++ but found something that worked using boost’s filesystem. Now it doesn’t (due to a different version?).
My intention is to create a new sub-directory where the output files would go. Currently, it is trying to save to /DET/ (at root) instead. What should I do? Should I even be using boost?
suggests that a path name is supposed to be passed to the program as an argument. Not knowing the value of i it’s not possible to say which of possibly several arguments it is. It would help if you showed the entire program.
This is a G’MIC related question but the content itself is more general. I would like to use this following command within user.gmic but don’t know how to escape properly.
load_gmic C:\Users\afre\AppData\Roaming\0.gmic
[gmic]-0./ *** Warning *** File ‘C:UsersafreAppDataRoaminguser.gmic’ is not a valid G’MIC command file.
2a: So, I think you need an backslash escape that cmd.exe doesn’t care about so it survives getting to G’MIC. Try slngle-quoting the path, and double up the backslashes.
Like this → load_gmic 'C:\\Users\\afre\\AppData\\Roaming\\0.gmic'? I tried double quoting before as well.
The reason for this line of inquiry is that my user.gmic is getting too unwieldy and messy to manage. I would like to divide it into manageable chunks and name them according to purpose.
My thought was cmd.exe was handling the escaped '', and G’MIC was ending up with this\that, and getting rid of the \t and such, but I just went and re-read about quoting in cmd.exe and now I just don’t know anything good…
Shell scripting in Windows is goofy. Powershell has promise, but I haven’t used it enough to see consistent patterns like I do with the Unix shells.
The thing is that it is within the *.gmic file, so the rules of cmd.exe may not apply. However, when you are talking about paths, now you are accessing something on the outside. I think that is where the trouble lies. Or I am just missing the obvious.
This is what I have.
user.gmic
#@gmic user
#up2 :
load_gmic {/"C:\Users\afre\AppData\Roaming\0.gmic"}
#too much stuff
#@gmic _
Edit: I understand the purpose now - basically split up the user file into parts, but still load them all automatically. I’m not sure that’s possible because the script files define commands rather than actually execute them…
Perhaps @David_Tschumperle can advise - is there an equivalent to an #include for gmic command files?