I've been working on a launcher for Dropbox and I think I'm running into an issue with the installer. I've been able to download and extract folders using installer.ini, but I have to do some post install code to clean everything up. The issue I'm having is that when the file is extracted the folders have system variable names so I'm thinking I won't be able to rename things properly. Can somebody take a look at what I've got and let me know if this will work or not.
!macro CustomCodePostInstall Rename "$INSTDIR\App\Dropbox\$0\Dropbox\$INSTDIR\gdiplus.dll" "$INSTDIR\App\Dropbox\gdiplus.dll" Rename "$INSTDIR\App\Dropbox\$APPDATA\Dropbox\bin\$INSTDIR\*.dll" "$INSTDIR\App\Dropbox\*.dll" Rename "$INSTDIR\App\Dropbox\$INSTDIR\*.*" "$INSTDIR\App\Dropbox\*.*" Rename "$INSTDIR\App\Dropbox\update\$PLUGINSDIR\nsExec.dll" "$INSTDIR\App\Dropbox\nsExec.dll" RMDir /r "$INSTDIR\App\Dropbox\$0" RMDir /r "$INSTDIR\App\Dropbox\$APPDATA" RMDir /r "$INSTDIR\App\Dropbox\$INSTDIR" RMDir /r "$INSTDIR\App\Dropbox\$PLUGINSDIR" RMDir /r "$INSTDIR\App\Dropbox\update" Clearerrors !macroend
Just double the dollar sign, it's an escape character:
But, if I recall correctly, you can not do Rename with wildcards, try CopyFiles or full file-names.
Formerly Gringoloco
Windows XP Pro sp3 x32
You were right about the wildcards. I got everything to install properly, now I just have to figure out how to edit the Dropbox preferences with the launcher, I can't seem to find where they're stored. Any ideas?
With scanning all of drive C and the drive you're running from too if it's not C.
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
I was able to find where the folder path is stored, config.db. Is there a way for the launcher to edit a db file?
It depends entirely on the contents of the db file. What is it - plain text? SQLite database?
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
It's an SQLite database. I was able to find the path in the file, but I don't know if the launcher will be able to update the file with the new drive letter.
Take a look at how Songbird handles it. On my distant-future feature list for PAL I have SQLite database management (using the SQLite DLL rather than the executable), but for the moment you can write custom code to work with sqlite3.exe.
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1