summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config-5.1.lua19
-rw-r--r--lua4win.wxs11
-rwxr-xr-xtest4
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
2rocks_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}
10rocks_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" />
diff --git a/test b/test
index 2f74971..83f1130 100755
--- a/test
+++ b/test
@@ -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
77INSTALLDIR='/root/.wine/drive_c/Program Files (x86)/Lua4Win/Lua4Win 1.0' 77INSTALLDIR='/root/.wine/drive_c/Program Files (x86)/Lua4Win/Lua4Win 1.0'
78test -e $INSTALLDIR/luajit.exe 78test -e "$INSTALLDIR/luajit.exe"
79test -e $INSTALLDIR/luarocks.exe 79test -e "$INSTALLDIR/luarocks.exe"
80wine "$INSTALLDIR/luarocks.exe" --help 80wine "$INSTALLDIR/luarocks.exe" --help
81wine "$INSTALLDIR/luarocks.exe" config 81wine "$INSTALLDIR/luarocks.exe" config