Ok i need to know how to make a program that would connect to a site and check if there are any downloads available on the site and return to the user a list of downloads that are available then the user could download them.
I have made installers with NSIS but i am probably in the novice stage so if anyone can tell me how to do it or even if its possible i would greatly appreciate it. Thanx🙂
Updater
40 posts
You can use the NSISdl plug-in to download and the InstallOptios plug-in to display the list of downloads.
Ok thanx but can u please give me an example on how to do it
Thanx again.
Thanx again.
Writing this whole system will take quite some time. Please read the documentation yourself and if you have any problems with specific features, post a question.
Ok i have made a downloader but everytime i get to the install part it connects then it gets a download error is there anyway i can find out what kind of error it is?
there's a readme for that plugin, it says:
NSISdl::download /TIMEOUT=30000 http://www.domain.com/file localfile.exe
The return value is pushed to the stack:
"cancel" if cancelled
"success" if success
otherwise, an error string describing the error
NSISdl::download /TIMEOUT=30000 http://www.domain.com/file localfile.exe
The return value is pushed to the stack:
"cancel" if cancelled
"success" if success
otherwise, an error string describing the error
Sorry but i already figured out my problem but thanx anyway.
Now can anybody tell me how to write a line to an .ini file like say that i want to add
;Hello
on line 5
how would i go about doing it?
Now can anybody tell me how to write a line to an .ini file like say that i want to add
;Hello
on line 5
how would i go about doing it?
Why would you want to write a comment to an INI file? Use WriteINIStr and ReadINIStr, it's much easier. If you want to write lines that are not in the INI format use FileOpen, FileWrite, FileRead and FileClose.
D-Day Updater
I have written an updater program in NSIS for our D-Day: Normandy computer game.
It's finished now, after releasing the final changes yesterday (build v1.00b4)
It downloads a list of community maps from our Internet server(s) to the users' PC, and then checks which map names on the downloaded list exist on his/her's hard drive.
If the maps, or downloaded zips do not exist, then it adds the zips to a list for download.
The full program can be downloaded here (1.13mb):
Main source:
-Stu
I have written an updater program in NSIS for our D-Day: Normandy computer game.
It's finished now, after releasing the final changes yesterday (build v1.00b4)
It downloads a list of community maps from our Internet server(s) to the users' PC, and then checks which map names on the downloaded list exist on his/her's hard drive.
If the maps, or downloaded zips do not exist, then it adds the zips to a list for download.
The full program can be downloaded here (1.13mb):
Main source:
-Stu
ok i can write a line to an ini file using WriteINIStr but is there anyway to write something just like
blahblah instead of
[whatever]
text=blahblah
blahblah instead of
[whatever]
text=blahblah
Also is there a way that i can scan an online folder and return to the user a list of files that are in that folder.
Thanx alot guys for all your help my updater is starting to look better and better.🙂
Thanx alot guys for all your help my updater is starting to look better and better.🙂
for writing normal text in a ini, you need the FileOpen/FileWrite/FileClose combo that kichik told you.
To find files you need the FindFirst/FindNext/FindClose combo.
Maybe difficult to use at first, but once you wrote one you can copy it for the rest of your live 😉
mmm... I found no examples for this combos in nsis archives, may I wrote them?
To find files you need the FindFirst/FindNext/FindClose combo.
Maybe difficult to use at first, but once you wrote one you can copy it for the rest of your live 😉
mmm... I found no examples for this combos in nsis archives, may I wrote them?
You can't scan the list of files on a server unless the server gives you a method to do it. It would be a lot simpler to just include an online file that contains the file the user can download.
n0On3, there are some examples in the Archive. But if you think something is missing, a basic example, a more descriptive explanation or anything else, go ahead and add it. The more the merrier 🙂
n0On3, there are some examples in the Archive. But if you think something is missing, a basic example, a more descriptive explanation or anything else, go ahead and add it. The more the merrier 🙂
Yes please write it so u can help many noobish people like me 🙂
Isnt there anyway i can get rid of the setion_name using WriteINIStr
Because im using it like this
WriteINIStr "$INSTDIR\plugins.ini" "i need to get rid of this" "blah.amx ;" "description"
And it looks like this
[i need to get rid of this]
blah.amx ;=description
See its perfect except the part i need to get rid of i dont even need to get rid of it but is there a way i can put a ; or // in front of it
Because im using it like this
WriteINIStr "$INSTDIR\plugins.ini" "i need to get rid of this" "blah.amx ;" "description"
And it looks like this
[i need to get rid of this]
blah.amx ;=description
See its perfect except the part i need to get rid of i dont even need to get rid of it but is there a way i can put a ; or // in front of it
if you do:
FileOpen $4 "whateverfile.txt" a
FileSeek $4 0 END
FileWrite $4 "blahblah"
FileClose $4
you'll have that blahblah at the end of the file. I am not sure about the '0' though.
FileOpen $4 "whateverfile.txt" a
FileSeek $4 0 END
FileWrite $4 "blahblah"
FileClose $4
you'll have that blahblah at the end of the file. I am not sure about the '0' though.
I wrote an example here:
tell me what you think, and what to change 😉
tell me what you think, and what to change 😉
Please could you move it to the Text File Manipulation subdir so that it can be found more easily.
Edit: Soorry, never mind it's in examples anyway 🙂
-Stu
Edit: Soorry, never mind it's in examples anyway 🙂
-Stu
🙂 Thank u it worked perfectly thank u a 1000 times and great post it was very helpful.
Thanks, I am glad it helped you 🙂
And yes, I put it in the examples section because that code is not something to use, but just to see how they work together.
I am still not sure about the "FileSeek $4 0 END" is it correct?
And yes, I put it in the examples section because that code is not something to use, but just to see how they work together.
I am still not sure about the "FileSeek $4 0 END" is it correct?
The 0 is fine. Will set the file pointer at the end.
Now how can i do this find a line that starts with gamedll and replace it with a new line. Also is there anyway i can write "" in a file?
Thanx again in advance
Thanx again in advance
Also one more thing sorry i had to post twice but it slipped my mind
how can i read a string from an ini and if that string exists to stop a file from appearing in the components list?
how can i read a string from an ini and if that string exists to stop a file from appearing in the components list?
How can i write quotes ("") to a text file
To compare only the first part of the string to another stirng use StrCpy with a limit first. StrCpy allows you to copy just a certain number of chars from the string. Specify the length of the string you want to compare to and compare the result.
To write quotes to a text file, or use them anywhere else, simply quote the string with other types of quotes (' for example). See Section 4.1 for more information.
To read from an INI file use ReadINIStr.
If you want to hide a section from the components page simply set its name to "" using SectionSetText.
To write quotes to a text file, or use them anywhere else, simply quote the string with other types of quotes (' for example). See Section 4.1 for more information.
To read from an INI file use ReadINIStr.
If you want to hide a section from the components page simply set its name to "" using SectionSetText.
OOps sorry i messed up my post
Ok here is my script so far i have it to write the string to a file named installed.ini but how can i make it to where it will read the installed.ini file next time around and if the current version is the same as in the ini for that file not to show up in the components list. i only have the WriteINIStr in the first section but i will add it to the others once u guys help with this part and i think i could get the rest of it own my own. Thanx once again for all the help.
Can you please repeat that? I didn't understand what you wanted to ask.
I have seen usage of FileOpen, FileRead, FileWrite and FileClose in your script for INIs in your script. If you're already using an INI use WriteINIStr and ReadINIStr instead of messing with File*. It's so much simpler...
I have seen usage of FileOpen, FileRead, FileWrite and FileClose in your script for INIs in your script. If you're already using an INI use WriteINIStr and ReadINIStr instead of messing with File*. It's so much simpler...
I just need u to tell me how to read the string from an ini version is the same for the component not to show up on the components list
[AMX]
version=0.9.6
Im sorry this is kinda of hard for me to explain heres an example
if
[AMX]
version=0.9.5
and there is an installer for amx version 0.9.5 i dont want it to show up in the components list
I hope it was clear enough
[AMX]
version=0.9.6
Im sorry this is kinda of hard for me to explain heres an example
if
[AMX]
version=0.9.5
and there is an installer for amx version 0.9.5 i dont want it to show up in the components list
I hope it was clear enough
To skip the component list simply call Abort from the component's page pre function. To skip according to the version number use something like:
ReadINIStr $0 file.ini section name
StrCmp $0 "0.9.6" 0 +2
Abort
ReadINIStr $0 file.ini section name
StrCmp $0 "0.9.6" 0 +2
Abort