diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4bf3358..0ef07952 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,12 @@ name: CI on: - workflow_dispatch: + push: + branches: + - '*' + pull_request: + branches: + - '*' jobs: build-linux: diff --git a/meson.build b/meson.build index 1f1ff0d2..9240f68a 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,9 @@ project('lite-xl', 'c', 'cpp', default_options : ['c_std=gnu11', 'cpp_std=c++03']) +version = get_option('version') +conf_data = configuration_data() +conf_data.set('PROJECT_VERSION', version) + if host_machine.system() == 'darwin' add_languages('objc') endif @@ -56,6 +60,9 @@ lite_rc = [] if host_machine.system() == 'windows' windows = import('windows') lite_rc += windows.compile_resources('resources/icons/icon.rc') + iss = configure_file(input : 'scripts/innosetup/innosetup.iss.in', + output : 'innosetup.iss', + configuration : conf_data) endif # On macos we need to use the SDL renderer to support retina displays diff --git a/meson_options.txt b/meson_options.txt index 73a542f2..a61bd359 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ +option('innosetup', type : 'boolean', value : false, description: 'Build Windows setup package') option('portable', type : 'boolean', value : false, description: 'Portable install') option('renderer', type : 'boolean', value : false, description: 'Use SDL renderer') - +option('version', type : 'string', value : '0.0.0', description: 'Project version') diff --git a/scripts/innosetup/innosetup.iss.in b/scripts/innosetup/innosetup.iss.in new file mode 100644 index 00000000..f085d271 --- /dev/null +++ b/scripts/innosetup/innosetup.iss.in @@ -0,0 +1,83 @@ +#define MyAppName "Lite XL" +#define MyAppVersion "@PROJECT_VERSION@" +#define MyAppPublisher "Lite XL Team" +#define MyAppURL "https://lite-xl.github.io" +#define MyAppExeName "lite-xl.exe" +#define BuildDir "@PROJECT_BUILD_DIR@" +#define SourceDir "." + +; Use /dArch option to create a setup for a different architecture, e.g.: +; iscc /dArch=x86 innosetup.iss +#ifndef Arch +#define Arch "x64" +#endif + +[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 InnoSetup IDE. +AppId={{06761240-D97C-43DE-B9ED-C15F765A2D65} + +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} + +#if Arch=="x64" +ArchitecturesAllowed=x64 +ArchitecturesInstallIn64BitMode={#Arch} +#endif + +AllowNoIcons=yes +Compression=lzma +SolidCompression=yes +DefaultDirName={autopf}\{#MyAppName} +DefaultGroupName={#MyAppPublisher} +UninstallFilesDir={app} + +; Uncomment the following line to run in non administrative install mode +; (install for current user only.) +;PrivilegesRequired=lowest +PrivilegesRequiredOverridesAllowed=dialog + +; The [Icons] "quicklaunchicon" entry uses {userappdata} +; but its [Tasks] entry has a proper IsAdminInstallMode Check. +UsedUserAreasWarning=no + +OutputDir=. +OutputBaseFilename=LiteXL-{#MyAppVersion}-{#Arch}-setup +;DisableDirPage=yes +;DisableProgramGroupPage=yes + +LicenseFile={#SourceDir}\LICENSE +SetupIconFile={#SourceDir}\icon.ico +WizardImageFile="wizard-modern-image.bmp" +WizardSmallImageFile="litexl-55px.bmp" + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 6.1; Check: not IsAdminInstallMode +Name: "portablemode"; Description: "Portable Mode"; Flags: unchecked + +[Files] +Source: "{#BuildDir}\lite-xl.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#BuildDir}\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: not IsTaskSelected('portablemode') +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; Check: not IsTaskSelected('portablemode') +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon +Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon; Check: not IsTaskSelected('portablemode') + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent + +[Setup] +Uninstallable=not IsTaskSelected('portablemode') diff --git a/scripts/innosetup/litexl-55px.bmp b/scripts/innosetup/litexl-55px.bmp new file mode 100644 index 00000000..d3424a9b Binary files /dev/null and b/scripts/innosetup/litexl-55px.bmp differ diff --git a/scripts/innosetup/wizard-modern-image.bmp b/scripts/innosetup/wizard-modern-image.bmp new file mode 100644 index 00000000..cf844e09 Binary files /dev/null and b/scripts/innosetup/wizard-modern-image.bmp differ