This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsetup.iss
101 lines (89 loc) · 4.23 KB
/
setup.iss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#define MyAppVersion "1.6.3"
#define OSGVersion "2.8.5"
#define OSGSOVersion "74"
#define OTSOVersion "11"
#define MyAppName "SketchUp to OpenSceneGraph Exporter Plugin - SketchUp " + TARGET_VERSION
#define MyAppPublisher "Ryan Pavlik"
#define MyAppPublisherURL "http://ryanpavlik.com"
#define MyAppURL "http://github.com/rpavlik/sketchupToOSG"
[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={#VersionSpecificGUID}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppPublisherURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={code:GetSketchUpPluginsDir}
DisableDirPage=yes
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=setup-sketchupToOpenSceneGraphPlugin-{#MyAppVersion}-skp{#TARGET_VERSION}
Compression=lzma/Max
SolidCompression=true
DirExistsWarning=no
AppendDefaultDirName=false
AlwaysShowDirOnReadyPage=true
VersionInfoVersion={#MyAppVersion}
VersionInfoCompany={#MyAppPublisher}
VersionInfoProductName={#MyAppName}
VersionInfoProductVersion={#MyAppVersion}
UninstallFilesDir={app}\osgconv
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
; Files created for this project
Source: "openscenegraph_exportviacollada.rb"; DestDir: "{app}"; Flags: ignoreversion
Source: README.mkd; DestDir: {app}; Flags: ignoreversion; DestName: SketchupToOpenSceneGraph-README.txt;
Source: "osgconv\fileutils.rb"; DestDir: "{app}\osgconv"; Flags: ignoreversion
Source: "osgconv\LICENSE_1_0.txt"; DestDir: "{app}\osgconv"; Flags: ignoreversion
Source: "osgconv\osgconv.rb"; DestDir: "{app}\osgconv"; Flags: ignoreversion
; OpenSceneGraph
Source: "binaries\win\osg{#OSGSOVersion}-*.dll"; DestDir: "{app}\osgconv"; Flags: IgnoreVersion;
Source: "binaries\win\ot{#OTSOVersion}-OpenThreads.dll"; DestDir: "{app}\osgconv"; Flags: IgnoreVersion;
Source: "binaries\win\osgPlugins-{#OSGVersion}\*.dll"; DestDir: "{app}\osgconv\osgPlugins-{#OSGVersion}"; Flags: IgnoreVersion;
; OSG Executables
Source: "binaries\win\osgconv.exe"; DestDir: "{app}\osgconv"; Flags: IgnoreVersion;
Source: "binaries\win\osgviewer.exe"; DestDir: "{app}\osgconv"; Flags: IgnoreVersion;
; OSG Dependencies
Source: "binaries\win\freetype6.dll"; DestDir: "{app}\osgconv"; Flags: IgnoreVersion;
Source: "binaries\win\jpeg62.dll"; DestDir: "{app}\osgconv"; Flags: IgnoreVersion;
Source: "binaries\win\libcollada14dom22.dll"; DestDir: "{app}\osgconv"; Flags: IgnoreVersion;
Source: "binaries\win\libpng12.dll"; DestDir: "{app}\osgconv"; Flags: IgnoreVersion;
Source: "binaries\win\libtiff3.dll"; DestDir: "{app}\osgconv"; Flags: IgnoreVersion;
Source: "binaries\win\libungif4.dll"; DestDir: "{app}\osgconv"; Flags: IgnoreVersion;
Source: "binaries\win\libxml2.dll"; DestDir: "{app}\osgconv"; Flags: IgnoreVersion;
Source: "binaries\win\libungif4.dll"; DestDir: "{app}\osgconv"; Flags: IgnoreVersion;
Source: "binaries\win\zlib1.dll"; DestDir: "{app}\osgconv"; Flags: IgnoreVersion;
[Icons]
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
[Code]
var
SketchUpPluginsDir: String;
function GetSketchUpPluginsDir(Param: String): String;
begin
Result := SketchUpPluginsDir;
end;
function IsValidDir(): Boolean;
begin
Result := DirExists(SketchUpPluginsDir) and FileExists(SketchUpPluginsDir + '\..\SketchUp.exe');
end;
function InitializeSetup(): Boolean;
var
KeepAsking: Boolean;
begin
Result := True;
SketchUpPluginsDir := ExpandConstant('{#DEFAULT_LOCATION}');
KeepAsking := not IsValidDir();
while Result and KeepAsking do begin
SketchUpPluginsDir := ExpandConstant('{#DEFAULT_LOCATION}');
Result := BrowseForFolder('Could not find the SketchUp {#TARGET_VERSION} plugin directory: please select it',
SketchUpPluginsDir, False);
KeepAsking := not IsValidDir();
end;
end;