Skip to content

Commit 6fd3b8e

Browse files
Added more languages to the Windows installer
1 parent f07a4ba commit 6fd3b8e

File tree

3 files changed

+57
-29
lines changed

3 files changed

+57
-29
lines changed

CMakeLists.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ cmake_policy(SET CMP0071 NEW)
33
project(hyperion-obs)
44
file (STRINGS ".version" PLUGIN_VERSION)
55
message(STATUS "hyperion-obs version: ${PLUGIN_VERSION}")
6-
set(PLUGIN_AUTHOR "hyperion-project")
7-
set(PLUGIN_GIT "hyperion-obs-plugin")
86

97
# Macro to get path of first sub dir of a dir, used for MAC OSX lib/header searching
108
MACRO(FIRSTSUBDIR result curdir)
@@ -75,6 +73,14 @@ endif()
7573
set(OBS_SOURCE "" CACHE PATH "Where is the source code of OBS-Studio located")
7674
set(OBS_BUILD "" CACHE PATH "Where is the build directory of OBS-Studio located")
7775

76+
if(NOT EXISTS ${OBS_SOURCE})
77+
message(FATAL_ERROR "OBS_SOURCE was not specified. Please specify the path to the OBS source.")
78+
endif()
79+
80+
if (WIN32 AND NOT EXISTS ${OBS_BUILD})
81+
message(FATAL_ERROR "OBS_BUILD was not specified. Please specify the path to the OBS build directory.")
82+
endif()
83+
7884
set(LIBOBS_INCLUDE_DIR "${OBS_SOURCE}/libobs")
7985
set(OBS_FRONTEND_INCLUDE_DIR "${OBS_SOURCE}/UI/obs-frontend-api")
8086

@@ -83,6 +89,11 @@ if (WIN32)
8389
set(LIBOBS_LIB "${OBS_BUILD}/libobs/$<CONFIGURATION>/obs.lib")
8490
set(OBS_FRONTEND_LIB "${OBS_BUILD}/UI/obs-frontend-api/$<CONFIGURATION>/obs-frontend-api.lib")
8591
set(PTHREAD_LIB "${OBS_BUILD}/deps/w32-pthreads/$<CONFIGURATION>/w32-pthreads.lib")
92+
93+
set(PLUGIN_AUTHOR "hyperion-project")
94+
set(PLUGIN_GIT "hyperion-obs-plugin")
95+
set(PLUGIN_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
96+
set(PLUGIN_ICON "${CMAKE_SOURCE_DIR}/resources/installer.ico")
8697
endif()
8798

8899
include(cmake/FindLibObs.cmake)

package/Windows.iss.in

Lines changed: 44 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,67 @@
1-
#define MyAppName "@CMAKE_PROJECT_NAME@"
2-
#define MyAppVersion "@PLUGIN_VERSION@"
3-
#define MyAppPublisher "@PLUGIN_AUTHOR@"
4-
#define MyAppURL "https://github.com/hyperion-project/@PLUGIN_GIT@"
1+
#define AppName "@CMAKE_PROJECT_NAME@"
2+
#define AppVersion "@PLUGIN_VERSION@"
3+
#define AppPublisher "@PLUGIN_AUTHOR@"
4+
#define AppURL "https://github.com/hyperion-project/@PLUGIN_GIT@"
5+
#define AppCopyright "Copyright (c) 2014-2021 Hyperion Project"
6+
#define AppLicense "@PLUGIN_LICENSE@"
7+
#define AppIcon "@PLUGIN_ICON@"
58

69
[Setup]
710
; NOTE: The value of AppId uniquely identifies this application.
811
; Do not use the same AppId value in installers for other applications.
912
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
10-
AppId={{604e2ddf-34f0-4a97-9095-5a5ca097c846}
11-
AppName={#MyAppName}
12-
AppVersion={#MyAppVersion}
13-
AppPublisher={#MyAppPublisher}
14-
AppPublisherURL={#MyAppURL}
15-
AppSupportURL={#MyAppURL}
16-
AppUpdatesURL={#MyAppURL}
13+
AppId=604e2ddf-34f0-4a97-9095-5a5ca097c846
14+
AppName={#AppName}
15+
AppVersion={#AppVersion}
16+
AppPublisher={#AppPublisher}
17+
AppPublisherURL={#AppURL}
18+
AppSupportURL={#AppURL}
19+
AppUpdatesURL={#AppURL}
20+
AppCopyright={#AppCopyright}
21+
LicenseFile={#AppLicense}
1722
DefaultDirName={code:GetDirName}
18-
DefaultGroupName={#MyAppName}
19-
OutputBaseFilename={#MyAppName}.{#MyAppVersion}.windows.installer
23+
DisableProgramGroupPage=yes
24+
OutputBaseFilename={#AppName}.{#AppVersion}.windows.installer
25+
SetupIconFile={#AppIcon}
2026
Compression=lzma
2127
SolidCompression=yes
2228

2329
[Languages]
24-
Name: "english"; MessagesFile: "compiler:Default.isl"
30+
Name: "en"; MessagesFile: "compiler:Default.isl"
31+
Name: "cs"; MessagesFile: "compiler:Languages\Czech.isl"
32+
Name: "de"; MessagesFile: "compiler:Languages\German.isl"
33+
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl"
34+
Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl"
35+
Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
36+
Name: "it"; MessagesFile: "compiler:Languages\Italian.isl"
37+
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl"
38+
Name: "no"; MessagesFile: "compiler:Languages\Norwegian.isl"
39+
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"
40+
Name: "pt"; MessagesFile: "compiler:Languages\Portuguese.isl"
41+
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
42+
Name: "sk"; MessagesFile: "compiler:Languages\Slovak.isl"
43+
Name: "tr"; MessagesFile: "compiler:Languages\Turkish.isl"
2544

2645
[Files]
2746
Source: "..\release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
2847
Source: "..\LICENSE"; Flags: dontcopy
2948
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
3049

3150
[Icons]
32-
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
33-
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
51+
Name: "{group}\{cm:UninstallProgram,{#AppName}}"; Filename: "{uninstallexe}"
3452

3553
[Code]
36-
procedure InitializeWizard();
37-
var
38-
MITText: AnsiString;
39-
Page: TOutputMsgMemoWizardPage;
54+
procedure CurPageChanged(CurPageID: Integer);
4055
begin
41-
ExtractTemporaryFile('LICENSE');
42-
LoadStringFromFile(ExpandConstant('{tmp}\LICENSE'), MITText);
43-
Page := CreateOutputMsgMemoPage(wpWelcome,
44-
'License Information', 'Please review the license terms before installing {#MyAppName}',
45-
'Press Page Down to see the rest of the agreement. Once you are aware of your rights, click Next to continue.',
46-
String(MITText)
47-
);
56+
{ On fresh install the last pre-install page is "Select Directory". }
57+
{ On upgrade the last pre-install page is "Read to Install" }
58+
{ (forced even with DisableReadyPage) }
59+
if (CurPageID = wpSelectDir) or (CurPageID = wpReady) then
60+
WizardForm.NextButton.Caption := SetupMessage(msgButtonInstall)
61+
else if (CurPageID = wpFinished) then
62+
WizardForm.NextButton.Caption := SetupMessage(msgButtonFinish)
63+
else
64+
WizardForm.NextButton.Caption := SetupMessage(msgButtonNext);
4865
end;
4966

5067
// credit where it's due :

resources/installer.ico

199 KB
Binary file not shown.

0 commit comments

Comments
 (0)