1000 Portable 3.0b

Description

Thousand (1000 Portable) — Trick-taking game for three, or four players, the goal is go get in the end more than 1000 points, first player to achieve overall (sum-up) more than 1000 points wins the game. Game features “marriages” (King and Queen of the same suit), which allow a player to claim / assign a suit to be a trump suit. When playing with four players one player (every round it is a next clock-wise player) is only a dealer and does not take part in the game round itself. In this case dealer gets as much scores as there was in stock counting even marriages if one happened to appear in stock. Every game round consists of several steps: shuffling & dealing cards, bidding, playing round cards, counting scores, summing up with previous results.

See more on Wikipedia.org

PortableAppZ.blogspot.com tutorial

Founded changes in Total Uninstall program.

The application source code, the NSI file content for NSIS compilation.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
; http://portableappz.blogspot.com
; NSIS with Registry.nsh in Include and Registry.dll, FindProcDLL.dll, KillProcDLL.dll in Plugins
 
; **************************************************************************
; === Define constants ===
; **************************************************************************
!define VER 		"3.0.0.0"	; version of launcher
!define APPNAME 	"1000"	; complete name of program
!define APP 		"1000"	; short name of program without space and accent  this one is used for the final executable an in the directory structure
!define APPEXE 		"1000.exe"	; main exe name
!define APPDIR 		"App\1000net"	; main exe relative path
!define WEBSITE 	"pafd.xyz"	; your website
!define APPSWITCH 	``	; some default Parameters
 
;--- Define RegKeys ---
!define REGISTRY
	!define REGKEY1 "HKEY_CURRENT_USER\SOFTWARE\1000"
 
; ---Define Files ---
	!define LOCALFILE1 "$EXEDIR\App\1000net\1000.tbl"
	!define PORTABLEFILE1 "$EXEDIR\Data\files\1000.tbl"
	!define DEFAULTPORTABLEFILE1 "$EXEDIR\App\DefaultData\files\1000.tbl"
 
 
; **************************************************************************
; === Best Compression ===
; **************************************************************************
SetCompressor /SOLID lzma
SetCompressorDictSize 32
 
; **************************************************************************
; === Includes ===
; **************************************************************************
!include "PortableApp.nsh" 
 
; **************************************************************************
; === Set basic information ===
; **************************************************************************
Name "${APPNAME} Portable"
OutFile "..\..\${APP}Portable.exe"
Icon "..\..\App\AppInfo\appicon.ico"
 
; **************************************************************************
; === MultiLang ===
; **************************************************************************
Var LNG
Function MultiLang
StrCpy $LNG "English"
System::Call 'kernel32::GetUserDefaultLangID() i .r0'
StrCmp $0 "1033" 0 +2
StrCpy $LNG "English"
StrCmp $0 "1149" 0 +2
StrCpy $LNG "Russian"
ReadINIStr $0 "$EXEDIR\Data\settings\${APP}Portable.ini" "${APP}Portable" "UserDefaultLang"
StrCmp $0 "false" +3
WriteINIStr "$EXEDIR\Data\settings\${APP}Portable.ini" "${APP}Portable" "UserDefaultLang" "true"
FunctionEnd
 
; **************************************************************************
; === Other Actions ===
; **************************************************************************
Function Init
 
FunctionEnd
 
Function Close
 
FunctionEnd
 
 
; **************************************************************************
; ==== Running ====
; **************************************************************************
 
Section "Main"
 
	Call CheckStart
 
	Call BackupLocalKeys
	Call RestorePortableKeys
 
	Call BackupLocalFiles
	Call RestorePortableFiles
 
	Call Init
	Call MultiLang
 
		Call SplashLogo
		Call Launch
 
	Call Restore
 
SectionEnd
 
Function Restore
 
	Call Close
 
	Call BackupPortableFiles
	Call RestoreLocalFiles
 
	Call BackupPortableKeys
	Call RestoreLocalKeys
 
FunctionEnd
 
; **************************************************************************
; === Run Application ===
; **************************************************************************
Function Launch
SetOutPath "$EXEDIR\${APPDIR}"
${GetParameters} $0
ExecWait `"$EXEDIR\${APPDIR}\${APPEXE}"${APPSWITCH} $0`
WriteINIStr "$EXEDIR\Data\settings\${APP}Portable.ini" "${APP}Portable" "GoodExit" "true"
FunctionEnd
 
; **************************************************************************
; ==== Actions on Registry Keys =====
; **************************************************************************
Function BackupLocalKeys
	${registry::DeleteKey} "${REGKEY1}-BackupBy${APP}Portable" $R0
	${registry::MoveKey} "${REGKEY1}" "${REGKEY1}-BackupBy${APP}Portable" $R0
Sleep 50
FunctionEnd
 
Function RestorePortableKeys
IfFileExists "$EXEDIR\Data\registry\${APP}.reg" +4
IfFileExists "$EXEDIR\App\DefaultData\registry\${APP}.reg" 0 +5
CreateDirectory "$EXEDIR\Data\registry"
CopyFiles  /SILENT "$EXEDIR\App\DefaultData\registry\${APP}.reg" "$EXEDIR\Data\registry"
${registry::RestoreKey} "$EXEDIR\Data\registry\${APP}.reg" $R0
Sleep 200
FunctionEnd
 
Function BackupPortableKeys
Delete "$EXEDIR\Data\registry\${APP}.reg"
CreateDirectory "$EXEDIR\Data\registry"
	${registry::SaveKey} "${REGKEY1}" "$EXEDIR\Data\registry\${APP}.reg" "/A=1" $R0
Sleep 100
FunctionEnd
 
Function RestoreLocalKeys
	${registry::DeleteKey} "${REGKEY1}" $R0
	${registry::MoveKey} "${REGKEY1}-BackupBy${APP}Portable" "${REGKEY1}" $R0
Sleep 50
${registry::Unload}
FunctionEnd
 
; **************************************************************************
; ====Actions on Files =====
; **************************************************************************
Function BackupLocalFiles
	Delete "${LOCALFILE1}.BackupBy${APP}Portable"
	Rename "${LOCALFILE1}" "${LOCALFILE1}.BackupBy${APP}Portable"
FunctionEnd
 
Function RestorePortableFiles
	IfFileExists "${PORTABLEFILE1}" +4
	IfFileExists "${DEFAULTPORTABLEFILE1}" 0 +4
	CreateDirectory "$EXEDIR\Data"
	CopyFiles /SILENT "${DEFAULTPORTABLEFILE1}" "${PORTABLEFILE1}"
	Rename  "${PORTABLEFILE1}" "${LOCALFILE1}"
FunctionEnd
 
Function BackupPortableFiles
CreateDirectory "$EXEDIR\Data\files"
	Rename "${LOCALFILE1}" "${PORTABLEFILE1}"
FunctionEnd
 
Function RestoreLocalFiles
	Delete "${LOCALFILE1}"
	Rename "${LOCALFILE1}.BackupBy${APP}Portable" "${LOCALFILE1}"
FunctionEnd

The text after the semicolon is seen as a comment and does not affect the application work.

Downloads

Official site | Download (Created using PortableAppZ.blogspot.com tutorial) | Download (Packed by JauntePE)

DISCUSS IT

No comments yet.

Leave a Reply

Spelling error report

The following text will be sent to our editors: