Windows: Setup-compatible launcher + .iss file
The launcher must download files to $GPODDER_HOME, otherwise it won't be able to save files in the application folder when installed using the setup.
This commit is contained in:
parent
30f3539fa9
commit
b005c2a33b
Binary file not shown.
|
@ -71,6 +71,7 @@ int main(int argc, char** argv)
|
|||
int _argc = 1;
|
||||
char *_argv[] = { MAIN_MODULE };
|
||||
TCHAR gPodder_Home[MAX_PATH];
|
||||
TCHAR Temp_Download_Filename[MAX_PATH];
|
||||
|
||||
HMODULE python_dll;
|
||||
FARPROC Py_Initialize;
|
||||
|
@ -95,7 +96,7 @@ int main(int argc, char** argv)
|
|||
BAILOUT("Cannot determine your home directory (SHGetFolderPath).");
|
||||
}
|
||||
|
||||
strncat(gPodder_Home, "\\gPodder", MAX_PATH);
|
||||
strncat(gPodder_Home, "\\gPodder\\", MAX_PATH);
|
||||
if (SetEnvironmentVariable("GPODDER_HOME", gPodder_Home) == 0) {
|
||||
BAILOUT("SetEnvironmentVariable for GPODDER_HOME failed.");
|
||||
}
|
||||
|
@ -124,12 +125,14 @@ int main(int argc, char** argv)
|
|||
"Do you want to install it now?",
|
||||
"Python 2.7 installation not found",
|
||||
MB_YESNO | MB_ICONQUESTION) == IDYES) {
|
||||
if (DownloadFile(PYTHON_INSTALLER_FILE,
|
||||
strncpy(Temp_Download_Filename, gPodder_Home, MAX_PATH);
|
||||
strncat(Temp_Download_Filename, PYTHON_INSTALLER_FILE, MAX_PATH);
|
||||
if (DownloadFile(Temp_Download_Filename,
|
||||
PYTHON_INSTALLER_URL,
|
||||
PYTHON_INSTALLER_SIZE) == PYTHON_INSTALLER_SIZE) {
|
||||
ShellExecute(NULL,
|
||||
"open",
|
||||
PYTHON_INSTALLER_FILE,
|
||||
Temp_Download_Filename,
|
||||
NULL,
|
||||
NULL,
|
||||
SW_SHOWNORMAL);
|
||||
|
@ -160,12 +163,14 @@ int main(int argc, char** argv)
|
|||
"Do you want to install it now?",
|
||||
"PyGTK installation not found",
|
||||
MB_YESNO | MB_ICONQUESTION) == IDYES) {
|
||||
if (DownloadFile(PYGTK_INSTALLER_FILE,
|
||||
strncpy(Temp_Download_Filename, gPodder_Home, MAX_PATH);
|
||||
strncat(Temp_Download_Filename, PYGTK_INSTALLER_FILE, MAX_PATH);
|
||||
if (DownloadFile(Temp_Download_Filename,
|
||||
PYGTK_INSTALLER_URL,
|
||||
PYGTK_INSTALLER_SIZE) == PYGTK_INSTALLER_SIZE) {
|
||||
ShellExecute(NULL,
|
||||
"open",
|
||||
PYGTK_INSTALLER_FILE,
|
||||
Temp_Download_Filename,
|
||||
NULL,
|
||||
NULL,
|
||||
SW_SHOWNORMAL);
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,54 @@
|
|||
; Script generated by the Inno Setup Script Wizard.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application.
|
||||
; Do not use the same AppId value in installers for other applications.
|
||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||
AppId={{ABE123A1-41D1-4917-8E1E-C7E37991B673}
|
||||
AppName=gPodder
|
||||
AppVersion=3.0.0
|
||||
;AppVerName=gPodder 3.0.0
|
||||
AppPublisher=Thomas Perl
|
||||
AppPublisherURL=http://gpodder.org/
|
||||
AppSupportURL=http://gpodder.org/
|
||||
AppUpdatesURL=http://gpodder.org/
|
||||
DefaultDirName={pf}\gPodder
|
||||
DefaultGroupName=gPodder
|
||||
LicenseFile=C:\Dokumente und Einstellungen\thp\Desktop\x\gpodder-3.0.0-win32\COPYING
|
||||
InfoBeforeFile=C:\Dokumente und Einstellungen\thp\Desktop\x\gpodder-3.0.0-win32\README
|
||||
OutputDir=C:\Dokumente und Einstellungen\thp\Desktop\x
|
||||
OutputBaseFilename=gpodder-3.0.0-setup
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
WizardSmallImageFile=C:\Dokumente und Einstellungen\thp\Desktop\x\wizard-small-image.bmp
|
||||
WizardImageFile=C:\Dokumente und Einstellungen\thp\Desktop\x\wizard-image.bmp
|
||||
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
|
||||
|
||||
[Files]
|
||||
Source: "C:\Dokumente und Einstellungen\thp\Desktop\x\gpodder-3.0.0-win32\gpodder.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "C:\Dokumente und Einstellungen\thp\Desktop\x\gpodder-3.0.0-win32\COPYING"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "C:\Dokumente und Einstellungen\thp\Desktop\x\gpodder-3.0.0-win32\gpo.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "C:\Dokumente und Einstellungen\thp\Desktop\x\gpodder-3.0.0-win32\README"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "C:\Dokumente und Einstellungen\thp\Desktop\x\gpodder-3.0.0-win32\bin\*"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "C:\Dokumente und Einstellungen\thp\Desktop\x\gpodder-3.0.0-win32\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "C:\Dokumente und Einstellungen\thp\Desktop\x\gpodder-3.0.0-win32\src\*"; DestDir: "{app}\src"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\gPodder"; Filename: "{app}\gpodder.exe"
|
||||
Name: "{group}\gPodder (CLI)"; Filename: "{app}\gpo.exe"
|
||||
Name: "{group}\{cm:ProgramOnTheWeb,gPodder}"; Filename: "http://gpodder.org/"
|
||||
Name: "{group}\{cm:UninstallProgram,gPodder}"; Filename: "{uninstallexe}"
|
||||
Name: "{commondesktop}\gPodder"; Filename: "{app}\gpodder.exe"; Tasks: desktopicon
|
||||
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\gPodder"; Filename: "{app}\gpodder.exe"; Tasks: quicklaunchicon
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\gpodder.exe"; Description: "{cm:LaunchProgram,gPodder}"; Flags: nowait postinstall skipifsilent
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 201 KiB |
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
Loading…
Reference in New Issue