Skip to content

Instantly share code, notes, and snippets.

For
* ES5
* ES6
* CoffeeScript
@rwilkes
rwilkes / check-version.iss
Created April 26, 2018 02:04 — forked from mistic100/check-version.iss
[InnoSetup] Prevent install if newer version is already installed
#define AppId "{INSERT HERE YOUR GUID}"
#define AppName "My App"
#define AppVersion "1.7"
[CustomMessages]
english.NewerVersionExists=A newer version of {#AppName} is already installed.%n%nInstaller version: {#AppVersion}%nCurrent version:
[Code]
// find current version before installation
function InitializeSetup: Boolean;
var Version: String;
@rwilkes
rwilkes / custom-link.iss
Created April 26, 2018 02:04 — forked from mistic100/custom-link.iss
[InnoSetup] Custom link in installer footer
@rwilkes
rwilkes / XmlTools.iss
Created April 26, 2018 02:04 — forked from akhansari/XmlTools.iss
Xml tools for InnoSetup
[Code]
function LoadValueFromXML(const AFileName, APath: string): string;
var
XMLNode: Variant;
XMLDocument: Variant;
begin
Log('Get Xml text node: ' + AFileName);
Result := '';
@rwilkes
rwilkes / DotNetTools.iss
Created April 26, 2018 02:04
.Net tools for InnoSetup
[Code]
{
// http://www.kynosarges.de/DotNetVersion.html
Indicates whether the specified version and service pack of the .NET Framework is installed.
version -- Specify one of these strings for the required .NET Framework version:
'v1.1.4322' .NET Framework 1.1
'v2.0.50727' .NET Framework 2.0
'v3.0' .NET Framework 3.0
; Defines
#define MyAppVersion "1.0.0"
#define MyAppVersionInfoVersion "1.0.0"
#define MyAppName "My Superb App That Will Save The World"
#define MyAppPublisher "Superb, Inc."
#define MyAppURL "http://www.a-very-superb-url-to-my-app.com/"
#define MyAppCopyright "Copyright (C) Copyright 3056. All rights reserved."
#define MyAppId "{{88C6A6D9-324C-46E8-BA87-563D14021442}"
#define MyAppPath "{pf}\Superb\WorldSavingApp"
@rwilkes
rwilkes / SHFileOperationExample.iss
Created April 26, 2018 02:00 — forked from seraphy/SHFileOperationExample.iss
InnoSetupで、SHFileOperationを使った複数フォルダ/ファイルのコピーの例。 https://stackoverflow.com/questions/45244210/inno-setup-invoke-or-replicate-native-windows-file-copy-operation
; SHFileOperationまわりの定義を外部ファイルに分離している
#include "SHFileOperationModule.iss"
[Setup]
AppId=SHFileOperationExample
AppName=SHFileOperationExample
AppVersion=1.0.0
VersionInfoVersion=1.0.0
@rwilkes
rwilkes / XMLParseExample.iss
Created April 26, 2018 02:00 — forked from seraphy/XMLParseExample.iss
Inno SetupでMSXMLを使ったXMLの解析の実装例(Ansi/Unicode版どちらでもOK)
[Setup]
AppId=XMLParseExample
AppName=XMLParseExample
AppVersion=1.0.0
VersionInfoVersion=1.0.0
VersionInfoDescription={#SetupSetting("AppName")} Installer
OutputBaseFilename={#SetupSetting("AppName")}_{#SetupSetting("AppVersion")}
@rwilkes
rwilkes / functionptr.iss
Created April 26, 2018 02:00 — forked from seraphy/functionptr.iss
Inno Scriptで関数ポインタを使う方法
[Code]
type
Tproc = procedure(const msg: String);
Tfunc = function(const value: Integer): String;
procedure sample_proc(const msg: String);
begin
Log(msg);
end;
@rwilkes
rwilkes / innosample.pas
Created April 26, 2018 01:59 — forked from lextm/innosample.pas
Inno Setup script sample for advanced part 3
function Count(What, Where: String): Integer;
begin
Result := 0;
if Length(What) = 0 then
exit;
while Pos(What,Where)>0 do
begin
Where := Copy(Where,Pos(What,Where)+Length(What),Length(Where));
Result := Result + 1;
end;