Skip to content

Commit

Permalink
fixed Readme
Browse files Browse the repository at this point in the history
added inno setup file
  • Loading branch information
univrsal committed Mar 8, 2020
1 parent cf5b479 commit 912f2af
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/README.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
tuna v1.4.0
tuna v@VERSION
This program is licensed under the GPL v2.0 See LICENSE.txt
github.com/univrsal/tuna
github.com/univrsal/@PROJECT

INSTALLATION

Expand Down
69 changes: 69 additions & 0 deletions package/installer.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
; Taken from https://raw.githubusercontent.com/Palakis/obs-websocket/4.x-current/installer/installer.iss

#define MyAppName "@PROJECT"
#define MyAppVersion "@VERSION"
#define MyAppPublisher "univrsal"
#define MyAppURL "http://github.com/unvirsal/@PROJECT"
#define Uninstall "Uninstall " + MyAppName

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{@APPID}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={code:GetDirName}
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=tuna-@ARCH
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Files]
Source: "@BUILDDIR\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "..\LICENSE"; Flags: dontcopy
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{#Uninstall}"

[Code]
procedure InitializeWizard();
var
GPLText: AnsiString;
Page: TOutputMsgMemoWizardPage;
begin
ExtractTemporaryFile('LICENSE');
LoadStringFromFile(ExpandConstant('{tmp}\LICENSE'), GPLText);
Page := CreateOutputMsgMemoPage(wpWelcome,
'License Information', 'Please review the license terms before installing obs-websocket',
'Press Page Down to see the rest of the agreement. Once you are aware of your rights, click Next to continue.',
String(GPLText)
);
end;
// credit where it's due :
// following function come from https://github.com/Xaymar/obs-studio_amf-encoder-plugin/blob/master/%23Resources/Installer.in.iss#L45
function GetDirName(Value: string): string;
var
InstallPath: string;
begin
// initialize default path, which will be returned when the following registry
// key queries fail due to missing keys or for some different reason
Result := '{pf}\obs-studio';
// query the first registry value; if this succeeds, return the obtained value
if RegQueryStringValue(HKLM32, 'SOFTWARE\OBS Studio', '', InstallPath) then
Result := InstallPath
end;
15 changes: 15 additions & 0 deletions package/package-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ $arch_64 = "win64"
$msvc = "2017"
$qt = "5_10_1"
$build = "RelWithDebInfo"
$appid = "A34796B1-6A14-4DC9-A37F-43D23BA9DF17"
$innoc = "C:\Program Files (x86)\Inno Setup 6\ISCC.exe"

$build_location_x32 = $base_dir + "build32\rundir\" + $build + "\obs-plugins\32bit"
$qtc_build_location_x32 = $base_dir + "build-obs-studio-Desktop_Qt_" + $qt + "_MSVC" + $msvc + "_32bit-" + $build +"\rundir\" + $build + "\obs-plugins\32bit"
Expand Down Expand Up @@ -76,12 +78,25 @@ echo("Fetching data")
Copy-Item $data_dir/* -Destination $build_dir/plugin/data/obs-plugins/$project/ -Recurse
Copy-Item ../LICENSE -Destination $build_dir/LICENSE.txt
Copy-Item ./README.txt $build_dir/README.txt

replace $build_dir/README.txt "@VERSION" $version
replace $build_dir/README.txt "@PROJECT" $project

echo("Making archive")
cd $build_dir
sz a -r "../$build_dir.zip" "./*"
cd ..

echo("Preparing installer")
Copy-Item ./installer.iss ./installer.tmp.iss
replace ./installer.tmp.iss "@VERSION" $version
replace ./installer.tmp.iss "@PROJECT" $project
replace ./installer.tmp.iss "@APPID" $appid
replace ./installer.tmp.iss "@BUILDDIR" "$build_dir/plugin"
replace ./installer.tmp.iss "@ARCH" $arch
echo("Creating installer")
& $innoc /O./ "./installer.tmp.iss"

echo("Cleaning up")
Remove-Item $build_dir/ -Recurse
Remove-item ./installer.tmp.iss

0 comments on commit 912f2af

Please sign in to comment.