diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2024-10-17 14:25:51 -0500 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2024-10-17 14:25:51 -0500 |
| commit | a8c1e3d6987cb1b9faa4a85e1b6736f5ab289bd9 (patch) | |
| tree | 07d5cec6418544696496e1fc07a372eb4a862bca | |
| parent | 50ad746cfae5cc96c1352dfa7d06754fcccf41df (diff) | |
| download | lua4win-dist-lua-a8c1e3d6987cb1b9faa4a85e1b6736f5ab289bd9.tar.gz lua4win-dist-lua-a8c1e3d6987cb1b9faa4a85e1b6736f5ab289bd9.tar.bz2 lua4win-dist-lua-a8c1e3d6987cb1b9faa4a85e1b6736f5ab289bd9.zip | |
Add our rock servers and a system-wide rock tree
| -rw-r--r-- | config-5.1.lua | 19 | ||||
| -rw-r--r-- | lua4win.wxs | 11 | ||||
| -rwxr-xr-x | test | 4 |
3 files changed, 32 insertions, 2 deletions
diff --git a/config-5.1.lua b/config-5.1.lua new file mode 100644 index 0000000..a24aa83 --- /dev/null +++ b/config-5.1.lua | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | |||
| 2 | rocks_servers = { | ||
| 3 | { | ||
| 4 | "http://lua4.win", | ||
| 5 | "https://luarocks.org", | ||
| 6 | "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/", | ||
| 7 | "https://loadk.com/luarocks/" | ||
| 8 | } | ||
| 9 | } | ||
| 10 | rocks_trees = { | ||
| 11 | { | ||
| 12 | name = "system", | ||
| 13 | root = os_getenv("LUAROCKS_SYSCONFDIR"):gsub("config","luarocks") | ||
| 14 | }, | ||
| 15 | { | ||
| 16 | name = "user", | ||
| 17 | root = home .. "\\luarocks" | ||
| 18 | } | ||
| 19 | } | ||
diff --git a/lua4win.wxs b/lua4win.wxs index 194db77..42c2402 100644 --- a/lua4win.wxs +++ b/lua4win.wxs | |||
| @@ -38,6 +38,8 @@ | |||
| 38 | <Component Id="Config"> | 38 | <Component Id="Config"> |
| 39 | <File Id="config.lua" Source="config-5.1.lua" /> | 39 | <File Id="config.lua" Source="config-5.1.lua" /> |
| 40 | </Component> | 40 | </Component> |
| 41 | </Directory> | ||
| 42 | <Directory Id="Luarocks" Name="luarocks"> | ||
| 41 | </Directory> | 43 | </Directory> |
| 42 | <Component Id="EnvironmentPath" Guid="Lua4Win.PATH"> | 44 | <Component Id="EnvironmentPath" Guid="Lua4Win.PATH"> |
| 43 | <Environment Id="Path" Name="PATH" Action="set" System="yes" Part="last" Value="[INSTALLDIR]"/> | 45 | <Environment Id="Path" Name="PATH" Action="set" System="yes" Part="last" Value="[INSTALLDIR]"/> |
| @@ -45,6 +47,13 @@ | |||
| 45 | <Component Id="SysConfigPath" Guid="Lua4Win.SYSCONFDIR"> | 47 | <Component Id="SysConfigPath" Guid="Lua4Win.SYSCONFDIR"> |
| 46 | <Environment Id="Sysconfdir" Name="LUAROCKS_SYSCONFDIR" Action="set" System="yes" Part="last" Value="[INSTALLDIR]config"/> | 48 | <Environment Id="Sysconfdir" Name="LUAROCKS_SYSCONFDIR" Action="set" System="yes" Part="last" Value="[INSTALLDIR]config"/> |
| 47 | </Component> | 49 | </Component> |
| 50 | <!-- This stuff is re-created from `luarocks path` --> | ||
| 51 | <Component ID="LuaPath" Guid="Lua4Win.LUA_PATH"> | ||
| 52 | <Environment Id="LUA_PATH" Name="LUA_PATH" Action="set" System="yes" Part="last" Value=".\\?.lua;[INSTALLDIR]lua\\?.lua;[INSTALLDIR]lua\\?\\init.lua;[AppDataFolder]luarocks\\share\\lua\\5.1\\?.lua;[AppDataFolder]luarocks\\share\\lua\\5.1\\?\\init.lua" /> | ||
| 53 | </Component> | ||
| 54 | <Component Id="LuaCPath" Guid="Lua4Win.LUA_CPATH"> | ||
| 55 | <Environment Id="LUA_CPATH" Name="LUA_CPATH" Action="set" System="yes" Part="last" Value=".\\?.dll;[INSTALLDIR]?.dll;[INSTALLDIR]loadall.dll;[AppDataFolder]luarocks\\lib\\lua\\5.1\\?.dll" /> | ||
| 56 | </Component> | ||
| 48 | </Directory> | 57 | </Directory> |
| 49 | </Directory> | 58 | </Directory> |
| 50 | </Directory> | 59 | </Directory> |
| @@ -57,6 +66,8 @@ | |||
| 57 | <ComponentRef Id="Config" /> | 66 | <ComponentRef Id="Config" /> |
| 58 | <ComponentRef Id="EnvironmentPath" /> | 67 | <ComponentRef Id="EnvironmentPath" /> |
| 59 | <ComponentRef Id="SysConfigPath" /> | 68 | <ComponentRef Id="SysConfigPath" /> |
| 69 | <ComponentRef Id="LuaPath" /> | ||
| 70 | <ComponentRef Id="LuaCPath" /> | ||
| 60 | </Feature> | 71 | </Feature> |
| 61 | 72 | ||
| 62 | <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" /> | 73 | <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" /> |
| @@ -75,7 +75,7 @@ tar -czf images.tar.gz *.png | |||
| 75 | 75 | ||
| 76 | # Make sure we've installed it | 76 | # Make sure we've installed it |
| 77 | INSTALLDIR='/root/.wine/drive_c/Program Files (x86)/Lua4Win/Lua4Win 1.0' | 77 | INSTALLDIR='/root/.wine/drive_c/Program Files (x86)/Lua4Win/Lua4Win 1.0' |
| 78 | test -e $INSTALLDIR/luajit.exe | 78 | test -e "$INSTALLDIR/luajit.exe" |
| 79 | test -e $INSTALLDIR/luarocks.exe | 79 | test -e "$INSTALLDIR/luarocks.exe" |
| 80 | wine "$INSTALLDIR/luarocks.exe" --help | 80 | wine "$INSTALLDIR/luarocks.exe" --help |
| 81 | wine "$INSTALLDIR/luarocks.exe" config | 81 | wine "$INSTALLDIR/luarocks.exe" config |
