From 61a79014eeba5698faad8fb5c48b4c6846f6984c Mon Sep 17 00:00:00 2001 From: Egor00f Date: Sun, 27 Apr 2025 13:24:02 +0500 Subject: [PATCH 1/2] add inno setup installer build --- Makefile | 62 ++++++++++++++++++++++++++++++++++---------- installer.iss | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 14 deletions(-) create mode 100644 installer.iss diff --git a/Makefile b/Makefile index 945aca9..cc3a134 100644 --- a/Makefile +++ b/Makefile @@ -23,46 +23,80 @@ GenerateControl: $(PACKAGE_DIR)/DEBIAN/control echo Version: $(PACKAGE_VER) >> $(DEBIAN_CONTROL_FILE) echo Installed-Size: $(PACKAGE_SIZE) $(shell du -s build | cut -f1) >> $(DEBIAN_CONTROL_FILE) -MoveHeadersToPackage: GeneratePackage - cp Lua/src/*.h $(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER) +MoveHeadersToPackage: $(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER) + cp -f Lua/src/*.h $(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER) -GeneratePackage: ./package - cp -R ./package $(PACKAGE_DIR) +$(PACKAGE_DIR): + mkdir $(PACKAGE_DIR) mkdir -p $(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER) mkdir -p $(PACKAGE_TOOLCHAIN_PATH)/lib + +GeneratePackage-linux: ./package $(PACKAGE_DIR) + cp -R ./package $(PACKAGE_DIR) mkdir -p $(PACKAGE_DOC_DIR) cp -f Readme.md $(PACKAGE_DOC_DIR) 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 + +MoveLuaLibs: Lua/src/liblua$(LUA_VER).dll.a Lua/src/liblua$(LUA_VER).a 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 -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 +build-exe-deps: MoveHeadersToPackage LuaLibs installer.iss + iscc /Obuild /DMyAppName=kos32-aboba /DMyAppVersion=$(PACKAGE_VER) 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: - make "LUA_VER=5.4" build + make "LUA_VER=5.4" build-deb kos32-liblua5.3.deb: - make "LUA_VER=5.3" build + make "LUA_VER=5.3" build-deb kos32-liblua5.2.deb: - make "LUA_VER=5.2" build + make "LUA_VER=5.2" build-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) + +clean: clean-package make -C Lua clean -$(PACKAGE_DIR): GeneratePackage -$(PACKAGE_DIR)/DEBIAN/control: GeneratePackage -$(PACKAGE_TOOLCHAIN_PATH)/lib: GeneratePackage -$(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER): GeneratePackage +$(PACKAGE_DIR)/DEBIAN/control: GeneratePackage-linux +$(PACKAGE_TOOLCHAIN_PATH)/lib: $(PACKAGE_DIR) +$(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER): $(PACKAGE_DIR) +$(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: BuildLua +Lua/src/liblua$(LUA_VER).a: BuildLua Lua/src/liblua$(LUA_VER).dll.a: make -C Lua/src "KOLIBRIOS_REPO=$(KOLIBRIOS_REPO)" shared diff --git a/installer.iss b/installer.iss new file mode 100644 index 0000000..c34bb86 --- /dev/null +++ b/installer.iss @@ -0,0 +1,71 @@ +; 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" +#define MyAppExeName "MyProg-x64.exe" + +[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=x64compatible +; "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=x64compatible +DisableProgramGroupPage=yes +LicenseFile=C:\Users\yyari\Documents\KolibriOS\kos32-liblua\LICENSE +; Uncomment the following line to run in non administrative install mode (install for current user only.) +;PrivilegesRequired=lowest +OutputDir=C:\Users\yyari\Documents\KolibriOS\kos32-liblua\build +OutputBaseFilename=setup +Compression=lzma +SolidCompression=yes +WizardStyle=modern + +[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: "C:\Users\yyari\Documents\KolibriOS\kos32-liblua\build\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + + -- 2.49.1 From 2f51027ab9458e41b6e4f5624ba68f63e83413d9 Mon Sep 17 00:00:00 2001 From: Egor00f Date: Sun, 27 Apr 2025 14:25:14 +0500 Subject: [PATCH 2/2] =?UTF-8?q?clean=20unneeded=20paths=20&&=20=D1=81?= =?UTF-8?q?=D0=B4=D0=B0=D0=BB=D0=B0=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D1=83?= =?UTF-8?q?=20=D0=BD=D0=B5=D0=BC=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=B0=D0=B4?= =?UTF-8?q?=D0=B5=D0=BA=D0=B2=D0=B0=D1=82=D0=BD=D0=B5=D0=B5=20&&=20fix=20d?= =?UTF-8?q?eb=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + Makefile | 12 +++++------- installer.iss | 17 ++++++++--------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 0084b2a..152f41e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ *.a *.dll *.deb +*.exe build/ diff --git a/Makefile b/Makefile index cc3a134..8b5e76f 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ $(PACKAGE_DIR): mkdir -p $(PACKAGE_TOOLCHAIN_PATH)/lib GeneratePackage-linux: ./package $(PACKAGE_DIR) - cp -R ./package $(PACKAGE_DIR) + cp -R ./package/* $(PACKAGE_DIR) mkdir -p $(PACKAGE_DOC_DIR) cp -f Readme.md $(PACKAGE_DOC_DIR) cp -f LICENSE $(PACKAGE_DOC_DIR)/copyright @@ -40,9 +40,9 @@ GeneratePackage-linux: ./package $(PACKAGE_DIR) GeneratePackage-exe: $(PACKAGE_DIR) -BuildLua: $(PACKAGE_TOOLCHAIN_PATH)/lib Lua/src/liblua$(LUA_VER).dll.a Lua/src/liblua$(LUA_VER).a - -MoveLuaLibs: 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).a $(PACKAGE_TOOLCHAIN_PATH)/lib @@ -53,7 +53,7 @@ build-deb: change_lua_ver clean-package MoveHeadersToPackage LuaLibs GenerateCon dpkg --build $(PACKAGE_DIR) kos32-liblua$(LUA_VER).deb build-exe-deps: MoveHeadersToPackage LuaLibs installer.iss - iscc /Obuild /DMyAppName=kos32-aboba /DMyAppVersion=$(PACKAGE_VER) 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 @@ -95,8 +95,6 @@ $(PACKAGE_TOOLCHAIN_PATH)/lib: $(PACKAGE_DIR) $(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER): $(PACKAGE_DIR) $(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: BuildLua -Lua/src/liblua$(LUA_VER).a: BuildLua Lua/src/liblua$(LUA_VER).dll.a: make -C Lua/src "KOLIBRIOS_REPO=$(KOLIBRIOS_REPO)" shared diff --git a/installer.iss b/installer.iss index c34bb86..692c0e4 100644 --- a/installer.iss +++ b/installer.iss @@ -3,7 +3,6 @@ #define MyAppPublisher "Egor00f" #define MyAppURL "https://git.kolibrios.org/Lua/kos32-liblua" -#define MyAppExeName "MyProg-x64.exe" [Setup] ; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. @@ -19,21 +18,23 @@ 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=x64compatible +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=x64compatible +ArchitecturesInstallIn64BitMode=x86compatible DisableProgramGroupPage=yes -LicenseFile=C:\Users\yyari\Documents\KolibriOS\kos32-liblua\LICENSE +LicenseFile=.\LICENSE ; Uncomment the following line to run in non administrative install mode (install for current user only.) ;PrivilegesRequired=lowest -OutputDir=C:\Users\yyari\Documents\KolibriOS\kos32-liblua\build -OutputBaseFilename=setup +OutputDir=.\build +OutputBaseFilename={#PackageName} Compression=lzma SolidCompression=yes WizardStyle=modern +DirExistsWarning=no + [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" @@ -65,7 +66,5 @@ Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl" Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl" [Files] -Source: "C:\Users\yyari\Documents\KolibriOS\kos32-liblua\build\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: ".\build\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ; NOTE: Don't use "Flags: ignoreversion" on any shared system files - - -- 2.49.1