add inno setup installer #1

Merged
Egor00f merged 2 commits from add-windows-installer into master 2025-04-27 11:28:13 +02:00
3 changed files with 118 additions and 15 deletions

1
.gitignore vendored
View File

@@ -2,5 +2,6 @@
*.a *.a
*.dll *.dll
*.deb *.deb
*.exe
build/ build/

View File

@@ -23,46 +23,78 @@ GenerateControl: $(PACKAGE_DIR)/DEBIAN/control
echo Version: $(PACKAGE_VER) >> $(DEBIAN_CONTROL_FILE) echo Version: $(PACKAGE_VER) >> $(DEBIAN_CONTROL_FILE)
echo Installed-Size: $(PACKAGE_SIZE) $(shell du -s build | cut -f1) >> $(DEBIAN_CONTROL_FILE) echo Installed-Size: $(PACKAGE_SIZE) $(shell du -s build | cut -f1) >> $(DEBIAN_CONTROL_FILE)
MoveHeadersToPackage: GeneratePackage MoveHeadersToPackage: $(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER)
cp Lua/src/*.h $(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER) cp -f Lua/src/*.h $(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER)
GeneratePackage: ./package $(PACKAGE_DIR):
cp -R ./package $(PACKAGE_DIR) mkdir $(PACKAGE_DIR)
mkdir -p $(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER) mkdir -p $(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER)
mkdir -p $(PACKAGE_TOOLCHAIN_PATH)/lib mkdir -p $(PACKAGE_TOOLCHAIN_PATH)/lib
GeneratePackage-linux: ./package $(PACKAGE_DIR)
cp -R ./package/* $(PACKAGE_DIR)
mkdir -p $(PACKAGE_DOC_DIR) mkdir -p $(PACKAGE_DOC_DIR)
cp -f Readme.md $(PACKAGE_DOC_DIR) cp -f Readme.md $(PACKAGE_DOC_DIR)
cp -f LICENSE $(PACKAGE_DOC_DIR)/copyright cp -f LICENSE $(PACKAGE_DOC_DIR)/copyright
GeneratePackage-exe: $(PACKAGE_DIR)
BuildLua: $(PACKAGE_TOOLCHAIN_PATH)/lib Lua/src/liblua$(LUA_VER).dll.a Lua/src/liblua$(LUA_VER).a
BuildLua: Lua/src/liblua$(LUA_VER).dll.a Lua/src/liblua$(LUA_VER).a
MoveLuaLibs: BuildLua $(PACKAGE_TOOLCHAIN_PATH)/lib
cp -f Lua/src/liblua$(LUA_VER).dll.a $(PACKAGE_TOOLCHAIN_PATH)/lib cp -f Lua/src/liblua$(LUA_VER).dll.a $(PACKAGE_TOOLCHAIN_PATH)/lib
cp -f Lua/src/liblua$(LUA_VER).a $(PACKAGE_TOOLCHAIN_PATH)/lib cp -f Lua/src/liblua$(LUA_VER).a $(PACKAGE_TOOLCHAIN_PATH)/lib
build: change_lua_ver MoveHeadersToPackage BuildLua GenerateControl LuaLibs: $(PACKAGE_TOOLCHAIN_PATH)/lib/liblua$(LUA_VER).a $(PACKAGE_TOOLCHAIN_PATH)/lib/liblua$(LUA_VER).dll.a
# build debian package
build-deb: change_lua_ver clean-package MoveHeadersToPackage LuaLibs GenerateControl
dpkg --build $(PACKAGE_DIR) kos32-liblua$(LUA_VER).deb dpkg --build $(PACKAGE_DIR) kos32-liblua$(LUA_VER).deb
build-exe-deps: MoveHeadersToPackage LuaLibs installer.iss
iscc /O. /DMyAppName=$(PACKAGE_NAME) /DMyAppVersion=$(PACKAGE_VER) /DPackageName=$(PACKAGE_NAME) installer.iss
# build windows installer
build-exe: change_lua_ver clean-package
make "PACKAGE_TOOLCHAIN_PATH=$(PACKAGE_DIR)" build-exe-deps
kos32-liblua5.4.deb: kos32-liblua5.4.deb:
make "LUA_VER=5.4" build make "LUA_VER=5.4" build-deb
kos32-liblua5.3.deb: kos32-liblua5.3.deb:
make "LUA_VER=5.3" build make "LUA_VER=5.3" build-deb
kos32-liblua5.2.deb: kos32-liblua5.2.deb:
make "LUA_VER=5.2" build make "LUA_VER=5.2" build-deb
kos32-liblua5.1.deb: kos32-liblua5.1.deb:
make "LUA_VER=5.1" build make "LUA_VER=5.1" build-deb
clean:
kos32-liblua5.4.exe:
make "LUA_VER=5.4" build-exe
kos32-liblua5.3.exe:
make "LUA_VER=5.3" build-exe
kos32-liblua5.2.exe:
make "LUA_VER=5.2" build-exe
kos32-liblua5.1.exe:
make "LUA_VER=5.1" build-win
clean-package:
rm -rf $(PACKAGE_DIR) rm -rf $(PACKAGE_DIR)
clean: clean-package
make -C Lua clean make -C Lua clean
$(PACKAGE_DIR): GeneratePackage $(PACKAGE_DIR)/DEBIAN/control: GeneratePackage-linux
$(PACKAGE_DIR)/DEBIAN/control: GeneratePackage $(PACKAGE_TOOLCHAIN_PATH)/lib: $(PACKAGE_DIR)
$(PACKAGE_TOOLCHAIN_PATH)/lib: GeneratePackage $(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER): $(PACKAGE_DIR)
$(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER): GeneratePackage $(PACKAGE_TOOLCHAIN_PATH)/lib/liblua$(LUA_VER).a: MoveLuaLibs
$(PACKAGE_TOOLCHAIN_PATH)/lib/liblua$(LUA_VER).dll.a: MoveLuaLibs
Lua/src/liblua$(LUA_VER).dll.a: Lua/src/liblua$(LUA_VER).dll.a:
make -C Lua/src "KOLIBRIOS_REPO=$(KOLIBRIOS_REPO)" shared make -C Lua/src "KOLIBRIOS_REPO=$(KOLIBRIOS_REPO)" shared

70
installer.iss Normal file
View File

@@ -0,0 +1,70 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppPublisher "Egor00f"
#define MyAppURL "https://git.kolibrios.org/Lua/kos32-liblua"
[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={{3BFB947D-A217-498A-8531-4E4FB86B1AE9}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=C:\MinGW\msys\1.0\home\autobuild\tools\win32\
; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run
; on anything but x64 and Windows 11 on Arm.
ArchitecturesAllowed=x86compatible
; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the
; install be done in "64-bit mode" on x64 or Windows 11 on Arm,
; meaning it should use the native 64-bit Program Files directory and
; the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x86compatible
DisableProgramGroupPage=yes
LicenseFile=.\LICENSE
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputDir=.\build
OutputBaseFilename={#PackageName}
Compression=lzma
SolidCompression=yes
WizardStyle=modern
DirExistsWarning=no
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "armenian"; MessagesFile: "compiler:Languages\Armenian.isl"
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
Name: "bulgarian"; MessagesFile: "compiler:Languages\Bulgarian.isl"
Name: "catalan"; MessagesFile: "compiler:Languages\Catalan.isl"
Name: "corsican"; MessagesFile: "compiler:Languages\Corsican.isl"
Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl"
Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl"
Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl"
Name: "finnish"; MessagesFile: "compiler:Languages\Finnish.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
Name: "hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl"
Name: "hungarian"; MessagesFile: "compiler:Languages\Hungarian.isl"
Name: "icelandic"; MessagesFile: "compiler:Languages\Icelandic.isl"
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
Name: "korean"; MessagesFile: "compiler:Languages\Korean.isl"
Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl"
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "slovak"; MessagesFile: "compiler:Languages\Slovak.isl"
Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl"
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl"
[Files]
Source: ".\build\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files