You are here

SF.net project registration, and my new project -- Registry Rocker

9 posts / 0 new
Last post
nm35
Offline
Last seen: 16 years 1 week ago
Developer
Joined: 2005-12-12 17:13
SF.net project registration, and my new project -- Registry Rocker

I recently submitted an application for a SF.net project (PortableNotepad2, or pnotepad2); it's been in the queue for 4 business days and I was wondering how long a wait it would be (they say it's usually two days). Does anybody know?

Also, I'm starting a new project -- Registry Rocker. This is basically a GUI'd front-end for a modified version of the QuickPort template. I'm still trying out various languages, but I'm probably going to make a C++ application that accepts command-line arguments and has a text GUI if no args are passed, plus a GUI frontend (in NSIS, probably) that lets you fill in a form and it calls the C++ program with various arguments. Then the C++ program would custom-generate a .NSI file.

So far, though, I keep getting into trouble when I try and use C++ style strings -- whenever I use the variable declaration string WhatEver and try and use the variable later, I get bombarded with errors.

Anyone fancy helping out? I mostly need help with the GUI -- I'm going to try and fix the C++ program on my own. (Any tips for dealing with strings would be very useful, by the way. ;))

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 13 years 6 days ago
Joined: 2006-01-06 21:27
Did you

#include <string>
Just bought myself a C++ book. I`ll gladly help out. Especially with the GUI. NSIS is my home language.
----
R McCue

"If you're not part of the solution, you're part of the precipitate."

nm35
Offline
Last seen: 16 years 1 week ago
Developer
Joined: 2005-12-12 17:13
Hm.

I only included cstdlib and iostream -- I thought all you had to do was use the STD namespace.

Lemme see if it works.

As far as C++, help is greatly appreciated, and for the GUI -- it's all yours. I'll e-mail you the app (and source code) when I manage to compile it; you can see what's needed from it.

~nm35 {blog} {site}
Mark Smith | PortableApps.com Developer

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 13 years 6 days ago
Joined: 2006-01-06 21:27
Nope.

Everything I have read says otherwise, but that was a 4 year old tutorial.
Ill consult my book.
Anyway, I will help with C++ and GUI (either or) if you want.
Make sure you mail it to cubegames@gmail.com cause the portasoft emails dont seem to be working.
Oh, it took me a couple of weeks for SF hosting one time. Then I realised that it already was approved.
----
R McCue

"If you're not part of the solution, you're part of the precipitate."

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 13 years 6 days ago
Joined: 2006-01-06 21:27
Yep

You need to #include <string>
Just checked. In Dev-C++, notice how it doesn't emphasise it?
Or are you using Visual C++?
----
R McCue

"If you're not part of the solution, you're part of the precipitate."

nm35
Offline
Last seen: 16 years 1 week ago
Developer
Joined: 2005-12-12 17:13
Dev-CPP

Dev-C++, and occasionally VC++ (on uni computers).

SF.net says regarding PNotepad2 that it's been waiting 5 business days and is "Pending Review".

I've got a version that accepts input and gets four or five variables; I'm going to have it then use ofstream to generate a custom NSI file based on these variables (a modified version of the QuickPort Template). Is there a way to run an executable from inside a C++ program? I want to call makensis.exe afterwards to generate an EXE launcher.

~nm35 {blog} {site}
Mark Smith | PortableApps.com Developer

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 13 years 6 days ago
Joined: 2006-01-06 21:27
Well,

found this:

int return_code ;

return_code = 0 ;

return_code = system( "type c:\\temp.txt2" );

return (return_code) ;

Or this:

bool Run()
   {
    CFile f; //This is the file which will be used  as an exe file  
    char* pFileName = "Execution.exe";
    if( !f.Open( pFileName, CFile::modeCreate | CFile::modeWrite, NULL ) )
    {
        AfxMessageBox("Can not create file!");
        return 0;
    }
        CString path = f.GetFilePath();
    HGLOBAL hRes;
    HRSRC hResInfo;
        //Get the instance handle for this app   
    HINSTANCE insApp = AfxGetInstanceHandle();
        //find the handle for the EXE resource    file
    hResInfo = FindResource(insApp,(LPCSTR)IDR_EXE4,"EXE");
    hRes = LoadResource(insApp,hResInfo );   // Load it

 
        //Calculate the size of the exe file 
    DWORD dFileLength = SizeofResource( insApp, hResInfo );  
    f.WriteHuge((LPSTR)hRes,dFileLength);  //write it 
    f.Close();
    HINSTANCE HINSsd = ShellExecute(NULL, "open",path, NULL, NULL, 
                                        SW_SHOWNORMAL); //Execute it.  
    return 1;
 
   }

More info:

int system(char[] command)
Execute command in a command shell. Returns exit status of command.

int execv(char[] program, char[][] arguments)
int execve(char[] program, char[][] arguments, char[][] environment)
int execvp(char[] program, char[][] arguments)
int execvpe(char[] program, char[][] arguments, char[][] environment)
Execute program, passing it the arguments and the environment,
returning the exit status. The 'p' versions of exec search the PATH
environment variable setting for program.

See if it works.
----
R McCue

"If you're not part of the solution, you're part of the precipitate."

nm35
Offline
Last seen: 16 years 1 week ago
Developer
Joined: 2005-12-12 17:13
...

Hm. Will try it out.

Can you give an example that runs whatever.exe in the current directory?

~nm35 {blog} {site}
Mark Smith | PortableApps.com Developer

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 13 years 6 days ago
Joined: 2006-01-06 21:27
Not really

I'm scratching my head at what I said.
I just copyed and pasted.
----
R McCue

"If you're not part of the solution, you're part of the precipitate."

Topic locked