Skip to content

Commit e5a7c20

Browse files
authored
Add files via upload
1 parent 3fdab82 commit e5a7c20

File tree

2 files changed

+117
-67
lines changed

2 files changed

+117
-67
lines changed

Setup.ahk

+97-67
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,9 @@
1-
; AeroZoom by WanderSick | http://wandersick.blogspot.com
1+
; (c) Copyright 2009-2012 AeroZoom by Ning Ng (Wandersick) | http://wandersick.blogspot.com
22
;
33
; This is the Setup. See main script for more.
44
;
5-
; ------------------------------------------
6-
; Some unorganized notes for internal use:
7-
;
8-
; ** Compile this with AutoHotKey Basic (as it does not need to query WMI anymore)
9-
; ** RunAsHighest for ONLY this script and AeroZoom ahk. (All mod scripts w/o manifest)
10-
; So this setup.exe uses the current user's profile to install (in case of AsHighest/AsInvoker, not the elevated user's (in case of AsAdmin)
11-
; Running AeroZoom with admin rights is better under win7 (due to OS limitations). So the elevated user might share settings
12-
; with the standard user as both would share the same registry user hive that way. (This problem assumes running from a standard user account,
13-
; for admin accounts with/without UAC on, no problem.)
14-
;
15-
; For unattended install, set unattendAZ=1, see below or setup.exe /?
16-
; (Also, a MSI may be available on the web site above)
17-
18-
; Uninstallation will automatically take place instead if an installed copy is found in %targetDir%
19-
; * No need to compile this with UAC RunAsAdmin manifest or name it setup.exe as the installation does not depend on admin rights *
20-
; * To name it setup.exe yet not get auto elevation in Standard User accounts, try asInvoker/asHighest. The latter elevates in admin
21-
; accounts with UAC on, but the former does not (unless UAC is off, then admin rights always).
22-
23-
; The following switches can be set by either setup.exe /unattendAZ=1 or, in a command prompt, set unattendAZ=1
24-
25-
; /unattendAZ=1 : for unattended installation/uninstallation using setup.exe
26-
; (also used by menu 'Tool > Uninstall AeroZoom from this Computer' although it wont allow uninstallation)
27-
; to suspress all dialogs. no running executables is closed -- so that would fail if its trying to delete itself
28-
; so it doesnt do that. in that case it would prompt user to uninstall in Program and Features (i.e. below, unattendAZ=2)
29-
; =2 : for uninstallation in Program and Features. will present uninstallation dialogs (attended)
30-
; to users when they uninstall using Program and Features.
31-
; cancelled --> the most obvious different from 1 is it includes using AT.exe to schedule deletion of this setup.exe
32-
; also it wont check for working directory
33-
; undefined : for setup.exe to install/uninstall in attended mode. (most usual)
34-
35-
; /programfiles : install into Program Files for all users
36-
37-
; e.g. Setup.exe /unattendAZ=1 /programfiles
385

39-
; MSI installer making steps: (cancelled as MSI created this way does not work with UAC on)
40-
; 1. Embed these files in a batch file for Batch To Exe Converter 1.5:
41-
; AeroZoom_Task.bat, AeroZoom_Task_Body.xml 7z.exe, 7z.dll, AeroZoom.7z (the whole AeroZoom folder compressed), setup.exe (this ahk file after being compiled.)
42-
; 2. Batch To Exe Converter Settings:
43-
; Invisible application, Temporary directory (Submit current directory), Overwrite existing files
44-
; 3. Batch file content:
45-
46-
; @echo off
47-
; "setup.exe" /unattendAZ=1
48-
; goto :EOF
49-
50-
; 4. AHK content: This file and uncomment the following line in around line 53
51-
; RunWait, 7z.exe -y x AeroZoom.7z -o"%localappdata%\WanderSick\",%A_ScriptDir%
52-
; Comment the following line around line 54
53-
; FileCopyDir, %A_WorkingDir%, %localappdata%\WanderSick\AeroZoom, 1
54-
55-
; 5. Use Exe To Msi Converter Free (1.0) by QwertyLabs to convert.
56-
; Specify no switch
57-
; Other tools/versions may not work without specific settings
58-
; For v3.1, check 'Do not Register Package (suppress Uninstall)'
59-
60-
; 6. Since v1 displays exe2msi and QwentyLabs as Product Name. Use Orca to correct it.
61-
62-
; When creating an single-file installer, remove the missing component check below
63-
64-
verAZ = 3.0
6+
verAZ = 3.1
657

668
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
679

@@ -115,14 +57,14 @@ IfNotExist, %targetDir%\WanderSick\AeroZoom\AeroZoom.exe
11557
}
11658
}
11759
Gosub, KillProcess
118-
; Remove existing directory
60+
; Remove existing directory
11961
FileRemoveDir, %targetDir%\WanderSick\AeroZoom\Data, 1
120-
FileRemoveDir, %targetDir%\WanderSick\AeroZoom, 1
121-
; Copy AeroZoom to %targetDir%
122-
123-
FileCreateDir, %targetDir%\WanderSick\AeroZoom
124-
; RunWait, 7z.exe -y x AeroZoom.7z -o"%targetDir%\WanderSick\",%A_ScriptDir%
125-
FileCopyDir, %A_WorkingDir%, %targetDir%\WanderSick\AeroZoom, 1
62+
FileRemoveDir, %targetDir%\WanderSick\AeroZoom, 1
63+
; Copy AeroZoom to %targetDir%
64+
65+
FileCreateDir, %targetDir%\WanderSick\AeroZoom
66+
; RunWait, 7z.exe -y x AeroZoom.7z -o"%targetDir%\WanderSick\",%A_ScriptDir%
67+
FileCopyDir, %A_WorkingDir%, %targetDir%\WanderSick\AeroZoom, 1
12668

12769
; Create shortcut to Start Menu (Current User)
12870
IfExist, %targetDir%\WanderSick\AeroZoom\AeroZoom.exe
@@ -330,3 +272,91 @@ Process, Close, AeroZoom_Shift.exe
330272
Process, Close, AeroZoom_Win.exe
331273
Process, Close, ZoomPad.exe
332274
return
275+
276+
; ------------------------------------------
277+
; Some unorganized notes for internal use:
278+
;
279+
; ** Compile this with AutoHotKey Basic (as it does not need to query WMI anymore)
280+
; ** RunAsHighest for ONLY this script and AeroZoom ahk. (All mod scripts w/o manifest)
281+
; So this setup.exe uses the current user's profile to install (in case of AsHighest/AsInvoker, not the elevated user's (in case of AsAdmin)
282+
; Running AeroZoom with admin rights is better under win7 (due to OS limitations). So the elevated user might share settings
283+
; with the standard user as both would share the same registry user hive that way. (This problem assumes running from a standard user account,
284+
; for admin accounts with/without UAC on, no problem.)
285+
;
286+
; For unattended install, set unattendAZ=1, see below or setup.exe /?
287+
; (Also, a MSI may be available on the web site above)
288+
289+
; Uninstallation will automatically take place instead if an installed copy is found in %targetDir%
290+
; * No need to compile this with UAC RunAsAdmin manifest or name it setup.exe as the installation does not depend on admin rights *
291+
; * To name it setup.exe yet not get auto elevation in Standard User accounts, try asInvoker/asHighest. The latter elevates in admin
292+
; accounts with UAC on, but the former does not (unless UAC is off, then admin rights always).
293+
294+
; The following switches can be set by either setup.exe /unattendAZ=1 or, in a command prompt, set unattendAZ=1
295+
296+
; /unattendAZ=1 : for unattended installation/uninstallation using setup.exe
297+
; (also used by menu 'Tool > Uninstall AeroZoom from this Computer' although it wont allow uninstallation)
298+
; to suspress all dialogs. no running executables is closed -- so that would fail if its trying to delete itself
299+
; so it doesnt do that. in that case it would prompt user to uninstall in Program and Features (i.e. below, unattendAZ=2)
300+
; =2 : for uninstallation in Program and Features. will present uninstallation dialogs (attended)
301+
; to users when they uninstall using Program and Features.
302+
; cancelled --> the most obvious different from 1 is it includes using AT.exe to schedule deletion of this setup.exe
303+
; also it wont check for working directory
304+
; undefined : for setup.exe to install/uninstall in attended mode. (most usual)
305+
306+
; /programfiles : install into Program Files for all users
307+
308+
; e.g. Setup.exe /unattendAZ=1 /programfiles
309+
310+
; OLD MSI installer making steps: (cancelled as MSI created this way does not work with UAC on)
311+
312+
; 1. Embed these files in a batch file for Batch To Exe Converter 1.5:
313+
; AeroZoom_Task.bat, AeroZoom_Task_Body.xml 7z.exe, 7z.dll, AeroZoom.7z (the whole AeroZoom folder compressed), setup.exe (this ahk file after being compiled.)
314+
; 2. Batch To Exe Converter Settings:
315+
; Invisible application, Temporary directory (Submit current directory), Overwrite existing files
316+
; 3. Batch file content:
317+
318+
; @echo off
319+
; "setup.exe" /unattendAZ=1
320+
; goto :EOF
321+
322+
; 4. AHK content: This file and uncomment the following line in around line 53
323+
; RunWait, 7z.exe -y x AeroZoom.7z -o"%localappdata%\WanderSick\",%A_ScriptDir%
324+
; Comment the following line around line 54
325+
; FileCopyDir, %A_WorkingDir%, %localappdata%\WanderSick\AeroZoom, 1
326+
327+
; 5. Use Exe To Msi Converter Free (1.0) by QwertyLabs to convert.
328+
; Specify no switch
329+
; Other tools/versions may not work without specific settings
330+
; For v3.1, check 'Do not Register Package (suppress Uninstall)'
331+
332+
; 6. Since v1 displays exe2msi and QwentyLabs as Product Name. Use Orca to correct it.
333+
334+
; When creating an single-file installer, remove the missing component check below
335+
336+
; ---------------------------------------------------------------
337+
338+
; NEW method simply uses AutoHotkey_L built-in FileInstall. Use no batch to exe converter.
339+
340+
; There're 3 setup.exe in total. One contains FileInstall command which extracts the 2nd setup.exe,
341+
; AeroZoom.7z, 7z.exe, etc. then execute the 2nd AZ_setup.exe which extracts the 7z and install the extracted files
342+
343+
; (diff between 2nd and 3rd setup is step 4 above, plus the component check at the top... 2nd doesnt check it)
344+
345+
; The third setup.exe is in extracted folder for uninstallation. It is also for the Portable version
346+
; of AeroZoom, where if users install the program, the subfolder gets copied to the destination
347+
; (since there's no one single 7z archive and 7z.exe).
348+
349+
; The first setup.exe (named setup.exe to get auto-elevated) extracts files to temp folder
350+
351+
; (Before compile, put these in C:\AZ_whatever_temp_folder to include in Setup.exe)
352+
353+
; FileInstall, C:\AZ_whatever_temp_folder\AeroZoom_Task.bat, %A_Temp%, 1
354+
; FileInstall, C:\AZ_whatever_temp_folder\AeroZoom_Task_Body.xml, %A_Temp%, 1
355+
; FileInstall, C:\AZ_whatever_temp_folder\7z.exe, %A_Temp%, 1
356+
; FileInstall, C:\AZ_whatever_temp_folder\7z.dll, %A_Temp%, 1
357+
; FileInstall, C:\AZ_whatever_temp_folder\AeroZoom.7z, %A_Temp%, 1
358+
359+
; Run, "%A_Temp%\Setup_2nd.exe" /unattendAZ=1,%A_ScriptDir%
360+
361+
; Use Intel's tool (based on Wix) to convert exe to msi.
362+

compileAll.bat

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cd /d C:\Program Files\AutoHotkey\Compiler
2+
Ahk2Exe.exe /in AeroZoom_MouseL_x64.ahk /bin "Unicode 64-bit.bin"
3+
Ahk2Exe.exe /in AeroZoom_MouseR_x64.ahk /bin "Unicode 64-bit.bin"
4+
Ahk2Exe.exe /in AeroZoom_MouseM_x64.ahk /bin "Unicode 64-bit.bin"
5+
Ahk2Exe.exe /in AeroZoom_MouseX1_x64.ahk /bin "Unicode 64-bit.bin"
6+
Ahk2Exe.exe /in AeroZoom_MouseX2_x64.ahk /bin "Unicode 64-bit.bin"
7+
Ahk2Exe.exe /in AeroZoom_Alt_x64.ahk /bin "Unicode 64-bit.bin"
8+
Ahk2Exe.exe /in AeroZoom_Ctrl_x64.ahk /bin "Unicode 64-bit.bin"
9+
Ahk2Exe.exe /in AeroZoom_Win_x64.ahk /bin "Unicode 64-bit.bin"
10+
Ahk2Exe.exe /in AeroZoom_Shift_x64.ahk /bin "Unicode 64-bit.bin"
11+
Ahk2Exe.exe /in AeroZoom_MouseL.ahk /bin "Unicode 32-bit.bin"
12+
Ahk2Exe.exe /in AeroZoom_MouseR.ahk /bin "Unicode 32-bit.bin"
13+
Ahk2Exe.exe /in AeroZoom_MouseM.ahk /bin "Unicode 32-bit.bin"
14+
Ahk2Exe.exe /in AeroZoom_MouseX1.ahk /bin "Unicode 32-bit.bin"
15+
Ahk2Exe.exe /in AeroZoom_MouseX2.ahk /bin "Unicode 32-bit.bin"
16+
Ahk2Exe.exe /in AeroZoom_Alt.ahk /bin "Unicode 32-bit.bin"
17+
Ahk2Exe.exe /in AeroZoom_Ctrl.ahk /bin "Unicode 32-bit.bin"
18+
Ahk2Exe.exe /in AeroZoom_Win.ahk /bin "Unicode 32-bit.bin"
19+
Ahk2Exe.exe /in AeroZoom_Shift.ahk /bin "Unicode 32-bit.bin"
20+
pause

0 commit comments

Comments
 (0)