Compare commits
492 Commits
v1.8.0-bet
...
v1.8.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf9bb26d19 | ||
|
|
01efba99af | ||
|
|
6e469662d3 | ||
|
|
4bc94c17ea | ||
|
|
1820d4018e | ||
|
|
f130a2716e | ||
|
|
deb5e68e15 | ||
|
|
9a9897ea1e | ||
|
|
deea902c4f | ||
|
|
42513af536 | ||
|
|
676a2ff8ca | ||
|
|
1e56349838 | ||
|
|
33b8064042 | ||
|
|
1f5170253c | ||
|
|
ad6f2e03c9 | ||
|
|
4c3daf7927 | ||
|
|
4936f70d20 | ||
|
|
ecd2da185d | ||
|
|
7a7bf4c561 | ||
|
|
827e07700d | ||
|
|
d142c554d1 | ||
|
|
69f2b2da7c | ||
|
|
4000993200 | ||
|
|
2c6c21d753 | ||
|
|
34384e3613 | ||
|
|
a42856ef84 | ||
|
|
e7f01b9a95 | ||
|
|
fc2ceb88fb | ||
|
|
36f62f7fd4 | ||
|
|
ee08b3759d | ||
|
|
c73110e3c7 | ||
|
|
9ced5fb9a3 | ||
|
|
f9659d80c9 | ||
|
|
553e831121 | ||
|
|
e9ff471e1c | ||
|
|
eb6d29a223 | ||
|
|
3df26ef189 | ||
|
|
25767bee0b | ||
|
|
0f7773ff99 | ||
|
|
2ed329e025 | ||
|
|
e04882cc7c | ||
|
|
40818920d1 | ||
|
|
1bec652822 | ||
|
|
4c10f1e40c | ||
|
|
53154bcd1e | ||
|
|
1d600ceecc | ||
|
|
e1a36b53dc | ||
|
|
5f91abd7c6 | ||
|
|
75b38d1a2f | ||
|
|
7f597e5dd2 | ||
|
|
e3be1a176d | ||
|
|
b1658cb1cf | ||
|
|
6ba3324035 | ||
|
|
e2a26f0eaf | ||
|
|
8cfb17bca6 | ||
|
|
211e5ec82e | ||
|
|
2435ba7e7d | ||
|
|
be77e4f57e | ||
|
|
f344b42aa9 | ||
|
|
90f4a20a50 | ||
|
|
793130a533 | ||
|
|
1ddb162338 | ||
|
|
070d9d3147 | ||
|
|
9b73308edd | ||
|
|
b46a8239e2 | ||
|
|
e9d0f5a022 | ||
|
|
5721d8eb64 | ||
|
|
e708c145fa | ||
|
|
713beeb2a5 | ||
|
|
6c46713701 | ||
|
|
3754e6c781 | ||
|
|
6401b1cfc3 | ||
|
|
6b9e123816 | ||
|
|
fb2295fcec | ||
|
|
0af2f7e5ed | ||
|
|
1c84d01584 | ||
|
|
3fcce08a22 | ||
|
|
289800c1ba | ||
|
|
49fb37fefc | ||
|
|
9a02a0f3a8 | ||
|
|
4e79093f84 | ||
|
|
d2fff2c3e3 | ||
|
|
8f277e46d6 | ||
|
|
c33d962712 | ||
|
|
3870915118 | ||
|
|
b05ca526a4 | ||
|
|
4e28a24af3 | ||
|
|
aebadfcda2 | ||
|
|
c975954a9a | ||
|
|
dec3bd4a02 | ||
|
|
64ce0cd7a2 | ||
|
|
34593cccb6 | ||
|
|
5b5a636cc1 | ||
|
|
5c6a6529a6 | ||
|
|
68fa190cf7 | ||
|
|
d148464efe | ||
|
|
6a7f2089e8 | ||
|
|
17fe4c3b29 | ||
|
|
dd6c97abb6 | ||
|
|
ddfe3fa7ab | ||
|
|
1f7274c2f2 | ||
|
|
4d87f30434 | ||
|
|
8b371c42b7 | ||
|
|
c7f759fedf | ||
|
|
830daa40d1 | ||
|
|
f016d25b4c | ||
|
|
e18fd62f34 | ||
|
|
3701fbcbfe | ||
|
|
823f9fa0d1 | ||
|
|
67d38bc87b | ||
|
|
b36ff1ed1d | ||
|
|
ec83295b99 | ||
|
|
e36252a845 | ||
|
|
d0d8de9f2f | ||
|
|
9693048f78 | ||
|
|
101d2268ff | ||
|
|
2fcad760b9 | ||
|
|
52eb6c95cf | ||
|
|
35169e3de4 | ||
|
|
650b201b33 | ||
|
|
f595fc2f9c | ||
|
|
06c889630c | ||
|
|
d6dbabfbc4 | ||
|
|
bcae146444 | ||
|
|
8a39748654 | ||
|
|
3556ed416c | ||
|
|
e5e2ce2b22 | ||
|
|
39d103adf7 | ||
|
|
afd1406e61 | ||
|
|
a4c411af99 | ||
|
|
bcc896fb6e | ||
|
|
76166c6252 | ||
|
|
dd5a49bc78 | ||
|
|
cdfafa2180 | ||
|
|
6b16e18eb8 | ||
|
|
c2dacd03a5 | ||
|
|
505dba5b23 | ||
|
|
af5a7063c9 | ||
|
|
9e7779a476 | ||
|
|
625e61516f | ||
|
|
41614ec851 | ||
|
|
4d3a0ed250 | ||
|
|
cac15988f0 | ||
|
|
1e131f4732 | ||
|
|
22c35c4d15 | ||
|
|
9507bb4be6 | ||
|
|
e1c370a9a2 | ||
|
|
b9eafaaf24 | ||
|
|
909368025f | ||
|
|
15bfa46023 | ||
|
|
0359c775e0 | ||
|
|
1053153ec4 | ||
|
|
79ac61684c | ||
|
|
441eca86c4 | ||
|
|
f07d3d069e | ||
|
|
e300e3c744 | ||
|
|
b9df8290c9 | ||
|
|
73e2254a80 | ||
|
|
352c2957b2 | ||
|
|
23b6426dfa | ||
|
|
9ef8658122 | ||
|
|
0a67719f2f | ||
|
|
04d820f9cf | ||
|
|
931dd59844 | ||
|
|
a6500d8068 | ||
|
|
0d5d2c578d | ||
|
|
77679790db | ||
|
|
ee71024496 | ||
|
|
b1f326054f | ||
|
|
bceb40ed80 | ||
|
|
fd684eda52 | ||
|
|
9e3c3353bd | ||
|
|
07ffff3d77 | ||
|
|
9b34427a1c | ||
|
|
5fba476076 | ||
|
|
d63abef718 | ||
|
|
cdba8a7f2f | ||
|
|
21967a130b | ||
|
|
08e78d5d6f | ||
|
|
fe68e1e82c | ||
|
|
25ac3bfdb7 | ||
|
|
4700c604b1 | ||
|
|
356fa737c5 | ||
|
|
520e2eb392 | ||
|
|
e0d2bd4830 | ||
|
|
1dc05f99bf | ||
|
|
b2b176bcd0 | ||
|
|
fde5ccd0df | ||
|
|
d1fe25cc31 | ||
|
|
60c18f75b5 | ||
|
|
c7f3791f3d | ||
|
|
ee9d5e6bf0 | ||
|
|
96fa3a3a1a | ||
|
|
7c4deec800 | ||
|
|
78e82eb920 | ||
|
|
3c91a1ace4 | ||
|
|
3a52db46ad | ||
|
|
137bce6dd0 | ||
|
|
f000e6ce6a | ||
|
|
7c1281dd06 | ||
|
|
60729f2bbd | ||
|
|
0b0ecfcbe4 | ||
|
|
1fe86bced2 | ||
|
|
c6a62a497d | ||
|
|
8be6881093 | ||
|
|
99c8118229 | ||
|
|
6c5ca055c4 | ||
|
|
a6ec8f3090 | ||
|
|
b039c2ce86 | ||
|
|
5a6d286c41 | ||
|
|
ba65187ad3 | ||
|
|
a91f54f0a8 | ||
|
|
d77c1f3e4a | ||
|
|
7390ddbd98 | ||
|
|
32a4b40f0a | ||
|
|
bc1bc2a4f8 | ||
|
|
155c965866 | ||
|
|
6c73f25747 | ||
|
|
2518fd7059 | ||
|
|
56edae6958 | ||
|
|
d8275cd4e1 | ||
|
|
c3dca7a288 | ||
|
|
96ff0076c7 | ||
|
|
8bb4af067a | ||
|
|
df0df76b51 | ||
|
|
458f336405 | ||
|
|
3f3f27d4d3 | ||
|
|
7c9cffa5ae | ||
|
|
996223197c | ||
|
|
b8e7555977 | ||
|
|
ed80a712ab | ||
|
|
2866e56c51 | ||
|
|
2074bdbb19 | ||
|
|
d212ac7d16 | ||
|
|
d2bae21b14 | ||
|
|
4283ab3b44 | ||
|
|
c579069071 | ||
|
|
88488c695c | ||
|
|
21594e9aa9 | ||
|
|
9ffacd4ecd | ||
|
|
9d5f5ea3bc | ||
|
|
2dbd27af76 | ||
|
|
0634a4d0c6 | ||
|
|
fa80a006b8 | ||
|
|
9d88ef5432 | ||
|
|
7b99877c68 | ||
|
|
ec81cdefb0 | ||
|
|
454d5b575c | ||
|
|
785b59e6d1 | ||
|
|
9d8fc4aa4d | ||
|
|
57ac1d9ea2 | ||
|
|
d9ea6936ab | ||
|
|
c917251e9e | ||
|
|
c805c5d6e9 | ||
|
|
adcf40afc3 | ||
|
|
d986011067 | ||
|
|
5a83636f81 | ||
|
|
d475628c70 | ||
|
|
4a890eae38 | ||
|
|
760e11bc5d | ||
|
|
96ebf2b519 | ||
|
|
4a6f4919d7 | ||
|
|
b98040c7d5 | ||
|
|
1240a8163d | ||
|
|
e15b9b5358 | ||
|
|
1617c9d482 | ||
|
|
16600fe86a | ||
|
|
50ba73860c | ||
|
|
750cdc1910 | ||
|
|
f4e2c84111 | ||
|
|
4f27750711 | ||
|
|
71d9f23068 | ||
|
|
9f7aed7602 | ||
|
|
7f2213416a | ||
|
|
9b9f0bdd4d | ||
|
|
ee0aec514f | ||
|
|
c2fd7d6ebd | ||
|
|
4a893c5267 | ||
|
|
2473183f19 | ||
|
|
7d7142d7d8 | ||
|
|
cb57cda87a | ||
|
|
f2fa812b0b | ||
|
|
ef89582d7e | ||
|
|
ae74a21305 | ||
|
|
32af63764c | ||
|
|
61ff90409d | ||
|
|
ba0c3256fa | ||
|
|
b6fe5d2cff | ||
|
|
9123fac545 | ||
|
|
c6bc388001 | ||
|
|
ea985a85af | ||
|
|
2578832002 | ||
|
|
cfada67aa6 | ||
|
|
5483682281 | ||
|
|
2a8c23aac3 | ||
|
|
88bc96fc4c | ||
|
|
588129d852 | ||
|
|
0889991c38 | ||
|
|
5c87a35fe4 | ||
|
|
418185af9a | ||
|
|
4b56cc6e08 | ||
|
|
3cef771868 | ||
|
|
59b20de7cd | ||
|
|
e0ae34f01b | ||
|
|
a9a24c96fc | ||
|
|
a202203325 | ||
|
|
83c3d76966 | ||
|
|
99734f8d72 | ||
|
|
570a0bb586 | ||
|
|
450a815d61 | ||
|
|
dafc2d2b73 | ||
|
|
0bd2edd33a | ||
|
|
807267cfdb | ||
|
|
48c9222578 | ||
|
|
b5ea56df73 | ||
|
|
2fdf6dd8f2 | ||
|
|
5b8c9eb16f | ||
|
|
9c05150c12 | ||
|
|
c7eb85ef78 | ||
|
|
4df455f2e0 | ||
|
|
653a00d63d | ||
|
|
3c9acdf724 | ||
|
|
e81d1ab9b8 | ||
|
|
ad5620efb5 | ||
|
|
f455c71338 | ||
|
|
033f2cd231 | ||
|
|
c9eccd729d | ||
|
|
b1100cd9e5 | ||
|
|
8f728ddfb2 | ||
|
|
4ef0ce112c | ||
|
|
57c14a0eba | ||
|
|
89f831e7d4 | ||
|
|
917b8409ae | ||
|
|
86fd39e3a9 | ||
|
|
04db332051 | ||
|
|
06a2f58c51 | ||
|
|
b87d55758b | ||
|
|
38ef525d5e | ||
|
|
367b1fcc33 | ||
|
|
f5c930968e | ||
|
|
5264a8c7f6 | ||
|
|
6c4b7f1479 | ||
|
|
c42c9f0002 | ||
|
|
95f299f865 | ||
|
|
09749e2c7f | ||
|
|
dc33784a76 | ||
|
|
961df1fc44 | ||
|
|
e93c1ccb73 | ||
|
|
286ad0c478 | ||
|
|
e30970ff90 | ||
|
|
14e0e4a072 | ||
|
|
60da0a15e6 | ||
|
|
0f84510e6f | ||
|
|
1dd3488973 | ||
|
|
12e5306947 | ||
|
|
9249d6c2f9 | ||
|
|
d0f07ee3a9 | ||
|
|
3992fba168 | ||
|
|
4601ac8b0e | ||
|
|
a81b0db2a8 | ||
|
|
d88751bb8b | ||
|
|
f13dfc19a0 | ||
|
|
0fccf5e50d | ||
|
|
a2aab28ba6 | ||
|
|
8e7b7caf04 | ||
|
|
8cc5ff0e70 | ||
|
|
9086f09fe2 | ||
|
|
5a6eecd694 | ||
|
|
efe9f1b442 | ||
|
|
db7919dc2f | ||
|
|
4a01644625 | ||
|
|
1ca68140f6 | ||
|
|
071177cee2 | ||
|
|
c88742fad3 | ||
|
|
791a0fd01e | ||
|
|
3b12b9d81d | ||
|
|
31e4009737 | ||
|
|
8746914f3b | ||
|
|
2fa6839ac7 | ||
|
|
b09e08c06f | ||
|
|
659f5ad301 | ||
|
|
6fe7f01a8d | ||
|
|
99f51998f2 | ||
|
|
4c13992f5d | ||
|
|
396f38598f | ||
|
|
b6e24cbd45 | ||
|
|
d2848b9c26 | ||
|
|
227ed8ae07 | ||
|
|
b622981b23 | ||
|
|
36e14cfc69 | ||
|
|
668de9bf31 | ||
|
|
3f712dce02 | ||
|
|
2eaeaf33fa | ||
|
|
8e21d612d8 | ||
|
|
398bca9fe4 | ||
|
|
07e60b9161 | ||
|
|
46d5d22f72 | ||
|
|
97c221d860 | ||
|
|
a5d29e6d56 | ||
|
|
4662f59577 | ||
|
|
131cf63d8d | ||
|
|
4d85f1daec | ||
|
|
f913cd97ee | ||
|
|
ccbeb86140 | ||
|
|
b43e0f5ebd | ||
|
|
b3c82fd7b6 | ||
|
|
15a60bb359 | ||
|
|
fe574dbbf9 | ||
|
|
7595c7e697 | ||
|
|
bd6769a3fd | ||
|
|
dc2a919e75 | ||
|
|
c20fc24f4d | ||
|
|
5f8af4527e | ||
|
|
80f3c7584b | ||
|
|
05624e3fc8 | ||
|
|
e381143a8f | ||
|
|
b03209ccef | ||
|
|
ec03ebd69f | ||
|
|
ff68caac24 | ||
|
|
51c617801d | ||
|
|
e53290088f | ||
|
|
4f7c062f3f | ||
|
|
8507aba9f8 | ||
|
|
d8b6e00fe7 | ||
|
|
c8167b77c9 | ||
|
|
c37792f58f | ||
|
|
842e5ba5e0 | ||
|
|
10d28292c6 | ||
|
|
506cc3908a | ||
|
|
ca00b02b0a | ||
|
|
201075827f | ||
|
|
961623d388 | ||
|
|
a98ab6f51d | ||
|
|
5c7fd24ea8 | ||
|
|
76ac628153 | ||
|
|
6f71bd9353 | ||
|
|
f88398e776 | ||
|
|
ed315f54e3 | ||
|
|
08c33cd1dc | ||
|
|
0464947610 | ||
|
|
1929040bb7 | ||
|
|
3af936c8a1 | ||
|
|
3bd48c1b3f | ||
|
|
298ca552c8 | ||
|
|
5dcc6a16ee | ||
|
|
318b858ce6 | ||
|
|
6c09764b35 | ||
|
|
96501322fa | ||
|
|
b1e9a74cc2 | ||
|
|
f38aa698eb | ||
|
|
366f3f68b8 | ||
|
|
276dd50650 | ||
|
|
defd6180c6 | ||
|
|
03e23da6a3 | ||
|
|
2ddaf5a06a | ||
|
|
5e1aa7d383 | ||
|
|
e1871eb325 | ||
|
|
66fc8e9e27 | ||
|
|
3259cf59f5 | ||
|
|
c6442f67c1 | ||
|
|
1998b602b9 | ||
|
|
193fca4a8b | ||
|
|
9659d0bdc7 | ||
|
|
ccf4298c81 | ||
|
|
0b461e2275 | ||
|
|
4f4ae5861a | ||
|
|
fedf368c7a | ||
|
|
c5f78fab51 | ||
|
|
56a907128a | ||
|
|
fb77cd5f7e | ||
|
|
99d674c346 | ||
|
|
9690ca0198 | ||
|
|
9351c7485f | ||
|
|
d43b82dc82 | ||
|
|
ce195bd599 | ||
|
|
c0c8a22fa3 | ||
|
|
93717c95fb | ||
|
|
a955defae5 | ||
|
|
9579102541 | ||
|
|
2423aa592f | ||
|
|
151228b2a6 | ||
|
|
025d74bbcd | ||
|
|
7626478165 | ||
|
|
3dea1eb173 | ||
|
|
bd4f68233f | ||
|
|
d6bdbf9f34 | ||
|
|
2ccfb8671e | ||
|
|
04bb67ef45 | ||
|
|
4b67429234 | ||
|
|
23e248b5d1 | ||
|
|
40dbc78407 | ||
|
|
b159018f51 |
@@ -102,6 +102,11 @@ if(TOKEN_AUTH_ONLY)
|
||||
add_definitions(-DTOKEN_AUTH_ONLY=1)
|
||||
endif()
|
||||
|
||||
option(NO_MSG_HANDLER "Don't redirect QDebug outputs to the log window/file" OFF)
|
||||
if(NO_MSG_HANDLER)
|
||||
add_definitions(-DNO_MSG_HANDLER=1)
|
||||
endif()
|
||||
|
||||
# this option creates only libocsync and libowncloudsync
|
||||
option(BUILD_LIBRARIES_ONLY "BUILD_LIBRARIES_ONLY" OFF)
|
||||
|
||||
@@ -160,13 +165,13 @@ endif()
|
||||
find_package(Sphinx)
|
||||
find_package(PdfLatex)
|
||||
|
||||
|
||||
find_package(SQLite3 3.8.0 REQUIRED)
|
||||
# On some OS, we want to use our own, not the system sqlite
|
||||
if (USE_OUR_OWN_SQLITE3)
|
||||
include_directories(BEFORE ${SQLITE3_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
find_package(ZLIB)
|
||||
|
||||
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
|
||||
132
ChangeLog
@@ -1,11 +1,129 @@
|
||||
ChangeLog
|
||||
=========
|
||||
version 1.8.3 (release 2015-06-23)
|
||||
* Fix a bug in the Windows Installer that could crash explorer (#3320)
|
||||
* Reduce 'Connection closed' errors (#3318, #3313, #3298)
|
||||
* Ignores: Force a remote discovery after ignore list change (#3172)
|
||||
* Shibboleth: Avoid crash by letting the webview use its own QNAM (#3359)
|
||||
|
||||
ChangeLog
|
||||
=========
|
||||
version 1.8.2 (release 2015-06-08)
|
||||
* Improve reporting of server error messages (#3220)
|
||||
* Discovery: Ignore folders with any 503 (#3113)
|
||||
* Wizard: Show server error message if possible (#3220)
|
||||
* QNAM: Fix handling of mitm cert changes (#3283)
|
||||
* Win32: Installer translations added (#3277)
|
||||
* Win32: Allow concurrent OEM (un-)installers (#3272)
|
||||
* Win32: Make Setup/Update Mutex theme-unique (#3272)
|
||||
* HTTP: Add the branding name to the UserAgent string
|
||||
* ConnectonValidator: Always run with new credentials (#3266)
|
||||
* Recall Feature: Admins can trigger an upload of a file from
|
||||
client to server again (#3246)
|
||||
* Propagator: Add 'Content-Length: 0' header to MKCOL request (#3256)
|
||||
* Switch on checksum verification through branding or config
|
||||
* Add ability for checksum verification of up and download
|
||||
* Fix opening external links for some labels (#3135)
|
||||
* AccountState: Run only a single validator, allow error message
|
||||
overriding (#3236, #3153)
|
||||
* SyncJournalDB: Minor fixes and simplificatons
|
||||
* SyncEngine: Force re-read of folder Etags for upgrades from
|
||||
1.8.0 and 1.8.1
|
||||
* Propagator: Limit length of temporary file name (#2789)
|
||||
* ShareDialog: Password ui fixes (#3189)
|
||||
* Fix startup hang by removing QSettings lock file (#3175)
|
||||
* Wizard: Allow SSL cert dialog to show twice (#3168)
|
||||
* ProtocolWidget: Fix rename message (#3210)
|
||||
* Discovery: Test better, treat invalid hrefs as error (#3176)
|
||||
* Propagator: Overwrite local data only if unchanged (#3156)
|
||||
* ShareDialog: Improve error reporting for share API fails
|
||||
* OSX Updater: Only allow updates only if in /Applications (#2931)
|
||||
* Wizard: Fix lock icon (#1447)
|
||||
* Fix compilation with GCC 5
|
||||
* Treat any 503 error as temporary (#3113)
|
||||
* Work around for the Qt PUT corruption bug (#2425)
|
||||
* OSX Shell integration: Optimizations
|
||||
* Windows Shell integration: Optimizations
|
||||
.. more than 250 commits since 1.8.1
|
||||
|
||||
version 1.8.1 (release 2015-05-07)
|
||||
* Make "operation canceled" error a soft error
|
||||
* Do not throw an error for files that are scheduled to be removed,
|
||||
but can not be found on the server. #2919
|
||||
* Windows: Reset QNAM to proper function after hibernation. #2899 #2895 #2973
|
||||
* Fix argument verification of --confdir #2453
|
||||
* Fix a crash when accessing a dangling UploadDevice pointer #2984
|
||||
* Add-folder wizard: Make sure there is a scrollbar if folder names
|
||||
are too long #2962
|
||||
* Add-folder Wizard: Select the newly created folder
|
||||
* Activity: Correctly restore column sizes #3005
|
||||
* SSL Button: do not crash on empty certificate chain
|
||||
* SSL Button: Make menu creation lazy #3007 #2990
|
||||
* Lookup system proxy async to avoid hangs #2993 #2802
|
||||
* ShareDialog: Some GUI refinements
|
||||
* ShareDialog: On creation of a share always retrieve the share
|
||||
This makes sure that if a default expiration date is set this is reflected
|
||||
in the dialog. #2889
|
||||
* ShareDialog: Only show share dialog if we are connected.
|
||||
* HttpCreds: Fill pw dialog with previous password. #2848 #2879
|
||||
* HttpCreds: Delete password from old location. #2186
|
||||
* Do not store Session Cookies in the client cookie storage
|
||||
* CookieJar: Don't accidentally overwrite cookies. #2808
|
||||
* ProtocolWidget: Always add seconds to the DateTime locale. #2535
|
||||
* Updater: Give context as to which app is about to be updated #3040
|
||||
* Windows: Add version information for owncloud.exe. This should help us know
|
||||
what version or build number a crash report was generated with.
|
||||
* Fix a crash on shutdown in ~SocketApi #3057
|
||||
* SyncEngine: Show more timing measurements #3064
|
||||
* Discovery: Add warning if returned etag is 0
|
||||
* Fix a crash caused by an invalid DiscoveryDirectoryResult::iterator #3051
|
||||
* Sync: Fix sync of deletions during 503. #2894
|
||||
* Handle redirect of auth request. #3082
|
||||
* Discovery: Fix parsing of broken XML replies, which fixes local file disappearing #3102
|
||||
* Migration: Silently restore files that were deleted locally by bug #3102
|
||||
* Sort folder sizes SelectiveSyncTreeView numerically #3112
|
||||
* Sync: PropagateDownload: Read the mtime from the file system after writing it #3103
|
||||
* Sync: Propagate download: Fix restoring files for which the conflict file exists #3106
|
||||
* Use identical User Agents and version for csync and the Qt parts
|
||||
* Prevent another crash in ~SocketApi #3118
|
||||
* Windows: Fix rename of finished file. #3073
|
||||
* AccountWizard: Fix auth error handling. #3155
|
||||
* Documentation fixes
|
||||
* Infrastructure/build fixes
|
||||
* Win32/OS X: Apply patch from OpenSSL to handle oudated intermediates gracefully #3087
|
||||
|
||||
version 1.8.0 (release 2015-03-17)
|
||||
* Mac OS: HIDPI support
|
||||
* Support Sharing from desktop: Added a share dialog that can be
|
||||
opened by context menu in the file managers (Win, Mac, Nautilus)
|
||||
Supports public links with password enforcement
|
||||
* Enhanced usage of parallel HTTP requests for ownCloud 8 servers
|
||||
* Renamed github repository from mirall to client.
|
||||
* Mac OS: Use native notification support
|
||||
* Selective Sync: allow to enforce selective sync in brandings.
|
||||
* Added ability to build on Windows utilizing MingGW
|
||||
* SQLite database fixes if running on FAT filesystems
|
||||
* Improved detection of changing files to upload from local
|
||||
* Preparations for the multi-account feature
|
||||
* Fixed experience for Window manager without system tray
|
||||
* Build with Qt 5.4
|
||||
* Dropped libneon dependency if Qt 5.4 is available
|
||||
* Keep files open very short, that avoid lock problems on Windows
|
||||
especially with office software but also others.
|
||||
* Merged some NetBSD patches
|
||||
* Selective sync support for owncloudcmd
|
||||
* Reorganize the source repository
|
||||
* Prepared direct download
|
||||
* Added Crashreporter feature to be switched on on demand
|
||||
* A huge amount of bug fixes in all areas of the client.
|
||||
* almost 700 commits since 1.7.1
|
||||
|
||||
version 1.7.1 (release 2014-12-18)
|
||||
* Documentation fixes and updates
|
||||
* Nautilus Python plugin fixed for Python 3
|
||||
* GUI wording fixes plus improved log messages
|
||||
* Fix hidning of the database files in the sync directories
|
||||
* Compare http download size with the header value to avoid broken
|
||||
* Compare http download size with the header value to avoid broken
|
||||
downloads, bug #2528
|
||||
* Avoid initial ETag fetch job at startup, which is not needed.
|
||||
* Add chunk size http header to PUT requests
|
||||
@@ -135,7 +253,7 @@ version 1.6.0 (release 2014-05-30 )
|
||||
* Improve Cookie support (e.g. for cookie-based load-balancers)
|
||||
* Introduce a general timeout of 300s for network operations
|
||||
* Improve error handling, blacklisting
|
||||
* Job-based change propagation, enables faster parallel up/downloads
|
||||
* Job-based change propagation, enables faster parallel up/downloads
|
||||
(right now only if no bandwidth limit is set and no proxy is used)
|
||||
* Significantly reduced CPU load when checking for local and remote changes
|
||||
* Speed up file stat code on Windows
|
||||
@@ -148,7 +266,7 @@ version 1.6.0 (release 2014-05-30 )
|
||||
Qt 5.2 or later
|
||||
* Forward server exception messages to client error messages
|
||||
* Mac OS X: Support Notification Center in OS X 10.8+
|
||||
* Mac OS X: Use native settings dialog
|
||||
* Mac OS X: Use native settings dialog
|
||||
* Mac OS X: Fix UI inconsistencies on Mavericks
|
||||
* Shibboleth: Warn if authenticating with a different user
|
||||
* Remove vio abstraction in csync
|
||||
@@ -183,7 +301,7 @@ version 1.5.2 (release 2014-02-26 )
|
||||
* Shibboleth: Proper invalidation if timeout during sync
|
||||
* Shibboleth: Do not pop up IdP login immediately when modifying account
|
||||
* Shibboleth: Avoid auth on restart by storing cookies in the wallet
|
||||
* Fix license headers
|
||||
* Fix license headers
|
||||
|
||||
version 1.5.1 (release 2014-02-13 )
|
||||
* Added an auto updater that updates the client if a
|
||||
@@ -268,7 +386,7 @@ version 1.4.2 (release 2013-10-18 ), csync 0.90.4 required
|
||||
version 1.4.1 (release 2013-09-24 ), csync 0.90.1 required
|
||||
|
||||
* Translation and documentation fixes.
|
||||
* Fixed error display in settings/status dialog, displays multi
|
||||
* Fixed error display in settings/status dialog, displays multi
|
||||
line error messages now correctly.
|
||||
* Wait up to 30 secs before complaining about missing systray
|
||||
Fixes bug #949
|
||||
@@ -349,7 +467,7 @@ version 1.3.0 (release 2013-06-25 ), csync 0.80.0 required
|
||||
version 1.2.5 (release 2013-04-23 ), csync 0.70.7 required
|
||||
* [Fixes] NSIS installer fixes
|
||||
* [Fixes] Fix crash race by making certificateChain() thread safe
|
||||
* [Fixes] Build with older CMake versions (CentOS/RHEL 6)
|
||||
* [Fixes] Build with older CMake versions (CentOS/RHEL 6)
|
||||
* [Fixes] Wording in GUI
|
||||
* [Fixes] Silently ignore "installed = true" status.php
|
||||
* Set log verbosity before calling csync_init.
|
||||
@@ -359,7 +477,7 @@ version 1.2.5 (release 2013-04-23 ), csync 0.70.7 required
|
||||
version 1.2.4 (release 2013-04-11 ), csync 0.70.6 required
|
||||
* [Fixes] Clarify string in folder wizard
|
||||
* [Fixes] Fixed some valgrind warnings
|
||||
* [Fixes] Ensure that only one sync thread can ever run
|
||||
* [Fixes] Ensure that only one sync thread can ever run
|
||||
* [Fixes] Fix default config storage path
|
||||
* [Fixes] Skip folders with no absolute path
|
||||
* [Fixes] Allow setting the configuration directory on command line
|
||||
|
||||
@@ -14,5 +14,5 @@ set( MAC_INSTALLER_BACKGROUND_FILE "${CMAKE_SOURCE_DIR}/admin/osx/installer-back
|
||||
# set( APPLICATION_LICENSE "${OEM_THEME_DIR}/license.txt )
|
||||
|
||||
option( WITH_CRASHREPORTER "Build crashreporter" OFF )
|
||||
set( CRASHREPORTER_SUBMIT_URL "https://crash-reports.owncloud.org/submit" CACHE string "URL for crash repoter" )
|
||||
set( CRASHREPORTER_SUBMIT_URL "https://crash-reports.owncloud.com/submit" CACHE string "URL for crash repoter" )
|
||||
set( CRASHREPORTER_ICON ":/owncloud-icon.png" )
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
set( MIRALL_VERSION_MAJOR 1 )
|
||||
set( MIRALL_VERSION_MINOR 8 )
|
||||
set( MIRALL_VERSION_PATCH 0 )
|
||||
set( MIRALL_VERSION_PATCH 3 )
|
||||
set( MIRALL_SOVERSION 0 )
|
||||
|
||||
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
||||
set( MIRALL_VERSION_SUFFIX "beta1") #e.g. beta1, beta2, rc1
|
||||
set( MIRALL_VERSION_SUFFIX "") #e.g. beta1, beta2, rc1
|
||||
endif( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
||||
|
||||
if( NOT DEFINED MIRALL_VERSION_BUILD )
|
||||
|
||||
@@ -50,7 +50,7 @@ if [ ! -z "$identity" ]; then
|
||||
echo "Will try to sign the installer"
|
||||
pushd $install_path
|
||||
productsign --sign "$identity" "$installer_file" "$installer_file.new"
|
||||
mv "$installer_file".new $installer_file
|
||||
mv "$installer_file".new "$installer_file"
|
||||
popd
|
||||
else
|
||||
echo "No certificate given, will not sign the pkg"
|
||||
|
||||
75
admin/osx/gen_sym_files.py
Executable file
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import logging, os, re, subprocess, sys
|
||||
import os.path
|
||||
import pdb, pprint
|
||||
|
||||
if len(sys.argv) < 4:
|
||||
print("Usage:")
|
||||
print("\tgen_sym_files.py <path to breakpad's dump_syms> <path to owncloud.app> <symbol output dir>")
|
||||
print("")
|
||||
print("Symbols will be created in './symbols'")
|
||||
sys.exit(1)
|
||||
|
||||
dump_symsPath = sys.argv[1]
|
||||
bundlePath = sys.argv[2]
|
||||
outPath = sys.argv[3]
|
||||
macOsDir = os.path.join(bundlePath, 'Contents', 'MacOS')
|
||||
pluginsDir = os.path.join(bundlePath, 'Contents', 'PlugIns')
|
||||
|
||||
def resolvePath(input):
|
||||
resolved = re.sub(r'@\w+', macOsDir, input)
|
||||
return os.path.normpath(resolved)
|
||||
|
||||
def extractDeps(macho):
|
||||
deps = [macho]
|
||||
otool = subprocess.Popen(['otool', '-L', macho], stdout=subprocess.PIPE)
|
||||
for l in otool.communicate()[0].splitlines():
|
||||
m = re.search(r'@[^\s]+', l)
|
||||
if m:
|
||||
path = resolvePath(m.group(0))
|
||||
if not os.path.exists(path):
|
||||
logging.warning("Non-existant file found in dependencies, ignoring: [%s]", path)
|
||||
continue
|
||||
deps.append(path)
|
||||
return deps
|
||||
|
||||
def findDeps():
|
||||
deps = []
|
||||
for f in os.listdir(macOsDir):
|
||||
path = os.path.join(macOsDir, f)
|
||||
if not os.path.islink(path):
|
||||
deps += extractDeps(path)
|
||||
for root, dirs, files in os.walk(pluginsDir):
|
||||
for f in files:
|
||||
path = os.path.join(root, f)
|
||||
deps += extractDeps(path)
|
||||
return sorted(set(deps))
|
||||
|
||||
def dumpSyms(deps):
|
||||
for dep in deps:
|
||||
print("Generating symbols for [%s]" % dep)
|
||||
with open('temp.sym', 'w') as temp:
|
||||
subprocess.check_call([dump_symsPath, dep], stdout=temp)
|
||||
with open('temp.sym', 'r') as temp:
|
||||
header = temp.readline()
|
||||
fields = header.split()
|
||||
key, name = fields[3:5]
|
||||
destDir = '%s/%s/%s/' % (outPath, name, key)
|
||||
destPath = destDir + name + '.sym'
|
||||
if os.path.exists(destPath):
|
||||
logging.warning("Symbols already exist: [%s]", destPath)
|
||||
continue
|
||||
if not os.path.exists(destDir):
|
||||
os.makedirs(destDir)
|
||||
os.rename('temp.sym', destPath)
|
||||
|
||||
def strip(deps):
|
||||
for dep in deps:
|
||||
print("Stripping symbols off [%s]" % dep)
|
||||
subprocess.check_call(['strip', '-S', dep])
|
||||
|
||||
print('=== Generating symbols for [%s] in [%s]' % (bundlePath, outPath))
|
||||
deps = findDeps()
|
||||
dumpSyms(deps)
|
||||
strip(deps)
|
||||
@@ -260,12 +260,18 @@ def CopyFramework(path):
|
||||
commands.append(args)
|
||||
args = ['chmod', 'u+w', os.path.join(full_path, parts[-1])]
|
||||
commands.append(args)
|
||||
args = ['chmod', 'u+w', os.path.join(frameworks_dir, framework, "Resources")]
|
||||
resources_dir = os.path.join(frameworks_dir, framework, "Resources")
|
||||
|
||||
args = ['mkdir', resources_dir]
|
||||
commands.append(args)
|
||||
args = ['chmod', 'u+w', resources_dir]
|
||||
commands.append(args)
|
||||
|
||||
info_plist = os.path.join(os.path.split(path)[0], '..', '..', 'Contents', 'Info.plist')
|
||||
if not os.path.exists(info_plist):
|
||||
info_plist = os.path.join(os.path.split(path)[0], 'Resources', 'Info.plist')
|
||||
if os.path.exists(info_plist):
|
||||
args = ['cp', '-r', info_plist, os.path.join(frameworks_dir, framework, "Resources")]
|
||||
args = ['cp', '-r', info_plist, resources_dir]
|
||||
commands.append(args)
|
||||
return os.path.join(full_path, parts[-1])
|
||||
|
||||
|
||||
@@ -6,3 +6,4 @@ killall @APPLICATION_EXECUTABLE@
|
||||
# Unload the Finder plugin. see issue #2105
|
||||
killall Finder
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh -x
|
||||
#!/bin/sh -xe
|
||||
|
||||
[ "$#" -lt 2 ] && echo "Usage: sign_app.sh <app> <identity>" && exit
|
||||
|
||||
@@ -7,6 +7,6 @@ identity="$2"
|
||||
|
||||
codesign -s "$identity" --force --verbose=4 --deep "$src_app"
|
||||
|
||||
# Just for our debug purposes:
|
||||
# Verify the signature
|
||||
spctl -a -t exec -vv $src_app
|
||||
codesign -dv $src_app
|
||||
|
||||
19
admin/win/docker/build.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: $(basename $0) directory_relative_to_home [uid]"
|
||||
exit
|
||||
fi
|
||||
|
||||
useradd user -u ${2:-1000}
|
||||
su - user << EOF
|
||||
cd /home/user/$1
|
||||
rm -rf build-win32
|
||||
mkdir build-win32
|
||||
cd build-win32
|
||||
../admin/win/download_runtimes.sh
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../admin/win/Toolchain-mingw32-openSUSE.cmake -DWITH_CRASHREPORTER=ON
|
||||
make -j4
|
||||
make package
|
||||
ctest .
|
||||
EOF
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#VS2013
|
||||
base_url=http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3
|
||||
tmp_path=/tmp/.vcredist
|
||||
tmp_path=${1:-/tmp/.vcredist}
|
||||
|
||||
mkdir -p $tmp_path
|
||||
|
||||
|
||||
@@ -10,24 +10,25 @@ minimum_perc = 5
|
||||
|
||||
# simple one-to-one language mappings
|
||||
trans.ca = pofiles/ca.po
|
||||
trans.el = pofiles/el.po
|
||||
trans.es = pofiles/es.po
|
||||
trans.es_AR = pofiles/es_AR.po
|
||||
trans.eu = pofiles/eu.po
|
||||
trans.fa = pofiles/fa.po
|
||||
trans.fr = pofiles/fr.po
|
||||
trans.gl = pofiles/gl.po
|
||||
trans.it = pofiles/it.po
|
||||
trans.nl = pofiles/nl.po
|
||||
trans.pl = pofiles/pl.po
|
||||
trans.pt_BR = pofiles/pt_BR.po
|
||||
trans.ru = pofiles/ru.po
|
||||
trans.el = pofiles/el.po
|
||||
trans.es_AR = pofiles/es_AR.po
|
||||
trans.es = pofiles/es.po
|
||||
trans.eu = pofiles/eu.po
|
||||
trans.fa = pofiles/fa.po
|
||||
trans.fr = pofiles/fr.po
|
||||
trans.gl = pofiles/gl.po
|
||||
trans.it = pofiles/it.po
|
||||
trans.nb_NO = pofiles/nb_NO.po
|
||||
trans.nl = pofiles/nl.po
|
||||
trans.pl = pofiles/pl.po
|
||||
trans.pt_BR = pofiles/pt_BR.po
|
||||
trans.ru = pofiles/ru.po
|
||||
trans.sl = pofiles/sl.po
|
||||
trans.sv = pofiles/sv.po
|
||||
trans.tr = pofiles/tr.po
|
||||
trans.uk = pofiles/uk.po
|
||||
trans.zh_TW = pofiles/zh_TW.po
|
||||
trans.zh_CN = pofiles/zh_CN.po
|
||||
trans.uk = pofiles/uk.po
|
||||
trans.zh_CN = pofiles/zh_CN.po
|
||||
trans.zh_TW = pofiles/zh_TW.po
|
||||
|
||||
# special handling below
|
||||
|
||||
@@ -35,14 +36,13 @@ trans.zh_CN = pofiles/zh_CN.po
|
||||
trans.de_DE = pofiles/de.po
|
||||
|
||||
# choose one of the given translations on transifex as default
|
||||
trans.pt_PT = pofiles/pt.po
|
||||
trans.pt_PT = pofiles/pt.po
|
||||
|
||||
# choose a special language as more generic default
|
||||
trans.cs_CZ = pofiles/cs.po
|
||||
trans.et_EE = pofiles/et.po
|
||||
trans.fi_FI = pofiles/fi.po
|
||||
trans.ja_JP = pofiles/ja.po
|
||||
trans.hu_HU = pofiles/hu.po
|
||||
trans.sk_SK = pofiles/sk.po
|
||||
trans.th_TH = pofiles/th.po
|
||||
|
||||
trans.cs_CZ = pofiles/cs.po
|
||||
trans.et_EE = pofiles/et.po
|
||||
trans.fi_FI = pofiles/fi.po
|
||||
trans.hu_HU = pofiles/hu.po
|
||||
trans.ja_JP = pofiles/ja.po
|
||||
trans.sk_SK = pofiles/sk.po
|
||||
trans.th_TH = pofiles/th.po
|
||||
|
||||
@@ -15,6 +15,8 @@ StrCpy $PageReinstall_SAME_Field_3 "Desinstal.lar ${APPLICATION_NAME}"
|
||||
StrCpy $UNINSTALLER_APPDATA_TITLE "Desinstal.lar ${APPLICATION_NAME}"
|
||||
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Escolliu l'opció de manteniment per executar-ho."
|
||||
StrCpy $SEC_APPLICATION_DETAILS "Instal·lant ${APPLICATION_NAME} essencial."
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Integració per Windows Explorer"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Instal·lant integració per Windows Explorer"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Accés directe del programa al menú d'inici"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Afegint la drecera per ${APPLICATION_NAME} al menú d'inici."
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Drecera a l'escriptori"
|
||||
@@ -42,5 +44,3 @@ StrCpy $INIT_INSTALLER_RUNNING "L'instal·lador ja s'està executant."
|
||||
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Aquest desinstal·lador requereix accés d'administrador, intenteu-ho de nou."
|
||||
StrCpy $INIT_UNINSTALLER_RUNNING "El desinstal·lador ja s'està executant."
|
||||
StrCpy $SectionGroup_Shortcuts "Dreceres"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Integration for Windows Explorer"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing Integration for Windows Explorer"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Auto-generated - do not modify
|
||||
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Afficher les notes de version"
|
||||
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Le(s) processus en cours d’exécution ${APPLICATION_EXECUTABLE} doit (doivent) être stoppé(s) afin de poursuivre.$\nVoulez-vous que le programme d’installation s’en charge pour vous ?"
|
||||
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Les processus ${APPLICATION_EXECUTABLE} en cours d’exécution doivent être stoppés avant de poursuivre.$\nVoulez-vous que le programme d’installation s’en charge pour vous ?"
|
||||
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Fermeture des processus ${APPLICATION_EXECUTABLE}."
|
||||
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Le processus à stopper n'a pas été trouvé !"
|
||||
StrCpy $PageReinstall_NEW_Field_1 "Une ancienne version de ${APPLICATION_NAME} est installée sur votre système. Il est recommandé de désinstaller cette version avant de continuer. Sélectionnez l'opération que vous voulez exécuter et cliquez sur Suivant pour continuer."
|
||||
|
||||
@@ -3,7 +3,7 @@ StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Amosar as notas de publicaci
|
||||
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Atopáronse procesos ${APPLICATION_EXECUTABLE} que teñen que ser detidos.$\nQuere que sexa o instalador quen o(s) deteña?"
|
||||
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Matando os procesos ${APPLICATION_EXECUTABLE}."
|
||||
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Non se atopou o proceso para matalo!"
|
||||
StrCpy $PageReinstall_NEW_Field_1 "No seu sistema hai instalada unha versión anterior do ${APPLICATION_NAME}. Recomendámoslle que desinstale a versión actual antes de instalar. Seleccione a operación que quere realizar e prema en Seguinte para continuar."
|
||||
StrCpy $PageReinstall_NEW_Field_1 "No seu sistema hai instalada unha versión anterior de ${APPLICATION_NAME}. Recomendámoslle que desinstale a versión actual antes de instalar. Seleccione a operación que quere realizar e prema en Seguinte para continuar."
|
||||
StrCpy $PageReinstall_NEW_Field_2 "Desinstalar antes de instalar"
|
||||
StrCpy $PageReinstall_NEW_Field_3 "Non desinstalar"
|
||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Xa instalado"
|
||||
@@ -18,7 +18,7 @@ StrCpy $SEC_APPLICATION_DETAILS "Instalando ${APPLICATION_NAME} esenciais."
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Integración con Windows Explorer"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Instalando a integración con Windows Explorer"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Acceso directo ao programa no menú de inicio"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Engadindo o acceso directo ao ${APPLICATION_NAME} no menú de inicio"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Engadindo o acceso directo a ${APPLICATION_NAME} no menú de inicio"
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Acceso directo no escritorio"
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Creando os accesos directos no escritorio"
|
||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Acceso de inicio rápido"
|
||||
@@ -39,8 +39,8 @@ StrCpy $UNINSTALL_ABORT "A desinstalaci
|
||||
StrCpy $INIT_NO_QUICK_LAUNCH "Acceso de inicio rápido (n/d)"
|
||||
StrCpy $INIT_NO_DESKTOP "Atallo no escritorio (sobrescribe o existente)"
|
||||
StrCpy $UAC_ERROR_ELEVATE "Non foi posíbel elevalo, erro:"
|
||||
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Este instalador require acceso de administrador, tenteo de novo"
|
||||
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Este instalador require acceso de administrador, ténteo de novo"
|
||||
StrCpy $INIT_INSTALLER_RUNNING "O instalador xa está en execución."
|
||||
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Este desinstalador require acceso de administrador, tenteo de novo"
|
||||
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Este desinstalador require acceso de administrador, ténteo de novo"
|
||||
StrCpy $INIT_UNINSTALLER_RUNNING "O desinstalador xa está en execución."
|
||||
StrCpy $SectionGroup_Shortcuts "Atallos"
|
||||
|
||||
46
admin/win/nsi/l10n/Norwegian.nsh
Normal file
@@ -0,0 +1,46 @@
|
||||
# Auto-generated - do not modify
|
||||
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Vis versjonsmerknader"
|
||||
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Fant ${APPLICATION_EXECUTABLE}-prosess(er) som må stoppes.$\nVil du at installasjonsprogrammet skal stoppe dem for deg?"
|
||||
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Terminerer ${APPLICATION_EXECUTABLE}-prosesser."
|
||||
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Fant ikke prosess som skulle termineres!"
|
||||
StrCpy $PageReinstall_NEW_Field_1 "En eldre versjon av ${APPLICATION_NAME} er installert på systemet ditt. Det anbefales at du avnistallerer den versjonen før installering av ny versjon. Velg hva du vil gjøre og klikk Neste for å fortsette."
|
||||
StrCpy $PageReinstall_NEW_Field_2 "Avinstaller før installering"
|
||||
StrCpy $PageReinstall_NEW_Field_3 "Ikke avinstaller"
|
||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Allerede installert"
|
||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Velg hvordan du vil installere ${APPLICATION_NAME}."
|
||||
StrCpy $PageReinstall_OLD_Field_1 "En nyere versjon av ${APPLICATION_NAME} er allerede installert! Det anbefales ikke at du installerer en eldre versjon. Hvis du virkelig ønsker å installere denne eldre versjonen, er det bedre å avinstallere gjeldende versjon først. Velg hva du vil gjøre og klikk Neste for å fortsette."
|
||||
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} er allerede installert.\nVelg hva du vil gjøre og klikk Neste for å fortsette."
|
||||
StrCpy $PageReinstall_SAME_Field_2 "Legg til/installer komponenter på nytt"
|
||||
StrCpy $PageReinstall_SAME_Field_3 "Avinstaller ${APPLICATION_NAME}"
|
||||
StrCpy $UNINSTALLER_APPDATA_TITLE "Avinstaller ${APPLICATION_NAME}"
|
||||
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Velg hva slags vedlikehold som skal utføres."
|
||||
StrCpy $SEC_APPLICATION_DETAILS "Installerer ${APPLICATION_NAME} grunnleggende."
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Integrering med Windows Utforsker"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installerer integrering med Windows Utforsker"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Snarvei i Start-menyen"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Legger til snarvei for ${APPLICATION_NAME} i Start-menyen."
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Snarvei på skrivebordet"
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Oppretter snarveier på skrivebordet"
|
||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Snarvei i Hurtigstart"
|
||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Oppretter snarvei i Hurtigstart"
|
||||
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} grunnleggende."
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "${APPLICATION_NAME}-snarvei."
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Skrivebordssnarvei for ${APPLICATION_NAME}."
|
||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Hurtigstart-snarvei for ${APPLICATION_NAME}."
|
||||
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Fjern ${APPLICATION_NAME} sin datamappe fra datamaskinen."
|
||||
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Ønsker du å slette ${APPLICATION_NAME} sin datamappe?"
|
||||
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Ikke kryss av dersom du vil beholde datamappen for senere bruk. Kryss av for å slette mappen."
|
||||
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Ja, slett denne datamappen."
|
||||
StrCpy $UNINSTALLER_FILE_Detail "Skriver Avinstallasjonsprogram."
|
||||
StrCpy $UNINSTALLER_REGISTRY_Detail "Skriver registernøkler for installasjonsprogrammet"
|
||||
StrCpy $UNINSTALLER_FINISHED_Detail "Ferdig"
|
||||
StrCpy $UNINSTALL_MESSAGEBOX "Det ser ikke ut som ${APPLICATION_NAME} er installert i mappe '$INSTDIR'.$\n$\nFortsett likevel (ikke anbefalt)?"
|
||||
StrCpy $UNINSTALL_ABORT "Avinstallering avbrutt av bruker"
|
||||
StrCpy $INIT_NO_QUICK_LAUNCH "Hurtigstart-snarvei (I/T)"
|
||||
StrCpy $INIT_NO_DESKTOP "Snarvei på skrivebordet (skriver over eksisterende)"
|
||||
StrCpy $UAC_ERROR_ELEVATE "Klarte ikke å heve tilgangsnivå. Feil: "
|
||||
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Dette installasjonsprogrammet krever administrasjonstilgang. Prøv igjen"
|
||||
StrCpy $INIT_INSTALLER_RUNNING "Installasjonsprogrammet kjører allerede."
|
||||
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Avinstallasjonsprogrammet krever administrasjonstilgang. Prøv igjen"
|
||||
StrCpy $INIT_UNINSTALLER_RUNNING "Avinstallasjonsprogrammet kjører allerede."
|
||||
StrCpy $SectionGroup_Shortcuts "Snarveier"
|
||||
@@ -15,6 +15,8 @@ StrCpy $PageReinstall_SAME_Field_3 "卸载${APPLICATION_NAME}"
|
||||
StrCpy $UNINSTALLER_APPDATA_TITLE "卸载${APPLICATION_NAME}"
|
||||
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "选择需要执行的维护选项。"
|
||||
StrCpy $SEC_APPLICATION_DETAILS "安装${APPLICATION_NAME}基本组件。"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "整合到 Windows 资源管理器"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "正在整合到 Windows 资源管理器"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "开始菜单程序快捷方式"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "添加 ${APPLICATION_NAME} 快捷方式到开始菜单。"
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "桌面快捷方式"
|
||||
@@ -42,5 +44,3 @@ StrCpy $INIT_INSTALLER_RUNNING "安装程序已经运行。"
|
||||
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "卸载程序需要管理员权限,请重试"
|
||||
StrCpy $INIT_UNINSTALLER_RUNNING "卸载程序已经运行。"
|
||||
StrCpy $SectionGroup_Shortcuts "快捷方式"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Integration for Windows Explorer"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing Integration for Windows Explorer"
|
||||
|
||||
@@ -15,6 +15,8 @@ StrCpy $PageReinstall_SAME_Field_3 "Odstrani ${APPLICATION_NAME}"
|
||||
StrCpy $UNINSTALLER_APPDATA_TITLE "Odstrani ${APPLICATION_NAME}"
|
||||
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Izberite možnost vzdrževanja za izvedbo."
|
||||
StrCpy $SEC_APPLICATION_DETAILS "Poteka nameščanje ključnih paketov programa ${APPLICATION_NAME}."
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Podpora programa Windows raziskovalca"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Nameščanje podpore za program Windows Raziskovalec"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Bližnjica programa v programskem meniju"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Poteka dodajanje bližnjice programa ${APPLICATION_NAME} v programski meni."
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Bližnica namizja"
|
||||
@@ -42,5 +44,3 @@ StrCpy $INIT_INSTALLER_RUNNING "Namestilnik je
|
||||
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Program za odstranjevanje namestitve zahteva skrbniška dovoljenja."
|
||||
StrCpy $INIT_UNINSTALLER_RUNNING "Program za odstranjevanje namestitve je že zagnan."
|
||||
StrCpy $SectionGroup_Shortcuts "Bližnjice"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Integration for Windows Explorer"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing Integration for Windows Explorer"
|
||||
|
||||
@@ -20,8 +20,8 @@ StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Instalando la integraci
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Acceso directo al programa Menú de Inicio"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Añadiendo accesos directos para ${APPLICATION_NAME} en el Menú de Inicio."
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Acceso directo de Escritorio"
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Creando Accesos Directos de Escritorio"
|
||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Acceso Directo al Lanzador Rápido"
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Creando accesos directos de escritorio"
|
||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Atajo de accceso rápido"
|
||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Creando un Acceso Directo al Lanzador Rápido"
|
||||
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} esencial."
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "Acceso Directo de ${APPLICATION_NAME}"
|
||||
@@ -36,7 +36,7 @@ StrCpy $UNINSTALLER_REGISTRY_Detail "Escribiendo claves en el registro del insta
|
||||
StrCpy $UNINSTALLER_FINISHED_Detail "Terminado"
|
||||
StrCpy $UNINSTALL_MESSAGEBOX "Parece que ${APPLICATION_NAME} no está instalado en el directorio '$INSTDIR'.$$ ¿Continuar de todos modos? (No Recomendado)"
|
||||
StrCpy $UNINSTALL_ABORT "Desinstalación cancelada por el usuario"
|
||||
StrCpy $INIT_NO_QUICK_LAUNCH "Acceso Directo al Lanzador Rápido (N/A)"
|
||||
StrCpy $INIT_NO_QUICK_LAUNCH "Atajo de inicio rápido (N/A)"
|
||||
StrCpy $INIT_NO_DESKTOP "Atajo de escritorio (sobreescribe el existente)"
|
||||
StrCpy $UAC_ERROR_ELEVATE "No se ha podido elevar, error:"
|
||||
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "El instalador requiere acceso administrativo, inténtelo de nuevo"
|
||||
|
||||
46
admin/win/nsi/l10n/Thai.nsh
Normal file
@@ -0,0 +1,46 @@
|
||||
# Auto-generated - do not modify
|
||||
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "แสดงบันทึกประจำรุ่น"
|
||||
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "พบว่ากระบวนการ ${APPLICATION_EXECUTABLE} จะต้องหยุดทำงาน\nคุณต้องการติดตั้งเพื่อหยุดการทำงานเหล่านี้ของคุณ?"
|
||||
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "ฆ่ากระบวนการทำงาน ${APPLICATION_EXECUTABLE}"
|
||||
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "ไม่พบการฆ่ากระบวนการ!"
|
||||
StrCpy $PageReinstall_NEW_Field_1 "รุ่นเก่าของ ${APPLICATION_NAME} มีการติดตั้งในระบบของคุณ ขอแนะนำให้คุณถอนการติดตั้งรุ่นปัจจุบันออกก่อน เลือกการดำเนินการที่คุณต้องการที่จะดำเนินการและคลิกถัดไปเพื่อดำเนินการต่อ"
|
||||
StrCpy $PageReinstall_NEW_Field_2 "ถอนการติดตั้งก่อนการติดตั้ง"
|
||||
StrCpy $PageReinstall_NEW_Field_3 "อย่าถอนการติดตั้ง"
|
||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "ติดตั้งแล้ว"
|
||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "เลือกวิธีที่คุณต้องการติดตั้ง ${APPLICATION_NAME}"
|
||||
StrCpy $PageReinstall_OLD_Field_1 "รุ่นใหม่ของ ${APPLICATION_NAME} ถูกติดตั้งแล้ว! เราไม่แนะนำให้คุณติดตั้งรุ่นเก่า ถ้าคุณอยากจะติดตั้งรุ่นเก่าก็สามารถสอนการติดตั้งได้"
|
||||
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} ได้ถูกติดตั้งแล้ว เลือกการดำเนินการที่คุณต้องการที่จะดำเนินการและคลิกถัดไปเพื่อดำเนินการต่อ"
|
||||
StrCpy $PageReinstall_SAME_Field_2 "ส่วนประกอบ เพิ่ม/ติดตั้งใหม่ "
|
||||
StrCpy $PageReinstall_SAME_Field_3 "ถอนการติดตั้ง ${APPLICATION_NAME}"
|
||||
StrCpy $UNINSTALLER_APPDATA_TITLE "ถอนการติดตั้ง ${APPLICATION_NAME}"
|
||||
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "เลือกตัวเลือกการบำรุงรักษาเพื่อดำเนินการ"
|
||||
StrCpy $SEC_APPLICATION_DETAILS "กำลังติดตั้งข้อมูลที่เป็นเป็นของ ${APPLICATION_NAME}"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "บูรณาการสำหรับ Windows Explorer"
|
||||
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "บูรณาการกำลังติดตั้งสำหรับ Windows Explorer"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "โปรแกรมทางลัดเมนูเริ่มต้น"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "เพิ่มทางลัดสำหรับ ${APPLICATION_NAME} ที่เมนูเริ่มต้น"
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "ทางลัดพื้นโต๊ะ"
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "สร้างทางลัดบนเดสก์ทอป"
|
||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "ทางลัดเร่งด่วน"
|
||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "สร้างทางลัดเร่งด่วน"
|
||||
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} ที่จำเป็น"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "ทางลัด ${APPLICATION_NAME}"
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "ทางลัดบนเดสก์ทอปสำหรับ ${APPLICATION_NAME}"
|
||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "ทางลัดเร่งด่วนสำหรับ ${APPLICATION_NAME}"
|
||||
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "ลบ ${APPLICATION_NAME} ของโฟลเดอร์ข้อมูลจากคอมพิวเตอร์ของคุณ"
|
||||
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "คุณต้องการลบ ${APPLICATION_NAME} ของโฟลเดอร์ข้อมูล?"
|
||||
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "ปล่อยให้ตรวจสอบสำหรับใช้โฟลเดอร์ข้อมูลในภายหลังหรือตรวจสอบเพื่อลบโฟลเดอร์ข้อมูล"
|
||||
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "ใช่ลบโฟลเดอร์ข้อมูลนี้"
|
||||
StrCpy $UNINSTALLER_FILE_Detail "กำลังถอนการติดตั้ง"
|
||||
StrCpy $UNINSTALLER_REGISTRY_Detail "กำลังติดตั้งรหัสรีจิสทรี"
|
||||
StrCpy $UNINSTALLER_FINISHED_Detail "เสร็จสิ้น"
|
||||
StrCpy $UNINSTALL_MESSAGEBOX "มันจะไม่ปรากฏ ${APPLICATION_NAME} ที่มีการติดตั้งในไดเรกทอรี '$INSTDIR' ดำเนินการต่อไป (ไม่แนะนำ)?"
|
||||
StrCpy $UNINSTALL_ABORT "ถอนการติดตั้งถูกยกเลิกโดยผู้ใช้"
|
||||
StrCpy $INIT_NO_QUICK_LAUNCH "ทางลัดเร่งด่วน (N/A)"
|
||||
StrCpy $INIT_NO_DESKTOP "ทางลัดเดสก์ทอป (จะเขียนทับหากมีอยู่แล้ว)"
|
||||
StrCpy $UAC_ERROR_ELEVATE "ไม่สามารถที่จะยกระดับข้อผิดพลาด:"
|
||||
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "การติดตั้งนี้จะต้องมีการเข้าถึงผู้ดูแลระบบ กรุณาลองอีกครั้ง"
|
||||
StrCpy $INIT_INSTALLER_RUNNING "กำลังทำการติดตั้ง"
|
||||
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "การถอนการติดตั้งนี้จะต้องมีการเข้าถึงส่วนผู้ดูแลระบบ กรุณาลองอีกครั้ง"
|
||||
StrCpy $INIT_UNINSTALLER_RUNNING "กำลังทำการถอนการติดตั้ง"
|
||||
StrCpy $SectionGroup_Shortcuts "ทางลัด"
|
||||
@@ -67,7 +67,7 @@ localeToName = {
|
||||
"mg" : "Malagasy",
|
||||
"ms" : "Malay",
|
||||
"mn" : "Mongolian",
|
||||
"nb" : "Norwegian",
|
||||
"nb_NO" : "Norwegian",
|
||||
"nn" : "NorwegianNynorsk",
|
||||
"ps" : "Pashto",
|
||||
"pl" : "Polish",
|
||||
|
||||
@@ -44,5 +44,6 @@ iconv -t CP1252 -o Finnish.nsh Finnish.nsh
|
||||
iconv -t CP932 -o Japanese.nsh Japanese.nsh
|
||||
iconv -t CP1250 -o Slovak.nsh Slovak.nsh
|
||||
iconv -t CP1254 -o Turkish.nsh Turkish.nsh
|
||||
iconv -t CP1252 -o Norwegian.nsh Norwegian.nsh
|
||||
|
||||
|
||||
|
||||
@@ -8,13 +8,15 @@
|
||||
!insertmacro MUI_LANGUAGE "Hungarian"
|
||||
!insertmacro MUI_LANGUAGE "Ukrainian"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!insertmacro MUI_LANGUAGE "Catalan"
|
||||
!insertmacro MUI_LANGUAGE "Norwegian"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
!insertmacro MUI_LANGUAGE "Thai"
|
||||
!insertmacro MUI_LANGUAGE "Finnish"
|
||||
!insertmacro MUI_LANGUAGE "Basque"
|
||||
!insertmacro MUI_LANGUAGE "Greek"
|
||||
!insertmacro MUI_LANGUAGE "SimpChinese"
|
||||
!insertmacro MUI_LANGUAGE "PortugueseBR"
|
||||
!insertmacro MUI_LANGUAGE "Catalan"
|
||||
!insertmacro MUI_LANGUAGE "Italian"
|
||||
!insertmacro MUI_LANGUAGE "Portuguese"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;}
|
||||
{\f172\froman\fcharset238\fprq2 Times New Roman CE;}{\f173\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f175\froman\fcharset161\fprq2 Times New Roman Greek;}{\f176\froman\fcharset162\fprq2 Times New Roman Tur;}
|
||||
{\f177\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f178\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f179\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f180\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
|
||||
{\f562\fswiss\fcharset238\fprq2 Verdana CE;}{\f563\fswiss\fcharset204\fprq2 Verdana Cyr;}{\f565\fswiss\fcharset161\fprq2 Verdana Greek;}{\f566\fswiss\fcharset162\fprq2 Verdana Tur;}{\f569\fswiss\fcharset186\fprq2 Verdana Baltic;}
|
||||
{\f570\fswiss\fcharset163\fprq2 Verdana (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
|
||||
\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
|
||||
\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\*
|
||||
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
|
||||
\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{\*\cs15 \additive \ul\cf2 \sbasedon10 \styrsid7485074 Hyperlink;}}
|
||||
{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid6712196\rsid7485074\rsid11352300\rsid15940516}{\*\generator Microsoft Word 11.0.5604;}{\info{\title Processes v1}{\author Hardwired}{\operator Hardwired}{\creatim\yr2004\mo12\dy12\hr23\min42}
|
||||
{\revtim\yr2004\mo12\dy12\hr23\min51}{\version2}{\edmins9}{\nofpages1}{\nofwords80}{\nofchars458}{\nofcharsws537}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180
|
||||
\dgvspace180\dghorigin1800\dgvorigin1440\dghshow1\dgvshow1
|
||||
\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
|
||||
\asianbrkrule\rsidroot7485074\newtblstyruls\nogrowautofit \fet0\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}
|
||||
{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}
|
||||
{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain
|
||||
\qj \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid7485074 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f39\insrsid7485074\charrsid7485074 Processes v1.0}{\f39\insrsid7485074\charrsid7485074 .0.1
|
||||
\par }{\f39\fs20\insrsid7485074
|
||||
\par }\pard \qj \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid15940516 {\f39\fs20\insrsid15940516 This software binaries and source-code are free for any kind of use, including commercial use. }{
|
||||
\f39\fs20\insrsid7485074\charrsid7485074 There is no restriction and no guaranty for using}{\f39\fs20\insrsid7485074\charrsid7485074 t}{\f39\fs20\insrsid7485074\charrsid7485074 his software}{\f39\fs20\insrsid7485074\charrsid7485074 and/or it
|
||||
s source-code. }{\f39\fs20\insrsid15940516
|
||||
\par I}{\f39\fs20\insrsid7485074\charrsid7485074 f you use the plug}{\f39\fs20\insrsid7485074\charrsid7485074 -}{\f39\fs20\insrsid7485074\charrsid7485074 in }{\f39\fs20\insrsid7485074\charrsid7485074 and/}{\f39\fs20\insrsid7485074\charrsid7485074 or it}{
|
||||
\f39\fs20\insrsid7485074\charrsid7485074 s}{\f39\fs20\insrsid7485074\charrsid7485074 source-code, I would }{\f39\fs20\insrsid7485074\charrsid7485074 appreciate }{\f39\fs20\insrsid7485074\charrsid7485074 if my name is mentioned.}{
|
||||
\f39\fs20\insrsid7485074\charrsid7485074
|
||||
\par }\pard \qj \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid7485074 {\f39\fs20\insrsid7485074\charrsid7485074
|
||||
\par }{\b\f39\fs20\insrsid7485074\charrsid7485074 Andrei Ciubotaru [Hardwired]
|
||||
\par }{\f39\fs20\insrsid7485074\charrsid7485074 Lead Developer ICode&Ideas SRL (}{\field\flddirty{\*\fldinst {\f39\fs20\insrsid7485074\charrsid7485074 HYPERLINK "http://www.icode.ro/" }{\f39\fs20\insrsid7485074\charrsid7485074 {\*\datafield
|
||||
00d0c9ea79f9bace118c8200aa004ba90b02000000170000001500000068007400740070003a002f002f007700770077002e00690063006f00640065002e0072006f002f000000e0c9ea79f9bace118c8200aa004ba90b2a00000068007400740070003a002f002f007700770077002e00690063006f00640065002e007200
|
||||
6f002f000000}}}{\fldrslt {\cs15\f39\fs20\ul\cf2\insrsid7485074\charrsid7485074 http://www.icode.ro/}}}{\f39\fs20\insrsid7485074\charrsid7485074 )
|
||||
\par }{\field{\*\fldinst {\f39\fs20\insrsid7485074 HYPERLINK "hardwiredteks@gmail.com" }{\f39\fs20\insrsid15940516\charrsid7485074 {\*\datafield
|
||||
00d0c9ea79f9bace118c8200aa004ba90b02000000010000000303000000000000c00000000000004600001800000068617264776972656474656b7340676d61696c2e636f6d00ffffadde000000000000000000000000000000000000000000000000}}}{\fldrslt {
|
||||
\cs15\f39\fs20\ul\cf2\insrsid7485074\charrsid7485074 hardwiredteks@gmail.com}}}{\f39\fs20\insrsid7485074\charrsid7485074 , }{\field{\*\fldinst {\f39\fs20\insrsid7485074 HYPERLINK "hardwired@icode.ro" }{\f39\fs20\insrsid15940516\charrsid7485074
|
||||
{\*\datafield 00d0c9ea79f9bace118c8200aa004ba90b02000000010000000303000000000000c0000000000000460000130000006861726477697265644069636f64652e726f00ffffadde000000000000000000000000000000000000000000000000}}}{\fldrslt {
|
||||
\cs15\f39\fs20\ul\cf2\insrsid7485074\charrsid7485074 hardwired@icode.ro}}}{\f39\fs20\insrsid7485074\charrsid7485074
|
||||
\par }}
|
||||
@@ -1,122 +0,0 @@
|
||||
----------------------------------------------------------------
|
||||
----------------------------------------------------------------
|
||||
Processes (Processes.dll)
|
||||
Version: 1.0.1.0
|
||||
Release: 24.february.2005
|
||||
Description: Nullsoft Installer (NSIS) plug-in for managing?!
|
||||
Windows processes.
|
||||
|
||||
Copyright: © 2004-2005 Hardwired. No rights reserved.
|
||||
There is no restriction and no guaranty for using
|
||||
this software.
|
||||
|
||||
Author: Andrei Ciubotaru [Hardwired]
|
||||
Lead Developer ICode&Ideas SRL (http://www.icode.ro/)
|
||||
hardwiredteks@gmail.com, hardwired@icode.ro
|
||||
|
||||
----------------------------------------------------------------
|
||||
----------------------------------------------------------------
|
||||
INTRODUCTION
|
||||
|
||||
The Need For Plug-in - I need it for the one of my installers.
|
||||
|
||||
Briefly: Use it when you need to find\kill a process when
|
||||
installing\uninstalling some application. Also, use it when you
|
||||
need to test the presence of a device driver.
|
||||
|
||||
|
||||
SUPPORT
|
||||
|
||||
Supported platforms are: WinNT,Win2K,WinXP and Win2003 Server.
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
Processes::FindProcess <process_name> ;without ".exe"
|
||||
|
||||
Searches the currently running processes for the given
|
||||
process name.
|
||||
|
||||
return: 1 - the process was found
|
||||
0 - the process was not found
|
||||
|
||||
Processes::KillProcess <process_name> ; without ".exe"
|
||||
|
||||
Searches the currently running processes for the given
|
||||
process name. If the process is found then the it gets
|
||||
killed.
|
||||
|
||||
return: 1 - the process was found and killed
|
||||
0 - the process was not found or the process
|
||||
cannot be killed (insuficient rights)
|
||||
|
||||
Processes::FindDevice <device_base_name>
|
||||
|
||||
Searches the installed devices drivers for the given
|
||||
device base name.
|
||||
(important: I said BASE NAME not FILENAME)
|
||||
|
||||
return: 1 - the device driver was found
|
||||
0 - the device driver was not found
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
First of all, does not matter where you use it. Ofcourse, the
|
||||
routines must be called inside of a Section/Function scope.
|
||||
|
||||
Processes::FindProcess "process_name"
|
||||
Pop $R0
|
||||
|
||||
StrCmp $R0 "1" make_my_day noooooo
|
||||
|
||||
make_my_day:
|
||||
...
|
||||
|
||||
noooooo:
|
||||
...
|
||||
|
||||
|
||||
Processes::KillProcess "process_name"
|
||||
Pop $R0
|
||||
|
||||
StrCmp $R0 "1" dead_meat why_wont_you_die
|
||||
|
||||
dead_meat:
|
||||
...
|
||||
|
||||
why_wont_you_die:
|
||||
...
|
||||
|
||||
|
||||
Processes::FindDevice "device_base_name"
|
||||
Pop $R0
|
||||
|
||||
StrCmp $R0 "1" blabla more_blabla
|
||||
|
||||
blabla:
|
||||
...
|
||||
|
||||
more_blabla:
|
||||
...
|
||||
|
||||
|
||||
THANKS
|
||||
|
||||
Sunil Kamath for inspiring me. I wanted to use its FindProcDLL
|
||||
but my requirements made it imposible.
|
||||
|
||||
Nullsoft for creating this very powerfull installer. One big,
|
||||
free and full-featured (hmmm... and guiless for the moment) mean
|
||||
install machine!:)
|
||||
|
||||
ME for being such a great coder...
|
||||
... HAHAHAHAHAHAHA!
|
||||
|
||||
ONE MORE THING
|
||||
|
||||
If you use the plugin or it's source-code, I would apreciate
|
||||
if my name is mentioned.
|
||||
|
||||
----------------------------------------------------------------
|
||||
----------------------------------------------------------------
|
||||
@@ -1,8 +0,0 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// KillProcDLL.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
||||
@@ -1,34 +0,0 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__780690DC_E128_403D_BC07_780D1B2CC101__INCLUDED_)
|
||||
#define AFX_STDAFX_H__780690DC_E128_403D_BC07_780D1B2CC101__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <string> // String management...
|
||||
|
||||
//From exam28.cpp
|
||||
#include <tlhelp32.h>
|
||||
//#include <iostream.h>
|
||||
|
||||
#ifdef BORLANDC
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
//To make it a NSIS Plug-In
|
||||
#include "exdll.h"
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__780690DC_E128_403D_BC07_780D1B2CC101__INCLUDED_)
|
||||
@@ -1,37 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include "exdll.h"
|
||||
|
||||
HINSTANCE g_hInstance;
|
||||
|
||||
HWND g_hwndParent;
|
||||
|
||||
void __declspec(dllexport) myFunction(HWND hwndParent, int string_size,
|
||||
char *variables, stack_t **stacktop)
|
||||
{
|
||||
g_hwndParent=hwndParent;
|
||||
|
||||
EXDLL_INIT();
|
||||
|
||||
|
||||
// note if you want parameters from the stack, pop them off in order.
|
||||
// i.e. if you are called via exdll::myFunction file.dat poop.dat
|
||||
// calling popstring() the first time would give you file.dat,
|
||||
// and the second time would give you poop.dat.
|
||||
// you should empty the stack of your parameters, and ONLY your
|
||||
// parameters.
|
||||
|
||||
// do your stuff here
|
||||
{
|
||||
char buf[1024];
|
||||
wsprintf(buf,"$0=%s\n",getuservariable(INST_0));
|
||||
MessageBox(g_hwndParent,buf,0,MB_OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOL WINAPI _DllMainCRTStartup(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
|
||||
{
|
||||
g_hInstance=hInst;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1,136 +0,0 @@
|
||||
#ifndef _EXDLL_H_
|
||||
#define _EXDLL_H_
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// only include this file from one place in your DLL.
|
||||
// (it is all static, if you use it in two places it will fail)
|
||||
//
|
||||
#define EXDLL_INIT() { \
|
||||
g_stringsize = string_size; \
|
||||
g_stacktop = stacktop; \
|
||||
g_variables = variables; }
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// For page showing plug-ins
|
||||
//
|
||||
#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8)
|
||||
#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd)
|
||||
#define NOTIFY_BYE_BYE 'x'
|
||||
|
||||
typedef struct _stack_t
|
||||
{
|
||||
struct _stack_t *next;
|
||||
char text[1]; // this should be the length of string_size
|
||||
} stack_t;
|
||||
|
||||
|
||||
static unsigned int g_stringsize;
|
||||
static stack_t **g_stacktop;
|
||||
static char *g_variables;
|
||||
|
||||
enum
|
||||
{
|
||||
INST_0, // $0
|
||||
INST_1, // $1
|
||||
INST_2, // $2
|
||||
INST_3, // $3
|
||||
INST_4, // $4
|
||||
INST_5, // $5
|
||||
INST_6, // $6
|
||||
INST_7, // $7
|
||||
INST_8, // $8
|
||||
INST_9, // $9
|
||||
INST_R0, // $R0
|
||||
INST_R1, // $R1
|
||||
INST_R2, // $R2
|
||||
INST_R3, // $R3
|
||||
INST_R4, // $R4
|
||||
INST_R5, // $R5
|
||||
INST_R6, // $R6
|
||||
INST_R7, // $R7
|
||||
INST_R8, // $R8
|
||||
INST_R9, // $R9
|
||||
INST_CMDLINE, // $CMDLINE
|
||||
INST_INSTDIR, // $INSTDIR
|
||||
INST_OUTDIR, // $OUTDIR
|
||||
INST_EXEDIR, // $EXEDIR
|
||||
INST_LANG, // $LANGUAGE
|
||||
__INST_LAST
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// utility functions (not required but often useful)
|
||||
//
|
||||
static int popstring( char *str )
|
||||
{
|
||||
stack_t *th;
|
||||
|
||||
|
||||
if( !g_stacktop ||
|
||||
!*g_stacktop )
|
||||
return 1;
|
||||
|
||||
th = (*g_stacktop);
|
||||
lstrcpy( str, th->text );
|
||||
*g_stacktop = th->next;
|
||||
GlobalFree( (HGLOBAL)th );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void pushstring( char *str )
|
||||
{
|
||||
stack_t *th;
|
||||
|
||||
|
||||
if( !g_stacktop )
|
||||
return;
|
||||
|
||||
th = (stack_t*)GlobalAlloc( GPTR, sizeof(stack_t) + g_stringsize );
|
||||
lstrcpyn( th->text, str, g_stringsize );
|
||||
th->next = *g_stacktop;
|
||||
*g_stacktop = th;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static char *getuservariable( int varnum )
|
||||
{
|
||||
if( varnum < 0 ||
|
||||
varnum >= __INST_LAST )
|
||||
return NULL;
|
||||
|
||||
return (g_variables + varnum*g_stringsize);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void setuservariable( int varnum, char *var )
|
||||
{
|
||||
if( var != NULL &&
|
||||
varnum >= 0 &&
|
||||
varnum < __INST_LAST )
|
||||
lstrcpy( g_variables + varnum*g_stringsize, var );
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif//_EXDLL_H_
|
||||
@@ -1,411 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "processes.h"
|
||||
#include "string.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// global variables
|
||||
lpfEnumProcesses EnumProcesses;
|
||||
lpfEnumProcessModules EnumProcessModules;
|
||||
lpfGetModuleBaseName GetModuleBaseName;
|
||||
lpfEnumDeviceDrivers EnumDeviceDrivers;
|
||||
lpfGetDeviceDriverBaseName GetDeviceDriverBaseName;
|
||||
|
||||
HINSTANCE g_hInstance;
|
||||
HWND g_hwndParent;
|
||||
HINSTANCE g_hInstLib;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// main DLL entry
|
||||
BOOL WINAPI _DllMainCRTStartup( HANDLE hInst,
|
||||
ULONG ul_reason_for_call,
|
||||
LPVOID lpReserved )
|
||||
{
|
||||
g_hInstance = (struct HINSTANCE__ *)hInst;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// loads the psapi routines
|
||||
bool LoadPSAPIRoutines( void )
|
||||
{
|
||||
if( NULL == (g_hInstLib = LoadLibraryA( "PSAPI.DLL" )) )
|
||||
return false;
|
||||
|
||||
EnumProcesses = (lpfEnumProcesses) GetProcAddress( g_hInstLib, "EnumProcesses" );
|
||||
EnumProcessModules = (lpfEnumProcessModules) GetProcAddress( g_hInstLib, "EnumProcessModules" );
|
||||
GetModuleBaseName = (lpfGetModuleBaseName) GetProcAddress( g_hInstLib, "GetModuleBaseNameA" );
|
||||
EnumDeviceDrivers = (lpfEnumDeviceDrivers) GetProcAddress( g_hInstLib, "EnumDeviceDrivers" );
|
||||
GetDeviceDriverBaseName = (lpfGetDeviceDriverBaseName) GetProcAddress( g_hInstLib, "GetDeviceDriverBaseNameA" );
|
||||
|
||||
if( ( NULL == EnumProcesses ) ||
|
||||
( NULL == EnumProcessModules ) ||
|
||||
( NULL == EnumDeviceDrivers ) ||
|
||||
( NULL == GetModuleBaseName ) ||
|
||||
( NULL == GetDeviceDriverBaseName ) )
|
||||
{
|
||||
FreeLibrary( g_hInstLib );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// free the psapi routines
|
||||
bool FreePSAPIRoutines( void )
|
||||
{
|
||||
EnumProcesses = NULL;
|
||||
EnumProcessModules = NULL;
|
||||
GetModuleBaseName = NULL;
|
||||
EnumDeviceDrivers = NULL;
|
||||
|
||||
if( FALSE == FreeLibrary( g_hInstLib ) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// find a process by name
|
||||
// return value: true - process was found
|
||||
// false - process not found
|
||||
bool FindProc( char *szProcess )
|
||||
{
|
||||
char szProcessName[ 1024 ];
|
||||
char szCurrentProcessName[ 1024 ];
|
||||
DWORD dPID[ 1024 ];
|
||||
DWORD dPIDSize( 1024 );
|
||||
DWORD dSize( 1024 );
|
||||
HANDLE hProcess;
|
||||
HMODULE phModule[ 1024 ];
|
||||
|
||||
|
||||
//
|
||||
// make the name lower case
|
||||
//
|
||||
memset( szProcessName, 0, 1024*sizeof(char) );
|
||||
sprintf( szProcessName, "%s", szProcess );
|
||||
strlwr( szProcessName );
|
||||
|
||||
//
|
||||
// load PSAPI routines
|
||||
//
|
||||
if( false == LoadPSAPIRoutines() )
|
||||
return false;
|
||||
|
||||
//
|
||||
// enumerate processes names
|
||||
//
|
||||
if( FALSE == EnumProcesses( dPID, dSize, &dPIDSize ) )
|
||||
{
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// walk trough and compare see if the process is running
|
||||
//
|
||||
for( int k( dPIDSize / sizeof( DWORD ) ); k >= 0; k-- )
|
||||
{
|
||||
memset( szCurrentProcessName, 0, 1024*sizeof(char) );
|
||||
|
||||
if( NULL != ( hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, dPID[ k ] ) ) )
|
||||
{
|
||||
if( TRUE == EnumProcessModules( hProcess, phModule, sizeof(HMODULE)*1024, &dPIDSize ) )
|
||||
if( GetModuleBaseName( hProcess, phModule[ 0 ], szCurrentProcessName, 1024 ) > 0 )
|
||||
{
|
||||
strlwr( szCurrentProcessName );
|
||||
|
||||
if( NULL != strstr( szCurrentProcessName, szProcessName ) )
|
||||
{
|
||||
FreePSAPIRoutines();
|
||||
CloseHandle( hProcess );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
CloseHandle( hProcess );
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// free PSAPI routines
|
||||
//
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// kills a process by name
|
||||
// return value: true - process was found
|
||||
// false - process not found
|
||||
bool KillProc( char *szProcess )
|
||||
{
|
||||
char szProcessName[ 1024 ];
|
||||
char szCurrentProcessName[ 1024 ];
|
||||
DWORD dPID[ 1024 ];
|
||||
DWORD dPIDSize( 1024 );
|
||||
DWORD dSize( 1024 );
|
||||
HANDLE hProcess;
|
||||
HMODULE phModule[ 1024 ];
|
||||
|
||||
|
||||
//
|
||||
// make the name lower case
|
||||
//
|
||||
memset( szProcessName, 0, 1024*sizeof(char) );
|
||||
sprintf( szProcessName, "%s", szProcess );
|
||||
strlwr( szProcessName );
|
||||
|
||||
//
|
||||
// load PSAPI routines
|
||||
//
|
||||
if( false == LoadPSAPIRoutines() )
|
||||
return false;
|
||||
|
||||
//
|
||||
// enumerate processes names
|
||||
//
|
||||
if( FALSE == EnumProcesses( dPID, dSize, &dPIDSize ) )
|
||||
{
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// walk trough and compare see if the process is running
|
||||
//
|
||||
for( int k( dPIDSize / sizeof( DWORD ) ); k >= 0; k-- )
|
||||
{
|
||||
memset( szCurrentProcessName, 0, 1024*sizeof(char) );
|
||||
|
||||
if( NULL != ( hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, dPID[ k ] ) ) )
|
||||
{
|
||||
if( TRUE == EnumProcessModules( hProcess, phModule, sizeof(HMODULE)*1024, &dPIDSize ) )
|
||||
if( GetModuleBaseName( hProcess, phModule[ 0 ], szCurrentProcessName, 1024 ) > 0 )
|
||||
{
|
||||
strlwr( szCurrentProcessName );
|
||||
|
||||
if( NULL != strstr( szCurrentProcessName, szProcessName ) )
|
||||
{
|
||||
FreePSAPIRoutines();
|
||||
|
||||
//
|
||||
// kill process
|
||||
//
|
||||
if( false == TerminateProcess( hProcess, 0 ) )
|
||||
{
|
||||
CloseHandle( hProcess );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// refresh systray
|
||||
//
|
||||
UpdateWindow( FindWindow( NULL, "Shell_TrayWnd" ) );
|
||||
|
||||
//
|
||||
// refresh desktop window
|
||||
//
|
||||
UpdateWindow( GetDesktopWindow() );
|
||||
|
||||
CloseHandle( hProcess );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
CloseHandle( hProcess );
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// free PSAPI routines
|
||||
//
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
bool FindDev( char *szDriverName )
|
||||
{
|
||||
char szDeviceName[ 1024 ];
|
||||
char szCurrentDeviceName[ 1024 ];
|
||||
LPVOID lpDevices[ 1024 ];
|
||||
DWORD dDevicesSize( 1024 );
|
||||
DWORD dSize( 1024 );
|
||||
TCHAR tszCurrentDeviceName[ 1024 ];
|
||||
DWORD dNameSize( 1024 );
|
||||
|
||||
|
||||
//
|
||||
// make the name lower case
|
||||
//
|
||||
memset( szDeviceName, 0, 1024*sizeof(char) );
|
||||
sprintf( szDeviceName, "%s", strlwr( szDriverName ) );
|
||||
|
||||
//
|
||||
// load PSAPI routines
|
||||
//
|
||||
if( false == LoadPSAPIRoutines() )
|
||||
return false;
|
||||
|
||||
//
|
||||
// enumerate devices
|
||||
//
|
||||
if( FALSE == EnumDeviceDrivers( lpDevices, dSize, &dDevicesSize ) )
|
||||
{
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// walk trough and compare see if the device driver exists
|
||||
//
|
||||
for( int k( dDevicesSize / sizeof( LPVOID ) ); k >= 0; k-- )
|
||||
{
|
||||
memset( szCurrentDeviceName, 0, 1024*sizeof(char) );
|
||||
memset( tszCurrentDeviceName, 0, 1024*sizeof(TCHAR) );
|
||||
|
||||
if( 0 != GetDeviceDriverBaseName( lpDevices[ k ], tszCurrentDeviceName, dNameSize ) )
|
||||
{
|
||||
sprintf( szCurrentDeviceName, "%S", tszCurrentDeviceName );
|
||||
|
||||
if( 0 == strcmp( strlwr( szCurrentDeviceName ), szDeviceName ) )
|
||||
{
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// free PSAPI routines
|
||||
//
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
extern "C" __declspec(dllexport) void FindProcess( HWND hwndParent,
|
||||
int string_size,
|
||||
char *variables,
|
||||
stack_t **stacktop )
|
||||
{
|
||||
char szParameter[ 1024 ];
|
||||
|
||||
|
||||
g_hwndParent = hwndParent;
|
||||
|
||||
EXDLL_INIT();
|
||||
{
|
||||
popstring( szParameter );
|
||||
|
||||
if( true == FindProc( szParameter ) )
|
||||
wsprintf( szParameter, "1" );
|
||||
else
|
||||
wsprintf( szParameter, "0" );
|
||||
|
||||
setuservariable( INST_R0, szParameter );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
extern "C" __declspec(dllexport) void KillProcess( HWND hwndParent,
|
||||
int string_size,
|
||||
char *variables,
|
||||
stack_t **stacktop )
|
||||
{
|
||||
char szParameter[ 1024 ];
|
||||
|
||||
|
||||
g_hwndParent = hwndParent;
|
||||
|
||||
EXDLL_INIT();
|
||||
{
|
||||
popstring( szParameter );
|
||||
|
||||
if( true == KillProc( szParameter ) )
|
||||
wsprintf( szParameter, "1" );
|
||||
else
|
||||
wsprintf( szParameter, "0" );
|
||||
|
||||
setuservariable( INST_R0, szParameter );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
extern "C" __declspec(dllexport) void FindDevice( HWND hwndParent,
|
||||
int string_size,
|
||||
char *variables,
|
||||
stack_t **stacktop )
|
||||
{
|
||||
char szParameter[ 1024 ];
|
||||
|
||||
|
||||
g_hwndParent = hwndParent;
|
||||
|
||||
EXDLL_INIT();
|
||||
{
|
||||
popstring( szParameter );
|
||||
|
||||
if( true == FindDev( szParameter ) )
|
||||
wsprintf( szParameter, "1" );
|
||||
else
|
||||
wsprintf( szParameter, "0" );
|
||||
|
||||
setuservariable( INST_R0, szParameter );
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// PSAPI function pointers
|
||||
typedef BOOL (WINAPI *lpfEnumProcesses) ( DWORD *, DWORD, DWORD * );
|
||||
typedef BOOL (WINAPI *lpfEnumProcessModules) ( HANDLE, HMODULE *, DWORD, LPDWORD );
|
||||
typedef DWORD (WINAPI *lpfGetModuleBaseName) ( HANDLE, HMODULE, LPTSTR, DWORD );
|
||||
typedef BOOL (WINAPI *lpfEnumDeviceDrivers) ( LPVOID *, DWORD, LPDWORD );
|
||||
typedef BOOL (WINAPI *lpfGetDeviceDriverBaseName)( LPVOID, LPTSTR, DWORD );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// Internal use routines
|
||||
bool LoadPSAPIRoutines( void );
|
||||
bool FreePSAPIRoutines( void );
|
||||
|
||||
bool FindProc( char *szProcess );
|
||||
bool KillProc( char *szProcess );
|
||||
|
||||
bool FindDev( char *szDriverName );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// Exported routines
|
||||
extern "C" __declspec(dllexport) void FindProcess( HWND hwndParent,
|
||||
int string_size,
|
||||
char *variables,
|
||||
stack_t **stacktop );
|
||||
|
||||
extern "C" __declspec(dllexport) void KillProcess( HWND hwndParent,
|
||||
int string_size,
|
||||
char *variables,
|
||||
stack_t **stacktop );
|
||||
|
||||
extern "C" __declspec(dllexport) void FindDevice( HWND hwndParent,
|
||||
int string_size,
|
||||
char *variables,
|
||||
stack_t **stacktop );
|
||||
@@ -1,103 +0,0 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "NSIS Plug-in for Windows process management. Only WinNT, Win2K, WinXP and Win2003 Server supported."
|
||||
VALUE "CompanyName", "Andrei Ciubotaru [Hardwired]"
|
||||
VALUE "FileDescription", "Windows Processes Management"
|
||||
VALUE "FileVersion", "1, 0, 0, 1"
|
||||
VALUE "InternalName", "Processes"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2004 Hardwired. No rights reserved."
|
||||
VALUE "OriginalFilename", "Processes.dll"
|
||||
VALUE "ProductName", "Processes"
|
||||
VALUE "ProductVersion", "1, 0, 0, 1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "processes", "processes.vcproj", "{3438467F-A719-46DC-93E5-137A8B691727}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{3438467F-A719-46DC-93E5-137A8B691727}.Debug.ActiveCfg = Debug|Win32
|
||||
{3438467F-A719-46DC-93E5-137A8B691727}.Debug.Build.0 = Debug|Win32
|
||||
{3438467F-A719-46DC-93E5-137A8B691727}.Release.ActiveCfg = Release|Win32
|
||||
{3438467F-A719-46DC-93E5-137A8B691727}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,122 +0,0 @@
|
||||
----------------------------------------------------------------
|
||||
----------------------------------------------------------------
|
||||
Processes (Processes.dll)
|
||||
Version: 1.0.0.1
|
||||
Release: 12.december.2004
|
||||
Description:Nullsoft Installer (NSIS) plug-in for managing?!
|
||||
Windows processes.
|
||||
|
||||
Copyright: © 2004 Hardwired. No rights reserved.
|
||||
There is no restriction and no guaranty for using
|
||||
this software.
|
||||
|
||||
Author: Andrei Ciubotaru [Hardwired]
|
||||
Lead Developer ICode&Ideas SRL (http://www.icode.ro)
|
||||
hardwiredteks@gmail.com, hardwired@icode.ro
|
||||
|
||||
----------------------------------------------------------------
|
||||
----------------------------------------------------------------
|
||||
INTRODUCTION
|
||||
|
||||
The Need For Plug-in - I need it for the one of my installers.
|
||||
|
||||
Briefly: Use it when you need to find\kill a process when
|
||||
installing\uninstalling some application. Also, use it when you
|
||||
need to test the presence of a device driver.
|
||||
|
||||
|
||||
SUPPORT
|
||||
|
||||
Supported platforms are: WinNT,Win2K,WinXP and Win2003 Server.
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
Processes::FindProcess <process_name.exe>
|
||||
|
||||
Searches the currently running processes for the given
|
||||
process name.
|
||||
|
||||
return: 1 - the process was found
|
||||
0 - the process was not found
|
||||
|
||||
Processes::KillProcess <process_name.exe>
|
||||
|
||||
Searches the currently running processes for the given
|
||||
process name. If the process is found then the it gets
|
||||
killed.
|
||||
|
||||
return: 1 - the process was found and killed
|
||||
0 - the process was not found or the process
|
||||
cannot be killed (insuficient rights)
|
||||
|
||||
Processes::FindDevice <device_base_name>
|
||||
|
||||
Searches the installed devices drivers for the given
|
||||
device base name.
|
||||
(important: I said BASE NAME not FILENAME)
|
||||
|
||||
return: 1 - the device driver was found
|
||||
0 - the device driver was not found
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
First of all, does not matter where you use it. Ofcourse, the
|
||||
routines must be called inside of a Section/Function scope.
|
||||
|
||||
Processes::FindProcess "process_name.exe"
|
||||
Pop $R0
|
||||
|
||||
StrCmp $R0 "1" make_my_day noooooo
|
||||
|
||||
make_my_day:
|
||||
...
|
||||
|
||||
noooooo:
|
||||
...
|
||||
|
||||
|
||||
Processes::KillProcess "process_name.exe"
|
||||
Pop $R0
|
||||
|
||||
StrCmp $R0 "1" dead_meat why_wont_you_die
|
||||
|
||||
dead_meat:
|
||||
...
|
||||
|
||||
why_wont_you_die:
|
||||
...
|
||||
|
||||
|
||||
Processes::FindDevice "device_base_name"
|
||||
Pop $R0
|
||||
|
||||
StrCmp $R0 "1" blabla more_blabla
|
||||
|
||||
blabla:
|
||||
...
|
||||
|
||||
more_blabla:
|
||||
...
|
||||
|
||||
|
||||
THANKS
|
||||
|
||||
Sunil Kamath for inspiring me. I wanted to use its FindProcDLL
|
||||
but my requirements made it imposible.
|
||||
|
||||
Nullsoft for creating this very powerfull installer. One big,
|
||||
free and full-featured (hmmm... and guiless for the moment) mean
|
||||
install machine!:)
|
||||
|
||||
ME for being such a great coder...
|
||||
... HAHAHAHAHAHAHA!
|
||||
|
||||
ONE MORE THING
|
||||
|
||||
If you use the plugin or it's source-code, I would apreciate
|
||||
if my name is mentioned.
|
||||
|
||||
----------------------------------------------------------------
|
||||
----------------------------------------------------------------
|
||||
@@ -1,222 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="processes"
|
||||
SccProjectName="processes"
|
||||
SccLocalPath=".">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FINDPROCDLL_EXPORTS"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="3"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Debug/processes.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile=".\Debug/processes.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile=".\Debug/processes.pdb"
|
||||
ImportLibrary=".\Debug/processes.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/processes.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1034"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="..\bin"
|
||||
IntermediateDirectory="..\bin\processes"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
GlobalOptimizations="TRUE"
|
||||
InlineFunctionExpansion="1"
|
||||
FavorSizeOrSpeed="1"
|
||||
OptimizeForWindowsApplication="TRUE"
|
||||
PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;FINDPROCDLL_EXPORTS"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
StructMemberAlignment="1"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="3"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile="..\bin\processes/processes.pch"
|
||||
AssemblerListingLocation="..\bin\processes/"
|
||||
ObjectFile="..\bin\processes/"
|
||||
ProgramDataBaseFileName="..\bin\processes/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libc.lib"
|
||||
OutputFile="..\bin/Processes.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
IgnoreAllDefaultLibraries="FALSE"
|
||||
ProgramDatabaseFile="..\bin/processes.pdb"
|
||||
OptimizeForWindows98="1"
|
||||
ImportLibrary="..\bin/processes.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/processes.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath="processes.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;FINDPROCDLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="NDEBUG;_WINDOWS;_MBCS;_USRDLL;FINDPROCDLL_EXPORTS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\processes.rc">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="StdAfx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;FINDPROCDLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="NDEBUG;_WINDOWS;_MBCS;_USRDLL;FINDPROCDLL_EXPORTS;$(NoInherit)"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath="exdll.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\processes.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="StdAfx.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="processes.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -1,15 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by processes.rc
|
||||
//
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,102 +0,0 @@
|
||||
History:
|
||||
--------
|
||||
|
||||
v0.0.11d - 20090705 (AndersK)
|
||||
*Fixed UAC_RealWorldFullyLoadedDualModeExample.nsi so installing as admin will allow both modes
|
||||
|
||||
v0.0.11c - 20090124 (AndersK)
|
||||
*Checks for seclogon service on NT5 and returns ERROR_SERVICE_NOT_ACTIVE in $0 if not running
|
||||
|
||||
v0.0.11b - 20090102 (AndersK)
|
||||
*Fixed unicode compile bugs
|
||||
|
||||
v0.0.11 - 20081021 (AndersK)
|
||||
+Added UAC_GetUserShellFolderPath.nsi (Uses the new UAC::GetShellFolderPath)
|
||||
|
||||
v0.0.10a - 20081004 (AndersK)
|
||||
+Added SEE_MASK_NOZONECHECKS flag (experimental)
|
||||
|
||||
v0.0.10 - 20080812 (AndersK)
|
||||
+Added ugly hook hack to the shells run-as dialog on xp, defaults to other user
|
||||
|
||||
v0.0.9 - 20080721 (AndersK)
|
||||
*Fixed UAC_RealWorldFullyLoadedDualModeExample.nsi related bug (Thanks Case)
|
||||
|
||||
v0.0.8 - 20080310 (AndersK)
|
||||
+HTML Readme
|
||||
+Added UAC::GetOuterHwnd (used by UAC_RealWorldFullyLoadedDualModeExample.nsi)
|
||||
*Fixed UAC_RealWorldFullyLoadedDualModeExample.nsi
|
||||
*Major code cleanup in UAC.cpp
|
||||
-Removed UAC::RunElevatedAndProcessMessages (UAC::RunElevated now supports non NULL $HWNDParent)
|
||||
-Removed several useless sample scripts
|
||||
|
||||
v0.0.7e - 20080229 (AndersK)
|
||||
*Added ugly hack for hackwnd to find correct title and give us a proper taskbar so the elevation dialog does not get lost (2000,XP (This also fixed Alt-Tab icon on Vista))
|
||||
*Should compile with MSVC2005 now (Thanks Case)
|
||||
*More unicode fixes, this time even tested with NSIS Unicode (Only RunElevated and Exec tested)
|
||||
|
||||
v0.0.7d - 20080226 (AndersK)
|
||||
*Fixed a couple of unicode version bugs (Unicode version still untested)
|
||||
*Fixed weird XP string length bug (Thanks kfank)
|
||||
|
||||
v0.0.7c - 20080218 (AndersK)
|
||||
*Fixed SyncVars string length bug
|
||||
|
||||
v0.0.7b - 20080205 (AndersK)
|
||||
*Fixed DelayLoadDlls() problem on NT4
|
||||
|
||||
v0.0.7 - 20080120 (AndersK)
|
||||
+Added UAC::StackPush (For use with ExecCodeSegment)
|
||||
|
||||
v0.0.6d - 20071108 (AndersK)
|
||||
+Now syncs basic registers/variables before calling UAC::*Exec* and UAC::ExecCodeSegment (r0-r9,R0-R9,$CMDLINE,$INSTDIR,$OUTDIR,$EXEDIR,$LANGUAGE)
|
||||
+Added UAC::RunElevatedAndProcessMessages, this can be called after .onInit (Very experimental, DO NOT USE)
|
||||
+New include file with helper macros: UAC.nsh
|
||||
*Replazed Clammerz hack with a better version
|
||||
|
||||
v0.0.6c - 20071014 (AndersK)
|
||||
+Check for and split up "domain\user" style input in RunAs.cpp for CreateProcessWithLogonW
|
||||
*Added a ugly hack to trick messagebox'es in .OnInit to appear correctly on Vista (Thanks Clammerz)
|
||||
|
||||
v0.0.6b - 20070523 (AndersK)
|
||||
*Fixed showwindow flag (Thanks for the help kichik)
|
||||
|
||||
v0.0.6 - 20070512 (AndersK)
|
||||
+Added basic language support for MyRunAs dialog.
|
||||
|
||||
v0.0.5e - 20070509 (AndersK)
|
||||
*Fixed detection of UAC mode?
|
||||
+IPC window is visible (but offscreen) during elevation to help with SetForegroundWindow/Focus problems
|
||||
|
||||
v0.0.5d - 20070324 (AndersK)
|
||||
*Fixed stupid IsAdmin bug
|
||||
|
||||
v0.0.5c - 20070304 (AndersK)
|
||||
*_IsAdmin now uses CheckTokenMembership if it exists ( MSKB:Q118626 / http://blogs.msdn.com/larryosterman/archive/2007/03/14/why-does-kb-118626-use-accesscheck-to-check-if-you-re-a-member-of-the-administrators-group.aspx )
|
||||
|
||||
v0.0.5b - 20070301 (AndersK)
|
||||
*Fixed ExecCodeSegment (Thread now calls CoInitialize)
|
||||
|
||||
v0.0.5 - 20070228 (AndersK)
|
||||
+Added ExecCodeSegment (You can now call ANY code in the context of the original user)
|
||||
|
||||
v0.0.4b - 20070226 (AndersK)
|
||||
*Fixed (My)RunAs font (http://blogs.msdn.com/oldnewthing/archive/2005/02/04/366987.aspx)
|
||||
|
||||
v0.0.4 - 20070225 (AndersK)
|
||||
+Added (My)RunAs dialog, used on Vista when running as LUA with UAC off
|
||||
+Always uses /NCRC for elevated instance
|
||||
*Now compiles as UNICODE (Untested, no UnicodeNSIS to test on)
|
||||
|
||||
v0.0.3 - 20070224 (AndersK)
|
||||
+Added Exec/ExecWait
|
||||
+Added Verb & ShowWindow support for ShellExec[Wait]
|
||||
|
||||
v0.0.2 - 20070219 (AndersK)
|
||||
+Added ShellExecWait
|
||||
*IPC srv wnd now has its own thread and msg loop
|
||||
*Removed CRT dependency
|
||||
*Hopefully loads on Win95 now
|
||||
|
||||
v0.0.1 - 20070215 (AndersK)
|
||||
*Initial release
|
||||
@@ -1,14 +0,0 @@
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
|
||||
ZLIB/LIBPNG LICENSE
|
||||
-------------------
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
@@ -1,149 +0,0 @@
|
||||
/*
|
||||
Alternative to ExDll.h
|
||||
|
||||
v0.0.1 - 20060811 (AndersK)
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <TChar.h>
|
||||
|
||||
|
||||
typedef TCHAR NSISCH;
|
||||
#define NSISCALL __stdcall
|
||||
|
||||
namespace NSIS {
|
||||
|
||||
__forceinline void* NSISCALL MemAlloc(SIZE_T cb) {return GlobalAlloc(LPTR,cb);}
|
||||
__forceinline void NSISCALL MemFree(void* p) {GlobalFree(p);}
|
||||
|
||||
enum {
|
||||
INST_0, // $0
|
||||
INST_1, // $1
|
||||
INST_2, // $2
|
||||
INST_3, // $3
|
||||
INST_4, // $4
|
||||
INST_5, // $5
|
||||
INST_6, // $6
|
||||
INST_7, // $7
|
||||
INST_8, // $8
|
||||
INST_9, // $9
|
||||
INST_R0, // $R0
|
||||
INST_R1, // $R1
|
||||
INST_R2, // $R2
|
||||
INST_R3, // $R3
|
||||
INST_R4, // $R4
|
||||
INST_R5, // $R5
|
||||
INST_R6, // $R6
|
||||
INST_R7, // $R7
|
||||
INST_R8, // $R8
|
||||
INST_R9, // $R9
|
||||
INST_CMDLINE, // $CMDLINE
|
||||
INST_INSTDIR, // $INSTDIR
|
||||
INST_OUTDIR, // $OUTDIR
|
||||
INST_EXEDIR, // $EXEDIR
|
||||
INST_LANG, // $LANGUAGE
|
||||
__INST_LAST,
|
||||
|
||||
VIDX_TEMP=(INST_LANG+1), //#define state_temp_dir g_usrvars[25]
|
||||
VIDX_PLUGINSDIR,//# define state_plugins_dir g_usrvars[26]
|
||||
VIDX_EXEPATH,//#define state_exe_path g_usrvars[27]
|
||||
VIDX_EXEFILENAME,//#define state_exe_file g_usrvars[28]
|
||||
VIDX_STATECLICKNEXT,//#define state_click_next g_usrvars[30]
|
||||
__VIDX_UNDOCLAST
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef struct _stack_t {
|
||||
struct _stack_t *next;
|
||||
NSISCH text[ANYSIZE_ARRAY];
|
||||
} stack_t;
|
||||
|
||||
typedef struct {
|
||||
int autoclose;
|
||||
int all_user_var;
|
||||
int exec_error;
|
||||
int abort;
|
||||
int exec_reboot;
|
||||
int reboot_called;
|
||||
int XXX_cur_insttype; // deprecated
|
||||
int XXX_insttype_changed; // deprecated
|
||||
int silent;
|
||||
int instdir_error;
|
||||
int rtl;
|
||||
int errlvl;
|
||||
//NSIS v2.3x ?
|
||||
int alter_reg_view;
|
||||
int status_update;
|
||||
} exec_flags_type;
|
||||
|
||||
typedef struct {
|
||||
exec_flags_type *exec_flags;
|
||||
int (NSISCALL *ExecuteCodeSegment)(int, HWND);
|
||||
void (NSISCALL *validate_filename)(char *);
|
||||
} extra_parameters;
|
||||
|
||||
extern UINT StrSize;
|
||||
extern stack_t **StackTop;
|
||||
extern NSISCH*Vars;
|
||||
|
||||
inline bool NSISCALL SetErrLvl(extra_parameters*pExtraParams,int ErrLevel) {return pExtraParams? ((pExtraParams->exec_flags->errlvl=ErrLevel)||true):false;}
|
||||
inline bool NSISCALL SetErrorFlag(extra_parameters*pExtraParams) {return pExtraParams? ((pExtraParams->exec_flags->exec_error=1)||true):false;}
|
||||
inline bool NSISCALL ClearErrorFlag(extra_parameters*pExtraParams) {return pExtraParams?((pExtraParams->exec_flags->exec_error=0)||true):false;}
|
||||
|
||||
__forceinline int NSISCALL ExecuteCodeSegment(extra_parameters*pExtraParams,int pos,HWND hwndProgress=NULL) {
|
||||
return pExtraParams?pExtraParams->ExecuteCodeSegment(pos,hwndProgress):(/*EXEC_ERROR*/0x7FFFFFFF);
|
||||
}
|
||||
|
||||
static NSISCH* __fastcall GetVar(const int varnum)
|
||||
{
|
||||
//ASSERT(NSIS::Vars && NSIS::StrSize);
|
||||
if (varnum < 0 || varnum >= __VIDX_UNDOCLAST) return NULL;
|
||||
return NSIS::Vars+(varnum*NSIS::StrSize);
|
||||
}
|
||||
|
||||
inline void NSISCALL SetVarUINT(const int varnum,UINT Value) {
|
||||
wsprintf(GetVar(varnum),_T("%u"),Value);
|
||||
}
|
||||
|
||||
static stack_t* NSISCALL StackPop() {
|
||||
if (NSIS::StackTop && *NSIS::StackTop) {
|
||||
stack_t*s=(*NSIS::StackTop);
|
||||
*NSIS::StackTop=(*NSIS::StackTop)->next;
|
||||
return s;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
__forceinline void NSISCALL StackFreeItem(stack_t*pStackItem) {NSIS::MemFree(pStackItem);}
|
||||
|
||||
static DWORD NSISCALL StackPush(NSISCH*InStr,UINT StackStrSize=NSIS::StrSize) {
|
||||
if (!NSIS::StackTop)return ERROR_INVALID_PARAMETER;
|
||||
stack_t*sNew=(stack_t*)NSIS::MemAlloc(sizeof(stack_t)+(StackStrSize*sizeof(NSISCH)));
|
||||
if (!sNew)return ERROR_OUTOFMEMORY;
|
||||
lstrcpyn(sNew->text,InStr,StackStrSize);
|
||||
sNew->next=*NSIS::StackTop;
|
||||
*NSIS::StackTop=sNew;
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
}; /* namespace */
|
||||
|
||||
#define NSISUTIL_INIT() namespace NSIS {static UINT StrSize;static stack_t **StackTop;static NSISCH*Vars;}//Call in only ONE source file
|
||||
#define NSISUTIL_INITEXPORT(_v,_strsize,_stackt) NSIS::Vars=_v;NSIS::StrSize=_strsize;NSIS::StackTop=_stackt
|
||||
|
||||
//#define NSISEXPORT4(_func,_h,_strsize,_v,_stackt) extern "C" void __declspec(dllexport) __cdecl \
|
||||
// _func (HWND _h,int _strsize,NSISCH*_v,NSIS::stack_t **_stackt) { NSISUTIL_INITEXPORT(_v,_strsize,_stackt); TRACE("EXPORT::" #_func "\n");
|
||||
//#define NSISEXPORT5(_func,_h,_strsize,_v,_stackt,_eparams) extern "C" void __declspec(dllexport) __cdecl \
|
||||
// _func (HWND _h,int _strsize,NSISCH*_v,NSIS::stack_t **_stackt,NSIS::extra_parameters* _eparams) { NSISUTIL_INITEXPORT(_v,_strsize,_stackt); TRACE("EXPORT::" #_func "\n");
|
||||
//#define NSISEXPORT NSISEXPORT5
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define EXPORTNSISFUNC extern "C" void __declspec(dllexport) __cdecl
|
||||
# else
|
||||
# error EXPORTNSISFUNC needs compiler goo, you are on your own!
|
||||
# endif
|
||||
#define NSISFUNCSTART4(_h,_strsize,_v,_stackt) {NSISUTIL_INITEXPORT(_v,_strsize,_stackt);
|
||||
#define NSISFUNCSTART5(_h,_strsize,_v,_stackt,_eparams) NSISFUNCSTART4(_h,_strsize,_v,_stackt)
|
||||
#define NSISFUNCSTART NSISFUNCSTART5
|
||||
#define NSISFUNCEND() }
|
||||
|
||||
@@ -1,277 +0,0 @@
|
||||
//Copyright (C) 2007 Anders Kjersem. Licensed under the zlib/libpng license, see License.txt for details.
|
||||
/*
|
||||
If UAC is disabled, the runas verb is broken (Vista RTM) so when running as LUA there is no way to elevate so
|
||||
we provide our own dialog.
|
||||
*/
|
||||
|
||||
#include "UAC.h"
|
||||
#ifdef FEAT_CUSTOMRUNASDLG
|
||||
#include <Lmcons.h>//UNLEN && GNLEN && PWLEN
|
||||
#include <WindowsX.h>
|
||||
#include "resource.h"
|
||||
#include "NSISUtil.h"
|
||||
using namespace NSIS;
|
||||
#define ERRAPP_TRYAGAIN (0x20000000|1)
|
||||
#define MYMAX_DOMAIN (2+max(GNLEN,MAX_COMPUTERNAME_LENGTH)+1)
|
||||
|
||||
|
||||
static LPCTSTR g_RunAsDlgTitle=_T("Run as");
|
||||
static LPCTSTR g_RunAsHelpText=_T("You may not have the necessary permissions to use all the features of the program you are about to run. You may run this program as a different user or continue to run the program as the current user.");
|
||||
static LPCTSTR g_RunAsCurrUsrFmt=_T("&Current user (%s)");//Max 50 chars!
|
||||
static LPCTSTR g_RunAsSpecHelp=_T("Run the program as the &following user:");
|
||||
|
||||
FORCEINLINE bool MySetDlgItemText(HWND hDlg,int id,LPCTSTR s) {return MySndDlgItemMsg(hDlg,id,WM_SETTEXT,0,(LPARAM)s)!=0;}
|
||||
|
||||
typedef struct {
|
||||
SHELLEXECUTEINFO*pSEI;
|
||||
bool AsSelf;
|
||||
} RUNASDLGDATA;
|
||||
|
||||
void MyRunAsFmtCurrUserRadio(HWND hDlg,LPCTSTR Fmt) {
|
||||
TCHAR bufFullName[MYMAX_DOMAIN+UNLEN+1];
|
||||
TCHAR buf[50+MYMAX_DOMAIN+UNLEN+1];
|
||||
*bufFullName=0;
|
||||
ULONG cch;
|
||||
if ((!_GetUserNameEx || !_GetUserNameEx(NameSamCompatible,bufFullName,&(cch=COUNTOF(bufFullName)))) &&
|
||||
!_GetUserName(bufFullName,&(cch=COUNTOF(bufFullName))) ) {
|
||||
*bufFullName=0;
|
||||
}
|
||||
wsprintf(buf,Fmt,*bufFullName?bufFullName:_T("?"));
|
||||
MySetDlgItemText(hDlg,IDC_RUNASCURR,buf);
|
||||
|
||||
// default the "User name:" to Administrator from shell32
|
||||
if (LoadString(GetModuleHandle(_T("SHELL32.dll")),21763, bufFullName, COUNTOF(bufFullName)) > 0) {
|
||||
MySetDlgItemText(hDlg,IDC_USERNAME,bufFullName);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef FEAT_CUSTOMRUNASDLG_TRANSLATE
|
||||
void MyRunAsTranslateDlgString(LPCTSTR StrID,LPTSTR Ini,HWND hDlg,INT_PTR DlgItemId,int special=0) {
|
||||
TCHAR buf[MAX_PATH*2];
|
||||
DWORD len=GetPrivateProfileString(_T("MyRunAsStrings"),StrID,0,buf,ARRAYSIZE(buf),Ini);
|
||||
if (len) {
|
||||
if (IDC_RUNASCURR==special)
|
||||
MyRunAsFmtCurrUserRadio(hDlg,buf);
|
||||
else
|
||||
(DlgItemId==-1) ? SetWindowText(hDlg,buf) : MySetDlgItemText(hDlg,DlgItemId,buf);
|
||||
}
|
||||
}
|
||||
|
||||
void MyRunAsTranslateDlg(HWND hDlg) {
|
||||
DWORD len;
|
||||
TCHAR buf[MAX_PATH*2];
|
||||
HMODULE hDll=GetWindowInstance(hDlg);ASSERT(hDll);
|
||||
if ( (len=GetModuleFileName(hDll,buf,ARRAYSIZE(buf))) <1)return;
|
||||
buf[len-3]=0;
|
||||
lstrcat(buf,_T("lng"));
|
||||
MyRunAsTranslateDlgString(_T("DlgTitle"),buf,hDlg,-1);
|
||||
MyRunAsTranslateDlgString(_T("HelpText"),buf,hDlg,IDC_HELPTEXT);
|
||||
MyRunAsTranslateDlgString(_T("OptCurrUser"),buf,hDlg,IDC_RUNASCURR,IDC_RUNASCURR);
|
||||
MyRunAsTranslateDlgString(_T("OptOtherUser"),buf,hDlg,IDC_RUNASSPEC);
|
||||
MyRunAsTranslateDlgString(_T("Username"),buf,hDlg,IDC_LBLUSER);
|
||||
MyRunAsTranslateDlgString(_T("Pwd"),buf,hDlg,IDC_LBLPWD);
|
||||
MyRunAsTranslateDlgString(_T("OK"),buf,hDlg,IDOK);
|
||||
MyRunAsTranslateDlgString(_T("Cancel"),buf,hDlg,IDCANCEL);
|
||||
HWND h=GetDlgItem(hDlg,IDC_RUNASCURR);
|
||||
if (GetPrivateProfileInt(_T("MyRunAsCfg"),_T("DisableCurrUserOpt"),false,buf))EnableWindow(h,false);
|
||||
if (GetPrivateProfileInt(_T("MyRunAsCfg"),_T("HideCurrUserOpt"),false,buf))ShowWindow(h,false);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool ErrorIsLogonError(DWORD err) {
|
||||
switch (err) {
|
||||
case ERROR_LOGON_FAILURE:
|
||||
case ERROR_ACCOUNT_RESTRICTION:
|
||||
case ERROR_INVALID_LOGON_HOURS:
|
||||
case ERROR_INVALID_WORKSTATION:
|
||||
case ERROR_PASSWORD_EXPIRED:
|
||||
case ERROR_ACCOUNT_DISABLED:
|
||||
case ERROR_NONE_MAPPED:
|
||||
case ERROR_NO_SUCH_USER:
|
||||
case ERROR_INVALID_ACCOUNT_NAME:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void VerifyOKBtn(HWND hDlg,RUNASDLGDATA*pRADD) {
|
||||
const bool HasText=pRADD?(pRADD->AsSelf?true:MySndDlgItemMsg(hDlg,IDC_USERNAME,WM_GETTEXTLENGTH)>0):false;
|
||||
EnableWindow(GetDlgItem(hDlg,IDOK),HasText);
|
||||
}
|
||||
|
||||
void SetDlgState(HWND hDlg,bool AsSelf,RUNASDLGDATA*pRADD) {
|
||||
if (pRADD)pRADD->AsSelf=AsSelf;
|
||||
MySndDlgItemMsg(hDlg,IDC_RUNASCURR,BM_SETCHECK,AsSelf?BST_CHECKED:BST_UNCHECKED);
|
||||
MySndDlgItemMsg(hDlg,IDC_RUNASSPEC,BM_SETCHECK,!AsSelf?BST_CHECKED:BST_UNCHECKED);
|
||||
int ids[]={IDC_USERNAME,IDC_PASSWORD,IDC_LBLUSER,IDC_LBLPWD};
|
||||
for (int i=0; i<COUNTOF(ids);++i)EnableWindow(GetDlgItem(hDlg,ids[i]),!AsSelf);
|
||||
VerifyOKBtn(hDlg,pRADD);
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK MyRunAsDlgProc(HWND hwnd,UINT uMsg,WPARAM wp,LPARAM lp) {
|
||||
RUNASDLGDATA*pRADD=(RUNASDLGDATA*)GetWindowLongPtr(hwnd,GWLP_USERDATA);
|
||||
switch(uMsg) {
|
||||
//case WM_DESTROY:
|
||||
// break;
|
||||
case WM_CLOSE:
|
||||
return DestroyWindow(hwnd);
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
pRADD=(RUNASDLGDATA*)lp;ASSERT(pRADD);
|
||||
SetWindowLongPtr(hwnd,GWLP_USERDATA,lp);
|
||||
Edit_LimitText(GetDlgItem(hwnd,IDC_USERNAME),UNLEN+1+MYMAX_DOMAIN); //room for "foo@BAR" or "BAR\foo"
|
||||
Edit_LimitText(GetDlgItem(hwnd,IDC_PASSWORD),PWLEN);
|
||||
const HINSTANCE hSh32=GetModuleHandle(_T("SHELL32.dll"));
|
||||
const HICON hIco=(HICON)LoadImage(hSh32,MAKEINTRESOURCE(194),IMAGE_ICON,32,32,LR_SHARED);
|
||||
MySndDlgItemMsg(hwnd,IDC_SHICON,STM_SETICON,(WPARAM)hIco);
|
||||
SendMessage(hwnd,WM_SETTEXT,0,(LPARAM)g_RunAsDlgTitle);
|
||||
MySetDlgItemText(hwnd,IDC_HELPTEXT,g_RunAsHelpText);
|
||||
MyRunAsFmtCurrUserRadio(hwnd,g_RunAsCurrUsrFmt);
|
||||
MySetDlgItemText(hwnd,IDC_RUNASSPEC,g_RunAsSpecHelp);
|
||||
#ifdef FEAT_CUSTOMRUNASDLG_TRANSLATE
|
||||
MyRunAsTranslateDlg(hwnd);
|
||||
#endif
|
||||
SetDlgState(hwnd,false,pRADD);
|
||||
|
||||
#if defined(BUILD_DBG) && 0 //auto login used during testing ;)
|
||||
SetDlgItemText(hwnd,IDC_USERNAME,_T("root"));
|
||||
SetDlgItemText(hwnd,IDC_PASSWORD,_T("???"));
|
||||
Sleep(1);PostMessage(hwnd,WM_COMMAND,IDOK,0);
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
case WM_COMMAND:
|
||||
{
|
||||
switch(HIWORD(wp)) {
|
||||
case EN_CHANGE:
|
||||
VerifyOKBtn(hwnd,pRADD);
|
||||
break;
|
||||
case EN_SETFOCUS:
|
||||
case BN_CLICKED:
|
||||
if (LOWORD(wp)<=IDCANCEL)break;
|
||||
SetDlgState(hwnd,LOWORD(wp)==IDC_RUNASCURR,pRADD);
|
||||
return FALSE;
|
||||
}
|
||||
INT_PTR exitcode=!pRADD?-1:IDCANCEL;
|
||||
switch(LOWORD(wp)) {
|
||||
case IDOK:
|
||||
if (pRADD) {
|
||||
SHELLEXECUTEINFO&sei=*pRADD->pSEI;
|
||||
PROCESS_INFORMATION pi={0};
|
||||
DWORD ec=NO_ERROR;
|
||||
WCHAR*wszExec;//Also used as TCHAR buffer in AsSelf mode
|
||||
bool PerformTCharFmt=pRADD->AsSelf;
|
||||
//const DWORD CommonStartupInfoFlags=STARTF_FORCEONFEEDBACK;
|
||||
#ifdef UNICODE
|
||||
PerformTCharFmt=true;
|
||||
#endif
|
||||
wszExec=(WCHAR*)NSIS::MemAlloc( (pRADD->AsSelf?sizeof(TCHAR):sizeof(WCHAR)) *(lstrlen(sei.lpFile)+1+lstrlen(sei.lpParameters)+1));
|
||||
if (!wszExec)ec=ERROR_OUTOFMEMORY;
|
||||
if (PerformTCharFmt)wsprintf((TCHAR*)wszExec,_T("%s%s%s"),sei.lpFile,((sei.lpParameters&&*sei.lpParameters)?_T(" "):_T("")),sei.lpParameters);
|
||||
if (!ec) {
|
||||
if (pRADD->AsSelf) {
|
||||
STARTUPINFO si={sizeof(si)};
|
||||
TRACEF("MyRunAs:CreateProcess:%s|\n",wszExec);
|
||||
ec=(CreateProcess(0,(TCHAR*)wszExec,0,0,false,0,0,0,&si,&pi)?NO_ERROR:GetLastError());
|
||||
}
|
||||
else {
|
||||
//All Wide strings!
|
||||
WCHAR wszPwd[PWLEN+1];
|
||||
WCHAR wszUName[UNLEN+1+MYMAX_DOMAIN+1];
|
||||
STARTUPINFOW siw={sizeof(siw)};
|
||||
WCHAR*p;
|
||||
#ifndef UNICODE
|
||||
//Build unicode string, we already know the buffer is big enough so no error handling
|
||||
p=wszExec;
|
||||
MultiByteToWideChar(CP_THREAD_ACP,0,sei.lpFile,-1,p,0xFFFFFF);
|
||||
if (sei.lpParameters && *sei.lpParameters) {
|
||||
p+=lstrlen(sei.lpFile);*p++=L' ';*p=0;
|
||||
MultiByteToWideChar(CP_THREAD_ACP,0,sei.lpParameters,-1,p,0xFFFFFF);
|
||||
}
|
||||
#endif
|
||||
SendMessageW(GetDlgItem(hwnd,IDC_USERNAME),WM_GETTEXT,COUNTOF(wszUName),(LPARAM)wszUName);
|
||||
SendMessageW(GetDlgItem(hwnd,IDC_PASSWORD),WM_GETTEXT,COUNTOF(wszPwd),(LPARAM)wszPwd);
|
||||
|
||||
//Try to find [\\]domain\user and split into username and domain strings
|
||||
WCHAR*pUName=wszUName,*pDomain=0;
|
||||
p=wszUName;
|
||||
//if (*p==p[1]=='\\')pUName=(p+=2);else \ //Should we still split things up if the string starts with \\ ? Is it possible to use \\machine\user at all?
|
||||
++p;//Don't parse "\something", require at least one char before backslash "?[*\]something"
|
||||
while(*p && *p!='\\')++p;
|
||||
if (*p=='\\') {
|
||||
pDomain=pUName;
|
||||
pUName=p+1;*p=0;
|
||||
}
|
||||
|
||||
TRACEF("MyRunAs:CreateProcessWithLogonW:%ws|%ws|%ws|%ws|\n",pUName,pDomain?pDomain:L"NO?DOMAIN",wszPwd,wszExec);
|
||||
ec=(_CreateProcessWithLogonW(pUName,pDomain?pDomain:0,wszPwd,LOGON_WITH_PROFILE,0,wszExec,0,0,0,&siw,&pi)?NO_ERROR:GetLastError());
|
||||
TRACEF("MyRunAs:CreateProcessWithLogonW: ret=%u\n",ec);
|
||||
SecureZeroMemory(wszPwd,sizeof(wszPwd));//if (wszPwd) {volatile WCHAR*_p=wszPwd;for(;_p&&*_p;++_p)*_p=1;if (_p)*wszPwd=0;}//Burn password (And attempt to prevent compiler from removing it)
|
||||
if (ec && ErrorIsLogonError(ec)) {
|
||||
LPTSTR szMsg;
|
||||
DWORD ret=FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS,0,ec,MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),(LPTSTR)&szMsg,0,0);
|
||||
if (ret) {
|
||||
ec=ERRAPP_TRYAGAIN;
|
||||
MessageBox(hwnd,szMsg,0,MB_ICONWARNING);
|
||||
LocalFree(szMsg);
|
||||
}
|
||||
else ec=GetLastError();
|
||||
}
|
||||
}
|
||||
}
|
||||
NSIS::MemFree(wszExec);
|
||||
if (pi.hThread)CloseHandle(pi.hThread);
|
||||
if (ERRAPP_TRYAGAIN==ec)break;
|
||||
if (ec) {
|
||||
SetLastError(ec);
|
||||
exitcode=-1;
|
||||
}
|
||||
else {
|
||||
pRADD->pSEI->hProcess=pi.hProcess;
|
||||
exitcode=IDOK;
|
||||
}
|
||||
}
|
||||
case IDCANCEL:
|
||||
EndDialog(hwnd,exitcode);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DWORD MyRunAs(HINSTANCE hInstDll,SHELLEXECUTEINFO&sei) {
|
||||
INT_PTR ec;
|
||||
ASSERT(sei.cbSize>=sizeof(SHELLEXECUTEINFO) && hInstDll);
|
||||
if (ec=DelayLoadDlls())return ec;
|
||||
ASSERT(_CreateProcessWithLogonW && _GetUserName);
|
||||
RUNASDLGDATA radd={0};
|
||||
radd.pSEI=&sei;
|
||||
ec=DialogBoxParam(hInstDll,MAKEINTRESOURCE(IDD_MYRUNAS),sei.hwnd,MyRunAsDlgProc,(LPARAM)&radd);
|
||||
TRACEF("MyRunAs returned %d (%s|%s)\n",ec,sei.lpFile,sei.lpParameters);
|
||||
switch(ec) {
|
||||
case 0:
|
||||
return ERROR_INVALID_HANDLE;//DialogBoxParam returns 0 on bad hwnd
|
||||
case IDOK:
|
||||
return NO_ERROR;
|
||||
case IDCANCEL:
|
||||
return ERROR_CANCELLED;
|
||||
}
|
||||
//TODO:BUGBUG: on vista, the last error seems to get lost, should probably put it in RUNASDLGDATA and always return IDOK
|
||||
return GetLastError();
|
||||
}
|
||||
|
||||
|
||||
#ifdef BUILD_DBG
|
||||
// RunDll exports are __stdcall, we dont care about that for this debug export, rundll32.exe is able to handle this mistake
|
||||
extern "C" void __declspec(dllexport) __cdecl DBGRDMyRunAs(HWND hwnd,HINSTANCE hinst,LPTSTR lpCmdLine,int nCmdShow) {
|
||||
SHELLEXECUTEINFO sei={sizeof(sei)};
|
||||
sei.lpFile=_T("Notepad.exe");//sei.lpParameters=_T("param1");
|
||||
TRACEF("ec=%d\n",MyRunAs(GetModuleHandle(_T("UAC.dll")),sei));
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FEAT_CUSTOMRUNASDLG */
|
||||
|
||||
@@ -1,222 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html><head>
|
||||
<title>UAC plug-in readme</title>
|
||||
<script type="text/javascript">
|
||||
function NavGL(q){window.open("http://www.google.com/search?hl=en&btnI=I&num=2&q="+escape(q));return 0;}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
html,body {background-color:#FFF; color:#000;}
|
||||
a:link, a:visited, a:active {color:#00F;}
|
||||
h2 {border-bottom:0.1em solid #000;}
|
||||
#docHdrHdln{text-align:center;}
|
||||
.importanttxt {color:#e00;}
|
||||
.code {font-family:monospace;}
|
||||
.nsisvar {color:#C00;}
|
||||
.str {color:#390}
|
||||
.inifile {background-color:#EEE;border:1px solid #000;padding:0.2em;}
|
||||
.inicomment {background-color:#f5f5c5;color:#555;}
|
||||
table.piexport {text-align:left;margin-bottom:1em;}
|
||||
table.piexport td {vertical-align:top;}
|
||||
table.piexport table.ret {padding:0;margin:0;border:0;}
|
||||
</style>
|
||||
</head><body>
|
||||
<h1 id="docHdrHdln">UAC plug-in</h1>
|
||||
|
||||
|
||||
<code><pre>
|
||||
Interactive User (MediumIL) Admin user(HighIL)
|
||||
+++[Setup.exe]++++++++++++++ +++[Setup.exe]++++++++++++++
|
||||
+ + + +
|
||||
+ ***[.OnInit]************ + + ***[.OnInit]************ +
|
||||
+ * UAC::RunElevated >---+-+------>+ * * +
|
||||
+ * NSIS.Quit() * + + * * +
|
||||
+ ************************ + + ***********||*********** +
|
||||
+ + + || +
|
||||
+ + + \/ +
|
||||
+ ***[Sections]*********** + + ***[Sections]*********** +
|
||||
+ * * + /--+-+-< UAC::Exec * +
|
||||
+ ************************ + | + ************************ +
|
||||
+ + | + +
|
||||
+ Win32.CreateProcess() <-+----/ + +
|
||||
+ + + +
|
||||
++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++
|
||||
</pre></code>
|
||||
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#exports">Plugin Functions</a>
|
||||
<li><a href="#lang">Language support</a>
|
||||
<li><a href="#knownissues">Known Issues</a>
|
||||
<li><a href="#glossary">Glossary</a>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="exports"><h2>Plugin Functions</h2></a><div class="CntSec"><p>
|
||||
Every function will try to emulate the basic NSIS instruction (of similar name) when UAC::RunElevated has not "succeeded" or running on a system that does not support elevation (Win9x/NT4)</p>
|
||||
|
||||
<table class="piexport"><tr><th colspan=2>UAC::RunElevated</th></tr>
|
||||
<tr><td>Parameters:</td><td></td></tr>
|
||||
<tr><td>Returns:</td><td>
|
||||
<table class="ret">
|
||||
<tr><td><span class="nsisvar">$0</span></td><td>Win32 error code (0 on success, 1223 if user aborted elevation dialog, anything else should be treated as a fatal error)</td></tr>
|
||||
<tr><td><span class="nsisvar">$1</span></td><td><span class="code">If <span class="nsisvar">$0</span>==0</span>:
|
||||
<table class="ret">
|
||||
<tr><td>0</td><td>UAC is not supported by the OS</td></tr>
|
||||
<tr><td>1</td><td>Started a elevated child process, the current process should act like a wrapper (Call Quit without any further processing)</td></tr>
|
||||
<tr><td>2</td><td>The process is already running @ HighIL (Member of admin group)</td></tr>
|
||||
<tr><td>3</td><td>You should call RunElevated again (This can happen if a user without admin priv. is used in the runas dialog)</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td><span class="nsisvar">$2</span></td><td><span class="code">If <span class="nsisvar">$0</span>==0 && <span class="nsisvar">$1</span>==1</span>: ExitCode of the elevated fork process (The NSIS errlvl is also set)</td></tr>
|
||||
<tr><td><span class="nsisvar">$3</span></td><td><span class="code">If <span class="nsisvar">$0</span>==0</span>: 1 if the user is a member of the admin group or 0 otherwise</td></tr>
|
||||
</table></td></tr>
|
||||
<tr><td>Description:</td><td>Allows non-admin/UAC.LUA users to re-spawn the installer as another user and UAC.Admin users to elevate.</td></tr>
|
||||
</table>
|
||||
<!--table class="piexport"><tr><th colspan=2>UAC::RunElevatedAndProcessMessages <i style="font-size:smaller;">(Experimental)</i></th></tr>
|
||||
<tr><td>Parameters:</td><td></td></tr>
|
||||
<tr><td>Returns:</td><td><i>See UAC::RunElevated</i></td></tr>
|
||||
<tr><td>Description:</td><td>Version of UAC::RunElevated that can be called from a page</td></tr>
|
||||
</table-->
|
||||
|
||||
<table class="piexport"><tr><th colspan=2>UAC::Unload</th></tr>
|
||||
<tr><td>Parameters:</td><td></td></tr>
|
||||
<tr><td>Returns:</td><td></td></tr>
|
||||
<tr><td>Description:</td><td>Cleanup, you must call this function in .OnInstFailed, .onUserAbort and .OnInstSuccess</td></tr>
|
||||
</table>
|
||||
|
||||
<table class="piexport"><tr>
|
||||
<th colspan=2>UAC::Exec</th></tr>
|
||||
<tr><td>Parameters:</td><td><INT:ShowWindow> <STR:App> <STR:Parameters> <STR:WorkingDir></td></tr>
|
||||
<tr><td>Returns:</td><td>
|
||||
<table class="ret">
|
||||
<tr><td><span class="nsisvar">$0</span></td><td>Win32 error code, 0 on success (ErrorFlag is also set on error)</td></tr>
|
||||
</table></td></tr>
|
||||
</table>
|
||||
<table class="piexport"><tr>
|
||||
<th colspan=2>UAC::ExecWait</th></tr>
|
||||
<tr><td>Parameters:</td><td><INT:ShowWindow> <STR:App> <STR:Parameters> <STR:WorkingDir></td></tr>
|
||||
<tr><td>Returns:</td><td>
|
||||
<table class="ret">
|
||||
<tr><td><span class="nsisvar">$0</span></td><td>Win32 error code, 0 on success (ErrorFlag is also set on error)</td></tr>
|
||||
<tr><td><span class="nsisvar">$1</span></td><td>Exitcode of new process</td></tr>
|
||||
</table></td></tr>
|
||||
</table>
|
||||
<table class="piexport"><tr>
|
||||
<th colspan=2>UAC::ShellExec</th></tr>
|
||||
<tr><td>Parameters:</td><td><STR:Verb> <INT:ShowWindow> <STR:App> <STR:Parameters> <STR:WorkingDir></td></tr>
|
||||
<tr><td>Returns:</td><td>
|
||||
<table class="ret">
|
||||
<tr><td><span class="nsisvar">$0</span></td><td>Win32 error code, 0 on success (ErrorFlag is also set on error)</td></tr>
|
||||
</table></td></tr>
|
||||
</table>
|
||||
<table class="piexport"><tr>
|
||||
<th colspan=2>UAC::ShellExecWait</th></tr>
|
||||
<tr><td>Parameters:</td><td><STR:Verb> <INT:ShowWindow> <STR:App> <STR:Parameters> <STR:WorkingDir></td></tr>
|
||||
<tr><td>Returns:</td><td>
|
||||
<table class="ret">
|
||||
<tr><td><span class="nsisvar">$0</span></td><td>Win32 error code, 0 on success (ErrorFlag is also set on error)</td></tr>
|
||||
<tr><td><span class="nsisvar">$1</span></td><td>Exitcode of new process</td></tr>
|
||||
</table></td></tr>
|
||||
</table>
|
||||
|
||||
<table class="piexport"><tr><th colspan=2>UAC::IsAdmin</th></tr>
|
||||
<tr><td>Parameters:</td><td></td></tr>
|
||||
<tr><td>Returns:</td><td><span class="nsisvar">$0</span> (BOOL) result</td></tr>
|
||||
<tr><td>Description:</td><td>Check current thread/process token for a non-deny admin group SID entry</td></tr>
|
||||
</table>
|
||||
|
||||
<table class="piexport"><tr><th colspan=2>UAC::ExecCodeSegment</th></tr>
|
||||
<tr><td>Parameters:</td><td><INT:NSISFunctionAddress></td></tr>
|
||||
<tr><td>Returns:</td><td>[None] (ErrorFlag is set on error)</td></tr>
|
||||
<tr><td>Description:</td><td>Calls NSIS function in LUA/outer instance (If you use instructions that alter the UI or the stack/variables in the code segment (StrCpy,Push/Pop/Exch,DetailPrint etc.) they will affect the hidden wrapper installer and not "your" installer instance)</td></tr>
|
||||
</table>
|
||||
|
||||
<table class="piexport"><tr><th colspan=2>UAC::StackPush</th></tr>
|
||||
<tr><td>Parameters:</td><td><STR:String></td></tr>
|
||||
<tr><td>Returns:</td><td>[None] (ErrorFlag is set on error)</td></tr>
|
||||
<tr><td>Description:</td><td>Push to outer instance stack (For use with UAC::ExecCodeSegment)</td></tr>
|
||||
</table>
|
||||
|
||||
<table class="piexport"><tr><th colspan=2>UAC::GetOuterHwnd</th></tr>
|
||||
<tr><td>Parameters:</td><td></td></tr>
|
||||
<tr><td>Returns:</td><td><span class="nsisvar">$0</span> HWNDPARENT of outer instance</td></tr>
|
||||
<tr><td>Description:</td><td>For use with ${UAC.RunElevatedAndProcessMessages}</td></tr>
|
||||
</table>
|
||||
|
||||
<table class="piexport"><tr><th colspan=2>UAC::SupportsUAC</th></tr>
|
||||
<tr><td>Parameters:</td><td></td></tr>
|
||||
<tr><td>Returns:</td><td><span class="nsisvar">$0</span> !=0 if supported</td></tr>
|
||||
<tr><td>Description:</td><td>Check if the OS supports UAC (And the user has UAC turned on) <span class="importanttxt">This function only tests if UAC is active, will return 0 on NT5 even though runas is implemented on those platforms, will also return 0 on NT6+ if UAC is off. You should only call this function during testing, NOT to determine if you can call UAC::RunElevated</span></td></tr>
|
||||
</table>
|
||||
|
||||
<table class="piexport"><tr><th colspan=2>UAC::GetElevationType</th></tr>
|
||||
<tr><td>Parameters:</td><td></td></tr>
|
||||
<tr><td>Returns:</td><td>
|
||||
<table class="ret">
|
||||
<tr><td><span class="nsisvar">$0</span></td><td><a href="#" OnClick="return NavGL('TOKEN_ELEVATION_TYPE Enumeration')">TOKEN_ELEVATION_TYPE</a>:
|
||||
<table class="ret">
|
||||
<tr><td>0</td><td>Unsupported/Failed (ErrorFlag is also set)</td></tr>
|
||||
<tr><td>1</td><td>TokenElevationTypeDefault: User is not using a split token (UAC disabled)</td></tr>
|
||||
<tr><td>2</td><td>TokenElevationTypeFull: UAC enabled, the (current) process is elevated</td></tr>
|
||||
<tr><td>3</td><td>TokenElevationTypeLimited: UAC enabled, the process is not elevated</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table></td></tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="lang"><h2>Language support</h2></a><div class="CntSec">
|
||||
<p>If the plugin is built with FEAT_CUSTOMRUNASDLG_TRANSLATE (Enabled by default),
|
||||
you can extract a file named <span class="str">UAC.LNG</span> to <span class="nsisvar">$pluginsdir</span>.
|
||||
It is a ini file with the following sections:
|
||||
</p><pre class="inifile">
|
||||
[MyRunAsCfg]
|
||||
<span class="inicomment">;Set to 1 to disable the radio button</span>
|
||||
DisableCurrUserOpt=
|
||||
<span class="inicomment">;Set to 1 to hide the radio button</span>
|
||||
HideCurrUserOpt=
|
||||
|
||||
[MyRunAsStrings]
|
||||
DlgTitle=Hello There!
|
||||
HelpText=Just do your thing!
|
||||
<span class="inicomment">;Label for current user radio button, %s is replaced with result of GetUserNameEx(NameSamCompatible,...)</span>
|
||||
OptCurrUser=Self service (%s)
|
||||
OptOtherUser=Run as someone:
|
||||
UserName=Who:
|
||||
Pwd=PIN:
|
||||
OK=Okey!
|
||||
Cancel=No Way</pre>
|
||||
</div>
|
||||
|
||||
<a name="knownissues"><h2>Known Issues</h2></a><div class="CntSec">
|
||||
<ul>
|
||||
<li>UACPI.KI#1: DetailPrint in outer process is ignored
|
||||
<li>UACPI.KI#2: Elevation can fail if the installer is located on a remote share that requires authentication
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="glossary"><h2>Glossary</h2></a><div class="CntSec">
|
||||
<ul>
|
||||
<li>AAM: Admin Approval Mode
|
||||
<li>IL: Integrity level (Part of the new MIC/WIC security levels added to NT6)
|
||||
<li>LUA: Limited/Least-privilege User Account
|
||||
<li>MIC: <a href="http://en.wikipedia.org/wiki/Mandatory_Integrity_Control">Mandatory Integrity Controls</a> (Now known as WIC)
|
||||
<li>UAC: User Account Control (Part of the UAP umbrella)
|
||||
<li>UAP: User Account Protection
|
||||
<li>WIC: <a href="http://www.securityfocus.com/infocus/1887">Windows Integrity Controls</a>
|
||||
<li>Win32 error code: Standard windows error codes, ERROR_???
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body></html>
|
||||
@@ -1,191 +0,0 @@
|
||||
/*
|
||||
=======================
|
||||
UAC helper include file
|
||||
.......................
|
||||
|
||||
Macros starting with UAC.I should only be called from the installer and vice versa for UAC.U macros.
|
||||
|
||||
*/
|
||||
!ifndef UAC_HDR__INC
|
||||
!define UAC_HDR__INC
|
||||
!include LogicLib.nsh
|
||||
|
||||
!define UAC.RunElevatedAndProcessMessages 'UAC::RunElevated '
|
||||
!define UAC.Unload 'UAC::Unload '
|
||||
!define UAC.StackPush 'UAC::StackPush '
|
||||
|
||||
/*!macro _UAC.BuildOnInitElevationFunc _funcprefix
|
||||
Function ${_funcprefix}onInit
|
||||
!ifmacrodef
|
||||
FunctionEnd
|
||||
!macroend*/
|
||||
|
||||
!macro _UAC.GenerateSimpleFunction _funcprefix _funcName _funcCode
|
||||
Function ${_funcprefix}${_funcName}
|
||||
${_funcCode}
|
||||
#messagebox mb_ok "${_funcprefix}${_funcName}"
|
||||
FunctionEnd
|
||||
!macroend
|
||||
|
||||
!macro _UAC.TryDef _d _v
|
||||
!ifndef ${_d}
|
||||
!define ${_d} "${_v}"
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!macro _UAC.InitStrings _modeprefix
|
||||
!insertmacro _UAC.TryDef UACSTR.UnDataFile "UAC.dat"
|
||||
!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvWinErr "Unable to elevate , error $0"
|
||||
!ifNdef __UNINSTALL__
|
||||
!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvAbortReqAdmin "This installer requires admin access, aborting!"
|
||||
!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvMustTryAgain "This installer requires admin access, try again"
|
||||
!else
|
||||
!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvAbortReqAdmin "This uninstaller requires admin access, aborting!"
|
||||
!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvMustTryAgain "This uninstaller requires admin access, try again"
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!ifmacroNdef _UAC.GenerateUninstallerTango
|
||||
!macro _UAC.GenerateUninstallerTango UninstallerFileName
|
||||
!ifdef __GLOBAL__
|
||||
!error "UAC: Needs to be called inside a function"
|
||||
!endif
|
||||
!ifNdef __UNINSTALL__
|
||||
!error "UAC: _UAC.GenerateUninstallerTango should only be called by uninstaller, see http://forums.winamp.com/showthread.php?threadid=280330"
|
||||
!endif
|
||||
!ifNdef UAC_UNINSTALLERTANGOFORALLPLATFORMS
|
||||
!include WinVer.nsh
|
||||
!endif
|
||||
!insertmacro _UAC.InitStrings 'U.'
|
||||
ReadIniStr $0 "$ExeDir\${UACSTR.UnDataFile}" UAC "Un.Ready"
|
||||
${IF} $0 != 1
|
||||
!ifNdef UAC_UNINSTALLERTANGOFORALLPLATFORMS
|
||||
${AndIf} ${AtLeastWinVista}
|
||||
!endif
|
||||
InitPluginsDir
|
||||
WriteIniStr "$PluginsDir\${UACSTR.UnDataFile}" UAC "Un.Ready" 1
|
||||
CopyFiles /SILENT "$EXEPATH" "$PluginsDir\${UninstallerFileName}"
|
||||
StrCpy $0 ""
|
||||
${IfThen} ${Silent} ${|} StrCpy $0 "/S " ${|}
|
||||
ExecWait '"$PluginsDir\${UninstallerFileName}" $0/NCRC _?=$INSTDIR' $0
|
||||
SetErrorLevel $0
|
||||
Quit
|
||||
${EndIf}
|
||||
!macroend
|
||||
!endif
|
||||
|
||||
!ifmacroNdef _UAC.GenerateOnInitElevationCode
|
||||
!macro _UAC.GenerateOnInitElevationCode _modeprefix
|
||||
!ifndef __FUNCTION__
|
||||
!error "UAC: Needs to be called inside a function"
|
||||
!endif
|
||||
!insertmacro _UAC.InitStrings ${_modeprefix}
|
||||
!define _UAC.GOIECUniq L${__LINE__}
|
||||
UAC_Elevate_${_UAC.GOIECUniq}:
|
||||
UAC::RunElevated
|
||||
StrCmp 1223 $0 UAC_ElevationAborted_${_UAC.GOIECUniq} ; UAC dialog aborted by user?
|
||||
StrCmp 0 $0 0 UAC_Err_${_UAC.GOIECUniq} ; Error?
|
||||
StrCmp 1 $1 0 UAC_Success_${_UAC.GOIECUniq} ;Are we the real deal or just the wrapper?
|
||||
Quit
|
||||
UAC_Err_${_UAC.GOIECUniq}:
|
||||
MessageBox mb_iconstop "${UACSTR.${_modeprefix}ElvWinErr}"
|
||||
Abort
|
||||
UAC_ElevationAborted_${_UAC.GOIECUniq}:
|
||||
MessageBox mb_iconstop "${UACSTR.${_modeprefix}ElvAbortReqAdmin}"
|
||||
Abort
|
||||
UAC_Success_${_UAC.GOIECUniq}:
|
||||
# if $0==0 && $3==1, we are a member of the admin group (Any OS)
|
||||
# if $0==0 && $1==0, UAC not supported (Probably <NT6), run as normal?
|
||||
# if $0==0 && $1==3, we can try to elevate again
|
||||
StrCmp 1 $3 /*+4*/ UAC_Done_${_UAC.GOIECUniq} ;Admin?
|
||||
StrCmp 3 $1 0 UAC_ElevationAborted_${_UAC.GOIECUniq} ;Try again or abort?
|
||||
MessageBox mb_iconexclamation "${UACSTR.${_modeprefix}ElvMustTryAgain}" ;Inform user...
|
||||
goto UAC_Elevate_${_UAC.GOIECUniq} ;...lets try again
|
||||
UAC_Done_${_UAC.GOIECUniq}:
|
||||
!undef _UAC.GOIECUniq
|
||||
!macroend
|
||||
!endif
|
||||
|
||||
!define UAC.I.Elevate.AdminOnly '!insertmacro UAC.I.Elevate.AdminOnly '
|
||||
!macro UAC.I.Elevate.AdminOnly
|
||||
!insertmacro _UAC.GenerateOnInitElevationCode 'I.'
|
||||
!macroend
|
||||
|
||||
!define UAC.U.Elevate.AdminOnly '!insertmacro UAC.U.Elevate.AdminOnly '
|
||||
!macro UAC.U.Elevate.AdminOnly _UninstallerName
|
||||
!ifNdef UAC_DISABLEUNINSTALLERTANGO
|
||||
!insertmacro _UAC.GenerateUninstallerTango "${_UninstallerName}"
|
||||
!endif
|
||||
!insertmacro _UAC.GenerateOnInitElevationCode 'U.'
|
||||
!macroend
|
||||
|
||||
!define UAC.AutoCodeUnload '!insertmacro UAC.AutoCodeUnload '
|
||||
!macro UAC.AutoCodeUnload _HasUninstaller
|
||||
!insertmacro _UAC.GenerateSimpleFunction "" .OnInstFailed '${UAC.Unload}'
|
||||
!insertmacro _UAC.GenerateSimpleFunction "" .OnInstSuccess '${UAC.Unload}'
|
||||
!ifNdef MUI_INCLUDED
|
||||
!insertmacro _UAC.GenerateSimpleFunction "" .onUserAbort '${UAC.Unload}'
|
||||
!else
|
||||
!ifNdef MUI_CUSTOMFUNCTION_ABORT
|
||||
!error "UAC: must call $$ {UAC.Unload} in MUI_CUSTOMFUNCTION_ABORT!"
|
||||
!endif
|
||||
!endif
|
||||
!if "${_HasUninstaller}" != ""
|
||||
!insertmacro _UAC.GenerateSimpleFunction "un" .onUninstFailed '${UAC.Unload}'
|
||||
!insertmacro _UAC.GenerateSimpleFunction "un" .onUninstSuccess '${UAC.Unload}'
|
||||
!ifNdef MUI_INCLUDED
|
||||
!insertmacro _UAC.GenerateSimpleFunction "un" .onUserAbort '${UAC.Unload}'
|
||||
!else
|
||||
!ifNdef MUI_CUSTOMFUNCTION_ABORT
|
||||
!error "UAC: must call $$ {UAC.Unload} in MUI_CUSTOMFUNCTION_(UN)ABORT!"
|
||||
!endif
|
||||
!endif
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!define UAC.FastCallFunctionAsUser '!insertmacro UAC.FastCallFunctionAsUser '
|
||||
!macro UAC.FastCallFunctionAsUser _func _var
|
||||
GetFunctionAddress ${_var} ${_func}
|
||||
UAC::ExecCodeSegment ${_var}
|
||||
!macroend
|
||||
!define UAC.CallFunctionAsUser '!insertmacro UAC.CallFunctionAsUser '
|
||||
!macro UAC.CallFunctionAsUser _func
|
||||
push $R9
|
||||
!insertmacro UAC.FastCallFunctionAsUser ${_func} $R9
|
||||
pop $R9
|
||||
!macroend
|
||||
|
||||
!define UAC.FastCallGetOuterInstanceHwndParent UAC::GetOuterHwnd
|
||||
!define UAC.GetOuterInstanceHwndParent '!insertmacro UAC.GetOuterInstanceHwndParent '
|
||||
!macro UAC.GetOuterInstanceHwndParent _var
|
||||
push $0
|
||||
${UAC.FastCallGetOuterInstanceHwndParent}
|
||||
Exch $0
|
||||
Pop ${_var}
|
||||
!macroend
|
||||
|
||||
|
||||
|
||||
!macro _UAC.DumpEx _disp _f _fp _v
|
||||
${_f} ${_fp}
|
||||
DetailPrint "${_disp}=${_v}"
|
||||
!macroend
|
||||
!macro _UAC.Dump _f _fp _v
|
||||
!insertmacro _UAC.DumpEx `${_f}` `${_f}` `${_fp}` `${_v}`
|
||||
!macroend
|
||||
!macro _UAC.DbgDetailPrint
|
||||
push $0
|
||||
push $1
|
||||
System::Call /NoUnload "advapi32::GetUserName(t.r0,*i${NSIS_MAX_STRLEN})"
|
||||
System::Call "Kernel32::GetComputerName(t.r1,*i${NSIS_MAX_STRLEN})"
|
||||
DetailPrint "$1\$0"
|
||||
;!insertmacro _UAC.DumpEx "User" System::Call "advapi32::GetUserName(t.r0,*i${NSIS_MAX_STRLEN})" $0
|
||||
!insertmacro _UAC.DumpEx "CmdLine" "" "" "$CmdLine"
|
||||
!insertmacro _UAC.Dump UAC::IsAdmin "" $0
|
||||
!insertmacro _UAC.Dump UAC::SupportsUAC "" $0
|
||||
!insertmacro _UAC.Dump UAC::GetElevationType "" $0
|
||||
pop $1
|
||||
pop $0
|
||||
!macroend
|
||||
|
||||
!endif /* ifndef UAC_HDR__INC */
|
||||
@@ -1,62 +0,0 @@
|
||||
RequestExecutionLevel user /* RequestExecutionLevel REQUIRED! */
|
||||
!define APPNAME "UAC_AdminOnly"
|
||||
Name "${APPNAME}"
|
||||
OutFile "${APPNAME}.exe"
|
||||
ShowInstDetails show
|
||||
|
||||
!include UAC.nsh ;<<< New headerfile that does everything for you ;)
|
||||
!include LogicLib.nsh
|
||||
|
||||
!define UACSTR.I.ElvAbortReqAdmin "This fancy app requires admin rights fool" ;custom error string, see _UAC.InitStrings macro in uac.nsh for more
|
||||
|
||||
Function .OnInit
|
||||
${UAC.I.Elevate.AdminOnly}
|
||||
FunctionEnd
|
||||
|
||||
Function .OnInstFailed
|
||||
${UAC.Unload}
|
||||
FunctionEnd
|
||||
Function .OnInstSuccess
|
||||
${UAC.Unload}
|
||||
FunctionEnd
|
||||
|
||||
Function ExecCodeSegmentTest
|
||||
${If} "$1" != "666, the # of the beast"
|
||||
MessageBox mb_ok "uh oh"
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Section "Info"
|
||||
!insertmacro _UAC.DbgDetailPrint
|
||||
|
||||
StrCpy $1 "666, the # of the beast"
|
||||
!insertmacro UAC.CallFunctionAsUser ExecCodeSegmentTest
|
||||
SectionEnd
|
||||
|
||||
page InstFiles
|
||||
|
||||
/* LEGACY CODE: (now uses magic code from UAC.nsh)
|
||||
Function .OnInit
|
||||
UAC_Elevate:
|
||||
UAC::RunElevated
|
||||
StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
|
||||
StrCmp 0 $0 0 UAC_Err ; Error?
|
||||
StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
|
||||
Quit
|
||||
UAC_Err:
|
||||
MessageBox mb_iconstop "Unable to elevate , error $0"
|
||||
Abort
|
||||
UAC_ElevationAborted:
|
||||
/*System::Call "user32::CreateWindowEx(i ${WS_EX_TRANSPARENT}|${WS_EX_LAYERED}, t 'Button', t 'blah', i 0, i 10, i 10, i 10, i 10, i 0, i 0, i 0) i .r0"
|
||||
ShowWindow $0 ${SW_SHOW}
|
||||
System::Call "user32::SetForegroundWindow(i r0) i."
|
||||
System::Call "user32::DestroyWindow(i r0) i."
|
||||
* /
|
||||
MessageBox mb_iconstop "This installer requires admin access, aborting!"
|
||||
Abort
|
||||
UAC_Success:
|
||||
StrCmp 1 $3 +4 ;Admin?
|
||||
StrCmp 3 $1 0 UAC_ElevationAborted ;Try again or abort?
|
||||
MessageBox mb_iconstop "This installer requires admin access, try again" ;Inform user...
|
||||
goto UAC_Elevate ;... and try again
|
||||
FunctionEnd*/
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
This sample will try to elevate, but it will also allow non admin users to continue if they click cancel in the elevation dialog
|
||||
*/
|
||||
|
||||
RequestExecutionLevel user /* RequestExecutionLevel REQUIRED! */
|
||||
!define APPNAME "UAC_AllowLUA"
|
||||
Name "${APPNAME}"
|
||||
OutFile "${APPNAME}.exe"
|
||||
ShowInstDetails show
|
||||
!include UAC.nsh
|
||||
|
||||
|
||||
Function .OnInstFailed
|
||||
UAC::Unload ;Must call unload!
|
||||
FunctionEnd
|
||||
Function .OnInstSuccess
|
||||
UAC::Unload ;Must call unload!
|
||||
FunctionEnd
|
||||
|
||||
Function .OnInit
|
||||
UAC::RunElevated
|
||||
;MessageBox mb_iconinformation "Debug: UAC::RunElevated: $\n0(Error)=$0 $\n1(UACMode)=$1 $\n2=$2 $\nadmin=$3$\n$\n$CmdLine"
|
||||
StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
|
||||
StrCmp 0 $0 0 UAC_Err ; Error?
|
||||
StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
|
||||
Quit
|
||||
UAC_Err:
|
||||
MessageBox mb_iconstop "Unable to elevate , error $0"
|
||||
Abort
|
||||
UAC_ElevationAborted:
|
||||
# elevation was aborted, we still run as normal
|
||||
UAC_Success:
|
||||
FunctionEnd
|
||||
|
||||
|
||||
|
||||
Section "Info"
|
||||
!insertmacro _UAC.DbgDetailPrint
|
||||
SectionEnd
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Page InstFiles
|
||||
@@ -1,30 +0,0 @@
|
||||
RequestExecutionLevel user /* RequestExecutionLevel REQUIRED! */
|
||||
!define APPNAME "UAC_GetUserShellFolderPath"
|
||||
Name "${APPNAME}"
|
||||
OutFile "${APPNAME}.exe"
|
||||
ShowInstDetails show
|
||||
|
||||
!include UAC.nsh
|
||||
!include LogicLib.nsh
|
||||
|
||||
page instfiles
|
||||
|
||||
Function .onInit
|
||||
${UAC.I.Elevate.AdminOnly}
|
||||
FunctionEnd
|
||||
|
||||
!ifndef CSIDL_PERSONAL
|
||||
!define CSIDL_PERSONAL 0x0005 ;My Documents
|
||||
!endif
|
||||
Section
|
||||
|
||||
/*
|
||||
You can specify a fallback value in the 2nd parameter, it is used if the installer is not elevated
|
||||
or running on NT4/Win9x or on errors.
|
||||
If you just want to check for success, use "" as the 2nd parameter and compare $0 with ""
|
||||
*/
|
||||
UAC::GetShellFolderPath ${CSIDL_PERSONAL} $Documents
|
||||
DetailPrint MyDocs=$0
|
||||
|
||||
|
||||
SectionEnd
|
||||
@@ -1,235 +0,0 @@
|
||||
/*
|
||||
This sample supports two modes, installing as a normal user (single user install) AND as admin (all users install)
|
||||
This sample uses the registry plugin, so you need to download that if you don't already have it
|
||||
*/
|
||||
|
||||
!define APPNAME "UAC_RealWorldFullyLoadedDualMode"
|
||||
!define ELEVATIONTITLE "${APPNAME}: Elevate" ;displayed during elevation on our custom page
|
||||
!define UNINSTALLER_NAME "Uninstall ${APPNAME}.exe"
|
||||
!define UNINSTALLER_REGSECTION "${APPNAME}"
|
||||
!define RegPath.MSUninstall "Software\Microsoft\Windows\CurrentVersion\Uninstall"
|
||||
Name "${APPNAME}"
|
||||
OutFile "${APPNAME}.exe"
|
||||
ShowInstDetails show
|
||||
SetCompressor LZMA
|
||||
RequestExecutionLevel user /* RequestExecutionLevel REQUIRED! */
|
||||
!include MUI.nsh
|
||||
!include UAC.nsh
|
||||
!include LogicLib.nsh
|
||||
!include Registry.nsh
|
||||
!include nsDialogs.nsh ;for our custom page
|
||||
!include FileFunc.nsh ;we need to parse the command line
|
||||
|
||||
!insertmacro GetParameters
|
||||
!insertmacro GetOptions
|
||||
|
||||
!define MUI_CUSTOMFUNCTION_ABORT onAbort
|
||||
!define MUI_CUSTOMFUNCTION_GUIINIT onGuiInit
|
||||
!define MUI_COMPONENTSPAGE_NODESC
|
||||
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
||||
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\llama-blue.ico"
|
||||
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\llama-blue.ico"
|
||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||
|
||||
var InstMode # 0: Single user, 1:All users, >1:elevated instance, perform page jump
|
||||
var hKey # Reg hive
|
||||
var hSelModeAdminRadio
|
||||
var StartMenuFolder
|
||||
|
||||
!macro SetMode IsAdmin
|
||||
!if "${IsAdmin}" > 0
|
||||
SetShellVarContext all
|
||||
StrCpy $InstMode 1
|
||||
StrCpy $hKey HKLM
|
||||
!else
|
||||
SetShellVarContext current
|
||||
StrCpy $InstMode 0
|
||||
StrCpy $hKey HKCU
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
Function .OnInit
|
||||
!insertmacro SetMode 0
|
||||
${GetParameters} $R9
|
||||
${GetOptions} "$R9" UAC $0 ;look for special /UAC:???? parameter (sort of undocumented)
|
||||
${Unless} ${Errors}
|
||||
UAC::IsAdmin
|
||||
${If} $0 < 1
|
||||
SetErrorLevel 666 ;special return value for outer instance so it knows we did not have admin rights
|
||||
Quit
|
||||
${EndIf}
|
||||
!insertmacro SetMode 1
|
||||
StrCpy $InstMode 2
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function onGuiInit
|
||||
${If} $InstMode >= 2
|
||||
${UAC.GetOuterInstanceHwndParent} $0
|
||||
${If} $0 <> 0
|
||||
System::Call /NOUNLOAD "*(i,i,i,i)i.r1"
|
||||
System::Call /NOUNLOAD 'user32::GetWindowRect(i $0,i r1)i.r2'
|
||||
${If} $2 <> 0
|
||||
System::Call /NOUNLOAD "*$1(i.r2,i.r3)"
|
||||
System::Call /NOUNLOAD 'user32::SetWindowPos(i $hwndParent,i0,ir2,ir3,i0,i0,i 4|1)'
|
||||
${EndIf}
|
||||
ShowWindow $hwndParent ${SW_SHOW}
|
||||
ShowWindow $0 ${SW_HIDE} ;hide outer instance installer window
|
||||
System::Free $1
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function Un.OnInit
|
||||
!insertmacro SetMode 0
|
||||
ReadRegDWORD $0 HKLM "${RegPath.MSUninstall}\${UNINSTALLER_REGSECTION}" InstMode ;We saved the "mode" in the installer
|
||||
${If} $0 U> 0
|
||||
; If it was installed for all users, we have to be admin to uninstall it
|
||||
${UAC.U.Elevate.AdminOnly} "${UNINSTALLER_NAME}"
|
||||
!insertmacro SetMode 1
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function onAbort
|
||||
${UAC.Unload}
|
||||
FunctionEnd
|
||||
|
||||
${UAC.AutoCodeUnload} 1 ;Auto-generate .OnInstFailed and .OnInstSuccess functions
|
||||
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipPageInElvModePreCB
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
Page Custom ModeSelectionPageCreate ModeSelectionPageLeave
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE CmpntsPreCB
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE DirPreCB
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_STARTMENU 1 $StartMenuFolder
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!define MUI_FINISHPAGE_TITLE_3LINES
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION FinishRunCB
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||
!insertmacro MUI_UNPAGE_WELCOME
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
Function CmpntsPreCB
|
||||
GetDlgItem $0 $hwndparent 3
|
||||
${IfThen} $InstMode >= 1 ${|} EnableWindow $0 0 ${|} ;prevent user from going back and selecting single user so noobs don't end up installing as the wrong user
|
||||
FunctionEnd
|
||||
|
||||
Function SkipPageInElvModePreCB
|
||||
${IfThen} $InstMode > 1 ${|} Abort ${|} ;skip this page so we get to the mode selection page
|
||||
FunctionEnd
|
||||
|
||||
Function ModeSelectionPageCreate
|
||||
${If} $InstMode > 1
|
||||
StrCpy $InstMode 1
|
||||
Abort ;skip this page and contine where the "parent" would have gone
|
||||
${EndIf}
|
||||
!insertmacro MUI_HEADER_TEXT_PAGE "Select install type" "Blah blah blah blah"
|
||||
nsDialogs::Create /NOUNLOAD 1018
|
||||
Pop $0
|
||||
${NSD_CreateLabel} 0 20u 75% 20u "Blah blah blah blah select install type..."
|
||||
Pop $0
|
||||
System::Call "advapi32::GetUserName(t.r0, *i ${NSIS_MAX_STRLEN}r1) i.r2"
|
||||
${NSD_CreateRadioButton} 0 40u 75% 15u "Single User ($0)"
|
||||
Pop $0
|
||||
${IfThen} $InstMode U< 1 ${|} SendMessage $0 ${BM_SETCHECK} 1 0 ${|}
|
||||
${NSD_CreateRadioButton} 0 60u 75% 15u "All users"
|
||||
Pop $hSelModeAdminRadio
|
||||
${IfThen} $InstMode U> 0 ${|} SendMessage $hSelModeAdminRadio ${BM_SETCHECK} 1 0 ${|}
|
||||
nsDialogs::Show
|
||||
FunctionEnd
|
||||
|
||||
!macro EnableCtrl dlg id state
|
||||
push $language
|
||||
GetDlgItem $language ${dlg} ${id}
|
||||
EnableWindow $language ${state}
|
||||
pop $language
|
||||
!macroend
|
||||
|
||||
Function ModeSelectionPageLeave
|
||||
SendMessage $hSelModeAdminRadio ${BM_GETCHECK} 0 0 $9
|
||||
UAC::IsAdmin
|
||||
${If} $9 U> 0
|
||||
${If} $0 <> 0
|
||||
!insertmacro SetMode 1
|
||||
${Else}
|
||||
System::Call /NoUnload 'user32::GetWindowText(i $HwndParent,t.R1,i ${NSIS_MAX_STRLEN})' ;get original window title
|
||||
System::Call /NoUnload 'user32::SetWindowText(i $HwndParent,t "${ELEVATIONTITLE}")' ;set out special title
|
||||
StrCpy $2 "" ;reset special return, only gets set when sub process is executed, not when user cancels
|
||||
!insertmacro EnableCtrl $HWNDParent 1 0 ;Disable next button, just because it looks good ;)
|
||||
${UAC.RunElevatedAndProcessMessages}
|
||||
!insertmacro EnableCtrl $HWNDParent 1 1
|
||||
System::Call 'user32::SetWindowText(i $HwndParent,t "$R1")' ;restore title
|
||||
${If} $2 = 666 ;our special return, the new process was not admin after all
|
||||
MessageBox mb_iconExclamation "You need to login with an account that is a member of the admin group to continue..."
|
||||
Abort
|
||||
${ElseIf} $0 = 1223 ;cancel
|
||||
Abort
|
||||
${Else}
|
||||
${If} $0 <> 0
|
||||
${If} $0 = 1062
|
||||
MessageBox mb_iconstop "Unable to elevate, Secondary Logon service not running!"
|
||||
${Else}
|
||||
MessageBox mb_iconstop "Unable to elevate, error $0 ($1,$2,$3)"
|
||||
${EndIf}
|
||||
Abort
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
Quit ;We now have a new process, the install will continue there, we have nothing left to do here
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function DirPreCB
|
||||
${If} $InstDir == ""
|
||||
${If} $InstMode U> 0
|
||||
StrCpy $InstDir "$ProgramFiles\${APPNAME}"
|
||||
${Else}
|
||||
StrCpy $InstDir "$APPDATA\${APPNAME}"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function FinishRunCB
|
||||
UAC::Exec "" "Notepad.exe" "$Windir\Win.INI" "$InstDir"
|
||||
FunctionEnd
|
||||
|
||||
Function CreateSMShortcuts
|
||||
CreateShortcut "$SMPrograms\${APPNAME}.lnk" "$Windir\Notepad.exe"
|
||||
FunctionEnd
|
||||
Function CreateDeskShortcuts
|
||||
CreateShortcut "$Desktop\${APPNAME}.lnk" "$Windir\Notepad.exe"
|
||||
FunctionEnd
|
||||
|
||||
Section "!Required files"
|
||||
SectionIn RO
|
||||
SetOutPath -
|
||||
!insertmacro _UAC.DbgDetailPrint ;some debug info, useful during testing
|
||||
;Install files here...
|
||||
WriteUninstaller "$InstDir\${UNINSTALLER_NAME}"
|
||||
${registry::Write} "$hKey\${RegPath.MSUninstall}\${UNINSTALLER_REGSECTION}" DisplayName "${APPNAME}" REG_SZ $0
|
||||
${registry::Write} "$hKey\${RegPath.MSUninstall}\${UNINSTALLER_REGSECTION}" UninstallString "$InstDir\${UNINSTALLER_NAME}" REG_SZ $0
|
||||
${registry::Write} "$hKey\${RegPath.MSUninstall}\${UNINSTALLER_REGSECTION}" InstMode $InstMode REG_DWORD $0
|
||||
${registry::Unload}
|
||||
SectionEnd
|
||||
|
||||
Section "Startmenu Shortcuts"
|
||||
${UAC.CallFunctionAsUser} CreateSMShortcuts
|
||||
SectionEnd
|
||||
Section "Desktop Shortcut"
|
||||
${UAC.CallFunctionAsUser} CreateDeskShortcuts
|
||||
SectionEnd
|
||||
|
||||
Section Uninstall
|
||||
Delete "$InstDir\${UNINSTALLER_NAME}"
|
||||
Delete "$SMPrograms\${APPNAME}.lnk"
|
||||
Delete "$Desktop\${APPNAME}.lnk"
|
||||
|
||||
RMDir "$InstDir"
|
||||
${registry::DeleteKey} "$hKey\${RegPath.MSUninstall}\${UNINSTALLER_REGSECTION}" $0
|
||||
${registry::Unload}
|
||||
SectionEnd
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
This script was made in response to http://forums.winamp.com/showthread.php?threadid=280330
|
||||
It is a ugly hack and is mostly here just to have a solution right now.
|
||||
Hopefully, NSIS will add support for changing the RequestExecutionLevel of the uninstaller
|
||||
This code inspired the _UAC.GenerateUninstallerTango macro (called by ${UAC.U.Elevate.AdminOnly} unless you define UAC_DISABLEUNINSTALLERTANGO)
|
||||
*/
|
||||
|
||||
RequestExecutionLevel user /* RequestExecutionLevel REQUIRED! */
|
||||
!define APPNAME "UAC_Uninstaller"
|
||||
Name "${APPNAME}"
|
||||
OutFile "${APPNAME}.exe"
|
||||
ShowInstDetails show
|
||||
!include LogicLib.nsh
|
||||
|
||||
!define UNINSTALLER_UACDATA "uac.ini"
|
||||
!define UNINSTALLER_NAME "Uninstall FooBarBaz"
|
||||
|
||||
Function un.onInit
|
||||
ReadIniStr $0 "$ExeDir\${UNINSTALLER_UACDATA}" UAC "Un.First"
|
||||
${IF} $0 != 1
|
||||
;SetSilent silent
|
||||
InitPluginsDir
|
||||
WriteIniStr "$PluginsDir\${UNINSTALLER_UACDATA}" UAC "Un.First" 1
|
||||
CopyFiles /SILENT "$EXEPATH" "$PluginsDir\${UNINSTALLER_NAME}.exe"
|
||||
StrCpy $0 ""
|
||||
${IfThen} ${Silent} ${|} StrCpy $0 "/S " ${|}
|
||||
ExecWait '"$PluginsDir\${UNINSTALLER_NAME}.exe" $0/NCRC _?=$INSTDIR' $0
|
||||
SetErrorLevel $0
|
||||
Quit
|
||||
${EndIf}
|
||||
|
||||
# UAC code goes here ...
|
||||
FunctionEnd
|
||||
|
||||
Section
|
||||
WriteUninstaller "$exedir\${UNINSTALLER_NAME}.exe"
|
||||
SetAutoClose true
|
||||
DetailPrint "Uninstalling..."
|
||||
Sleep 1111
|
||||
Exec '"$exedir\${UNINSTALLER_NAME}.exe"'
|
||||
SectionEnd
|
||||
|
||||
Section uninstall
|
||||
MessageBox mb_ok "My filename is: $EXEFILE"
|
||||
Delete "$instdir\${UNINSTALLER_NAME}.exe"
|
||||
Delete "$instdir\${APPNAME}.exe" ;delete generated installer aswell, this is just a sample script
|
||||
SectionEnd
|
||||
|
||||
page InstFiles
|
||||
@@ -1,24 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by resource.rc
|
||||
//
|
||||
#define IDD_MYRUNAS 101
|
||||
#define IDC_RUNASCURR 1000
|
||||
#define IDC_RUNASSPEC 1001
|
||||
#define IDC_SHICON 1002
|
||||
#define IDC_HELPTEXT 1003
|
||||
#define IDC_USERNAME 1004
|
||||
#define IDC_PASSWORD 1005
|
||||
#define IDC_LBLUSER 1007
|
||||
#define IDC_LBLPWD 1008
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1009
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,109 +0,0 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
#include "uac.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_MYRUNAS DIALOG DISCARDABLE 0, 0, 250, 145
|
||||
STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_SETFOREGROUND | DS_FIXEDSYS |
|
||||
DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&OK",IDOK,132,122,50,14
|
||||
PUSHBUTTON "Ca&ncel",IDCANCEL,188,122,50,14
|
||||
ICON "",IDC_SHICON,7,7,20,20
|
||||
LTEXT "",IDC_HELPTEXT,34,7,204,35
|
||||
CONTROL "",IDC_RUNASCURR,"Button",BS_AUTORADIOBUTTON,20,49,218,
|
||||
10
|
||||
CONTROL "",IDC_RUNASSPEC,"Button",BS_AUTORADIOBUTTON,20,65,218,
|
||||
10
|
||||
LTEXT "&User name:",IDC_LBLUSER,20,84,42,16
|
||||
EDITTEXT IDC_USERNAME,63,83,175,14,ES_AUTOHSCROLL
|
||||
LTEXT "&Password:",IDC_LBLPWD,20,102,42,20
|
||||
EDITTEXT IDC_PASSWORD,63,100,175,14,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_MYRUNAS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 238
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 136
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"#include ""uac.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
@@ -1,169 +0,0 @@
|
||||
//Copyright (C) 2007 Anders Kjersem. Licensed under the zlib/libpng license, see License.txt for details.
|
||||
#pragma once
|
||||
/** /#define BUILD_DBGRELEASE // Include simple debug output in release version */
|
||||
/** /#define BUILD_DBGSELECTELVMODE //Test MyRunAs*/
|
||||
|
||||
/** /#define UNICODE // Unicode build */
|
||||
/**/#define FEAT_CUSTOMRUNASDLG // Include custom runas dialog */
|
||||
/**/#define FEAT_CUSTOMRUNASDLG_TRANSLATE //*/
|
||||
/**/#define FEAT_MSRUNASDLGMODHACK // Default to other user radio button */
|
||||
|
||||
|
||||
#if !defined(APSTUDIO_INVOKED) && !defined(RC_INVOKED)
|
||||
|
||||
#if (defined(_MSC_VER) && !defined(_DEBUG))
|
||||
#pragma comment(linker,"/opt:nowin98")
|
||||
#pragma comment(linker,"/ignore:4078")
|
||||
#pragma comment(linker,"/merge:.rdata=.text")
|
||||
|
||||
//#pragma intrinsic(memset) //http://www.codeguru.com/forum/showthread.php?t=371491&page=2&pp=15 | http://www.ddj.com/windows/184416623
|
||||
#endif
|
||||
|
||||
#if defined(UNICODE) && !defined(_UNICODE)
|
||||
#define _UNICODE
|
||||
#endif
|
||||
#ifdef _UNICODE
|
||||
#define TFUNCSUFFIX W
|
||||
#else
|
||||
#define TFUNCSUFFIX A
|
||||
#endif
|
||||
#define _PCJOIN(a,b) a##b
|
||||
#define PCJOIN(a,b) _PCJOIN(a,b)
|
||||
|
||||
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <ShellAPI.h>
|
||||
#include <TChar.h>
|
||||
#include "NSISUtil.h"
|
||||
|
||||
#ifndef SEE_MASK_NOZONECHECKS
|
||||
#define SEE_MASK_NOZONECHECKS 0x00800000
|
||||
#endif
|
||||
|
||||
#define COUNTOF(___c) ( sizeof(___c)/sizeof(___c[0]) )
|
||||
#ifndef ARRAYSIZE
|
||||
#define ARRAYSIZE COUNTOF
|
||||
#endif
|
||||
#define FORCEINLINE __forceinline
|
||||
|
||||
#if _MSC_VER >= 1400
|
||||
extern void* __cdecl memset(void*mem,int c,size_t len);
|
||||
#endif
|
||||
|
||||
FORCEINLINE LRESULT MySndDlgItemMsg(HWND hDlg,int id,UINT Msg,WPARAM wp=0,LPARAM lp=0) {return SendMessage(GetDlgItem(hDlg,id),Msg,wp,lp);}
|
||||
#ifndef UAC_NOCUSTOMIMPLEMENTATIONS
|
||||
FORCEINLINE HANDLE WINAPI GetCurrentProcess(){return ((HANDLE)(-1));}
|
||||
FORCEINLINE HANDLE WINAPI GetCurrentThread(){return ((HANDLE)(-2));}
|
||||
|
||||
#define MyTStrLen lstrlen
|
||||
|
||||
#undef lstrcpy
|
||||
#define lstrcpy MyTStrCpy
|
||||
FORCEINLINE LPTSTR MyTStrCpy(LPTSTR s1,LPCTSTR s2) {return PCJOIN(lstr,PCJOIN(cpyn,TFUNCSUFFIX))(s1,s2,0x7FFFFFFF);}
|
||||
|
||||
#undef lstrcat
|
||||
#define lstrcat MyTStrCat
|
||||
LPTSTR MyTStrCat(LPTSTR s1,LPCTSTR s2)
|
||||
#ifdef UAC_INITIMPORTS
|
||||
{return s1?MyTStrCpy(&s1[MyTStrLen(s1)],s2):NULL;}
|
||||
#else
|
||||
;
|
||||
#endif //UAC_INITIMPORTS
|
||||
|
||||
#endif //UAC_NOCUSTOMIMPLEMENTATIONS
|
||||
|
||||
|
||||
//DelayLoaded functions:
|
||||
typedef BOOL (WINAPI*ALLOWSETFOREGROUNDWINDOW)(DWORD dwProcessId);
|
||||
typedef BOOL (WINAPI*OPENPROCESSTOKEN)(HANDLE ProcessHandle,DWORD DesiredAccess,PHANDLE TokenHandle);
|
||||
typedef BOOL (WINAPI*OPENTHREADTOKEN)(HANDLE ThreadHandle,DWORD DesiredAccess,BOOL OpenAsSelf,PHANDLE TokenHandle);
|
||||
typedef BOOL (WINAPI*GETTOKENINFORMATION)(HANDLE hToken,TOKEN_INFORMATION_CLASS TokInfoClass,LPVOID TokInfo,DWORD TokInfoLenh,PDWORD RetLen);
|
||||
typedef BOOL (WINAPI*ALLOCATEANDINITIALIZESID)(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,BYTE nSubAuthorityCount,DWORD sa0,DWORD sa1,DWORD sa2,DWORD sa3,DWORD sa4,DWORD sa5,DWORD sa6,DWORD sa7,PSID*pSid);
|
||||
typedef PVOID (WINAPI*FREESID)(PSID pSid);
|
||||
typedef BOOL (WINAPI*EQUALSID)(PSID pSid1,PSID pSid2);
|
||||
typedef BOOL (WINAPI*CHECKTOKENMEMBERSHIP)(HANDLE TokenHandle,PSID SidToCheck,PBOOL IsMember);
|
||||
#ifdef FEAT_CUSTOMRUNASDLG
|
||||
typedef BOOL (WINAPI*GETUSERNAME)(LPTSTR lpBuffer,LPDWORD nSize);
|
||||
typedef BOOL (WINAPI*CREATEPROCESSWITHLOGONW)(LPCWSTR lpUsername,LPCWSTR lpDomain,LPCWSTR lpPassword,DWORD dwLogonFlags,LPCWSTR lpApplicationName,LPWSTR lpCommandLine,DWORD dwCreationFlags,LPVOID pEnv,LPCWSTR WorkDir,LPSTARTUPINFOW pSI,LPPROCESS_INFORMATION pPI);
|
||||
#define SECURITY_WIN32
|
||||
#include <Security.h>//NameSamCompatible
|
||||
typedef BOOLEAN (WINAPI*GETUSERNAMEEX)(EXTENDED_NAME_FORMAT NameFormat,LPTSTR lpNameBuffer,PULONG nSize);
|
||||
#endif
|
||||
#ifdef UAC_INITIMPORTS
|
||||
ALLOWSETFOREGROUNDWINDOW _AllowSetForegroundWindow=0;
|
||||
OPENPROCESSTOKEN _OpenProcessToken=0;
|
||||
OPENTHREADTOKEN _OpenThreadToken=0;
|
||||
GETTOKENINFORMATION _GetTokenInformation=0;
|
||||
ALLOCATEANDINITIALIZESID _AllocateAndInitializeSid=0;
|
||||
FREESID _FreeSid=0;
|
||||
EQUALSID _EqualSid=0;
|
||||
CHECKTOKENMEMBERSHIP _CheckTokenMembership=0;
|
||||
#ifdef FEAT_CUSTOMRUNASDLG
|
||||
GETUSERNAME _GetUserName=0;
|
||||
GETUSERNAMEEX _GetUserNameEx=0;
|
||||
CREATEPROCESSWITHLOGONW _CreateProcessWithLogonW=0;
|
||||
#endif
|
||||
#else
|
||||
#ifdef FEAT_CUSTOMRUNASDLG
|
||||
extern GETUSERNAME _GetUserName;
|
||||
extern GETUSERNAMEEX _GetUserNameEx;
|
||||
extern CREATEPROCESSWITHLOGONW _CreateProcessWithLogonW;
|
||||
#endif
|
||||
#endif /* UAC_INITIMPORTS */
|
||||
|
||||
|
||||
extern DWORD DelayLoadDlls();
|
||||
#ifdef FEAT_CUSTOMRUNASDLG
|
||||
extern DWORD MyRunAs(HINSTANCE hInstDll,SHELLEXECUTEINFO&sei);
|
||||
#endif
|
||||
|
||||
#if !defined(NTDDI_VISTA) || defined(BUILD_OLDSDK)
|
||||
//#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < 0x06000000) || !defined(NTDDI_VISTA)
|
||||
//#if !defined(TOKEN_ELEVATION_TYPE) || defined(BUILD_OLDSDK)
|
||||
enum TOKEN_ELEVATION_TYPE {
|
||||
TokenElevationTypeDefault = 1,
|
||||
TokenElevationTypeFull,
|
||||
TokenElevationTypeLimited
|
||||
};
|
||||
enum _TOKEN_INFORMATION_CLASS___VISTA {
|
||||
TokenElevationType = (TokenOrigin+1),
|
||||
TokenLinkedToken,
|
||||
TokenElevation,
|
||||
TokenHasRestrictions,
|
||||
TokenAccessInformation,
|
||||
TokenVirtualizationAllowed,
|
||||
TokenVirtualizationEnabled,
|
||||
TokenIntegrityLevel,
|
||||
TokenUIAccess,
|
||||
TokenMandatoryPolicy,
|
||||
TokenLogonSid,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(_DEBUG) || defined(BUILD_DBGRELEASE)
|
||||
//Simple debug helpers:
|
||||
#define BUILD_DBG
|
||||
/** /#define BUILD_XPTEST //Pretend UAC exists and "elevate" with NT runas */
|
||||
#define DBG_RESETDBGVIEW() do{HWND hDbgView=FindWindowA("dbgviewClass",0);PostMessage(hDbgView,WM_COMMAND,40020,0);if(0)SetForegroundWindow(hDbgView);}while(0)
|
||||
#define _pp_MakeStr_(x) #x
|
||||
#define pp_MakeStr(x) _pp_MakeStr_(x)
|
||||
#define TRACE OutputDebugStringA
|
||||
#define DBGONLY(_x) _x
|
||||
#ifndef ASSERT
|
||||
#define ASSERT(_x) do{if(!(_x)){MessageBoxA(GetActiveWindow(),#_x##"\n\n"##__FILE__##":"## pp_MakeStr(__LINE__),"SimpleAssert",0);/*TRACE(#_x##"\n"##__FILE__##":" pp_MakeStr(__LINE__)"\n");*/}}while(0)
|
||||
#endif
|
||||
#define VERIFY(_x) ASSERT(_x)
|
||||
static void TRACEF(const char*fmt,...) {va_list a;va_start(a,fmt);static TCHAR b[1024*4];if (sizeof(TCHAR)!=sizeof(char)){static TCHAR fmtBuf[COUNTOF(b)];VERIFY(wsprintf(fmtBuf,_T("%hs"),fmt)<COUNTOF(fmtBuf));fmt=(LPCSTR)fmtBuf;}wvsprintf(b,(TCHAR*)fmt,a);OutputDebugString(b);}
|
||||
#else
|
||||
#define TRACE /*(void)0*/
|
||||
#define DBGONLY(_x)
|
||||
#define ASSERT(_x)
|
||||
#define VERIFY(_x) ((void)(_x))
|
||||
#define TRACEF TRACE
|
||||
#endif /* DEBUG */
|
||||
|
||||
#endif /* APSTUDIO_INVOKED */
|
||||
|
||||
2
binary
@@ -16,6 +16,6 @@
|
||||
<file>resources/lock-http@2x.png</file>
|
||||
<file>resources/lock-https.png</file>
|
||||
<file>resources/lock-https@2x.png</file>
|
||||
<file>resources/accounts.png</file>
|
||||
<file>resources/account.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -40,7 +40,7 @@ set(__get_git_revision_description YES)
|
||||
get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
|
||||
function(get_git_head_revision _refspecvar _hashvar)
|
||||
set(GIT_PARENT_DIR "${CMAKE_SOURCE_DIR}")
|
||||
set(GIT_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
|
||||
while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories
|
||||
set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}")
|
||||
@@ -53,6 +53,13 @@ function(get_git_head_revision _refspecvar _hashvar)
|
||||
endif()
|
||||
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
|
||||
endwhile()
|
||||
# check if this is a submodule
|
||||
if(NOT IS_DIRECTORY ${GIT_DIR})
|
||||
file(READ ${GIT_DIR} submodule)
|
||||
string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule})
|
||||
get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
|
||||
get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE)
|
||||
endif()
|
||||
set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
|
||||
if(NOT EXISTS "${GIT_DATA}")
|
||||
file(MAKE_DIRECTORY "${GIT_DATA}")
|
||||
|
||||
@@ -175,10 +175,11 @@ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VERSION}"
|
||||
StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
|
||||
StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
|
||||
StrCmp $LANGUAGE ${LANG_GREEK} Greek 0
|
||||
StrCmp $LANGUAGE ${LANG_GREEK} Basque 0
|
||||
StrCmp $LANGUAGE ${LANG_GREEK} Galician 0
|
||||
StrCmp $LANGUAGE ${LANG_GREEK} Slovak 0
|
||||
StrCmp $LANGUAGE ${LANG_GREEK} Turkish 0
|
||||
StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
|
||||
StrCmp $LANGUAGE ${LANG_GALICIAN} Galician 0
|
||||
StrCmp $LANGUAGE ${LANG_SLOVAC} Slovak 0
|
||||
StrCmp $LANGUAGE ${LANG_TURKISH} Turkish 0
|
||||
StrCmp $LANGUAGE ${LANG_NORWEGIAN} Norwegian 0
|
||||
StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
|
||||
German:
|
||||
!include "${source_path}/admin/win/nsi/l10n\German.nsh"
|
||||
@@ -221,6 +222,9 @@ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VERSION}"
|
||||
Goto EndLanguageCmp
|
||||
Brazilian:
|
||||
!include "${source_path}/admin/win/nsi/l10n\PortugueseBR.nsh"
|
||||
Goto EndLanguageCmp
|
||||
Norwegian:
|
||||
!include "${source_path}/admin/win/nsi/l10n\Norwegian.nsh"
|
||||
EndLanguageCmp:
|
||||
|
||||
FunctionEnd
|
||||
@@ -264,7 +268,7 @@ FunctionEnd
|
||||
!macro ConfirmEndProcess processName
|
||||
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
|
||||
$ConfirmEndProcess_MESSAGEBOX_TEXT \
|
||||
IDYES process_${processName}_kill IDNO process_${processName}_ended
|
||||
/SD IDYES IDYES process_${processName}_kill IDNO process_${processName}_ended
|
||||
process_${processName}_kill:
|
||||
DetailPrint $ConfirmEndProcess_KILLING_PROCESSES_TEXT
|
||||
Processes::KillProcess ${processName}
|
||||
@@ -441,7 +445,6 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
|
||||
File "${MING_BIN}\libGLESv2.dll"
|
||||
File "${MING_BIN}\libjpeg-8.dll"
|
||||
File "${MING_BIN}\libpcre16-0.dll"
|
||||
File "${MING_BIN}\libproxy.dll"
|
||||
File "${MING_BIN}\libsqlite3-0.dll"
|
||||
File "${MING_BIN}\libcrypto-10.dll"
|
||||
File "${MING_BIN}\libssl-10.dll"
|
||||
@@ -476,6 +479,7 @@ SectionEnd
|
||||
CreateDirectory "$INSTDIR\shellext"
|
||||
!define LIBRARY_COM
|
||||
!define LIBRARY_SHELL_EXTENSION
|
||||
!define LIBRARY_IGNORE_VERSION
|
||||
${If} ${RunningX64}
|
||||
!define LIBRARY_X64
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCUtil_x64.dll" "$INSTDIR\shellext\OCUtil_x64.dll" "$INSTDIR\shellext"
|
||||
@@ -489,6 +493,7 @@ SectionEnd
|
||||
${Endif}
|
||||
!undef LIBRARY_COM
|
||||
!undef LIBRARY_SHELL_EXTENSION
|
||||
!undef LIBRARY_IGNORE_VERSION
|
||||
${MementoSectionEnd}
|
||||
!endif
|
||||
|
||||
@@ -512,7 +517,9 @@ SectionGroup $SectionGroup_Shortcuts
|
||||
SetDetailsPrint textonly
|
||||
DetailPrint $OPTION_SECTION_SC_DESKTOP_DetailPrint
|
||||
SetDetailsPrint listonly
|
||||
SetShellVarContext all
|
||||
CreateShortCut "$DESKTOP\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}"
|
||||
SetShellVarContext current
|
||||
${MementoSectionEnd}
|
||||
!endif
|
||||
|
||||
@@ -521,8 +528,10 @@ SectionGroup $SectionGroup_Shortcuts
|
||||
SectionIn 1 2
|
||||
SetDetailsPrint textonly
|
||||
DetailPrint $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint
|
||||
SetShellVarContext all
|
||||
SetDetailsPrint listonly
|
||||
CreateShortCut "$QUICKLAUNCH\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}"
|
||||
SetShellVarContext current
|
||||
${MementoSectionEnd}
|
||||
!endif
|
||||
|
||||
@@ -643,6 +652,7 @@ Section Uninstall
|
||||
!ifdef OPTION_SECTION_SC_SHELL_EXT
|
||||
!define LIBRARY_COM
|
||||
!define LIBRARY_SHELL_EXTENSION
|
||||
!define LIBRARY_IGNORE_VERSION
|
||||
${If} ${HasSection} SEC_SHELL_EXT
|
||||
DetailPrint "Uninstalling x64 overlay DLLs"
|
||||
!define LIBRARY_X64
|
||||
@@ -658,6 +668,7 @@ Section Uninstall
|
||||
${EndIf}
|
||||
!undef LIBRARY_COM
|
||||
!undef LIBRARY_SHELL_EXTENSION
|
||||
!undef LIBRARY_IGNORE_VERSION
|
||||
!endif
|
||||
|
||||
;Start menu shortcut
|
||||
@@ -672,18 +683,22 @@ Section Uninstall
|
||||
;Desktop shortcut.
|
||||
!ifdef OPTION_SECTION_SC_DESKTOP
|
||||
${If} ${HasSection} SEC_DESKTOP
|
||||
SetShellVarContext all
|
||||
${If} ${FileExists} "$DESKTOP\${APPLICATION_NAME}.lnk"
|
||||
Delete "$DESKTOP\${APPLICATION_NAME}.lnk"
|
||||
${EndIf}
|
||||
SetShellVarContext current
|
||||
${EndIf}
|
||||
!endif
|
||||
|
||||
;Quick Launch shortcut.
|
||||
!ifdef OPTION_SECTION_SC_QUICK_LAUNCH
|
||||
${If} ${HasSection} SEC_QUICK_LAUNCH
|
||||
SetShellVarContext all
|
||||
${If} ${FileExists} "$QUICKLAUNCH\${APPLICATION_NAME}.lnk"
|
||||
Delete "$QUICKLAUNCH\${APPLICATION_NAME}.lnk"
|
||||
${EndIf}
|
||||
SetShellVarContext current
|
||||
${EndIf}
|
||||
!endif
|
||||
|
||||
@@ -770,7 +785,7 @@ Function .onInit
|
||||
goto UAC_Elevate
|
||||
|
||||
;Prevent multiple instances.
|
||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "owncloudInstaller") i .r1 ?e'
|
||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${APPLICATION_SHORTNAME}Installer") i .r1 ?e'
|
||||
Pop $R0
|
||||
StrCmp $R0 0 +3
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION $INIT_INSTALLER_RUNNING
|
||||
@@ -835,7 +850,7 @@ Function un.onInit
|
||||
goto UAC_Elevate
|
||||
|
||||
;Prevent multiple instances.
|
||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "owncloudUninstaller") i .r1 ?e'
|
||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${APPLICATION_SHORTNAME}Uninstaller") i .r1 ?e'
|
||||
Pop $R0
|
||||
StrCmp $R0 0 +3
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION $INIT_UNINSTALLER_RUNNING
|
||||
|
||||
@@ -17,6 +17,7 @@ if( Qt5Core_FOUND )
|
||||
message(STATUS "Found Qt5 core, checking for further dependencies...")
|
||||
find_package(Qt5Network REQUIRED)
|
||||
find_package(Qt5Xml REQUIRED)
|
||||
find_package(Qt5Concurrent REQUIRED)
|
||||
if(NOT TOKEN_AUTH_ONLY)
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
find_package(Qt5WebKit REQUIRED)
|
||||
|
||||
@@ -2,25 +2,21 @@
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
||||
OUTPUT_VARIABLE GCC_VERSION)
|
||||
if(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wno-long-long")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
|
||||
else(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
|
||||
endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(CMAKE_CXX_COMPILER MATCHES "clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
endif(CMAKE_CXX_COMPILER MATCHES "clang")
|
||||
# TODO: handle msvc compilers warnings?
|
||||
|
||||
if(DEFINED MIRALL_FATAL_WARNINGS)
|
||||
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER MATCHES "clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
|
||||
endif (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER MATCHES "clang")
|
||||
# TODO: handle msvc compilers warnings?
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
|
||||
endif(DEFINED MIRALL_FATAL_WARNINGS)
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#cmakedefine APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@"
|
||||
#cmakedefine APPLICATION_UPDATE_URL "@APPLICATION_UPDATE_URL@"
|
||||
|
||||
#cmakedefine ZLIB_FOUND @ZLIB_FOUND@
|
||||
|
||||
#cmakedefine SYSCONFDIR "@SYSCONFDIR@"
|
||||
#cmakedefine DATADIR "@DATADIR@"
|
||||
|
||||
|
||||
@@ -3,13 +3,7 @@
|
||||
# global needed variables
|
||||
set(APPLICATION_NAME "ocsync")
|
||||
|
||||
set(APPLICATION_VERSION_MAJOR "0")
|
||||
set(APPLICATION_VERSION_MINOR "91")
|
||||
set(APPLICATION_VERSION_PATCH "5")
|
||||
|
||||
set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
|
||||
|
||||
set(LIBRARY_VERSION "0.2.1")
|
||||
set(LIBRARY_VERSION ${MIRALL_VERSION})
|
||||
set(LIBRARY_SOVERSION "0")
|
||||
|
||||
# add definitions
|
||||
|
||||
@@ -386,6 +386,20 @@ static int _csync_treewalk_visitor(void *obj, void *data) {
|
||||
SAFE_FREE(renamed_path);
|
||||
}
|
||||
|
||||
if (!other_node) {
|
||||
/* Check the source path as well. */
|
||||
int len;
|
||||
uint64_t h = 0;
|
||||
char *renamed_path = csync_rename_adjust_path_source(ctx, cur->path);
|
||||
|
||||
if (!c_streq(renamed_path, cur->path)) {
|
||||
len = strlen( renamed_path );
|
||||
h = c_jhash64((uint8_t *) renamed_path, len, 0);
|
||||
other_node = c_rbtree_find(other_tree, &h);
|
||||
}
|
||||
SAFE_FREE(renamed_path);
|
||||
}
|
||||
|
||||
if (obj == NULL || data == NULL) {
|
||||
ctx->status_code = CSYNC_STATUS_PARAM_ERROR;
|
||||
return -1;
|
||||
@@ -573,19 +587,11 @@ int csync_commit(CSYNC *ctx) {
|
||||
}
|
||||
ctx->statedb.db = NULL;
|
||||
|
||||
#ifdef USE_NEON
|
||||
rc = owncloud_commit(ctx);
|
||||
if (rc < 0) {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "commit failed: %s",
|
||||
ctx->error_string ? ctx->error_string : "");
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
|
||||
_csync_clean_ctx(ctx);
|
||||
|
||||
ctx->remote.read_from_db = 0;
|
||||
ctx->read_from_db_disabled = 0;
|
||||
ctx->read_remote_from_db = true;
|
||||
ctx->db_is_empty = false;
|
||||
|
||||
|
||||
/* Create new trees */
|
||||
@@ -782,10 +788,3 @@ int csync_set_module_property(CSYNC* ctx, const char* key, void* value)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int csync_set_read_from_db(CSYNC* ctx, int enabled)
|
||||
{
|
||||
ctx->read_from_db_disabled = !enabled;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,8 +40,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <config_csync.h>
|
||||
|
||||
#include "csync_version.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -91,6 +89,7 @@ enum csync_status_codes_e {
|
||||
CSYNC_STATUS_OUT_OF_SPACE,
|
||||
CSYNC_STATUS_QUOTA_EXCEEDED, /* UNUSED */
|
||||
CSYNC_STATUS_SERVICE_UNAVAILABLE,
|
||||
CSYNC_STATUS_STORAGE_UNAVAILABLE,
|
||||
CSYNC_STATUS_FILE_SIZE_ERROR,
|
||||
CSYNC_STATUS_CONTEXT_LOST,
|
||||
CSYNC_STATUS_MERGE_FILETREE_ERROR,
|
||||
@@ -104,6 +103,7 @@ enum csync_status_codes_e {
|
||||
CSYNC_STATUS_INDIVIDUAL_IS_HARDLINK,
|
||||
CSYNC_STATUS_INDIVIDUAL_IGNORE_LIST,
|
||||
CSYNC_STATUS_INDIVIDUAL_IS_INVALID_CHARS,
|
||||
CSYNC_STATUS_INDIVIDUAL_EXCLUDE_LONG_FILENAME,
|
||||
CYSNC_STATUS_FILE_LOCKED_OR_OPEN
|
||||
};
|
||||
|
||||
@@ -335,7 +335,7 @@ int csync_update(CSYNC *ctx);
|
||||
int csync_reconcile(CSYNC *ctx);
|
||||
|
||||
/**
|
||||
* @brief Commit the sync results to journal
|
||||
* @brief Re-initializes the csync context
|
||||
*
|
||||
* @param ctx The context to commit.
|
||||
*
|
||||
@@ -548,11 +548,6 @@ void csync_resume(CSYNC *ctx);
|
||||
*/
|
||||
int csync_abort_requested(CSYNC *ctx);
|
||||
|
||||
/**
|
||||
* Specify if it is allowed to read the remote tree from the DB (default to enabled)
|
||||
*/
|
||||
int csync_set_read_from_db(CSYNC* ctx, int enabled);
|
||||
|
||||
char *csync_normalize_etag(const char *);
|
||||
time_t oc_httpdate_parse( const char *date );
|
||||
|
||||
|
||||
@@ -151,11 +151,12 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
|
||||
return match;
|
||||
}
|
||||
|
||||
// See http://support.microsoft.com/kb/74496
|
||||
static const char *win_reserved_words[] = {"CON","PRN","AUX", "NUL",
|
||||
"COM1", "COM2", "COM3", "COM4",
|
||||
"LPT1", "LPT2", "LPT3", "CLOCK$" };
|
||||
|
||||
// See http://support.microsoft.com/kb/74496 and
|
||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
|
||||
// Additionally, we ignore '$Recycle.Bin', see https://github.com/owncloud/client/issues/2955
|
||||
static const char* win_reserved_words[] = {"CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5",
|
||||
"COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4",
|
||||
"LPT5", "LPT6", "LPT7", "LPT8", "LPT9", "CLOCK$", "$Recycle.Bin" };
|
||||
|
||||
bool csync_is_windows_reserved_word(const char* filename) {
|
||||
|
||||
@@ -231,6 +232,15 @@ CSYNC_EXCLUDE_TYPE csync_excluded_no_ctx(c_strlist_t *excludes, const char *path
|
||||
goto out;
|
||||
}
|
||||
|
||||
// check the strlen and ignore the file if its name is longer than 254 chars.
|
||||
// whenever changing this also check createDownloadTmpFileName
|
||||
if (strlen(bname) > 254) {
|
||||
match = CSYNC_FILE_EXCLUDE_LONG_FILENAME;
|
||||
SAFE_FREE(bname);
|
||||
SAFE_FREE(dname);
|
||||
goto out;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
// Windows cannot sync files ending in spaces (#2176). It also cannot
|
||||
// distinguish files ending in '.' from files without an ending,
|
||||
|
||||
@@ -26,7 +26,8 @@ enum csync_exclude_type_e {
|
||||
CSYNC_FILE_SILENTLY_EXCLUDED,
|
||||
CSYNC_FILE_EXCLUDE_AND_REMOVE,
|
||||
CSYNC_FILE_EXCLUDE_LIST,
|
||||
CSYNC_FILE_EXCLUDE_INVALID_CHAR
|
||||
CSYNC_FILE_EXCLUDE_INVALID_CHAR,
|
||||
CSYNC_FILE_EXCLUDE_LONG_FILENAME
|
||||
};
|
||||
typedef enum csync_exclude_type_e CSYNC_EXCLUDE_TYPE;
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ enum csync_log_priority_e {
|
||||
};
|
||||
|
||||
#define CSYNC_LOG(priority, ...) \
|
||||
csync_log(priority, __FUNCTION__, __VA_ARGS__)
|
||||
csync_log(priority, __func__, __VA_ARGS__)
|
||||
|
||||
void csync_log(int verbosity,
|
||||
const char *function,
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#define ERRNO_ERROR_STRING CSYNC_CUSTOM_ERRNO_BASE+13
|
||||
#define ERRNO_SERVICE_UNAVAILABLE CSYNC_CUSTOM_ERRNO_BASE+14
|
||||
#define ERRNO_USER_ABORT CSYNC_CUSTOM_ERRNO_BASE+16
|
||||
#define ERRNO_STORAGE_UNAVAILABLE CSYNC_CUSTOM_ERRNO_BASE+17
|
||||
|
||||
#endif /* _CSYNC_MACROS_H */
|
||||
/* vim: set ft=c.doxygen ts=8 sw=2 et cindent: */
|
||||
|
||||
@@ -108,6 +108,9 @@ CSYNC_STATUS csync_errno_to_status(int error, CSYNC_STATUS default_status)
|
||||
case ERRNO_SERVICE_UNAVAILABLE:
|
||||
status = CSYNC_STATUS_SERVICE_UNAVAILABLE; /* Service temporarily down */
|
||||
break;
|
||||
case ERRNO_STORAGE_UNAVAILABLE:
|
||||
status = CSYNC_STATUS_STORAGE_UNAVAILABLE; /* Storage temporarily unavailable */
|
||||
break;
|
||||
case EFBIG:
|
||||
status = CSYNC_STATUS_FILE_SIZE_ERROR; /* File larger than 2MB */
|
||||
break;
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
#include "csync_private.h"
|
||||
|
||||
#include "csync_version.h"
|
||||
|
||||
|
||||
/*
|
||||
* helper method to build up a user text for SSL problems, called from the
|
||||
@@ -437,8 +439,8 @@ int dav_connect(CSYNC *csyncCtx, const char *base_url) {
|
||||
// Should never take more than some seconds, 30 is really a max.
|
||||
ne_set_connect_timeout(ctx->dav_session.ctx, 30);
|
||||
|
||||
snprintf( uaBuf, sizeof(uaBuf), "Mozilla/5.0 (%s) csyncoC/%s",
|
||||
csync_owncloud_get_platform(), CSYNC_STRINGIFY( LIBCSYNC_VERSION ));
|
||||
snprintf( uaBuf, sizeof(uaBuf), "Mozilla/5.0 (%s) mirall/%s (csyncoC)",
|
||||
CSYNC_STRINGIFY( MIRALL_VERSION ), csync_owncloud_get_platform() );
|
||||
ne_set_useragent( ctx->dav_session.ctx, uaBuf);
|
||||
ne_set_server_auth(ctx->dav_session.ctx, authentication_callback_by_neon, ctx);
|
||||
|
||||
|
||||
@@ -151,7 +151,17 @@ struct csync_s {
|
||||
int status;
|
||||
volatile int abort;
|
||||
void *rename_info;
|
||||
int read_from_db_disabled;
|
||||
|
||||
/**
|
||||
* Specify if it is allowed to read the remote tree from the DB (default to enabled)
|
||||
*/
|
||||
bool read_remote_from_db;
|
||||
|
||||
/**
|
||||
* If true, the DB is considered empty and all reads are skipped. (default is false)
|
||||
* This is useful during the initial local discovery as it speeds it up significantly.
|
||||
*/
|
||||
bool db_is_empty;
|
||||
|
||||
struct csync_owncloud_ctx_s *owncloud_context;
|
||||
|
||||
|
||||
@@ -156,8 +156,8 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
||||
}
|
||||
|
||||
if( tmp ) {
|
||||
if( tmp->path ) {
|
||||
len = strlen( tmp->path );
|
||||
len = strlen( tmp->path );
|
||||
if( len > 0 ) {
|
||||
h = c_jhash64((uint8_t *) tmp->path, len, 0);
|
||||
/* First, check that the file is NOT in our tree (another file with the same name was added) */
|
||||
node = c_rbtree_find(ctx->current == REMOTE_REPLICA ? ctx->remote.tree : ctx->local.tree, &h);
|
||||
|
||||
@@ -43,6 +43,7 @@ struct csync_rename_s {
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> folder_renamed_to; // map from->to
|
||||
std::map<std::string, std::string> folder_renamed_from; // map to->from
|
||||
|
||||
struct renameop {
|
||||
csync_file_stat_t *st;
|
||||
@@ -63,6 +64,7 @@ void csync_rename_destroy(CSYNC* ctx)
|
||||
void csync_rename_record(CSYNC* ctx, const char* from, const char* to)
|
||||
{
|
||||
csync_rename_s::get(ctx)->folder_renamed_to[from] = to;
|
||||
csync_rename_s::get(ctx)->folder_renamed_from[to] = from;
|
||||
}
|
||||
|
||||
char* csync_rename_adjust_path(CSYNC* ctx, const char* path)
|
||||
@@ -78,4 +80,18 @@ char* csync_rename_adjust_path(CSYNC* ctx, const char* path)
|
||||
return c_strdup(path);
|
||||
}
|
||||
|
||||
char* csync_rename_adjust_path_source(CSYNC* ctx, const char* path)
|
||||
{
|
||||
csync_rename_s* d = csync_rename_s::get(ctx);
|
||||
for (std::string p = _parentDir(path); !p.empty(); p = _parentDir(p)) {
|
||||
std::map< std::string, std::string >::iterator it = d->folder_renamed_from.find(p);
|
||||
if (it != d->folder_renamed_from.end()) {
|
||||
std::string rep = it->second + (path + p.length());
|
||||
return c_strdup(rep.c_str());
|
||||
}
|
||||
}
|
||||
return c_strdup(path);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Return the final destination path of a given patch in case of renames */
|
||||
char *csync_rename_adjust_path(CSYNC *ctx, const char *path);
|
||||
/* Return the source of a given path in case of renames */
|
||||
char *csync_rename_adjust_path_source(CSYNC *ctx, const char *path);
|
||||
void csync_rename_destroy(CSYNC *ctx);
|
||||
void csync_rename_record(CSYNC *ctx, const char *from, const char *to);
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "csync_statedb.h"
|
||||
#include "csync_util.h"
|
||||
#include "csync_misc.h"
|
||||
#include "csync_exclude.h"
|
||||
|
||||
#include "c_string.h"
|
||||
#include "c_jhash.h"
|
||||
@@ -298,7 +299,7 @@ csync_file_stat_t *csync_statedb_get_stat_by_hash(CSYNC *ctx,
|
||||
csync_file_stat_t *st = NULL;
|
||||
int rc;
|
||||
|
||||
if( !ctx ) {
|
||||
if( !ctx || ctx->db_is_empty ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -341,7 +342,7 @@ csync_file_stat_t *csync_statedb_get_stat_by_file_id(CSYNC *ctx,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if( !ctx ) {
|
||||
if( !ctx || ctx->db_is_empty ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -381,7 +382,7 @@ csync_file_stat_t *csync_statedb_get_stat_by_inode(CSYNC *ctx,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if( !ctx ) {
|
||||
if( !ctx || ctx->db_is_empty ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -448,7 +449,7 @@ int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if( !ctx ) {
|
||||
if( !ctx || ctx->db_is_empty ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -481,6 +482,21 @@ int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
|
||||
|
||||
rc = _csync_file_stat_from_metadata_table( &st, stmt);
|
||||
if( st ) {
|
||||
/* Check for exclusion from the tree.
|
||||
* Note that this is only a safety net in case the ignore list changes
|
||||
* without a full remote discovery being triggered. */
|
||||
CSYNC_EXCLUDE_TYPE excluded = csync_excluded(ctx, st->path, st->type);
|
||||
if (excluded != CSYNC_NOT_EXCLUDED) {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "%s excluded (%d)", st->path, excluded);
|
||||
|
||||
if (excluded == CSYNC_FILE_EXCLUDE_AND_REMOVE
|
||||
|| excluded == CSYNC_FILE_SILENTLY_EXCLUDED) {
|
||||
continue;
|
||||
}
|
||||
|
||||
st->instruction = CSYNC_INSTRUCTION_IGNORE;
|
||||
}
|
||||
|
||||
/* store into result list. */
|
||||
if (c_rbtree_insert(ctx->remote.tree, (void *) st) < 0) {
|
||||
SAFE_FREE(st);
|
||||
|
||||
@@ -306,7 +306,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
|
||||
|| !c_streq(fs->remotePerm, tmp->remotePerm)))
|
||||
|| (ctx->current == LOCAL_REPLICA && fs->inode != tmp->inode);
|
||||
if (type == CSYNC_FTW_TYPE_DIR && ctx->current == REMOTE_REPLICA
|
||||
&& !metadata_differ && !ctx->read_from_db_disabled) {
|
||||
&& !metadata_differ && ctx->read_remote_from_db) {
|
||||
/* If both etag and file id are equal for a directory, read all contents from
|
||||
* the database.
|
||||
* The metadata comparison ensure that we fetch all the file id or permission when
|
||||
@@ -416,6 +416,8 @@ out:
|
||||
st->error_status = CSYNC_STATUS_INDIVIDUAL_IGNORE_LIST; /* File listed on ignore list. */
|
||||
} else if (excluded == CSYNC_FILE_EXCLUDE_INVALID_CHAR) {
|
||||
st->error_status = CSYNC_STATUS_INDIVIDUAL_IS_INVALID_CHARS; /* File contains invalid characters. */
|
||||
} else if (excluded == CSYNC_FILE_EXCLUDE_LONG_FILENAME) {
|
||||
st->error_status = CSYNC_STATUS_INDIVIDUAL_EXCLUDE_LONG_FILENAME; /* File name is too long. */
|
||||
}
|
||||
}
|
||||
if (st->instruction != CSYNC_INSTRUCTION_NONE && st->instruction != CSYNC_INSTRUCTION_IGNORE
|
||||
@@ -619,11 +621,16 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
|
||||
if (asp < 0) {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "asprintf failed!");
|
||||
}
|
||||
} else if(errno == ERRNO_SERVICE_UNAVAILABLE) {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_WARN, "Service was not available!");
|
||||
}
|
||||
// The server usually replies with the custom "503 Storage not available"
|
||||
// if some path is temporarily unavailable. But in some cases a standard 503
|
||||
// is returned too. Thus we can't distinguish the two and will treat any
|
||||
// 503 as request to ignore the folder. See #3113 #2884.
|
||||
else if(errno == ERRNO_STORAGE_UNAVAILABLE || errno == ERRNO_SERVICE_UNAVAILABLE) {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_WARN, "Storage was not available!");
|
||||
if (ctx->current_fs) {
|
||||
ctx->current_fs->instruction = CSYNC_INSTRUCTION_IGNORE;
|
||||
ctx->current_fs->error_status = CSYNC_STATUS_SERVICE_UNAVAILABLE;
|
||||
ctx->current_fs->error_status = CSYNC_STATUS_STORAGE_UNAVAILABLE;
|
||||
/* If a directory has ignored files, put the flag on the parent directory as well */
|
||||
if( previous_fs ) {
|
||||
previous_fs->has_ignored_files = true;
|
||||
|
||||
@@ -28,22 +28,7 @@ extern "C" {
|
||||
#define CSYNC_STRINGIFY(s) CSYNC_TOSTRING(s)
|
||||
#define CSYNC_TOSTRING(s) #s
|
||||
|
||||
/* csync version macros */
|
||||
#define CSYNC_VERSION_INT(a, b, c) ((a) << 16 | (b) << 8 | (c))
|
||||
#define CSYNC_VERSION_DOT(a, b, c) a ##.## b ##.## c
|
||||
#define CSYNC_VERSION(a, b, c) CSYNC_VERSION_DOT(a, b, c)
|
||||
|
||||
/* csync version */
|
||||
#define LIBCSYNC_VERSION_MAJOR @APPLICATION_VERSION_MAJOR@
|
||||
#define LIBCSYNC_VERSION_MINOR @APPLICATION_VERSION_MINOR@
|
||||
#define LIBCSYNC_VERSION_MICRO @APPLICATION_VERSION_PATCH@
|
||||
|
||||
#define LIBCSYNC_VERSION_INT CSYNC_VERSION_INT(LIBCSYNC_VERSION_MAJOR, \
|
||||
LIBCSYNC_VERSION_MINOR, \
|
||||
LIBCSYNC_VERSION_MICRO)
|
||||
#define LIBCSYNC_VERSION CSYNC_VERSION(LIBCSYNC_VERSION_MAJOR, \
|
||||
LIBCSYNC_VERSION_MINOR, \
|
||||
LIBCSYNC_VERSION_MICRO)
|
||||
#define MIRALL_VERSION @MIRALL_VERSION@
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#define DEBUG_HBF(...) { if(transfer->log_cb) { \
|
||||
char buf[1024]; \
|
||||
snprintf(buf, 1024, __VA_ARGS__); \
|
||||
transfer->log_cb(__FUNCTION__, buf, transfer->user_data); \
|
||||
transfer->log_cb(__func__, buf, transfer->user_data); \
|
||||
} }
|
||||
|
||||
// #endif
|
||||
|
||||
@@ -50,7 +50,7 @@ csync_vio_handle_t *csync_vio_opendir(CSYNC *ctx, const char *name) {
|
||||
break;
|
||||
case LOCAL_REPLICA:
|
||||
if( ctx->callbacks.update_callback ) {
|
||||
ctx->callbacks.update_callback(ctx->replica, name, ctx->callbacks.update_callback_userdata);
|
||||
ctx->callbacks.update_callback(ctx->replica, name, ctx->callbacks.update_callback_userdata);
|
||||
}
|
||||
return csync_vio_local_opendir(name);
|
||||
break;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "c_lib.h"
|
||||
#include "csync.h"
|
||||
#include "csync_log.h"
|
||||
|
||||
csync_vio_file_stat_t *csync_vio_file_stat_new(void) {
|
||||
csync_vio_file_stat_t *file_stat = (csync_vio_file_stat_t *) c_malloc(sizeof(csync_vio_file_stat_t));
|
||||
@@ -30,7 +31,9 @@ csync_vio_file_stat_t *csync_vio_file_stat_new(void) {
|
||||
csync_vio_file_stat_t* csync_vio_file_stat_copy(csync_vio_file_stat_t *file_stat) {
|
||||
csync_vio_file_stat_t *file_stat_cpy = csync_vio_file_stat_new();
|
||||
memcpy(file_stat_cpy, file_stat, sizeof(csync_vio_file_stat_t));
|
||||
file_stat_cpy->etag = c_strdup(file_stat_cpy->etag);
|
||||
if (file_stat_cpy->fields & CSYNC_VIO_FILE_STAT_FIELDS_ETAG) {
|
||||
file_stat_cpy->etag = c_strdup(file_stat_cpy->etag);
|
||||
}
|
||||
if (file_stat_cpy->directDownloadCookies) {
|
||||
file_stat_cpy->directDownloadCookies = c_strdup(file_stat_cpy->directDownloadCookies);
|
||||
}
|
||||
@@ -68,6 +71,7 @@ void csync_vio_file_stat_set_file_id( csync_vio_file_stat_t *dst, const char* sr
|
||||
void csync_vio_set_file_id( char* dst, const char *src ) {
|
||||
if( src && dst ) {
|
||||
if( strlen(src) > FILE_ID_BUF_SIZE ) {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "Ignoring file_id because it is too long: %s", src);
|
||||
strcpy(dst, "");
|
||||
} else {
|
||||
strcpy(dst, src);
|
||||
|
||||
@@ -131,7 +131,7 @@ static void check_logging(void **state)
|
||||
rc = csync_set_log_callback(check_log_callback);
|
||||
assert_int_equal(rc, 0);
|
||||
|
||||
csync_log(1, __FUNCTION__, "rc = %d", rc);
|
||||
csync_log(1, __func__, "rc = %d", rc);
|
||||
|
||||
rc = _tstat(path, &sb);
|
||||
|
||||
|
||||
@@ -124,7 +124,8 @@ sub initTesting(;$)
|
||||
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0
|
||||
}
|
||||
|
||||
$d = HTTP::DAV->new();
|
||||
my $ua = HTTP::DAV::UserAgent->new(keep_alive => 1 );
|
||||
$d = HTTP::DAV->new(-useragent => $ua);
|
||||
|
||||
$d->credentials( -url=> $owncloud, -realm=>"ownCloud",
|
||||
-user=> $user,
|
||||
@@ -191,7 +192,6 @@ sub removeRemoteDir($;$)
|
||||
my ($dir, $optionsRef) = @_;
|
||||
|
||||
my $url = testDirUrl() . $dir;
|
||||
|
||||
if( $optionsRef && $optionsRef->{user} && $optionsRef->{passwd} ) {
|
||||
$d->credentials( -url=> $owncloud, -realm=>"ownCloud",
|
||||
-user=> $optionsRef->{user},
|
||||
@@ -326,11 +326,11 @@ sub assertLocalDirs( $$ )
|
||||
|
||||
opendir(my $dh, $dir1 ) || die;
|
||||
while(readdir $dh) {
|
||||
assert( -e "$dir2/$_" );
|
||||
assert( -e "$dir2/$_", " $dir2/$_ do not exist" );
|
||||
next if( -d "$dir1/$_"); # don't compare directory sizes.
|
||||
my $s1 = -s "$dir1/$_";
|
||||
my $s2 = -s "$dir2/$_";
|
||||
assert( $s1 == $s2, "$dir1/$_ <-> $dir2/$_" );
|
||||
assert( $s1 == $s2, "$dir1/$_ <-> $dir2/$_ size not equal ($s1 != $s2)" );
|
||||
}
|
||||
closedir $dh;
|
||||
}
|
||||
@@ -524,7 +524,9 @@ sub put_to_dir( $$;$ )
|
||||
|
||||
my $filename = $file;
|
||||
$filename =~ s/^.*\///;
|
||||
$filename =~ s/#/%23/g; # poor man's URI encoder
|
||||
my $puturl = $targetUrl . $dir. $filename;
|
||||
|
||||
print "put_to_dir puts to $puturl\n";
|
||||
unless ($d->put( -local => $file, -url => $puturl )) {
|
||||
print " ### FAILED to put a single file!\n";
|
||||
|
||||
85
csync/tests/ownCloud/t_recall.pl
Executable file
@@ -0,0 +1,85 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Test script for the ownCloud module of csync.
|
||||
# This script requires a running ownCloud instance accessible via HTTP.
|
||||
# It does quite some fancy tests and asserts the results.
|
||||
#
|
||||
# Copyright (C) by Olivier Goffart <ogoffart@woboq.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
|
||||
use lib ".";
|
||||
|
||||
|
||||
use File::Copy;
|
||||
use ownCloud::Test;
|
||||
|
||||
use strict;
|
||||
|
||||
print "Hello, this is t_recall, a tester for the recall feature\n";
|
||||
|
||||
initTesting();
|
||||
|
||||
printInfo( "Syncing two files with the same name that differ with case" );
|
||||
|
||||
#create some files
|
||||
my $tmpdir = "/tmp/t_recall/";
|
||||
mkdir($tmpdir);
|
||||
createLocalFile( $tmpdir . "file1.dat", 100 );
|
||||
createLocalFile( $tmpdir . "file2.dat", 150 );
|
||||
createLocalFile( $tmpdir . "file3.dat", 110 );
|
||||
createLocalFile( $tmpdir . "file4.dat", 170 );
|
||||
|
||||
#put them in some directories
|
||||
createRemoteDir( "dir" );
|
||||
glob_put( "$tmpdir/*", "dir" );
|
||||
|
||||
csync();
|
||||
|
||||
assertLocalAndRemoteDir( '', 0);
|
||||
|
||||
|
||||
|
||||
printInfo( "Testing with a .sys.admin#recall#" );
|
||||
system("echo 'dir/file2.dat' > ". $tmpdir . ".sys.admin\#recall\#");
|
||||
system("echo 'dir/file3.dat' >> ". $tmpdir . ".sys.admin\#recall\#");
|
||||
glob_put( "$tmpdir/.sys.admin\#recall\#", "" );
|
||||
|
||||
csync();
|
||||
|
||||
#test that the recall files have been created
|
||||
assert( -e glob(localDir().'dir/file2_.sys.admin#recall#-*.dat' ) );
|
||||
assert( -e glob(localDir().'dir/file3_.sys.admin#recall#-*.dat' ) );
|
||||
|
||||
#Remove the recall file
|
||||
unlink(localDir() . ".sys.admin#recall#");
|
||||
|
||||
# 2 sync necessary for the recall to be uploaded
|
||||
csync();
|
||||
|
||||
assertLocalAndRemoteDir( '', 0);
|
||||
|
||||
printInfo( "Testing with a dir/.sys.admin#recall#" );
|
||||
system("echo 'file4.dat' > ". $tmpdir . ".sys.admin\#recall\#");
|
||||
glob_put( "$tmpdir/.sys.admin\#recall\#", "dir" );
|
||||
|
||||
csync();
|
||||
assert( -e glob(localDir().'dir/file4_.sys.admin#recall#-*.dat' ) );
|
||||
|
||||
|
||||
cleanup();
|
||||
system("rm -r " . $tmpdir);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
==============
|
||||
Advanced Usage
|
||||
==============
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ The process of synchronization keeps files in two separate repositories the
|
||||
same. When synchronized:
|
||||
|
||||
- If a file is added to one repository it is copied to the other synchronized repository.
|
||||
- When a file is changed in one repository, the change is propagated to any
|
||||
synchronized other repositories- If a file is deleted in one repository, it
|
||||
is deleted in any other.
|
||||
- When a file is changed in one repository, the change is propagated to any other
|
||||
synchronized repository.
|
||||
- If a file is deleted in one repository, it is deleted in any other.
|
||||
|
||||
It is important to note that the ownCloud synchronization process does not use
|
||||
a typical client/server system where the server is always master. This is a
|
||||
@@ -151,9 +151,9 @@ ownCloud Client provides the ability to add custom patterns.
|
||||
|
||||
By default, the ownCloud Client ignores the following files:
|
||||
|
||||
- Files matched by one of the patterns defined in :ref:`ignoredFilesEditor-label`.
|
||||
- Files containing characters that do not work on certain file systems (`\, /, :, ?, *, ", >, <, |`).
|
||||
* Files starting in ``.csync_journal.db*``, as these files are reserved for journalling.
|
||||
* Files matched by one of the patterns defined in the Ignored Files Editor
|
||||
* Files containing characters that do not work on certain file systems ``(`\, /, :, ?, *, ", >, <, |`)``.
|
||||
* Files starting in ``.csync_journal.db``, as these files are reserved for journalling.
|
||||
|
||||
If a pattern selected using a checkbox in the `ignoredFilesEditor-label` (or if
|
||||
a line in the exclude file starts with the character `]` directly followed by
|
||||
@@ -204,3 +204,69 @@ journal. This function can be used to recreate the journal database.
|
||||
|
||||
.. note:: We recommend that you use this function only when advised to do so by
|
||||
ownCloud support staff.
|
||||
|
||||
Custom WebDAV Properties
|
||||
------------------------
|
||||
|
||||
In the communication between client and server a couple of custom WebDAV properties
|
||||
were introduced. They are either needed for sync functionality or help have a positive
|
||||
effect on synchronization performance.
|
||||
|
||||
This chapter describes additional xml elements which the server returns in response
|
||||
to a successful PROPFIND request on a file or directory. The elements are returned in
|
||||
the namespace oc.
|
||||
|
||||
Server Side Permissions
|
||||
------------------------
|
||||
|
||||
The XML element ``<oc:permissions>`` represents the permission- and sharing state of the
|
||||
item. It is a list of characters, and each of the chars has a meaning as outlined
|
||||
in the table below:
|
||||
|
||||
+----+----------------+-------------------------------------------+
|
||||
|Code| Resource | Description |
|
||||
+----+----------------+-------------------------------------------+
|
||||
| S | File or Folder | is shared |
|
||||
+----+----------------+-------------------------------------------+
|
||||
| R | File or Folder | can share (includes reshare) |
|
||||
+----+----------------+-------------------------------------------+
|
||||
| M | File or Folder | is mounted (like on DropBox, Samba, etc.) |
|
||||
+----+----------------+-------------------------------------------+
|
||||
| W | File | can write file |
|
||||
+----+----------------+-------------------------------------------+
|
||||
| C | Folder |can create file in folder |
|
||||
+----+----------------+-------------------------------------------+
|
||||
| K | Folder | can create folder (mkdir) |
|
||||
+----+----------------+-------------------------------------------+
|
||||
| D | File or Folder |can delete file or folder |
|
||||
+----+----------------+-------------------------------------------+
|
||||
| N | File or Folder | can rename file or folder |
|
||||
+----+----------------+-------------------------------------------+
|
||||
| V | File or Folder | can move file or folder |
|
||||
+----+----------------+-------------------------------------------+
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
<oc:permissions>RDNVCK</oc:permissions>
|
||||
|
||||
File- or Directory Size
|
||||
-----------------------
|
||||
|
||||
The XML element ``<oc:size>`` represents the file- or directory size in bytes. For
|
||||
directories, the size of the whole file tree underneath the directory is accumulated.
|
||||
|
||||
Example:
|
||||
|
||||
<oc:size>2429176697</oc:size>
|
||||
|
||||
FileID
|
||||
------
|
||||
|
||||
The XML element ``<oc:id>`` represents the so called file ID. It is a non volatile string id
|
||||
that stays constant as long as the file exists. It is not changed if the file changes or
|
||||
is renamed or moved.
|
||||
|
||||
Example:
|
||||
|
||||
<oc:id>00000020oc5cfy6qqizm</oc:id>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
=====================
|
||||
The Automatic Updater
|
||||
=====================
|
||||
|
||||
@@ -9,11 +10,15 @@ users only need to use their normal package managers. However, on Linux systems
|
||||
the Updater will check for updates and notify you when a new version is
|
||||
available.
|
||||
|
||||
.. note:: Because of various technical issues, desktop sync clients older than
|
||||
1.7 will not be allowed to connect and sync with the ownCloud 8.1 server. It is
|
||||
highly recommended to keep your client updated.
|
||||
|
||||
Basic Workflow
|
||||
--------------
|
||||
|
||||
The following sections describe how to use the Automatic Updater on different
|
||||
operating systems:
|
||||
operating systems.
|
||||
|
||||
Windows
|
||||
^^^^^^^
|
||||
@@ -26,6 +31,9 @@ If an update is available, and has been successfully downloaded, the ownCloud
|
||||
client starts a silent update prior to its next launch and then restarts
|
||||
itself. Should the silent update fail, the client offers a manual download.
|
||||
|
||||
When you upgrade from 1.7 you should restart Windows to ensure that all the new
|
||||
features in 1.8 are enabled.
|
||||
|
||||
.. note:: Administrative privileges are required to perform the update.
|
||||
|
||||
Mac OS X
|
||||
|
||||
@@ -129,30 +129,23 @@ Windows Installer Build (Cross-Compile)
|
||||
|
||||
Due to the large number of dependencies, building the client installer for Windows
|
||||
is **currently only officially supported on openSUSE**, by using the MinGW cross compiler.
|
||||
You can set up openSUSE 12.1, 12.2, or 13.1 in a virtual machine if you do not
|
||||
You can set up openSUSE 13.1, 13.2 or openSUSE Factory in a virtual machine if you do not
|
||||
have it installed already.
|
||||
|
||||
To cross-compile:
|
||||
|
||||
1. Add the following repositories using YaST or ``zypper ar`` (adjust when using openSUSE 12.2 or 13.1)::
|
||||
1. Add the following repositories using YaST or ``zypper ar`` (adjust when using another openSUSE version)::
|
||||
|
||||
zypper ar http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_13.1/windows:mingw:win32.repo
|
||||
zypper ar http://download.opensuse.org/repositories/windows:/mingw/openSUSE_13.1/windows:mingw.repo
|
||||
zypper ar http://download.opensuse.org/repositories/windows:/mingw/openSUSE_13.2/windows:mingw.repo
|
||||
zypper ar http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_13.2/windows:mingw:win32.repo
|
||||
|
||||
2. Install the cross-compiler packages and the cross-compiled dependencies::
|
||||
|
||||
zypper install cmake make mingw32-cross-binutils mingw32-cross-cpp mingw32-cross-gcc \
|
||||
mingw32-cross-gcc-c++ mingw32-cross-pkg-config mingw32-filesystem \
|
||||
mingw32-headers mingw32-runtime site-config mingw32-libqt4-sql \
|
||||
mingw32-libqt4-sql-sqlite mingw32-sqlite mingw32-libsqlite-devel \
|
||||
mingw32-dlfcn-devel mingw32-libssh2-devel kdewin-png2ico \
|
||||
mingw32-libqt4 mingw32-libqt4-devel mingw32-libgcrypt \
|
||||
mingw32-libgnutls mingw32-libneon-openssl mingw32-libneon-devel \
|
||||
mingw32-libbeecrypt mingw32-libopenssl mingw32-openssl \
|
||||
mingw32-libpng-devel mingw32-libsqlite mingw32-qtkeychain \
|
||||
mingw32-qtkeychain-devel mingw32-dlfcn mingw32-libintl-devel \
|
||||
mingw32-libneon-devel mingw32-libopenssl-devel mingw32-libproxy-devel \
|
||||
mingw32-libxml2-devel mingw32-zlib-devel
|
||||
mingw32-cross-gcc-c++ mingw32-cross-pkg-config mingw32-filesystem \
|
||||
mingw32-headers mingw32-runtime site-config \
|
||||
mingw32-cross-libqt5-qmake mingw32-cross-libqt5-qttools mingw32-libqt5* \
|
||||
mingw32-cross-nsis
|
||||
|
||||
3. For the installer, install the NSIS installer package::
|
||||
|
||||
@@ -170,24 +163,43 @@ To cross-compile:
|
||||
.. note:: These files also work for more recent openSUSE versions!
|
||||
|
||||
::
|
||||
# RPM depends on curl for installs from HTTP
|
||||
zypper install curl
|
||||
|
||||
rpm -ivh http://download.tomahawk-player.org/packman/mingw:32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-processes-0-1.1.x86_64.rpm
|
||||
rpm -ivh http://download.tomahawk-player.org/packman/mingw:32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-uac-0-3.1.x86_64.rpm
|
||||
|
||||
6. Follow the `generic build instructions`_
|
||||
|
||||
.. note:: When building for Windows platforms, you must specify a special
|
||||
.. note:: When building for Windows platforms, you must specify a special
|
||||
toolchain file that enables cmake to locate the platform-specific tools. To add
|
||||
this parameter to the call to cmake, enter
|
||||
``-DCMAKE_TOOLCHAIN_FILE=../client/admin/win/Toolchain-mingw32-openSUSE.cmake``.
|
||||
|
||||
7. Build by running ``make``.
|
||||
|
||||
.. note:: Using ``make package`` produces an NSIS-based installer, provided
|
||||
.. note:: Using ``make package`` produces an NSIS-based installer, provided
|
||||
the NSIS mingw32 packages are installed.
|
||||
|
||||
.. _`generic build instructions`:
|
||||
8. If you want to sign the installer, acquire a `Microsoft Authenticode`_ Certificate and install ``osslsigncode`` to sign the installer::
|
||||
|
||||
zypper install osslsigncode
|
||||
|
||||
9. Sign the package::
|
||||
|
||||
osslsigncode -pkcs12 $HOME/.codesign/packages.pfx -h sha1 \
|
||||
-pass yourpass \
|
||||
-n "ACME Client" \
|
||||
-i "http://acme.com" \
|
||||
-ts "http://timestamp.server/" \
|
||||
-in ${unsigned_file} \
|
||||
-out ${installer_file}
|
||||
|
||||
for ``-in``, use URL to the time stamping server provided by your CA along with the Authenticode certificate. Alternatively,
|
||||
you may use the official Microsoft ``signtool`` utility on Microsoft Windows.
|
||||
|
||||
|
||||
.. _`generic build instructions`:
|
||||
Generic Build Instructions
|
||||
--------------------------
|
||||
|
||||
@@ -202,6 +214,8 @@ To build the most up to date version of the client:
|
||||
1. Clone the latest versions of the client from Git_ as follows:
|
||||
|
||||
``git clone git://github.com/owncloud/client.git``
|
||||
``git submodule init``
|
||||
``git submodule update``
|
||||
|
||||
2. Create the build directory:
|
||||
|
||||
@@ -243,4 +257,5 @@ The following are known cmake parameters:
|
||||
.. _Homebrew: http://mxcl.github.com/homebrew/
|
||||
.. _`OpenSSL Windows Build`: http://slproweb.com/products/Win32OpenSSL.html
|
||||
.. _Qt: http://www.qt.io/download
|
||||
.. _`Microsoft Authenticode`: https://msdn.microsoft.com/en-us/library/ie/ms537361%28v=vs.85%29.aspx
|
||||
.. _QtKeychain: https://github.com/frankosterfeld/qtkeychain
|
||||
|
||||
@@ -18,6 +18,9 @@ and then use their package managers to install the desktop sync client. Linux
|
||||
users will also update their sync clients via package manager, and the client
|
||||
will display a notification when an update is available.
|
||||
|
||||
Linux users must also have a password manager enabled, such as GNOME Keyring or
|
||||
KWallet, so that the sync client can login automatically.
|
||||
|
||||
Improvements and New Features
|
||||
-----------------------------
|
||||
|
||||
@@ -32,6 +35,9 @@ including:
|
||||
and Nautilus on Linux.
|
||||
* Faster uploads and downloads.
|
||||
|
||||
.. note:: When you upgrade from 1.7, restart Windows to ensure that all new
|
||||
features are visible.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
@@ -81,7 +87,7 @@ file manager integration works.
|
||||
.. image:: images/client8.png
|
||||
|
||||
When you are in your local ownCloud folder you can right-click any file or
|
||||
folder, and then left-click Share to create a share link. Note that Windows
|
||||
folder, and then left-click "Share with ownCloud" to create a share link. Note that Windows
|
||||
may also have a Share With option. This is not the ownCloud Share option. The
|
||||
ownCloud share dialog looks like the following example:
|
||||
|
||||
|
||||
@@ -11,3 +11,6 @@ Desktop Sync client enables you to:
|
||||
Your files are always automatically synchronized between your ownCloud server
|
||||
and local PC.
|
||||
|
||||
.. note:: Because of various technical issues, desktop sync clients older than
|
||||
1.7 will not allowed to connect and sync with the ownCloud 8.1 server. It is
|
||||
highly recommended to keep your client updated.
|
||||
|
||||
@@ -1,23 +1,28 @@
|
||||
When invoking the client from the command line, the following options are supported:
|
||||
You have the option of starting your ownCloud desktop client with the
|
||||
``owncloud`` command. The following options are supported:
|
||||
|
||||
``-h``, ``--help``
|
||||
``owncloud -h`` or ``owncloud --help``
|
||||
Displays all command options.
|
||||
|
||||
The other options are:
|
||||
|
||||
``--logwindow``
|
||||
Opens a window displaying log output.
|
||||
|
||||
``--logfile`` `<filename>`
|
||||
Write log output to the file specified. To write to stdout, specify `-` as the filename.
|
||||
Write log output to the file specified. To write to stdout, specify `-`
|
||||
as the filename.
|
||||
|
||||
``--logdir`` `<name>`
|
||||
Writes each synchronization log output in a new file in the specified directory.
|
||||
|
||||
Writes each synchronization log output in a new file in the specified
|
||||
directory.
|
||||
|
||||
``--logexpire`` `<hours>`
|
||||
Removes logs older than the value specified (in hours). This command is used with ``--logdir``.
|
||||
Removes logs older than the value specified (in hours). This command is
|
||||
used with ``--logdir``.
|
||||
|
||||
``--logflush``
|
||||
Clears (flushes) the log file after each write action.
|
||||
|
||||
``--confdir`` `<dirname>`
|
||||
Uses the specified configuration directory.
|
||||
|
||||
Uses the specified configuration directory.
|
||||
@@ -1,16 +1,14 @@
|
||||
The ownCloud Client packages contain a command line client that can be used to
|
||||
synchronize ownCloud files to client machines. The command line client is
|
||||
called ``owncloudcmd``.
|
||||
The ownCloud Client packages contain a command line client, ``owncloudcmd``, that can
|
||||
be used to synchronize ownCloud files to client machines.
|
||||
|
||||
owncloudcmd performs a single *sync run* and then exits the synchronization
|
||||
process. In this manner, owncloudcmd processes the differences between client
|
||||
and server directories and propagates the files to bring both repositories to
|
||||
the same state. Contrary to the GUI-based client, ``owncloudcmd`` does not
|
||||
repeat
|
||||
synchronizations on its own. It also does not monitor for file system changes.
|
||||
``owncloudcmd`` performs a single *sync run* and then exits the synchronization
|
||||
process. In this manner, ``owncloudcmd`` processes the differences between
|
||||
client and server directories and propagates the files to bring both
|
||||
repositories to the same state. Contrary to the GUI-based client,
|
||||
``owncloudcmd`` does not repeat synchronizations on its own. It also does not
|
||||
monitor for file system changes.
|
||||
|
||||
To invoke ``owncloudcmd``, you must provide the local and the remote
|
||||
repository
|
||||
To invoke ``owncloudcmd``, you must provide the local and the remote repository
|
||||
URL using the following command::
|
||||
|
||||
owncloudcmd [OPTIONS...] sourcedir owncloudurl
|
||||
@@ -18,45 +16,41 @@ URL using the following command::
|
||||
where ``sourcedir`` is the local directory and ``owncloudurl`` is
|
||||
the server URL.
|
||||
|
||||
.. note:: Prior to the 1.6 version of owncloudcmd, the tool only accepted
|
||||
``owncloud://`` or ``ownclouds://`` in place of ``http://`` and ``https://`` as
|
||||
a scheme. See ``Examples`` for details.
|
||||
|
||||
Other comand line switches supported by owncloudcmd include the following:
|
||||
Other command line switches supported by ``owncloudcmd`` include the following:
|
||||
|
||||
``--user``, ``-u`` ``[user]``
|
||||
Use ``user`` as the login name.
|
||||
Specify the user's login name.
|
||||
|
||||
``--password``, ``-p`` ``[password]``
|
||||
Use ``password`` as the password.
|
||||
Specify the user's password.
|
||||
|
||||
``-n``
|
||||
Use ``netrc (5)`` for login.
|
||||
Use ``netrc (5)`` for login.
|
||||
|
||||
``--non-interactive``
|
||||
Do not prompt for questions.
|
||||
Do not prompt for questions.
|
||||
|
||||
``--silent``, ``-s``
|
||||
Inhibits verbose log output.
|
||||
Inhibits verbose log output.
|
||||
|
||||
``--trust``
|
||||
Trust any SSL certificate, including invalid ones.
|
||||
Trust any SSL certificate, including invalid ones.
|
||||
|
||||
``--httpproxy http://[user@pass:]<server>:<port>``
|
||||
Uses the specified ``server`` as the HTTP proxy.
|
||||
|
||||
``--unsyncedfolders [file]``
|
||||
File containing list of folders to not sync
|
||||
|
||||
Credential Handling
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
By default, ``owncloudcmd`` reads the client configuration and uses the
|
||||
credentials of the GUI synchronization client. If no client is configured, or if you choose
|
||||
to use a different user to synchronize, you can specify the user password
|
||||
setting with the usual URL pattern. For example::
|
||||
credentials of the GUI synchronization client. If no client is configured, or if
|
||||
you choose to use a different user to synchronize, you can specify the user
|
||||
password setting with the usual URL pattern. For example::
|
||||
|
||||
https://user:secret@192.168.178.2/remote.php/webdav
|
||||
|
||||
Example
|
||||
~~~~~~~
|
||||
$ owncloudcmd / https://carla:secret@server/owncloud/remote.php/webdav/
|
||||
|
||||
To synchronize the ownCloud directory ``Music`` to the local directory
|
||||
``media/music``, through a proxy listening on port ``8080``, and on a gateway
|
||||
@@ -66,13 +60,5 @@ machine using IP address ``192.168.178.1``, the command line would be::
|
||||
$HOME/media/music \
|
||||
https://server/owncloud/remote.php/webdav/Music
|
||||
|
||||
``owncloudcmd`` will enquire user name and password, unless they have
|
||||
``owncloudcmd`` will prompt for the user name and password, unless they have
|
||||
been specified on the command line or ``-n`` has been passed.
|
||||
|
||||
Using the legacy scheme, the command line would be::
|
||||
|
||||
$ owncloudcmd --httpproxy http://192.168.178.1:8080 \
|
||||
$HOME/media/music \
|
||||
ownclouds://server/owncloud/remote.php/webdav/Music
|
||||
|
||||
|
||||
|
||||
@@ -61,12 +61,12 @@ Other issues can affect synchronization of your ownCloud files:
|
||||
ensure that the folder to which you are synchronizing is not shared with
|
||||
other synchronization applications.
|
||||
|
||||
- Synchronizing the same directory with ownCloud and other
|
||||
synchronization software such as Unison, rsync, Microsoft Windows Offline
|
||||
Folders, or other cloud services such as DropBox or Microsoft SkyDrive is not
|
||||
supported and should not be attempted. In the worst case, it is possible that
|
||||
synchronizing folders or files using ownCloud and other synchronization
|
||||
software or services can result in data loss.
|
||||
- Synchronizing the same directory with ownCloud and other synchronization
|
||||
software such as Unison, rsync, Microsoft Windows Offline Folders, or other
|
||||
cloud services such as DropBox or Microsoft SkyDrive is not supported and
|
||||
should not be attempted. In the worst case, it is possible that synchronizing
|
||||
folders or files using ownCloud and other synchronization software or
|
||||
services can result in data loss.
|
||||
|
||||
- If you find that only specific files are not synrchronized, the
|
||||
synchronization protocol might be having an effect. Some files are
|
||||
@@ -80,9 +80,13 @@ Other issues can affect synchronization of your ownCloud files:
|
||||
|
||||
.. note:: The data directory on the server is exclusive to ownCloud and must not be modified manually.
|
||||
|
||||
If you are using a different file backend on the server, you can try to exclude a bug in the
|
||||
- If you are using a different file backend on the server, you can try to exclude a bug in the
|
||||
backend by reverting to the built-in backend.
|
||||
|
||||
- If you are experiencing slow upload/download speed or similar performance issues
|
||||
be aware that those could be caused by on-access virus scanning solutions, either
|
||||
on the server (like the files_antivirus app) or the client.
|
||||
|
||||
Log Files
|
||||
---------
|
||||
|
||||
@@ -125,9 +129,9 @@ mentioned above to save the log to a file.
|
||||
.. note:: You can also open a log window for an already running session, by
|
||||
restarting the client using the following command:
|
||||
|
||||
* Windows: ``C:\Program Files (x86)\ownCloud\owncloud.exe --logwindow``
|
||||
* Mac OS X: ``/Applications/owncloud.app/Contents/MacOS/owncloud --logwindow``
|
||||
* Linux: ``owncloud --logwindow``
|
||||
* Windows: ``C:\Program Files (x86)\ownCloud\owncloud.exe --logwindow``
|
||||
* Mac OS X: ``/Applications/owncloud.app/Contents/MacOS/owncloud --logwindow``
|
||||
* Linux: ``owncloud --logwindow``
|
||||
|
||||
Saving Files Directly
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
BIN
resources/account.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
10
resources/account.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="64" width="64" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs>
|
||||
<linearGradient id="a" y2="69.127" gradientUnits="userSpaceOnUse" x2="-18.398" gradientTransform="matrix(.93749 0 0 .93750 48.705 -2.957)" y1="5.2866" x1="-18.398">
|
||||
<stop offset="0"/>
|
||||
<stop stop-color="#363636" offset="1"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path opacity=".7" style="block-progression:tb;color:#000000;text-transform:none;text-indent:0" d="m32.014 2.0032c-6.4921 0-12 4.7474-12 10.874 0.04608 1.9365 0.21927 4.3246 1.3749 9.3745v0.125l0.12499 0.125c0.37098 1.0626 0.91084 1.6705 1.6249 2.4999 0.71405 0.82937 1.5653 1.8055 2.3749 2.6249 0.09524 0.0964 0.15627 0.15612 0.24995 0.25003 0.16055 0.69862 0.35503 1.4505 0.49998 2.1249 0.38566 1.7943 0.34611 3.065 0.25003 3.4998-2.7899 0.97997-6.2601 2.1463-9.3744 3.5003-1.7483 0.75997-3.3307 1.4404-4.625 2.2483-1.2943 0.81109-2.5815 1.4239-2.9998 3.2498-0.00516 0.08324-0.00516 0.16675 0 0.25003-0.40882 3.7538-1.0272 9.2737-1.4999 13-0.10204 0.78425 0.31131 1.611 0.99996 1.9999 5.6546 3.0543 14.34 4.2835 22.999 4.2499 8.6584-0.0336 17.275-1.3353 22.749-4.2499 0.68865-0.38891 1.102-1.2156 0.99996-1.9999-0.15092-1.1646-0.33631-3.7907-0.49998-6.3746-0.16367-2.584-0.30575-5.1258-0.49994-6.6246-0.06775-0.37155-0.24343-0.72281-0.49998-0.99996-1.7388-2.0763-4.3366-3.3456-7.3745-4.6246-2.7736-1.1679-6.0249-2.3806-9.2496-3.7498-0.18047-0.40203-0.35975-1.5717 0-3.3748 0.0984-0.48318 0.24959-1.002 0.37678-1.4991 0.30279-0.33919 0.53918-0.61678 0.87476-0.99996 0.71597-0.81717 1.4859-1.6747 2.1259-2.4999 0.63997-0.82517 1.16-1.5327 1.4999-2.4999l0.124-0.1248c1.3065-5.273 1.3072-7.4733 1.3749-9.3745v-0.12852c0-6.127-5.5074-10.874-12-10.874z" fill="url(#a)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.9 KiB |
10
resources/activity.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="64" width="64" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs>
|
||||
<linearGradient id="a" y2="62.102" gradientUnits="userSpaceOnUse" x2="32" y1="2.1695" x1="32">
|
||||
<stop offset="0"/>
|
||||
<stop stop-color="#363636" offset="1"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path opacity=".7" d="m32 2-20 36h22l-2 24 20-36h-22z" fill="url(#a)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 597 B |
|
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 479 B |
5
resources/lock-http.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="64" width="64" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<path fill="#909090" d="m32 6c-8.284 0-15 6.716-15 15v10h-5v28h40v-28h-5v-10c0-8.284-6.716-15-15-15zm0 6c4.9706 0 9 4.0294 9 9v10h-18v-10c0-4.9706 4.0294-9 9-9z"/>
|
||||
<path d="m26 45h36l-18-30z" fill="#dfae19"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 493 B |