Показать полную графическую версию : Скрипты Inno Setup. Помощь и советы [часть 6]
Есть ли способ убить запущенный процесс (рабочую программу) при установке на нее? В справке нашел 2 варианта, но ни один не сработал... »
В шапке есть пример. И несколько страниц назад было.
Farser21
26-10-2013, 11:32
Nordek, спасибо.
И еще возник вопрос.
Когда я использую Flags: exclusive, то почему-то сразу флажки выставлены.
А когда я использую Flags: dontinheritcheck, то флажки не стоят.
Как сделать так чтобы изначально флажки не где не стояли. А то немного не удобно каждый раз самому их убирать.
Заранее спасибо.
Как сделать так чтобы изначально флажки не где не стояли. »
Удали строчку что касается Types. »
[Components]
Name: a; Description: aaa; Types: custom
Farser21
26-10-2013, 12:06
saurn, в том то и дело что такой строчки у меня нету.
Скрипт
#include "botva2.iss"
#include "BASS_Module.iss"
#define Pic1 "Анимированный прицел (Снайперский)"
#define Pic2 "Белый прицел"
#define Pic3 "Прицел как у 40 тонн"
#define Pic4 "Прицел Кирилла Орешкина (Зеленый)"
#define Pic5 "Прицел Кирилла Орешкина (Синий)"
#define Pic6 "Сведение с Пробитием снаряда и Толщиной брони"
#define Pic7 "Снайперский прицел (Простой)"
#define Pic8 "Снайперский прицел Warface"
#define Pic9 "Снайперский прицел Минималистический"
#define Pic10 "Спайперский прицел ZX mini"
#define Pic11 "Анимированный Арт-прицел"
#define Pic12 "Арт-прицел (Белый)"
#define Pic13 "Арт-прицел (Простой)"
#define Pic14 "Необычный Арт-прицел"
#define Pic15 "Анимированная Дамаг панель"
#define Pic16 "Дамаг панель (Прозрачная) с таймером починки"
#define Pic17 "Дамаг панель (Прозрачная)"
#define Pic18 "Дамаг панель (С новыми иконками модулей)"
#define Pic19 "Дамаг панель Xbox"
#define Pic20 "Дамаг панель Бионик (Зеленый)"
#define Pic21 "Дамаг панель Бионик (Черный)"
#define Pic22 "Дамаг панель в стиле RPG"
#define Pic23 "Дамаг панель от zayaz"
#define Pic24 "Китайская дамаг панель"
#define Pic25 "Дамаг индикатор (Легкий)"
#define Pic26 "Дамаг индикатор (Простой)"
#define Pic27 "Дамаг индикатор (Пуля)"
#define Pic28 "Дамаг индикатор Warface"
#define Pic29 "Дамаг индикатор"
#define Pic30 "Маркер фокуса (Атакую) желтый"
#define Pic31 "Маркер фокуса (Атакую) зеленый"
#define Pic32 "Маркер фокуса (Атакую) красный"
#define Pic33 "Маркер фокуса (Атакую) синий"
#define Pic34 "УГН для ПТ (Желтые)"
#define Pic35 "УГН для ПТ в стиле zayaz"
#define Pic36 "УГН для ПТ и Арты (MeltyMap) + Улучшеная мини-карта"
#define Pic37 "УГН для ПТ и Арты (Квадратные)"
#define Pic38 "УГН для ПТ и Арты (Оранжевые)"
#define Pic39 "Иконки снарядов"
#define Pic40 "Мини карта (Названия танков, луч, радиус обзора)"
[Setup]
SourceDir=.
OutputDir=Setup
AppName=Сборка модов от Farser (Собери сам)
AppVerName=Сборка модов от Farser (Собери сам)
AppVersion=0.8.9
DefaultDirName={pf}\World_of_Tanks
DefaultGroupName=Сборка модов от Farser (Собери сам)
AllowNoIcons=yes
OutputBaseFilename=setup
WizardImageFile=Images\Внешний вид\1.bmp
WizardSmallImageFile=Images\Внешний вид\2.bmp
SetupIconFile=Images\Внешний вид\back.ico
WindowVisible=no
WindowShowCaption=no
WindowResizable=no
Compression=lzma/normal
DiskSpanning=yes
DiskSliceSize=2100000000
SlicesPerDisk=1
[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[Components]
Name: g0; Description: Прицелы; Flags: collapsed dontinheritcheck
Name: g0\c1; Description: Анимированный прицел (Снайперский); Flags: exclusive
Name: g0\c2; Description: Белый прицел; Flags: exclusive
Name: g0\c3; Description: Прицел как у 40 тонн; Flags: exclusive
Name: g0\c4; Description: Прицел Кирилла Орешкина (Зеленый); Flags: exclusive
Name: g0\c5; Description: Прицел Кирилла Орешкина (Синий); Flags: exclusive
Name: g0\c6; Description: Сведение с Пробитием снаряда и Толщиной брони; Flags: exclusive
Name: g0\c7; Description: Снайперский прицел (Простой); Flags: exclusive
Name: g0\c8; Description: Снайперский прицел Warface; Flags: exclusive
Name: g0\c10; Description: Снайперский прицел Минималистический; Flags: exclusive
Name: g0\c8; Description: Снайперский прицел TAIPAN; Flags: exclusive
Name: g0\c10; Description: Прицел от Андрея Тареева; Flags: exclusive
Name: g0; Description: Арт-Прицелы; Flags: collapsed dontinheritcheck
Name: g0\c11; Description: Анимированный Арт-прицел; Flags: exclusive
Name: g0\c14; Description: Арт-прицел (Белый); Flags: exclusive
Name: g0\c15; Description: Арт-прицел (Простой); Flags: exclusive
Name: g0\c16; Description: Необычный Арт-прицел; Flags: exclusive
Name: g0; Description: Панели повреждений; Flags: collapsed dontinheritcheck
Name: g0\c17; Description: Анимированная Дамаг панель; Flags: exclusive
Name: g0\c18; Description: Дамаг панель (Прозрачная); Flags: exclusive
Name: g0\c19; Description: Дамаг панель (Прозрачная) с таймером починки; Flags: exclusive
Name: g0\c20; Description: Дамаг панель (С новыми иконками модулей); Flags: exclusive
Name: g0\c21; Description: Дамаг панель Xbox; Flags: exclusive
Name: g0\c22; Description: Дамаг панель Бионик (Зеленый); Flags: exclusive
Name: g0\c23; Description: Дамаг панель Бионик (Черный); Flags: exclusive
Name: g0\c24; Description: Дамаг панель в стиле RPG; Flags: exclusive
Name: g0\c25; Description: Дамаг панель от zayaz; Flags: exclusive
Name: g0\c26; Description: Китайская дамаг панель; Flags: exclusive
Name: g0; Description: Дамаг индикаторы; Flags: collapsed dontinheritcheck
Name: g0\c27; Description: Дамаг индикатор; Flags: exclusive
Name: g0\c28; Description: Дамаг индикатор (Легкий); Flags: exclusive
Name: g0\c29; Description: Дамаг индикатор (Пуля); Flags: exclusive
Name: g0\c30; Description: Дамаг индикатор Warface; Flags: exclusive
Name: g0\c30; Description: Дамаг индикатор (Простой); Flags: exclusive
Name: g0; Description: Маркеры фокуса; Flags: collapsed dontinheritcheck
Name: g0\c31; Description: Маркер фокуса (Атакую) желтый; Flags: exclusive
Name: g0\c32; Description: Маркер фокуса (Атакую) зеленый; Flags: exclusive
Name: g0\c33; Description: Маркер фокуса (Атакую) красный; Flags: exclusive
Name: g0\c34; Description: Маркер фокуса (Атакую) синий; Flags: exclusive
Name: g0; Description: УГН (Углы Горизонтальной Наводки); Flags: collapsed dontinheritcheck
Name: g0\c35; Description: УГН для ПТ (Желтые); Flags: exclusive
Name: g0\c36; Description: УГН для ПТ в стиле zayaz; Flags: exclusive
Name: g0\c37; Description: УГН для ПТ и Арты (MeltyMap) + Улучшеная мини-карта; Flags: exclusive
Name: g0\c38; Description: УГН для ПТ и Арты (Квадратные); Flags: exclusive
Name: g0\c39; Description: УГН для ПТ и Арты (Оранжевые); Flags: exclusive
Name: g0; Description: Иконки; Flags: collapsed dontinheritcheck
Name: g0\c41; Description: Иконки снарядов; Flags: dontinheritcheck
Name: g0; Description: Мини-карты; Flags: collapsed dontinheritcheck
Name: g0\c44; Description: Мини карта (Названия танков, луч, радиус обзора); Flags: exclusive
Name: g0\c44; Description: Мини карта (Названия танков, луч, сонар, радиус обзора, ники игроков); Flags: exclusive
Name: g0\c44; Description: Мини карта Мини карта (Направление стволом противника и арты); Flags: exclusive
Name: g0; Description: Часы; Flags: collapsed dontinheritcheck
Name: g0\c46; Description: Часы в бою; Flags: dontinheritcheck
Name: g0\c47; Description: Часы с датой в ангаре (Белые); Flags: dontinheritcheck
Name: g0\c48; Description: Часы с датой в бою; Flags: dontinheritcheck
Name: g0; Description: Шкурки; Flags: dontinheritcheck
Name: g0; Description: Разное; Flags: collapsed dontinheritcheck
Name: g0\c51; Description: Дебуг панель; Flags: dontinheritcheck
Name: g0\c52; Description: Души танков; Flags: dontinheritcheck
Name: g0\c53; Description: Души танков в виде Оленя; Flags: dontinheritcheck
Name: g0\c54; Description: Зум; Flags: dontinheritcheck
Name: g0\c55; Description: Убираем черноту в снайперском режиме; Flags: dontinheritcheck
Name: g0\c56; Description: Цветные пробития; Flags: dontinheritcheck
#define Files
[Files]
#ifdef Files
Source: "Сборка (Собери Сам)\---Прицелы---\Анимированный прицел (Снайперский)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c1
Source: "Сборка (Собери Сам)\---Прицелы---\Белый прицел\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c2
Source: "Сборка (Собери Сам)\---Прицелы---\Прицел как у 40 тонн\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c3
Source: "Сборка (Собери Сам)\---Прицелы---\Прицел Кирилла Орешкина (Зеленый)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c4
Source: "Сборка (Собери Сам)\---Прицелы---\Прицел Кирилла Орешкина (Синий)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c5
Source: "Сборка (Собери Сам)\---Прицелы---\Сведение с Пробитием снаряда и Толщиной брони\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c6
Source: "Сборка (Собери Сам)\---Прицелы---\Снайперский прицел (Простой)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c7
Source: "Сборка (Собери Сам)\---Прицелы---\Снайперский прицел Warface\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c8
Source: "Сборка (Собери Сам)\---Прицелы---\Снайперский прицел Минималистический\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c10
Source: "Сборка (Собери Сам)\---Прицелы---\Снайперский прицел TAIPAN\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c10
Source: "Сборка (Собери Сам)\---Прицелы---\Прицел от Андрея Тареева\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c10
Source: "Сборка (Собери Сам)\---Арт прицелы---\Анимированный Арт-прицел\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c11
Source: "Сборка (Собери Сам)\---Арт прицелы---\Арт-прицел (Белый)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c14
Source: "Сборка (Собери Сам)\---Арт прицелы---\Арт-прицел (Простой)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c15
Source: "Сборка (Собери Сам)\---Арт прицелы---\Необычный Арт-прицел\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c16
Source: "Сборка (Собери Сам)\---Панели повреждений---\Анимированная Дамаг панель\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c17
Source: "Сборка (Собери Сам)\---Панели повреждений---\Дамаг панель (Прозрачная)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c18
Source: "Сборка (Собери Сам)\---Панели повреждений---\Дамаг панель (Прозрачная) с таймером починки\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c19
Source: "Сборка (Собери Сам)\---Панели повреждений---\Дамаг панель (С новыми иконками модулей)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c20
Source: "Сборка (Собери Сам)\---Панели повреждений---\Дамаг панель Xbox\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c21
Source: "Сборка (Собери Сам)\---Панели повреждений---\Дамаг панель Бионик (Зеленый)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c22
Source: "Сборка (Собери Сам)\---Панели повреждений---\Дамаг панель Бионик (Черный)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c23
Source: "Сборка (Собери Сам)\---Панели повреждений---\Дамаг панель в стиле RPG\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c24
Source: "Сборка (Собери Сам)\---Панели повреждений---\Дамаг панель от zayaz\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c25
Source: "Сборка (Собери Сам)\---Панели повреждений---\Китайская дамаг панель\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c26
Source: "Сборка (Собери Сам)\---Дамаг индикаторы---\Дамаг индикатор\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c27
Source: "Сборка (Собери Сам)\---Дамаг индикаторы---\Дамаг индикатор (Легкий)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c28
Source: "Сборка (Собери Сам)\---Дамаг индикаторы---\Дамаг индикатор (Пуля)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c29
Source: "Сборка (Собери Сам)\---Дамаг индикаторы---\Дамаг индикатор Warface\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c30
Source: "Сборка (Собери Сам)\---Маркеры фокуса---\Маркер фокуса (Атакую) желтый\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c31
Source: "Сборка (Собери Сам)\---Маркеры фокуса---\Маркер фокуса (Атакую) зеленый\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c32
Source: "Сборка (Собери Сам)\---Маркеры фокуса---\Маркер фокуса (Атакую) красный\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c33
Source: "Сборка (Собери Сам)\---Маркеры фокуса---\Маркер фокуса (Атакую) синий\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c34
Source: "Сборка (Собери Сам)\---УГН---\УГН для ПТ (Желтые)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c35
Source: "Сборка (Собери Сам)\---УГН---\УГН для ПТ в стиле zayaz\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c36
Source: "Сборка (Собери Сам)\---УГН---\УГН для ПТ и Арты (MeltyMap) + Улучшеная мини-карта\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c37
Source: "Сборка (Собери Сам)\---УГН---\УГН для ПТ и Арты (Квадратные)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c38
Source: "Сборка (Собери Сам)\---УГН---\УГН для ПТ и Арты (Оранжевые)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c39
Source: "Сборка (Собери Сам)\---Иконки---\Иконки снарядов\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c41
Source: "Сборка (Собери Сам)\---Мини карты---\Мини карта (Названия танков, луч, радиус обзора)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c44
Source: "Сборка (Собери Сам)\---Мини карты---\Мини карта (Названия танков, луч, сонар, радиус обзора, ники игроков)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c44
Source: "Сборка (Собери Сам)\---Мини карты---\Мини карта (Направление стволом противника и арты)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c44
Source: "Сборка (Собери Сам)\---Часы---\Часы в бою\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c46
Source: "Сборка (Собери Сам)\---Часы---\Часы с датой в ангаре (Белые)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c47
Source: "Сборка (Собери Сам)\---Часы---\Часы с датой в бою\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c48
Source: "Сборка (Собери Сам)\---Разное---\Дебуг панель\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c51
Source: "Сборка (Собери Сам)\---Разное---\Души танков\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c52
Source: "Сборка (Собери Сам)\---Разное---\Души танков в виде Оленя\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c53
Source: "Сборка (Собери Сам)\---Разное---\Зум\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c54
Source: "Сборка (Собери Сам)\---Разное---\Убираем черноту в снайперском режиме\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c55
Source: "Сборка (Собери Сам)\---Разное---\Цветные пробития\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: g0\c56
#endif
Source: BASS_Files\*; DestDir: {tmp}; Flags: dontcopy
Source: C:\Users\Farser\Desktop\BASS_Files\music.mp3; DestDir: {tmp}; Flags: dontcopy
Source: Images\Содержимое\{#Pic1}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic2}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic3}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic4}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic5}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic6}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic7}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic8}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic9}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic10}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic11}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic12}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic13}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic14}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic15}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic16}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic17}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic18}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic19}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic20}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic21}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic22}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic23}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic24}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic25}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic26}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic27}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic28}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic29}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic30}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic31}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic32}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic33}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic34}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic35}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic36}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic37}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic38}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic39}.bmp; Flags: dontcopy nocompression
Source: Images\Содержимое\{#Pic40}.bmp; Flags: dontcopy nocompression
[Icons]
Name: "{group}\{cm:UninstallProgram,World of Tanks}"; Filename: "{uninstallexe}"
[UninstallDelete]
Name: {app}; Type: dirifempty;
[code]
[code]
#ifdef UNICODE
#define A "W"
#else
#define A "A"
#endif
const
UNDEF_INDEX = -777;
ALPHA_BLEND_LEVEL = 230; // max=Byte=255
WS_EX_LAYERED = $80000;
WS_EX_TRANSPARENT = $20;
LWA_COLORKEY = 1;
LWA_ALPHA = 2;
GWL_EXSTYLE = (-20);
Color = clblack;
procedure Formcolor();
begin
WizardForm.Font.Color:=clWhite;
WizardForm.TypesCombo.TabStop := False;
WizardForm.Color:=Color;
WizardForm.WelcomePage.Color:=Color;
WizardForm.InnerPage.Color:=Color;
WizardForm.FinishedPage.Color:=Color;
WizardForm.LicensePage.Color:=Color;
WizardForm.PasswordPage.Color:=Color;
WizardForm.InfoBeforePage.Color:=Color;
WizardForm.UserInfoPage.Color:=Color;
WizardForm.SelectDirPage.Color:=Color;
WizardForm.SelectComponentsPage.Color:=Color;
WizardForm.SelectProgramGroupPage.Color:=Color;
WizardForm.SelectTasksPage.Color:=Color;
WizardForm.ReadyPage.Color:=Color;
WizardForm.PreparingPage.Color:=Color;
WizardForm.InstallingPage.Color:=Color;
WizardForm.InfoAfterPage.Color:=Color;
WizardForm.DirEdit.Color:=Color;
WizardForm.DiskSpaceLabel.Color:=Color;
WizardForm.DirEdit.Color:=Color;
WizardForm.GroupEdit.Color:=Color;
WizardForm.PasswordLabel.Color:=Color;
WizardForm.PasswordEdit.Color:=Color;
WizardForm.PasswordEditLabel.Color:=Color;
WizardForm.ReadyMemo.Color:=Color;
WizardForm.ReadyMemo.ScrollBars:= ssNone
WizardForm.DirEdit.TabStop := False;
WizardForm.TypesCombo.Color:=Color;
WizardForm.WelcomeLabel1.Color:=Color;
WizardForm.WelcomeLabel1.Font.Color:=clWhite;
WizardForm.GroupEdit.TabStop := False;
WizardForm.InfoBeforeClickLabel.Color:=Color;
WizardForm.MainPanel.Color:=Color;
WizardForm.PageNameLabel.Color:=Color;
WizardForm.PageDescriptionLabel.Color:=Color;
WizardForm.ReadyLabel.Color:=Color;
WizardForm.FinishedLabel.Color:=Color;
WizardForm.YesRadio.Color:=Color;
WizardForm.NoRadio.Color:=Color;
WizardForm.WelcomeLabel2.Color:=Color;
WizardForm.LicenseLabel1.Color:=Color;
WizardForm.InfoAfterClickLabel.Color:=Color;
WizardForm.ComponentsList.Color:=Color;
WizardForm.ComponentsDiskSpaceLabel.Color:=Color;
WizardForm.BeveledLabel.Color:=Color;
WizardForm.StatusLabel.Color:=Color;
WizardForm.FilenameLabel.Color:=Color;
WizardForm.SelectDirLabel.Color:=Color;
WizardForm.SelectStartMenuFolderLabel.Color:=Color;
WizardForm.SelectComponentsLabel.Color:=Color;
WizardForm.SelectTasksLabel.Color:=Color;
WizardForm.LicenseAcceptedRadio.Color:=Color;
WizardForm.LicenseNotAcceptedRadio.Color:=Color;
WizardForm.UserInfoNameLabel.Color:=Color;
WizardForm.UserInfoNameEdit.Color:=Color;
WizardForm.UserInfoOrgLabel.Color:=Color;
WizardForm.UserInfoOrgEdit.Color:=Color;
WizardForm.PreparingLabel.Color:=Color;
WizardForm.FinishedHeadingLabel.Color:=Color;
WizardForm.FinishedHeadingLabel.Font.Color:=clWhite;
WizardForm.ComponentsList.TreeViewStyle := True;
WizardForm.UserInfoSerialLabel.Color:=Color;
WizardForm.UserInfoSerialEdit.Color:=Color;
WizardForm.TasksList.Color:=Color;
WizardForm.RunList.Color:=Color;
WizardForm.SelectDirBrowseLabel.Color:=Color;
WizardForm.SelectStartMenuFolderBrowseLabel.Color:=Color;
WizardForm.PageNameLabel.Font.Color:=clWhite;
end;
var
InfoPic: TBitmapImage;
LastIndex: Integer;
TempPath: String;
PicForm: TForm;
type
COLORREF = DWORD;
function GetCursorPos(var lpPoint: TPoint): BOOL; external 'GetCursorPos@user32.dll stdcall';
function SetLayeredWindowAttributes(Hwnd: THandle; crKey: COLORREF; bAlpha: Byte; dwFlags: DWORD): Boolean; external 'SetLayeredWindowAttributes@user32.dll stdcall';
function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLong{#A}@user32.dll stdcall';
function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLong{#A}@user32.dll stdcall';
function SetFocus(hWnd: HWND): HWND; external 'SetFocus@user32.dll stdcall';
procedure ShowPicHint(const PicFilePath: String);
var
pt: TPoint;
begin
if not GetCursorPos(pt) then Exit;
InfoPic.Bitmap.LoadFromFile(PicFilePath);
try
with PicForm do
begin
SetBounds(ScaleX(pt.x + 16), ScaleY(pt.y + 7), InfoPic.Width, InfoPic.Height);
SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE) or WS_EX_LAYERED);
SetLayeredWindowAttributes(Handle, 0, ALPHA_BLEND_LEVEL, LWA_ALPHA);
Show;
end;
finally
SetFocus(WizardForm.Handle);
end;
end;
procedure CompOnItemMouseMove(Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea);
var
UndefPic: String;
begin
if Index = -1 then Exit;
if Index = LastIndex then Exit;
try
case TNewCheckListBox(Sender).ItemCaption[Index] of
'Анимированный прицел (Снайперский)': UndefPic := '{#Pic1}.bmp';
'Белый прицел': UndefPic := '{#Pic2}.bmp';
'Прицел как у 40 тонн': UndefPic := '{#Pic3}.bmp';
'Прицел Кирилла Орешкина (Зеленый)': UndefPic := '{#Pic4}.bmp';
'Прицел Кирилла Орешкина (Синий)': UndefPic := '{#Pic5}.bmp';
'Сведение с Пробитием снаряда и Толщиной брони': UndefPic := '{#Pic6}.bmp';
'Снайперский прицел (Простой)': UndefPic := '{#Pic7}.bmp';
'Снайперский прицел Warface': UndefPic := '{#Pic8}.bmp';
'Снайперский прицел Минималистический': UndefPic := '{#Pic9}.bmp';
'Спайперский прицел ZX mini': UndefPic := '{#Pic10}.bmp';
'Анимированный Арт-прицел': UndefPic := '{#Pic11}.bmp';
'Арт-прицел (Белый)': UndefPic := '{#Pic12}.bmp';
'Арт-прицел (Простой)': UndefPic := '{#Pic13}.bmp';
'Необычный Арт-прицел': UndefPic := '{#Pic14}.bmp';
'Анимированная Дамаг панель': UndefPic := '{#Pic15}.bmp';
'Дамаг панель (Прозрачная)': UndefPic := '{#Pic16}.bmp';
'Дамаг панель (Прозрачная) с таймером починки': UndefPic := '{#Pic17}.bmp';
'Дамаг панель (С новыми иконками модулей)': UndefPic := '{#Pic18}.bmp';
'Дамаг панель Xbox': UndefPic := '{#Pic19}.bmp';
'Дамаг панель Бионик (Зеленый)': UndefPic := '{#Pic20}.bmp';
'Дамаг панель Бионик (Черный)': UndefPic := '{#Pic21}.bmp';
'Дамаг панель в стиле RPG': UndefPic := '{#Pic22}.bmp';
'Дамаг панель от zayaz': UndefPic := '{#Pic23}.bmp';
'Китайская дамаг панель': UndefPic := '{#Pic24}.bmp';
'Дамаг индикатор (Легкий)': UndefPic := '{#Pic25}.bmp';
'Дамаг индикатор (Простой)': UndefPic := '{#Pic26}.bmp';
'Дамаг индикатор (Пуля)': UndefPic := '{#Pic27}.bmp';
'Дамаг индикатор Warface': UndefPic := '{#Pic28}.bmp';
'Дамаг индикатор': UndefPic := '{#Pic29}.bmp';
'Маркер фокуса (Атакую) желтый': UndefPic := '{#Pic30}.bmp';
'Маркер фокуса (Атакую) зеленый': UndefPic := '{#Pic31}.bmp';
'Маркер фокуса (Атакую) красный': UndefPic := '{#Pic32}.bmp';
'Маркер фокуса (Атакую) синий': UndefPic := '{#Pic33}.bmp';
'УГН для ПТ (Желтые)': UndefPic := '{#Pic34}.bmp';
'УГН для ПТ в стиле zayaz': UndefPic := '{#Pic35}.bmp';
'УГН для ПТ и Арты (MeltyMap) + Улучшеная мини-карта': UndefPic := '{#Pic36}.bmp';
'УГН для ПТ и Арты (Квадратные)': UndefPic := '{#Pic37}.bmp';
'УГН для ПТ и Арты (Оранжевые)': UndefPic := '{#Pic38}.bmp';
'Иконки снарядов': UndefPic := '{#Pic39}.bmp';
'Мини карта (Названия танков, луч, радиус обзора)': UndefPic := '{#Pic40}.bmp';
else
begin
LastIndex := UNDEF_INDEX;
PicForm.Hide;
Exit;
end;
end;
if not FileExists(TempPath + UndefPic) then ExtractTemporaryFile(UndefPic);
ShowPicHint(TempPath + UndefPic);
finally
LastIndex := Index;
end;
end;
procedure CompOnMouseLeave(Sender: TObject);
begin
PicForm.Hide;
end;
procedure InitInfo();
begin
WizardForm.ComponentsList.OnItemMouseMove := @CompOnItemMouseMove;
WizardForm.ComponentsList.OnMouseLeave := @CompOnMouseLeave;
TempPath := AddBackslash(ExpandConstant('{tmp}'));
LastIndex := UNDEF_INDEX;
PicForm := TForm.Create(WizardForm)
with PicForm do
begin
BorderStyle := bsNone;
FormStyle := fsStayOnTop;
InfoPic := TBitmapImage.Create(PicForm)
with InfoPic do
begin
Parent := PicForm;
AutoSize := True;
end;
end;
end;
procedure InitializeWizard();
begin
Formcolor();
InitInfo();
WizardForm.TypesCombo.Visible := False;
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('CallbackCtrl.dll');
ExtractTemporaryFile('botva2.dll');
ExtractTemporaryFile('MusicButton.png');
ExtractTemporaryFile('Music.mp3');
BASS_Init('{tmp}\Music.mp3') //Запускаем музыку
//Можно добавить в инсталл несколько песен
//BASS_Init(ExpandConstant('{tmp}\*')) //Поиск по маске
BASS_CreateOnOffButton(WizardForm, '{tmp}\MusicButton.png', 20, 320, 36, 36, 4) //Создаем кнопку вкл/выкл
end;
procedure DeinitializeSetup();
begin
BASS_DeInit; //Освобождаем процесс
gdipShutdown
end;
Farser21, тьфу, сразу не понял, что вам нужно :)
Насколько мне известно(могу и ошибатся), при использовании флага exclusive хотя бы один компонент, из имеющих этот флаг, будет отмечен по умолчанию.
Но можно снять отметки со всех компонентов через код:
[Code]
#ifdef UNICODE
#define A "W"
#else
#define A "A"
#endif
const
UNDEF_INDEX = -777;
ALPHA_BLEND_LEVEL = 230; // max=Byte=255
WS_EX_LAYERED = $80000;
WS_EX_TRANSPARENT = $20;
LWA_COLORKEY = 1;
LWA_ALPHA = 2;
GWL_EXSTYLE = (-20);
Color = clblack;
type
COLORREF = DWORD;
function GetCursorPos(var lpPoint: TPoint): BOOL;
external 'GetCursorPos@user32.dll stdcall';
function SetLayeredWindowAttributes(Hwnd: THandle; crKey: COLORREF; bAlpha: Byte; dwFlags: DWORD): Boolean;
external 'SetLayeredWindowAttributes@user32.dll stdcall';
function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint;
external 'GetWindowLong{#A}@user32.dll stdcall';
function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint;
external 'SetWindowLong{#A}@user32.dll stdcall';
function SetFocus(hWnd: HWND): HWND;
external 'SetFocus@user32.dll stdcall';
var
InfoPic: TBitmapImage;
LastIndex: Integer;
TempPath: String;
PicForm: TForm;
procedure Formcolor();
begin
WizardForm.Font.Color:=clWhite;
WizardForm.TypesCombo.TabStop := False;
WizardForm.Color:=Color;
WizardForm.WelcomePage.Color:=Color;
WizardForm.InnerPage.Color:=Color;
WizardForm.FinishedPage.Color:=Color;
WizardForm.LicensePage.Color:=Color;
WizardForm.PasswordPage.Color:=Color;
WizardForm.InfoBeforePage.Color:=Color;
WizardForm.UserInfoPage.Color:=Color;
WizardForm.SelectDirPage.Color:=Color;
WizardForm.SelectComponentsPage.Color:=Color;
WizardForm.SelectProgramGroupPage.Color:=Color;
WizardForm.SelectTasksPage.Color:=Color;
WizardForm.ReadyPage.Color:=Color;
WizardForm.PreparingPage.Color:=Color;
WizardForm.InstallingPage.Color:=Color;
WizardForm.InfoAfterPage.Color:=Color;
WizardForm.DirEdit.Color:=Color;
WizardForm.DiskSpaceLabel.Color:=Color;
WizardForm.DirEdit.Color:=Color;
WizardForm.GroupEdit.Color:=Color;
WizardForm.PasswordLabel.Color:=Color;
WizardForm.PasswordEdit.Color:=Color;
WizardForm.PasswordEditLabel.Color:=Color;
WizardForm.ReadyMemo.Color:=Color;
WizardForm.ReadyMemo.ScrollBars:= ssNone
WizardForm.DirEdit.TabStop := False;
WizardForm.TypesCombo.Color:=Color;
WizardForm.WelcomeLabel1.Color:=Color;
WizardForm.WelcomeLabel1.Font.Color:=clWhite;
WizardForm.GroupEdit.TabStop := False;
WizardForm.InfoBeforeClickLabel.Color:=Color;
WizardForm.MainPanel.Color:=Color;
WizardForm.PageNameLabel.Color:=Color;
WizardForm.PageDescriptionLabel.Color:=Color;
WizardForm.ReadyLabel.Color:=Color;
WizardForm.FinishedLabel.Color:=Color;
WizardForm.YesRadio.Color:=Color;
WizardForm.NoRadio.Color:=Color;
WizardForm.WelcomeLabel2.Color:=Color;
WizardForm.LicenseLabel1.Color:=Color;
WizardForm.InfoAfterClickLabel.Color:=Color;
WizardForm.ComponentsList.Color:=Color;
WizardForm.ComponentsDiskSpaceLabel.Color:=Color;
WizardForm.BeveledLabel.Color:=Color;
WizardForm.StatusLabel.Color:=Color;
WizardForm.FilenameLabel.Color:=Color;
WizardForm.SelectDirLabel.Color:=Color;
WizardForm.SelectStartMenuFolderLabel.Color:=Color;
WizardForm.SelectComponentsLabel.Color:=Color;
WizardForm.SelectTasksLabel.Color:=Color;
WizardForm.LicenseAcceptedRadio.Color:=Color;
WizardForm.LicenseNotAcceptedRadio.Color:=Color;
WizardForm.UserInfoNameLabel.Color:=Color;
WizardForm.UserInfoNameEdit.Color:=Color;
WizardForm.UserInfoOrgLabel.Color:=Color;
WizardForm.UserInfoOrgEdit.Color:=Color;
WizardForm.PreparingLabel.Color:=Color;
WizardForm.FinishedHeadingLabel.Color:=Color;
WizardForm.FinishedHeadingLabel.Font.Color:=clWhite;
WizardForm.ComponentsList.TreeViewStyle := True;
WizardForm.UserInfoSerialLabel.Color:=Color;
WizardForm.UserInfoSerialEdit.Color:=Color;
WizardForm.TasksList.Color:=Color;
WizardForm.RunList.Color:=Color;
WizardForm.SelectDirBrowseLabel.Color:=Color;
WizardForm.SelectStartMenuFolderBrowseLabel.Color:=Color;
WizardForm.PageNameLabel.Font.Color:=clWhite;
end;
procedure ShowPicHint(const PicFilePath: String);
var
pt: TPoint;
begin
if not GetCursorPos(pt) then Exit;
InfoPic.Bitmap.LoadFromFile(PicFilePath);
try
with PicForm do
begin
SetBounds(ScaleX(pt.x + 16), ScaleY(pt.y + 7), InfoPic.Width, InfoPic.Height);
SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE) or WS_EX_LAYERED);
SetLayeredWindowAttributes(Handle, 0, ALPHA_BLEND_LEVEL, LWA_ALPHA);
Show;
end;
finally
SetFocus(WizardForm.Handle);
end;
end;
procedure CompOnItemMouseMove(Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea);
var
UndefPic: String;
begin
if Index = -1 then Exit;
if Index = LastIndex then Exit;
try
case TNewCheckListBox(Sender).ItemCaption[Index] of
'Анимированный прицел (Снайперский)': UndefPic := '{#Pic1}.bmp';
'Белый прицел': UndefPic := '{#Pic2}.bmp';
'Прицел как у 40 тонн': UndefPic := '{#Pic3}.bmp';
'Прицел Кирилла Орешкина (Зеленый)': UndefPic := '{#Pic4}.bmp';
'Прицел Кирилла Орешкина (Синий)': UndefPic := '{#Pic5}.bmp';
'Сведение с Пробитием снаряда и Толщиной брони': UndefPic := '{#Pic6}.bmp';
'Снайперский прицел (Простой)': UndefPic := '{#Pic7}.bmp';
'Снайперский прицел Warface': UndefPic := '{#Pic8}.bmp';
'Снайперский прицел Минималистический': UndefPic := '{#Pic9}.bmp';
'Спайперский прицел ZX mini': UndefPic := '{#Pic10}.bmp';
'Анимированный Арт-прицел': UndefPic := '{#Pic11}.bmp';
'Арт-прицел (Белый)': UndefPic := '{#Pic12}.bmp';
'Арт-прицел (Простой)': UndefPic := '{#Pic13}.bmp';
'Необычный Арт-прицел': UndefPic := '{#Pic14}.bmp';
'Анимированная Дамаг панель': UndefPic := '{#Pic15}.bmp';
'Дамаг панель (Прозрачная)': UndefPic := '{#Pic16}.bmp';
'Дамаг панель (Прозрачная) с таймером починки': UndefPic := '{#Pic17}.bmp';
'Дамаг панель (С новыми иконками модулей)': UndefPic := '{#Pic18}.bmp';
'Дамаг панель Xbox': UndefPic := '{#Pic19}.bmp';
'Дамаг панель Бионик (Зеленый)': UndefPic := '{#Pic20}.bmp';
'Дамаг панель Бионик (Черный)': UndefPic := '{#Pic21}.bmp';
'Дамаг панель в стиле RPG': UndefPic := '{#Pic22}.bmp';
'Дамаг панель от zayaz': UndefPic := '{#Pic23}.bmp';
'Китайская дамаг панель': UndefPic := '{#Pic24}.bmp';
'Дамаг индикатор (Легкий)': UndefPic := '{#Pic25}.bmp';
'Дамаг индикатор (Простой)': UndefPic := '{#Pic26}.bmp';
'Дамаг индикатор (Пуля)': UndefPic := '{#Pic27}.bmp';
'Дамаг индикатор Warface': UndefPic := '{#Pic28}.bmp';
'Дамаг индикатор': UndefPic := '{#Pic29}.bmp';
'Маркер фокуса (Атакую) желтый': UndefPic := '{#Pic30}.bmp';
'Маркер фокуса (Атакую) зеленый': UndefPic := '{#Pic31}.bmp';
'Маркер фокуса (Атакую) красный': UndefPic := '{#Pic32}.bmp';
'Маркер фокуса (Атакую) синий': UndefPic := '{#Pic33}.bmp';
'УГН для ПТ (Желтые)': UndefPic := '{#Pic34}.bmp';
'УГН для ПТ в стиле zayaz': UndefPic := '{#Pic35}.bmp';
'УГН для ПТ и Арты (MeltyMap) + Улучшеная мини-карта': UndefPic := '{#Pic36}.bmp';
'УГН для ПТ и Арты (Квадратные)': UndefPic := '{#Pic37}.bmp';
'УГН для ПТ и Арты (Оранжевые)': UndefPic := '{#Pic38}.bmp';
'Иконки снарядов': UndefPic := '{#Pic39}.bmp';
'Мини карта (Названия танков, луч, радиус обзора)': UndefPic := '{#Pic40}.bmp';
else
begin
LastIndex := UNDEF_INDEX;
PicForm.Hide;
Exit;
end;
end;
if not FileExists(TempPath + UndefPic) then ExtractTemporaryFile(UndefPic);
ShowPicHint(TempPath + UndefPic);
finally
LastIndex := Index;
end;
end;
procedure CompOnMouseLeave(Sender: TObject);
begin
PicForm.Hide;
end;
procedure InitInfo();
begin
WizardForm.ComponentsList.OnItemMouseMove := @CompOnItemMouseMove;
WizardForm.ComponentsList.OnMouseLeave := @CompOnMouseLeave;
TempPath := AddBackslash(ExpandConstant('{tmp}'));
LastIndex := UNDEF_INDEX;
PicForm := TForm.Create(WizardForm)
with PicForm do
begin
BorderStyle := bsNone;
FormStyle := fsStayOnTop;
InfoPic := TBitmapImage.Create(PicForm)
with InfoPic do
begin
Parent := PicForm;
AutoSize := True;
end;
end;
end;
procedure InitializeWizard();
var
i, iCount: Integer;
begin
Formcolor();
InitInfo();
WizardForm.TypesCombo.Visible := False;
iCount := WizardForm.ComponentsList.Items.Count - 1;
for i := iCount downto 0 do
WizardForm.ComponentsList.Checked[i]:= False;
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('CallbackCtrl.dll');
ExtractTemporaryFile('botva2.dll');
ExtractTemporaryFile('MusicButton.png');
ExtractTemporaryFile('Music.mp3');
BASS_Init('{tmp}\Music.mp3') //Запускаем музыку
//Можно добавить в инсталл несколько песен
//BASS_Init(ExpandConstant('{tmp}\*')) //Поиск по маске
BASS_CreateOnOffButton(WizardForm, '{tmp}\MusicButton.png', 20, 320, 36, 36, 4) //Создаем кнопку вкл/выкл
end;
procedure DeinitializeSetup();
begin
BASS_DeInit; //Освобождаем процесс
gdipShutdown
end;
Farser21
26-10-2013, 12:45
saurn, Вставил код, о в итоге флажок пропал только с 1 раздела. Как сделать чтобы он пропал на остальных? Заранее спасибо.
Вставил код, о в итоге флажок пропал только с 1 раздела »
Проверил еще раз - флажки снимаются со всех компонентов.
Добавьте в секцию [Setup] строчку ComponentsListTVStyle=yes так как у вас в компонентах присутствует флаг collapsed
Farser21
26-10-2013, 13:07
saurn, Все разобрался, спасибо большое.
Как сделать так чтобы изначально флажки не где не стояли »
в том то и дело что такой строчки у меня нету. »
Посмотрел, флажки и так изначально не стоят.
Если она у тебя уже установлена, то такое возможно т.к реестр помнит выбранный тип установки.
Farser21, Кстати, удали в скрипте лишний , не к чему он там.
[code]
[code]
»
P.S Farser21,
Что касается твоих вставленных сюда скриптов. Пожалуйста, когда постишь, захватывай в BB-код http://forum.oszone.net/images/editor/code.gif
Вот так
Сюда вставляешь код/скрипт
И перед вставкой сюда, не забывай так же в секции [Code] своего скрипта добавить звёздочку или хотябы решётку
для того чтоб форматирование на форуме не сбилось при захватывании в BB-код [CODE]
Вот так [*Code] или так [#Code]
Пример вставки:
[Setup]
AppName=My Program
AppVersion=1.5
AppPublisher=My Company, Inc.
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
OutputBaseFilename=setup
[Languages]
Name: default; MessagesFile: compiler:Default.isl
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
[Files]
Source: compiler:Examples\MyProg.exe; DestDir: {app}; Flags: ignoreversion
[Icons]
Name: {group}\My Program; Filename: {app}\MyProg.exe
Name: {commondesktop}\My Program; Filename: {app}\MyProg.exe; Tasks: desktopicon
[Run]
Filename: {app}\MyProg.exe; Description: {cm:LaunchProgram,My Program}; Flags: nowait postinstall skipifsilent
[#Code]
procedure InitializeWizard();
begin
with WizardForm.TypesCombo.Visible := False;
end;
Farser21
26-10-2013, 13:33
Nordek, с флажками уже разобрался. Ок учту если еще что-то буду добавлять сюда.
Ещё, Farser21,
(пакуемые файлы не нужны) »
Я изначально туда вставил
#define Files
#ifdef Files
#endif
#define Files
#ifdef Files
[Files]
#endif
не везде.
При комментировании
//#define Files
файлы становятся не активны и не входят в сборку при компиляции. Для проверки компиляции это хорошо, т.к для себя лишний раз не нужно ждать когда все файлы войдут в сборку. А для других (кто проверяет твой скрипт), если нет файлов, то не выдаст ошибку что файл не найден.
Dinvin4ester
27-10-2013, 00:45
А мне не поможете ?
сделать музыку по умолчанию , а то при запуске и когда установка идет ее не выключить »
[Code]
{ RedesignWizardFormBegin } // Не удалять эту строку!
// Не изменять эту секцию. Она создана автоматически.
procedure RedesignWizardForm;
begin
with WizardForm.DiskSpaceLabel do
begin
Left := ScaleX(-416);
Top := ScaleY(200);
Height := ScaleY(46);
end;
{ ReservationBegin }
// Вы можете добавить ваш код здесь.
{ ReservationEnd }
end;
// Не изменять эту секцию. Она создана автоматически.
{ RedesignWizardFormEnd } // Не удалять эту строку!
const
PCFonFLY=true;
notPCFonFLY=false;
BASS_SAMPLE_LOOP = 4; //повторение
var
LabelPct1,LabelTime1,LabelTime2,LabelTime3,FinishedLbl: TLabel;
#ifdef SecondProgressBar
LabelPct2: TLabel;
ISDoneProgressBar2:TNewProgressBar;
#endif
ISDoneCancel, i, CurrentPicture:integer;
ISDoneError:boolean;
PCFVer:double;
TimerID: LongWord;
PicList: TStringlist;
BackgroundForm: TForm;
MusicButton, VolumeUP, VolumeDown, MyButton: TButton;
VolumeInd: TNewProgressBar;
BackgroundBitmapImage: TBitmapImage;
s, Name, ResultStr: string;
Ver, VerREG : Cardinal;
type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
TProc=procedure(HandleW, msg, idEvent, TimeSys: LongWord);
function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';
function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'ISRarExtract@files:ISDone.dll stdcall delayload';
function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
function ISxDeltaExtract(CurComponent:Cardinal; PctOfTotal:double; minRAM,maxRAM:integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile, DeleteDiffFile:boolean):boolean; external 'ISxDeltaExtract@files:ISDone.dll stdcall delayload';
function ISPackZIP(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString;ComprLvl:integer; DeleteInFile:boolean):boolean; external 'ISPackZIP@files:ISDone.dll stdcall delayload';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';
function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer; external 'ISFindFiles@files:ISDone.dll stdcall delayload';
function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean; external 'ISPickFilename@files:ISDone.dll stdcall delayload';
function ISGetName(TypeStr:integer):PAnsichar; external 'ISGetName@files:ISDone.dll stdcall delayload';
function ISFindFree(FindHandle:integer):boolean; external 'ISFindFree@files:ISDone.dll stdcall delayload';
function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString;Show:boolean):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';
function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
function ChangeLanguage(Language:AnsiString):boolean; external 'ChangeLanguage@files:ISDone.dll stdcall delayload';
function SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';
procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
function WrapTimerProc(callback:TProc; paramcount:integer):longword; external 'wrapcallback@files:innocallback.dll stdcall';
function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall';
function GetSystemMetrics(nIndex:Integer):Integer; external 'GetSystemMetrics@user32.dll stdcall';
procedure InitializeSlideShow(Hwnd:Thandle; l,t,w,h:integer;Animate:boolean; Stretch:integer); external 'InitializeSlideShow@files:isslideshow.dll stdcall';
procedure DeinitializeSlideShow; external 'DeinitializeSlideShow@files:isslideshow.dll stdcall';
procedure ShowImage(ipath:PAnsiChar; Effect:integer); external 'ShowImage@files:isslideshow.dll stdcall';
// ================= Процедуры работы со свуком ===================== \\
function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean; external 'BASS_Init@files:BASS.dll stdcall delayload';
function BASS_StreamCreateFile(mem: BOOL; f: PChar; offset: DWORD; length: DWORD; flags: DWORD): DWORD; external 'BASS_StreamCreateFile@files:BASS.dll stdcall delayload';
function BASS_Start(): Boolean; external 'BASS_Start@files:BASS.dll stdcall delayload';
function BASS_Pause(): Boolean; external 'BASS_Pause@files:BASS.dll stdcall delayload';
function BASS_SetVolume(volume: DWORD): BOOL; external 'BASS_SetVolume@files:BASS.dll stdcall delayload';
function BASS_GetVolume: Integer; external 'BASS_GetVolume@files:BASS.dll stdcall delayload';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean; external 'BASS_ChannelPlay@files:BASS.dll stdcall delayload';
function BASS_Stop(): Boolean; external 'BASS_Stop@files:BASS.dll stdcall delayload';
function BASS_Free(): Boolean; external 'BASS_Free@files:BASS.dll stdcall delayload';
// Процедуры работы со скинами
procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall';
// Процедуры Вин-апи
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';
function KillTask(ExeFileName: string): Integer; external 'KillTask@files:ISTask.dll stdcall delayload';
function RunTask(FileName: string; bFullpath: Boolean): Boolean; external 'RunTask@files:ISTask.dll stdcall delayload';
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then WizardForm.ProgressGauge.Position := OveralPct div 10;
LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
#ifdef SecondProgressBar
if CurrentPct<=1000 then ISDoneProgressBar2.Position := CurrentPct;
LabelPct2.Caption := IntToStr(CurrentPct div 10)+'.'+chr(48 + CurrentPct mod 10)+'%';
#endif
WizardForm.FilenameLabel.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, WizardForm.FilenameLabel.Font, WizardForm.FilenameLabel.Width-ScaleX(100));
LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
//LabelTime2.Caption:=ExpandConstant('{cm:RemainingTime} ')+TimeStr1; // при необходимости раскоментировать
LabelTime3.Caption:=ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
Result := ISDoneCancel;
end;
procedure CancelButtonOnClick(Sender: TObject);
begin
SuspendProc;
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
ResumeProc;
end;
//Кнопка вкл.\выкл. музыки
procedure MusicButtonOnClick(Sender: TObject);
begin
case TButton(Sender).Caption of
'Play':
begin
BASS_Start;
MusicButton.Caption := 'Stop';
end;
'Stop':
begin
BASS_Pause;
MusicButton.Caption := 'Play';
end;
end;
end;
// увеличения громкости
procedure VolumeUPOnClick(Sender: TObject);
var
vol : integer;
begin
vol := BASS_GetVolume;
if vol+5 >= 100 then // Увеличение громкости по 5 едини.... пример (vol+5) - (vol+10) и.т.д.
begin
BASS_SETVolume(100);
VolumeIND.position := 100;
VolumeUP.Enabled := False;
end else
begin
BASS_SETVolume(vol+5);
VolumeIND.position := vol+5;
VolumeDOWN.Enabled := True;
end;
end;
// уменьшение громкости
procedure VolumeDOWNOnClick(Sender: TObject);
var
vol : integer;
begin
vol := BASS_GetVolume;
if vol-5 <= 0 then
begin
BASS_SETVolume(0);
VolumeIND.position := 0;
VolumeDOWN.Enabled := False;
end else
begin
BASS_SETVolume(vol-5);
VolumeIND.position := vol-5;
VolumeUP.Enabled := True;
end;
end;
procedure InitMusic();
begin
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('music.mp3');
if BASS_Init(-1, 44100, 0, 0, 0) then
begin
BASS_Start();
Name:=ExpandConstant('{tmp}\music.mp3');
i:=BASS_StreamCreateFile(FALSE, PChar(Name), 0, 0, 4);
if i <> 0 then
begin
BASS_ChannelPlay(i, True);
end;
end;
// Music Button on/off
MusicButton := TButton.Create(WizardForm);
with MusicButton do
begin
Left := 4//WizardForm.ClientWidth - WizardForm.CancelButton.Left - WizardForm.CancelButton.Width;
Top := 337//WizardForm.CancelButton.Top;
Width := 131//WizardForm.CancelButton.Height;
Height := 17//WizardForm.CancelButton.Height;
Caption := 'Play';
Hint := 'Вкл.\Выкл. музыку';
ShowHint := True;
OnClick := @MusicButtonOnClick;
Parent := WizardForm;
end;
if MusicButton.Caption = 'Stop' then BASS_Start else BASS_Pause;
end;
/////////////////////////////////////////////////////////////////////////////////////////////////
procedure InitializeWizard();
begin
InitMusic();
RedesignWizardForm;
with WizardForm do
begin
ExtractTemporaryFile('folder.bmp');
SelectDirBitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\folder.bmp');
SelectDirBitmapImage.SetBounds(0,0,42,42);
ExtractTemporaryFile('folder1.bmp');
SelectGroupBitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\folder1.bmp')
SelectGroupBitmapImage.SetBounds(0,0,42,42);
ExtractTemporaryFile('img1.bmp');
WizardBitmapImage.SetBounds(0,0,500,313);
WizardBitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\img1.bmp'));
ExtractTemporaryFile('img2.bmp');
WizardBitmapImage2.SetBounds(0,0,500,313);
WizardBitmapImage2.Bitmap.LoadFromFile(ExpandConstant('{tmp}\img2.bmp'));
WizardSmallBitmapImage.SetBounds(0,0,497,58);
PageNameLabel.Hide; //Del, если нужно вернуть текст
PageDescriptionLabel.Hide; //Del, если нужно вернуть текст
end;
//WelcomePage,
with TLabel.Create(WizardForm) do
begin
Left:= ScaleX(100);
Top:= ScaleY(7);
Width:= ScaleX(300);
Height:= ScaleY(80);
AutoSize:= false;
Alignment := taCenter;
Transparent:= true;
WordWrap:= true;
Font.Size:= 14;
Font.Color:=ClWhite
Font.Style := [fsBold]
Parent:= WizardForm.WelcomePage;
Font.Name:= 'Georgia'
//Caption:= WizardForm.WelcomeLabel1.Caption;
end;
with TLabel.Create(WizardForm) do
begin
Top:= ScaleY(245);
Left:= ScaleX(25);
Width:= ScaleX(450);
Height:= ScaleY(270);
AutoSize:= false;
Alignment := taCenter;
WordWrap:= true;
Font.Color:=ClWhite
Font.Name:= 'Georgia'
Font.Size:= 10;
Transparent:= true;
Parent:= WizardForm.WelcomePage;
//Caption:= ExpandConstant('{cm:Welcome2}');
end;
with TLabel.Create(WizardForm) do
begin
Left:= ScaleX(100);
Top:= ScaleY(7);
Width:= ScaleX(300);
Height:= ScaleY(80);
AutoSize:= false;
Alignment := taCenter;
WordWrap:= true;
Font.Size:= 14;
Font.Color:=ClWhite
Font.Name:= 'Georgia'
Font.Style := [fsBold]
Transparent:= true;
Parent:= WizardForm.FinishedPage;
//Caption:= WizardForm.FinishedHeadingLabel.Caption;
end;
FinishedLbl:= TLabel.Create(WizardForm);
with FinishedLbl do
begin
Left:= ScaleX(25);
Top:= ScaleY(245);
Width:= ScaleX(450);
Height:= ScaleY(160);
AutoSize:= false;
Alignment := taCenter;
WordWrap:= true;
Transparent:= true;
Font.Color:=ClWhite
Font.Size:= 10;
Font.Name:= 'Georgia'
Parent:= WizardForm.FinishedPage;
//Caption:= ExpandConstant('{cm:Finished2}');
end;
LabelPct1 := TLabel.Create(WizardForm);
with LabelPct1 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Left := WizardForm.ProgressGauge.Width+ScaleX(5);
Top := WizardForm.ProgressGauge.Top + ScaleY(2);
Width := ScaleX(80);
end;
#ifdef SecondProgressBar
ISDoneProgressBar2 := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar2 do begin
Parent := WizardForm.InstallingPage;
Left := ScaleX(0);
Top := ScaleY(83);
Width := WizardForm.ProgressGauge.Width;
Max := 1000;
Height := WizardForm.ProgressGauge.Height;
end;
LabelPct2 := TLabel.Create(WizardForm);
with LabelPct2 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Left := ISDoneProgressBar2.Width+ScaleX(5);
Top := ISDoneProgressBar2.Top + ScaleY(2);
Width := ScaleX(80);
end;
#endif
LabelTime1 := TLabel.Create(WizardForm);
with LabelTime1 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := WizardForm.ProgressGauge.Width div 2;
Left := ScaleX(0);
Top := ScaleY(85);
end;
LabelTime2 := TLabel.Create(WizardForm);
with LabelTime2 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := LabelTime1.Width+ScaleX(40);
Left := 280;
Top := LabelTime1.Top;
end;
LabelTime3 := TLabel.Create(WizardForm);
with LabelTime3 do begin
Parent := WizardForm.FinishedPage;
AutoSize := False;
Width := 300;
Left := 180;
Top := 200;
end;
//==splash
// ExtractTemporaryFile('splash.png');
// ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\splash.png',1000,3000,1000,0,255,False, $FFFFFF,10);
// //==slides
// BackgroundForm:= TForm.Create(nil);
// BackgroundForm.BorderStyle:= bsNone;
// BackgroundForm.Color:=clBlack;
// BackgroundForm.SetBounds(0, 0, GetSystemMetrics(0), GetSystemMetrics(1))
// BackgroundForm.Visible:=True;
// BackgroundForm.enabled:= false;
// PicList:=tstringlist.Create;
// ExtractTemporaryFile('0.jpg');
// piclist.add(ExpandConstant('{tmp}') + '\1.jpg');
// BackgroundForm.show;
// InitializeSlideShow(BackgroundForm.Handle, 0, 0, GetSystemMetrics(0), GetSystemMetrics(1), false, 1);
// ShowImage(ExpandConstant('{tmp}') + '\0.jpg', 1);
//Volum up
VolumeDown := TButton.Create(WizardForm);
with VolumeDown do
begin
Left := 4
Top := 318
Width := WizardForm.CancelButton.Height;
Height := 17
Caption := '-';
Hint := 'Убавить громкость';
ShowHint := True;
OnClick := @VolumeDOWNOnClick;
Parent := WizardForm;
end;
//Volum down
VolumeUP := TButton.Create(WizardForm);
with VolumeUP do
begin
Left := 112//WizardForm.ClientWidth - WizardForm.CancelButton.Left - WizardForm.CancelButton.Width + MusicButton.Width + VolumeDown.Width;
Top := 318
Width := WizardForm.CancelButton.Height;
Height := 17
Caption := '+';
Hint := 'Прибавить громкость';
ShowHint := True;
OnClick := @VolumeUPOnClick;
Parent := WizardForm;
end;
VolumeIND := TNewProgressBar.Create(WizardForm);
with VolumeIND do
begin
Parent := WizardForm;
Left := 30//WizardForm.ClientWidth - WizardForm.CancelButton.Left - WizardForm.CancelButton.Width + MusicButton.Width + VolumeUP.Width + VolumeDown.Width;
Top := 320//WizardForm.CancelButton.Top;
Width := 80//WizardForm.CancelButton.Width;
Height := 14//WizardForm.CancelButton.Height;
Min := 0;
Max := 100;
Position := BASS_GetVolume;
end;
if BASS_GetVolume >= 100 then volumeUP.Enabled := False;
if BASS_GetVolume <= 0 then volumeDOWN.Enabled := False;
end;
// *********** Конец для управления музыкой
//procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord);
//begin
// CurrentPicture:=CurrentPicture+1;
// if CurrentPicture=piclist.count+1 then CurrentPicture:=1;
// ShowImage(piclist.strings[CurrentPicture - 1], 1);
//end;
Procedure CurPageChanged(CurPageID: Integer);
Begin
WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;
WizardForm.FinishedHeadingLabel.Hide;
WizardForm.FinishedLabel.Hide;
Case CurPageID of
wpInstalling:
begin
CurrentPicture:=1;
with WizardForm do
begin
hide;
MainPanel.Visible:=False;
Bevel1.Visible:=False;
setbounds(ScaleX(GetSystemMetrics(0)-420), ScaleY(GetSystemMetrics(1)-167), ScaleX(395), ScaleY(142));
InnerNotebook.setbounds(ScaleX(10), ScaleY(10), ScaleX(370), InnerNotebook.height);
StatusLabel.setbounds(ScaleX(0), ScaleY(0), InnerNotebook.Width, StatusLabel.height);
FileNameLabel.setbounds(ScaleX(0), ScaleY(15), InnerNotebook.Width, FileNameLabel.height);
ProgressGauge.Top:=ScaleY(40);
ProgressGauge.Width:=InnerNotebook.Width;
CancelButton.Left:=ScaleX(154);
CancelButton.Top:=ScaleY(82);
CancelButton.bringtofront;
show;
end;
// ShowImage(piclist.strings[CurrentPicture - 1], 1);
// TimerID:=SetTimer(0, 0, 6000, WrapTimerProc(@OnTimer, 4));
end;
wpFinished:
begin
LabelTime3.Hide;
WizardForm.Visible:=False;
WizardForm.setbounds((GetSystemMetrics(0)-WizardForm.Width) div 2, (GetSystemMetrics(1)-WizardForm.Height) div 2, ScaleX(502), ScaleY(392));
WizardForm.Visible:=True;
KillTimer(0, TimerID);
// showimage(ExpandConstant('{tmp}') + '\0.jpg', 1);
if ISDoneError then
begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:Error}');
FinishedLbl.Font.Color:= clRed;
FinishedLbl.Caption:= SetupMessage(msgSetupAborted) ;
end;
end;
end;
end;
function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('Tiger.cjstyles');
LoadSkin(ExpandConstant('{tmp}\Tiger.cjstyles'), '');
Result := True;
end;
procedure DeinitializeSetup();
begin
DeinitializeSlideShow;
KillTimer(0, TimerID);
BASS_Stop();
BASS_Free();
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
UnloadSkin();
end;
function CheckError:boolean;
begin
result:= not ISDoneError;
end;
procedure CurStepChanged(CurStep: TSetupStep);
var Comps1,Comps2,Comps3, TmpValue:cardinal;
FindHandle1,ColFiles1,CurIndex1,tmp:integer;
ExecError:boolean;
InFilePath,OutFilePath,OutFileName:PAnsiChar;
begin
if CurStep = ssInstall then begin //Если необходимо, можно поменять на ssPostInstall
WizardForm.CancelButton.OnClick:= @CancelButtonOnClick;
WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
ISDoneCancel:=0;
// Распаковка всех необходимых файлов в папку {tmp}.
ExtractTemporaryFile('unarc.dll');
#ifdef PrecompInside
ExtractTemporaryFile('CLS-precomp.dll');
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('packjpg_dll1.dll');
ExtractTemporaryFile('precomp.exe');
ExtractTemporaryFile('zlib1.dll');
#endif
#ifdef SrepInside
ExtractTemporaryFile('CLS-srep.dll');
#endif
#ifdef MSCInside
ExtractTemporaryFile('CLS-MSC.dll');
#endif
#ifdef facompress
ExtractTemporaryFile('facompress.dll');
#endif
#ifdef records
ExtractTemporaryFile('records.inf');
#endif
#ifdef precomp
#if precomp == "0.38"
ExtractTemporaryFile('precomp038.exe');
#else
#if precomp == "0.4"
ExtractTemporaryFile('precomp040.exe');
#else
#if precomp == "0.41"
ExtractTemporaryFile('precomp041.exe');
#else
#if precomp == "0.42"
ExtractTemporaryFile('precomp042.exe');
#else
ExtractTemporaryFile('precomp038.exe');
ExtractTemporaryFile('precomp040.exe');
ExtractTemporaryFile('precomp041.exe');
ExtractTemporaryFile('precomp042.exe');
#endif
#endif
#endif
#endif
#endif
#ifdef unrar
ExtractTemporaryFile('Unrar.dll');
#endif
#ifdef XDelta
ExtractTemporaryFile('XDelta3.dll');
#endif
#ifdef PackZIP
ExtractTemporaryFile('7z.dll');
ExtractTemporaryFile('PackZIP.exe');
#endif
ExtractTemporaryFile('English.ini');
// Подготавливаем переменную, содержащую всю информацию о выделенных компонентах для ISDone.dll
// максимум 96 компонентов.
Comps1:=0; Comps2:=0; Comps3:=0;
#ifdef Components
TmpValue:=1;
if IsComponentSelected('text\rus') then Comps1:=Comps1+TmpValue; //компонент 1
TmpValue:=TmpValue*2;
if IsComponentSelected('text\eng') then Comps1:=Comps1+TmpValue; //компонент 2
TmpValue:=TmpValue*2;
if IsComponentSelected('voice\rus') then Comps1:=Comps1+TmpValue; //компонент 3
TmpValue:=TmpValue*2;
if IsComponentSelected('voice\eng') then Comps1:=Comps1+TmpValue; //компонент 4
// .....
// см. справку
#endif
#ifdef precomp
PCFVer:={#precomp};
#else
PCFVer:=0;
#endif
ISDoneError:=true;
if ISDoneInit(ExpandConstant('{src}\records.inf'), $F444, Comps1,Comps2,Comps3, MainForm.Handle, {#NeedMem}, @ProgressCallback) then begin
repeat
// ChangeLanguage('English');
if not SrepInit('',512,0) then break;
if not PrecompInit('',128,PCFVer) then break;
if not FileSearchInit(true) then break;
//if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data1.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
//if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data2.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
//if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data3.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
//if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data4.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
//if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data5.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
//if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data6.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
// далее находятся закомментированые примеры различных функций распаковки (чтобы каждый раз не лазить в справку за примерами)
(*
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\arc.arc'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not IS7ZipExtract ( 0, 0, ExpandConstant('{src}\CODMW2.7z'), ExpandConstant('{app}\data1'), false, '') then break;
if not ISRarExtract ( 0, 0, ExpandConstant('{src}\data_*.rar'), ExpandConstant('{app}'), false, '') then break;
if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data1024_1024.srep'),ExpandConstant('{app}\data1024.arc'), true) then break;
if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data.pcf'), ExpandConstant('{app}\data.7z'), true) then break;
if not ISxDeltaExtract ( 0, 0, 0, 640, ExpandConstant('{app}\in.pcf'), ExpandConstant('{app}\*.diff'), ExpandConstant('{app}\out.dat'), false, false) then break;
if not ISPackZIP ( 0, 0, ExpandConstant('{app}\1a1\*'), ExpandConstant('{app}\1a1.pak'), 2, false ) then break;
if not ISExec ( 0, 0, 0, ExpandConstant('{tmp}\Arc.exe'), ExpandConstant('x -o+ "{src}\001.arc" "{app}\"'), ExpandConstant('{tmp}'), '...',false) then break;
if not ShowChangeDiskWindow ('Пожалуйста, вставьте второй диск и дождитесь его инициализации.', ExpandConstant('{src}'),'CODMW_2.arc') then break;
// распаковка группы файлов посредством внешнего приложения
FindHandle1:=ISFindFiles(0,ExpandConstant('{app}\*.ogg'),ColFiles1);
ExecError:=false;
while not ExecError and ISPickFilename(FindHandle1,ExpandConstant('{app}\'),CurIndex1,true) do begin
InFilePath:=ISGetName(0);
OutFilePath:=ISGetName(1);
OutFileName:=ISGetName(2);
ExecError:=not ISExec(0, 0, 0, ExpandConstant('{tmp}\oggdec.exe'), '"'+InFilePath+'" -w "'+OutFilePath+'"',ExpandConstant('{tmp}'),OutFileName,false);
end;
ISFindFree(FindHandle1);
if ExecError then break;
*)
ISDoneError:=false;
until true;
ISDoneStop;
end;
end;
if (CurStep=ssPostInstall) and ISDoneError then begin
Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
end;
end;
Dinvin4ester
27-10-2013, 13:54
saurn,
Все получилось , а с этой не поможете ?
Ребята, помогите вставить музыку в инсталл - http://sendfile.su/886037. »
а с этой не поможете ? »
Без регулятора уровня громкости. Только кнопка Старт/Стоп
http://rghost.ru/49756930
Dinvin4ester
27-10-2013, 16:24
saurn,
Благодарю. А можно еще узнать - можно ли как-то чтоб музыка шла сразу при запуске инсталлятора ?
можно ли как-то чтоб музыка шла сразу при запуске инсталлятора ? »
Можно конечно.
[Code]
const
TfontColor = $ffffff;
var
Wizard1,Wizard2,Wizard3,Wizard4,Wizard5,Wizard6,Wizard7,Wizard8,Wizard9,Wizard10,
Wizard11,Wizard12,Wizard13,Wizard14,Wizard15,Wizard16,Wizard17,Wizard18,Wizard19,Wizard20,Wizard21,W izard22: LongInt;
hCancelBtn, hNextBtn, hBackBtn, hMusicButton, hDirBrowseBtn, hGroupBrowseBtn, hLogoBtn, StartBtn, IconBtn, hMyCancelBtn, Font1, Font2: HWND;
ButtonFont: TFont;
FreeMB, TotalMB: Cardinal;
WelcomLabel1, SelectDirLabel, DirEditLabel, InstallSpacelabel1, InstallSpacelabel2, GroupEditLabel,
SelectGroupLabel, NoStartLabel, TaskLabel, IconLabel, LabelStatus, LabelFinish: TLabel;
MusicButton: TButton;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean; external 'BASS_Init@files:BASS.dll stdcall delayload';
function BASS_StreamCreateFile(mem: BOOL; f: PChar; offset: DWORD; length: DWORD; flags: DWORD): DWORD; external 'BASS_StreamCreateFile@files:BASS.dll stdcall delayload';
function BASS_Start(): Boolean; external 'BASS_Start@files:BASS.dll stdcall delayload';
function BASS_Pause(): Boolean; external 'BASS_Pause@files:BASS.dll stdcall delayload';
function BASS_SetVolume(volume: DWORD): BOOL; external 'BASS_SetVolume@files:BASS.dll stdcall delayload';
function BASS_GetVolume: Integer; external 'BASS_GetVolume@files:BASS.dll stdcall delayload';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean; external 'BASS_ChannelPlay@files:BASS.dll stdcall delayload';
function BASS_Stop(): Boolean; external 'BASS_Stop@files:BASS.dll stdcall delayload';
function BASS_Free(): Boolean; external 'BASS_Free@files:BASS.dll stdcall delayload';
function NewFont(Height:Integer;thickness,italic,underline,strikeout:DWORD;name:String):hWnd;external 'NewFont@files:IsMyFont.dll stdcall delayload';
procedure Deinitialize;external 'Deinitialize@files:IsMyFont.dll stdcall delayload';
procedure IsMyFont;
begin
Font1:=NewFont(20,500,0,0,0,'Corbel');
Font2:=NewFont(17,500,0,0,0,'Franklin Gothic Medium');
WizardForm.Font.Handle:=Font1;
WizardForm.Font.Color:=TfontColor;
end;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure wzform;
begin
WizardForm.ClientWidth:=600;
WizardForm.ClientHeight:=400;
WizardForm.InnerNotebook.hide;
WizardForm.OuterNotebook.hide;
WizardForm.OuterNotebook.hide;
WizardForm.Bevel.Hide;
WizardForm.Position:=poScreenCenter;
WizardForm.ProgressGauge.Parent := WizardForm;
WizardForm.ProgressGauge.SetBounds(ScaleX(30), ScaleY(163), ScaleX(540), ScaleY(26));
end;
procedure SetStateNewButtons;
begin
with WizardForm.BackButton do begin
BtnSetText(hBackBtn,PAnsiChar(Caption));
BtnSetVisibility(hBackBtn,Visible);
end;
with WizardForm.NextButton do begin
BtnSetText(hNextBtn,PAnsiChar(Caption));
BtnSetVisibility(hNextBtn,Visible);
end;
with WizardForm.CancelButton do begin
BtnSetText(hCancelBtn,PAnsiChar(Caption));
BtnSetVisibility(hCancelBtn,Visible);
end;
with MusicButton do begin
BtnSetText(hMusicButton,PAnsiChar(Caption));
BtnSetVisibility(hMusicButton,Visible);
end;
BtnSetText(hDirBrowseBtn,PAnsiChar(WizardForm.DirBrowseButton.Caption));
BtnSetText(hGroupBrowseBtn,PAnsiChar(WizardForm.GroupBrowseButton.Caption));
end;
procedure LogoBtnClick(hBtn:HWND);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://forum.krinkels.ru/index.php', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)
end;
procedure WizardFormBtnClick(hBtn:HWND);
var
Btn:TButton;
begin
case hBtn of
hCancelBtn: Btn:=WizardForm.CancelButton;
hNextBtn: Btn:=WizardForm.NextButton;
hBackBtn: Btn:=WizardForm.BackButton;
hMusicButton: Btn:=MusicButton;
hDirBrowseBtn: Btn:=WizardForm.DirBrowseButton;
hGroupBrowseBtn: Btn:=WizardForm.GroupBrowseButton;
end;
Btn.OnClick(Btn);
SetStateNewButtons;
BtnRefresh(hBtn);
end;
procedure MusicButtonOnClick(Sender: TObject);
begin
case TButton(Sender).Caption of
'Играть':
begin
BASS_Start;
MusicButton.Caption := 'Стоп';
end;
'Стоп':
begin
BASS_Pause;
MusicButton.Caption := 'Играть';
end;
end;
end;
procedure InitMusic();
var
Name: String;
i: Integer;
begin
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('music.mp3');
if BASS_Init(-1, 44100, 0, 0, 0) then
begin
BASS_Start();
Name := ExpandConstant('{tmp}\music.mp3');
i := BASS_StreamCreateFile(FALSE, PChar(Name), 0, 0, 4);
if i <> 0 then
begin
BASS_ChannelPlay(i, True);
end;
end;
end;
procedure btn;
begin
ButtonFont:=TFont.Create;
ButtonFont.Handle:=Font2;
hLogoBtn:=BtnCreate(WizardForm.Handle,12,335,116,52,ExpandConstant('{tmp}\Button2.png'),15,False);
BtnSetEvent(hLogoBtn,BtnClickEventID,WrapBtnCallback(@LogoBtnClick,1));
BtnSetCursor(hLogoBtn,GetSysCursorHandle(32649));
with WizardForm.CancelButton do begin
hCancelBtn:=BtnCreate(WizardForm.Handle,495,339,100,46,ExpandConstant('{tmp}\Button1.png'),15,False) ;
BtnSetEvent(hCancelBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hCancelBtn,ButtonFont.Handle);
Width:=0;
Height:=0;
end;
with WizardForm.NextButton do begin
hNextBtn:=BtnCreate(WizardForm.Handle,385,339,100,46,ExpandConstant('{tmp}\Button1.png'),15,False);
BtnSetEvent(hNextBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hNextBtn,ButtonFont.Handle);
Width:=0;
Height:=0;
end;
with WizardForm.BackButton do begin
hBackBtn:=BtnCreate(WizardForm.Handle,285,339,100,46,ExpandConstant('{tmp}\Button1.png'),15,False);
BtnSetEvent(hBackBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hBackBtn,ButtonFont.Handle);
Width:=0;
Height:=0;
end;
MusicButton := TButton.Create(nil);
with MusicButton do
begin
Caption := 'Стоп';
Hint := 'Вкл.\Выкл. музыку';
ShowHint := True;
OnClick := @MusicButtonOnClick;
end;
with MusicButton do begin
hMusicButton:=BtnCreate(WizardForm.Handle,495,6,100,46,ExpandConstant('{tmp}\Button1.png'),15,False) ;
BtnSetEvent(hMusicButton,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hMusicButton,ButtonFont.Handle);
Width:=0;
Height:=0;
end;
with WizardForm.DirBrowseButton do begin
hDirBrowseBtn:=BtnCreate(WizardForm.Handle,495,180,100,46,ExpandConstant('{tmp}\Button1.png'),15,Fal se);
BtnSetEvent(hDirBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hDirBrowseBtn,ButtonFont.Handle);
Width:=0;
Height:=0;
end;
with WizardForm.GroupBrowseButton do begin
hGroupBrowseBtn:=BtnCreate(WizardForm.Handle,495,180,100,46,ExpandConstant('{tmp}\Button1.png'),15,F alse);
BtnSetEvent(hGroupBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hGroupBrowseBtn,ButtonFont.Handle);
Width:=0;
Height:=0;
end;
ImgApplyChanges(WizardForm.Handle);
end;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure welcom;
begin
Wizard1:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\BGImage1.png'),0,0,WizardForm.ClientWidth,W izardForm.ClientHeight,True,True);
Wizard2:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage1.png'),0,315,WizardForm.ClientWidt h,85,True,True);
Wizard3:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage3.png'),0,181,WizardForm.ClientWidt h,138,True,True);
Wizard4:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage2.png'),3,205,590,91,True,True);
WelcomLabel1:= TLabel.Create(WizardForm);
with WelcomLabel1 do begin
Left:= 30;
Top:= 219;
Width:= 550;
Height:= 58;
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
ParentFont := True;
Parent:= WizardForm;
Caption:=ExpandConstant('{cm:Welcom1}');
end;
end;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function NumToStr(Float: Extended): String;
begin
Result:= Format('%.2n', [Float]); StringChange(Result, ',', '.');
while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
SetLength(Result, Length(Result)-1);
end;
function MbOrTb(Float: Extended): String;
begin
if Float < 1024 then Result:= NumToStr(Float)+ExpandConstant('{cm:Size1}') else
if Float/1024 < 1024 then Result:= NumToStr(Float/1024)+ExpandConstant('{cm:Size2}') else
Result:= NumToStr(Float/(1024*1024))+ExpandConstant('{cm:Size3}');
end;
procedure DirEditOnChange(Sender: TObject);
var Drive: String;
begin
DirEditLabel.Caption:=MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
Drive:= ExtractFileDrive(WizardForm.DirEdit.Text);
GetSpaceOnDisk(Drive, True, FreeMB, TotalMB);
InstallSpacelabel1.Caption:=ExpandConstant('{cm:Install1}')+ MbOrTb({#NeedInstallSize});
InstallSpacelabel2.Caption:=ExpandConstant('{cm:Install2}')+ MbOrTb({#NeedSinceInstallSize});
if WizardForm.CurPageID = wpWelcome then begin
end;
if (FreeMB>{#NeedInstallSize}) then begin
WizardForm.NextButton.Enabled:= (FreeMB>{#NeedInstallSize});
BtnSetEnabled(hNextBtn, True);
end else begin
WizardForm.NextButton.Enabled:= (FreeMB>{#NeedInstallSize});
BtnSetEnabled(hNextBtn, False);
end;
end;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure SelectDir;
begin
Wizard6:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage4.png'),0,81,600,238,True,True);
Wizard7:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage5.png'),3,105,594,74,True,True);
Wizard8:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage6.png'),90,180,395,45,True,True);
Wizard9:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage7.png'),5,230,346,77,True,True);
Wizard10:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\FLRImage1.png'),17,170,79,64,True,True);
SelectDirLabel:= TLabel.Create(WizardForm);
with SelectDirLabel do begin
Left:= 30;
Top:= 119;
Width:= 594;
Height:= 74;
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
ParentFont := True;
Parent:= WizardForm;
Caption:=ExpandConstant('{cm:SelectDir}');
end;
DirEditLabel := TLabel.Create(WizardForm);
with DirEditLabel do begin
Left:=112;
Top:= 191;
Width:= 350;
Height:= 20;
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
ParentFont := True;
Caption := MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
Parent := WizardForm;
end;
InstallSpacelabel1:= TLabel.Create(WizardForm);
with InstallSpacelabel1 do begin
Left:= 30;
Top:= 244;
Width:= 594;
Height:= 74;
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
ParentFont := True;
Parent:= WizardForm;
end;
InstallSpacelabel2:= TLabel.Create(WizardForm);
with InstallSpacelabel2 do begin
Left:= 30;
Top:= 269;
Width:= 594;
Height:= 74;
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
ParentFont := True;
Parent:= WizardForm;
end;
WizardForm.DirEdit.OnChange:=@DirEditOnChange;
end;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure GroupChange(Sender: TObject);
begin
GroupEditLabel.Caption := MinimizePathName(WizardForm.GroupEdit.Text, GroupEditLabel.Font, GroupEditLabel.Width);
end;
function Group: Boolean;
begin
Result := BtnGetEnabled(hGroupBrowseBtn);
end;
procedure StartClick(hBtn:HWND);
var
Check:boolean;
begin
Check:=BtnGetChecked(hBtn);
if Check then begin
BtnSetEnabled(hGroupBrowseBtn, False)
GroupEditLabel.Font.Color:=$737373;
end else begin
BtnSetEnabled(hGroupBrowseBtn, True)
GroupEditLabel.Font.Color:=$FFFFFF
end;
end;
procedure NoIconsLabelClick(Sender:TObject);
begin
BtnSetChecked(StartBtn, not BtnGetChecked(StartBtn));
StartClick(StartBtn);
end;
procedure ProgramGroup;
begin
Wizard11:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage8.png'),20,240,282,48,True,True);
StartBtn:=BtnCreate(WizardForm.Handle,19,247,28,32,ExpandConstant('{tmp}\Button3.png'),8,True);
BtnSetEvent(StartBtn,BtnClickEventID,WrapBtnCallback(@StartClick,1));
GroupEditLabel := TLabel.Create(WizardForm);
with GroupEditLabel do begin
Left:=112;
Top:= 191;
Width:= 350;
Height:= 20;
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
ParentFont := True;
Caption := MinimizePathName(WizardForm.GroupEdit.Text, GroupEditLabel.Font, GroupEditLabel.Width);
Parent := WizardForm;
end;
SelectGroupLabel:= TLabel.Create(WizardForm);
with SelectGroupLabel do begin
Left:= 30;
Top:= 119;
Width:= 540;
Height:= 74;
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
ParentFont := True;
Parent:= WizardForm;
Caption:=ExpandConstant('{cm:SelectGroup}');
end;
NoStartLabel:= TLabel.Create(WizardForm);
with NoStartLabel do begin
Left:= 44;
Top:= 252;
Width:= 250;
Height:= 20;
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
ParentFont := True;
Parent:= WizardForm;
OnClick:= @NoIconsLabelClick;
Caption:=ExpandConstant('{cm:NoStart}');
end;
WizardForm.GroupEdit.OnChange := @GroupChange;
end;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function IconDP: Boolean;
begin
Result:= BtnGetChecked(IconBtn);
end;
procedure IconClick(hBtn:HWND);
var
Check:boolean;
begin
Check:=BtnGetChecked(hBtn);
end;
procedure IconLabelClick(Sender:TObject);
begin
BtnSetChecked(IconBtn, not BtnGetChecked(IconBtn));
IconClick(IconBtn);
end;
procedure ProgramTask;
begin
Wizard12:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage8.png'),20,205,232,48,True,True);
IconBtn:=BtnCreate(WizardForm.Handle,39,211,28,32,ExpandConstant('{tmp}\Button3.png'),8,True);
BtnSetEvent(IconBtn,BtnClickEventID,WrapBtnCallback(@IconClick,1));
BtnSetChecked(IconBtn,True);
TaskLabel:= TLabel.Create(WizardForm);
with TaskLabel do begin
Left:= 30;
Top:= 119;
Width:= 540;
Height:= 74;
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
ParentFont := True;
Parent:= WizardForm;
Caption:=ExpandConstant('{cm:Task}');
end;
IconLabel:= TLabel.Create(WizardForm);
with IconLabel do begin
Left:= 64;
Top:= 215;
Width:= 170;
Height:= 20;
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
ParentFont := True;
Parent:= WizardForm;
OnClick:= @IconLabelClick;
Caption:=ExpandConstant('{cm:Icon}');
end;
end;
procedure CreateControls;
begin
Wizard13:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage10.png'),3,148,594,72,True,True);
Wizard14:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage11.png'),190,105,84,52,True,True);
Wizard15:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage9.png'),3,105,200,52,True,True);
LabelStatus := TLabel.Create(WizardForm);
with LabelStatus do begin
Left:= 30;
Top:= 119;
Width:= 540;
Height:= 74;
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
ParentFont := True;
Caption:= ExpandConstant('{cm:Extracted}');
Parent:= WizardForm;
end;
end;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure Finish;
begin
Wizard16:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage12.png'),3,220,594,62,True,True);
Wizard17:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SDWImage5.png'),3,215,594,72,True,True);
LabelFinish := TLabel.Create(WizardForm);
with LabelFinish do begin
Left:= 30;
Top:= 230;
Width:= 550;
Height:= 58;
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
ParentFont := True;
Caption:= ExpandConstant('{cm:Finish2}');
Parent:= WizardForm;
end;
end;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure InitializeWizard;
begin
InitMusic();
IsMyFont;
wzform;
btn;
welcom;
SelectDir;
ProgramGroup;
ProgramTask;
CreateControls;
Finish;
end;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function InitializeSetup:boolean;
begin
if not FileExists(ExpandConstant('{tmp}\b2p.dll')) then ExtractTemporaryFile('b2p.dll');
if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll');
ExtractTemporaryFile('IsMyFont.dll');
Result:=True;
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if (PageID =wpLicense)or(PageID =wpInfoBefore)or(PageID =wpUserInfo)or(PageID =wpSelectTasks) then
Result:= True;
end;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure Hide(CurPageID: Integer);
begin
WizardForm.ProgressGauge.hide;
WelcomLabel1.hide;
SelectDirLabel.hide;
DirEditLabel.hide;
InstallSpacelabel1.hide;
InstallSpacelabel2.hide;
GroupEditLabel.hide;
SelectGroupLabel.hide;
NoStartLabel.hide;
TaskLabel.hide;
IconLabel.hide;
LabelStatus.hide;
LabelFinish.hide;
BtnSetVisibility(hDirBrowseBtn, False);
BtnSetVisibility(hGroupBrowseBtn, False);
ImgSetVisibility(Wizard3, False);
ImgSetVisibility(Wizard4, False);
ImgSetVisibility(Wizard6, False);
ImgSetVisibility(Wizard7, False);
ImgSetVisibility(Wizard8, False);
ImgSetVisibility(Wizard9, False);
ImgSetVisibility(Wizard10, False);
ImgSetVisibility(Wizard11, False);
ImgSetVisibility(Wizard12, False);
ImgSetVisibility(Wizard13, False);
ImgSetVisibility(Wizard14, False);
ImgSetVisibility(Wizard15, False);
ImgSetVisibility(Wizard16, False);
ImgSetVisibility(Wizard17, False);
BtnSetVisibility(StartBtn, False);
BtnSetVisibility(IconBtn, False);
BtnSetVisibility(hMyCancelBtn, False);
BtnSetVisibility(hCancelBtn, False);
ImgApplyChanges(WizardForm.Handle);
end;
procedure Show(CurPageID: Integer);
begin case CurPageID of
wpWelcome:
begin
ImgSetVisibility(Wizard3, True);
ImgSetVisibility(Wizard4, True);
BtnSetVisibility(hCancelBtn, True);
BtnSetEnabled(hNextBtn, True);
WelcomLabel1.Show;
WizardForm.Caption:= ExpandConstant('{cm:Welcom}');
ImgApplyChanges(WizardForm.Handle);
end;
wpSelectDir:
begin
DirEditOnChange(nil)
BtnSetVisibility(hCancelBtn, True);
ImgSetVisibility(Wizard6, True);
ImgSetVisibility(Wizard7, True);
ImgSetVisibility(Wizard8, True);
ImgSetVisibility(Wizard9, True);
ImgSetVisibility(Wizard10, True);
BtnSetVisibility(hDirBrowseBtn, True);
SelectDirLabel.Show;
DirEditLabel.Show;
InstallSpacelabel1.Show;
InstallSpacelabel2.Show;
WizardForm.Caption:= ExpandConstant('{cm:SelectDir1}');
ImgApplyChanges(WizardForm.Handle);
end;
wpSelectProgramGroup:
begin
GroupChange(nil)
GroupEditLabel.Show;
SelectGroupLabel.Show;
NoStartLabel.Show;
WizardForm.Caption:= ExpandConstant('{cm:SelectGroup1}');
BtnSetVisibility(hCancelBtn, True);
ImgSetVisibility(Wizard6, True);
ImgSetVisibility(Wizard7, True);
ImgSetVisibility(Wizard8, True);
ImgSetVisibility(Wizard10, True);
ImgSetVisibility(Wizard11, True);
BtnSetVisibility(hGroupBrowseBtn, True);
BtnSetVisibility(StartBtn, True);
ImgApplyChanges(WizardForm.Handle);
end;
wpReady:
begin
TaskLabel.Show;
IconLabel.Show;
WizardForm.Caption:= ExpandConstant('{cm:Task1}');
BtnSetVisibility(hCancelBtn, True);
ImgSetVisibility(Wizard6, True);
ImgSetVisibility(Wizard7, True);
ImgSetVisibility(Wizard12, True);
BtnSetVisibility(IconBtn, True);
ImgApplyChanges(WizardForm.Handle);
end;
wpInstalling:
begin
WizardForm.ProgressGauge.Show;
LabelStatus.Show;
BtnSetVisibility(hCancelBtn, True);
ImgSetVisibility(Wizard6, True);
ImgSetVisibility(Wizard13, True);
ImgSetVisibility(Wizard14, True);
ImgSetVisibility(Wizard15, True);
ImgApplyChanges(WizardForm.Handle);
end;
wpFinished:
begin
LabelFinish.Show;
WizardForm.Caption:= ExpandConstant('{cm:Finish1}');
ImgSetVisibility(Wizard3, True);
ImgSetVisibility(Wizard17, True);
ImgApplyChanges(WizardForm.Handle);
end;
end;
end;
Procedure CurPageChanged(CurPageID: Integer);
Begin
SetStateNewButtons;
Hide(CurPageID);
Show(CurPageID);
end;
procedure DeinitializeSetup;
begin
Deinitialize;
gdipShutDown;
ButtonFont.Free;
BASS_Stop();
BASS_Free();
end;
Dinvin4ester
27-10-2013, 16:49
saurn,
Спасибище вам от нуба.
Ребят!
Как можно удалить файлы в папке в "AppData" перед установкой, если стоит галочка в секции [Tasks]...
...все дело в том, что секция [InstallDelete] совершенно не воспринимает...
Type: filesandordirs; Name: {userappdata}\Имя папки в которой надо все удалить\
Type: filesandordirs; Name: {commonappdata}\Имя папки в которой надо все удалить\
Type: filesandordirs; Name: {localappdata}\Имя папки в которой надо все удалить\
?
Еще вопрос... есть такой скрипт, который копирует файлы из одной папку в другую (создает бэкап)
[Setup]
AppName=MyProg
AppVerName=MyProg
DefaultDirName={pf}\MyProg
DefaultGroupName=MyProg
OutputDir=.
\Code\
var
MyTask: TCheckBox;
function MoveFile(const srcFile, destFile: PChar): Integer; external 'MoveFileA@kernel32.dll stdcall';
procedure CurStepChanged(CurStep: TSetupStep);
var
FindFiles: TFindRec;
i: integer;
MyFiles: array of string;
MyDir, BackDir: string;
begin
if CurStep=ssInstall then begin
if MyTask.Checked then begin
MyFiles:=['TS3.exe','gameplay.package','*.precomp','*.jpg']; // указать файлы или маски нужные для бакупа через запятую. при указании маски '*' бакупятся все файлы с вложенными папками
MyDir:=ExpandConstant('{app}'+'\Game\Bin\'); //папка откуда бакупить
BackDir:=ExpandConstant('{app}'+'\Backup\'); // папка куда бакупить
for i:=0 to GetArrayLength(MyFiles)-1 do
begin
if FindFirst(MyDir+MyFiles[i], FindFiles) then begin
repeat
if not DirExists(BackDir) then begin
CreateDir(BackDir);
end;
MoveFile(MyDir+FindFiles.Name, BackDir+FindFiles.Name);
until not FindNext(FindFiles);
FindClose(FindFiles);
end;
end;
end;
end;
end;
procedure InitializeWizard();
begin
MyTask:=TCheckBox.Create(WizardForm);
with MyTask do
begin
Parent:=WizardForm.SelectDirPage;
Caption:='Сделать Бэкап';
Left:=ScaleX(0);
Top:=ScaleY(100);
Width:=ScaleX(400);
Height:=ScaleY(15);
TabOrder:=0;
Checked:=True;
end;
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
FindFiles: TFindRec;
MyDir, BackDir: string;
begin
if CurUninstallStep = usPostUninstall then begin
MyDir:=ExpandConstant('{app}'+'\Game\Bin\'); //папка куда возвращать файлы
BackDir:=ExpandConstant('{app}'+'\Backup\'); // папка откуда брать файлы
if DirExists(BackDir) then begin
if MsgBox('Восстановить данные из бэкапа?', mbConfirmation, MB_YESNO) = IDYES then begin
if FindFirst(BackDir+'*', FindFiles) then begin
repeat
MoveFile(BackDir+FindFiles.Name, MyDir+FindFiles.Name);
until not FindNext(FindFiles);
FindClose(FindFiles);
RemoveDir(BackDir);
end;
end;
end;
end;
end;
У данного скрипта есть проблема... если в папке куда перемещаются файлы уже создана пусть даже пустая папка, имя которой совпадает с перемещаемой папкой, то файлы в эту папку просто не копируются... их просто пропускают... как это исправить?
© OSzone.net 2001-2012
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.
Available in ZeroNet 1osznRoVratMCN3bFoFpR2pSV5c9z6sTC