You are here

GameSuite Portable Dev Test 1 (Testers Required)

52 posts / 0 new
Last post
digitxp
digitxp's picture
Offline
Last seen: 13 years 2 months ago
Joined: 2007-11-03 18:33
GameSuite Portable Dev Test 1 (Testers Required)

Simon Tatham, the creator of PuTTY, made these cross-platform, standalone games (rules aren't his, just the code). This launcher makes it easy to chose a game to play, or if you have more time, you can chose any number of games to play. Thanks to Simeon for the multiselect code, as well as wraithdu and mecki77 for the updates. The games are under an MIT license, saying that you can modify and redistribute, but you need to put in royalties... :(. Download Here.
To Do:
Nothing Smile
[Make sure to close that UL - Ryan]

Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
Cool

I really like that.
Nice and easy games.
One thing though: In the readme, it says Kuhl instead of Kühl Smile
And you could put Wraithdu in as Copyright holder too as he helped me a lot cleaning the code.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

wk
wk's picture
Offline
Last seen: 1 year 5 months ago
Joined: 2007-09-05 12:31
hey, just a short comment for now..

solo doesn´t start with the launcher, the other games do. Anyway, great work...

"Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis .." Friday Next -
"May The Schwartz be with You!" Yogurt the Yoda

Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
oh

I wanted to point that one out earlier but forgot:
Line 197 is

StrCmp $Slant "1" "" +4

but it should be

StrCmp $Slant "1" "" +3

That's why solo never gets launched Sad

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 11 months ago
Developer
Joined: 2006-12-06 18:07
Good job, other than the

Good job, other than the error mentioned above everything looks great. You may want to find another name though. The name Game Suite, especially on this site, may imply to some users that it is another version of the PortableApps Suite that is specific to games. Maybe something like STGamePack (ST stands for Simon Tatham). or just GamePack or something like that. Or since the "About" for each game says "from Simon Tatham's Portable Puzzle Collection" maybe calling it PuzzleCollectionPortable would be good.

The developer formerly known as ZGitRDun8705

digitxp
digitxp's picture
Offline
Last seen: 13 years 2 months ago
Joined: 2007-11-03 18:33
I'll do that ASAP

I fixed it, just gotta get it up...

Insert original signature here with Greasemonkey Script.

John T. Haller
John T. Haller's picture
Offline
Last seen: 6 hours 46 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Royalties?

Where do you see the royalty info?

I have a package of this with a menu based off the NSIS menu (the one that links to help, compiled, etc) that I never posted though I can't recall why. If there is a royalties requirement, then it can't be considered OSI.

Sometimes, the impossible can become possible, if you're awesome!

digitxp
digitxp's picture
Offline
Last seen: 13 years 2 months ago
Joined: 2007-11-03 18:33
Oh,

I put it under the readme.

Insert original signature here with Greasemonkey Script.

John T. Haller
John T. Haller's picture
Offline
Last seen: 6 hours 46 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Hmmm

I can't see any mention of royalties anywhere. I think the only thing I hadn't finished was ensuring that the hlp vs chm was launched on the correct versions of Windows (all versions of Windows support hlp but Vista. Win 95/98 original don't do chm... or something like that) from the menu I'd done. And adding the icons to the launch window.

I'd done a custom icon and called it "Puzzles Portable".

Sometimes, the impossible can become possible, if you're awesome!

digitxp
digitxp's picture
Offline
Last seen: 13 years 2 months ago
Joined: 2007-11-03 18:33
By royalties, I mean

that the software must include the copyright notice. Maybe I should put in a readme...
*Edit* The MIT License is on their list of approved licenses... Smile

Insert original signature here with Greasemonkey Script.

TStodden
TStodden's picture
Offline
Last seen: 7 years 5 months ago
Joined: 2006-02-21 16:29
License Terms...

See http://www.chiark.greenend.org.uk/~sgtatham/puzzles/doc/licence.html#lic...

As it's listed on the game's website in the license section...

In short... you can do anything you want with those games as long as you give him/them credit for them.

~TStodden
Game Monkey Likes You!

spaz.shaffer
Offline
Last seen: 16 years 9 months ago
Joined: 2008-02-23 02:06
Where would I go to request

Where would I go to request this same program, but certain games in it? Like Tetris, Bejeweled, Collapse, Frogger, etc. Yea, I know those games are Open Source or anything but I do know that some of them have alternatives. Bricks is an alternative to Tetris, for example.

- the path i walk is in the wrong direction -

digitxp
digitxp's picture
Offline
Last seen: 13 years 2 months ago
Joined: 2007-11-03 18:33
Well, these games are standalone

and cross platform. If you want another game, just show me to it :).

Insert original signature here with Greasemonkey Script.

LOGAN-Portable
LOGAN-Portable's picture
Offline
Last seen: 11 years 10 months ago
Developer
Joined: 2007-09-11 12:24
Tetris, Frogger, Pacman...

Tetris, Frogger, Pacman... Cames carrying these titles are in violation of copyright law. While you cannot copyright a certain gametype (ie thats why you see pacman clones etc.) you can not and may not use these names unless the official publishers / copyright holders would have given them away.

Just a small note for your information.

wraithdu
Offline
Last seen: 11 years 5 months ago
Developer
Joined: 2007-06-27 20:22
Few source changes

I found a few things you can fix in the source.

1. remove the StrRep.nsh include
2. remove the extra OutFile line
3. **Optional** remove the Page instfiles

If you do this, you'll have to change how you change the install button text -
a. add !include WinMessages.nsh
b. add these 2 lines to the top of your nsDialogs page function -

GetDlgItem $0 $HWNDPARENT 1 ; install button
SendMessage $0 ${WM_SETTEXT} 0 "STR:Start!" ; change text

You have to do it that way cause the InstallButtonText command doesn't seem to work if you don't have the instfiles page. If you remove that page, you can ignore the compiler warning.

4. fix the +4 ==> +3

wraithdu
Offline
Last seen: 11 years 5 months ago
Developer
Joined: 2007-06-27 20:22
I hope you don't mind

I think you and Simeon had a great start on this little launcher, so I thought I'd give you a little bump ahead. I made the following changes -

1. renamed to GamePack (from your to-do list)
2. removed sleep times, as they are unnecessary and just slow the thing down, and changed the relative jumps to compensate
3. added a button to run the games while leaving the launcher open
4. removed the Cancel button, as it is now redundant
5. fixed the run code - you want to put the BM_GETSTATE in it's own register (or variable) instead of overwriting each game variable, because they hold the checkbox control's HWND (handle). If you overwrite it, you can't ever check its state again without restarting the launcher. Since I added the Run button, I had to change it.

If you paste this in a decent editor (N++ or SciTE) you can seem my comments. Feel free to use all/part/none of it as you see fit Smile

;Copyright 2007 Simeon Kühl and Digitxp

;This software is OSI Certified Open Source Software.
;OSI Certified is a certification mark of the Open Source Initiative.

;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either version 2
;of the License, or (at your option) any later version.

;This program 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 General Public License for more details.

;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

!define APPNAME "GamePack"
!define VER "0.9.0.0"
!define WEBSITE "PortableApps.com/DevelopmentTest"
!define DEFAULTAPPDIR "Games"
!define NAME "GamePackPortable"
!define PORTABLEAPPNAME "GamePack Portable"

RequestExecutionLevel user
Icon "..\..\App\AppInfo\Appicon.ico"
;=== Program Details
Name "${PORTABLEAPPNAME}"
OutFile "..\..\${NAME}.exe"
Caption "${PORTABLEAPPNAME} | PortableApps.com"
BrandingText /TRIMRIGHT "${PORTABLEAPPNAME} v${VER}"
VIProductVersion "${VER}"
VIAddVersionKey ProductName "${NAME}"
VIAddVersionKey Comments "Allows a collection of games to be run from a removable drive. For additional details, visit ${WEBSITE}"
VIAddVersionKey CompanyName "PortableApps.com"
VIAddVersionKey LegalCopyright "Portableapps.com and Contributors"
VIAddVersionKey FileDescription "${PORTABLEAPPNAME}"
VIAddVersionKey FileVersion "${VER}"
VIAddVersionKey ProductVersion "${VER}"
VIAddVersionKey InternalName "${PORTABLEAPPNAME}"
VIAddVersionKey LegalTrademarks "PortableApps.com is a Trademark of Rare Ideas, LLC."
VIAddVersionKey OriginalFilename "${NAME}.exe"
CRCCheck On
WindowIcon On
AutoCloseWindow True
RequestExecutionLevel user

!include "nsDialogs.nsh"
!include "WinMessages.nsh"

Page custom nsDialogsPage ;nsDialogsPageLeave ; 
Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
great

I had the sleep commands in there because I wanted/needed them but they aren't necessary here. And without your help, this Launcher wouldn't be where it is today Smile
So thank you for your improvements!

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

wraithdu
Offline
Last seen: 11 years 5 months ago
Developer
Joined: 2007-06-27 20:22
Help File

I suggest also downloading and including this help file in your package. Place it in the same directory as all the game executables, and the help options will appear in each game's help menu.

http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles.chm

Caehan
Caehan's picture
Offline
Last seen: 1 year 9 months ago
Joined: 2007-10-19 22:51
I agree.

I was thinking about suggesting that also.

TStodden
TStodden's picture
Offline
Last seen: 7 years 5 months ago
Joined: 2006-02-21 16:29
Looking Good!

Despite a few minor issues (mostly some control deals... but that's on the non-portable end), things are looking very good.

~TStodden
Game Monkey Likes You!

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 11 months ago
Developer
Joined: 2006-12-06 18:07
What other games would you

What other games would you add? It may be best to keep this specific pack limited to the games made by Simon Tatham. Also, as suggested above, add in the help files.

This is a great pack digitxp, thanks for setting it up, and great job on the multi-launcher Simeon.

I would suggest however, upgrading the multi-launcher to use the Modern-UI code, it will make it look better, and maybe use a radio button instead of a check box, it's not very likely that a user will want to open and run several games at once.

The developer formerly known as ZGitRDun8705

digitxp
digitxp's picture
Offline
Last seen: 13 years 2 months ago
Joined: 2007-11-03 18:33
Thanks

I want to add most of the games that are in the forums. I already added a link to the online documentation (those help files don't work in vista) in the help file. And what's Modern-UI code. Oh, and I launch multiple games at a time all the time...

Insert original signature here with Greasemonkey Script.

wraithdu
Offline
Last seen: 11 years 5 months ago
Developer
Joined: 2007-06-27 20:22
Hmm, the .chm help file I

Hmm, the .chm help file I linked to above works fine in Vista (I have it open now).

Patrick Patience
Offline
Last seen: 4 years 11 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
No

I suggest you stick with just Simon's games, otherwise the pack will get too large and bloated.

digitxp
digitxp's picture
Offline
Last seen: 13 years 2 months ago
Joined: 2007-11-03 18:33
Well

I was thinking of making one with Simon's games only, then with the games here only...

Insert original signature here with Greasemonkey Script.

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 11 months ago
Developer
Joined: 2006-12-06 18:07
That works too....I'd still

That works too....I'd still recommend changing the name of this pack as well. And modern-ui code is the newer set of code that NSIS uses for it's GUIs. The code you are currently using is for the classic-ui, where window elements (checkboxes, buttons, etc.) do not change to match the style of the current operating system, they use only the Win2000 style.

The developer formerly known as ZGitRDun8705

digitxp
digitxp's picture
Offline
Last seen: 13 years 2 months ago
Joined: 2007-11-03 18:33
So,uh

what kind of code do I use then? (I'm not very good with NSIS)

Insert original signature here with Greasemonkey Script.

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 11 months ago
Developer
Joined: 2006-12-06 18:07
I have no idea lol. I just

I have no idea lol. I just know that there is modern-ui code that will adjust the window elements to use the style of the current OS.

The developer formerly known as ZGitRDun8705

digitxp
digitxp's picture
Offline
Last seen: 13 years 2 months ago
Joined: 2007-11-03 18:33
Oh, and

can somebody point me to the NSIS Manual? I lost the link :(...

Insert original signature here with Greasemonkey Script.

Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
You could ask

Google or look here.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

Patrick Patience
Offline
Last seen: 4 years 11 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Well

XPStyle on

Should do the trick.

wraithdu
Offline
Last seen: 11 years 5 months ago
Developer
Joined: 2007-06-27 20:22
Yep, that'll do it. I almost

Yep, that'll do it.

I almost have the MUI code changes done, just gotta tweak the Run button placement (for those interested :))

wraithdu
Offline
Last seen: 11 years 5 months ago
Developer
Joined: 2007-06-27 20:22
MUI2 Version

Here's the MUI2 coded version. Biggest difference is the UI is bigger, so more room for more games.

;Copyright 2007 Simeon Kühl and Digitxp

;This software is OSI Certified Open Source Software.
;OSI Certified is a certification mark of the Open Source Initiative.

;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either version 2
;of the License, or (at your option) any later version.

;This program 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 General Public License for more details.

;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

!define APPNAME "GamePack"
!define VER "0.9.2.0"
!define WEBSITE "PortableApps.com/DevelopmentTest"
!define DEFAULTAPPDIR "Games"
!define NAME "GamePackPortable"
!define PORTABLEAPPNAME "GamePack Portable"

SetDatablockOptimize on
SetCompress force
SetCompressor /SOLID /FINAL lzma

Icon "..\..\App\AppInfo\Appicon.ico"
;=== Program Details
Name "${PORTABLEAPPNAME}"
OutFile "..\..\${NAME}.exe"
Caption "${PORTABLEAPPNAME} | PortableApps.com"
BrandingText /TRIMRIGHT "${PORTABLEAPPNAME} v${VER}"
VIProductVersion "${VER}"
VIAddVersionKey ProductName "${NAME}"
VIAddVersionKey Comments "Allows a collection of games to be run from a removable drive. For additional details, visit ${WEBSITE}"
VIAddVersionKey CompanyName "PortableApps.com"
VIAddVersionKey LegalCopyright "Portableapps.com and Contributors"
VIAddVersionKey FileDescription "${PORTABLEAPPNAME}"
VIAddVersionKey FileVersion "${VER}"
VIAddVersionKey ProductVersion "${VER}"
VIAddVersionKey InternalName "${PORTABLEAPPNAME}"
VIAddVersionKey LegalTrademarks "PortableApps.com is a Trademark of Rare Ideas, LLC."
VIAddVersionKey OriginalFilename "${NAME}.exe"

RequestExecutionLevel user
CRCCheck On
WindowIcon On
AutoCloseWindow True
RequestExecutionLevel user
XPStyle on

!include MUI2.nsh
!include WinMessages.nsh

!define MUI_ICON "..\..\App\AppInfo\appicon.ico"

Page custom nsDialogsPage

!insertmacro MUI_LANGUAGE "English"

;custom page language strings
LangString PAGE_TITLE ${LANG_ENGLISH} "Welcome to GamePackPortable"
LangString PAGE_SUBTITLE ${LANG_ENGLISH} "Choose some games and click Run..."

;=== Variables
Var BlackBox
Var Bridges
Var Cube
Var Dominosa
Var Fifteen
Var Filling
Var Flip
Var Galaxies
Var Guess
Var Inertia
Var Lightup
Var Loopy
Var Map
Var Mines
Var Pegs
Var Sixteen
Var Slant
Var Solo
Var Tents
Var Twiddle
Var Unequal
Var Untangle

Var RunButton

Function nsDialogsPage
	!insertmacro MUI_HEADER_TEXT $(PAGE_TITLE) $(PAGE_SUBTITLE)
	
	GetDlgItem $0 $HWNDPARENT 2 ; cancel button
	SendMessage $0 ${WM_SETTEXT} 0 "STR:Close" ; change text
	GetDlgItem $0 $HWNDPARENT 1 ; install button
	EnableWindow $0 0 ; disable install button
	ShowWindow $0 ${SW_HIDE} ; hide install button
	
	nsDialogs::Create /NOUNLOAD 1018
	${NSD_CreateCheckbox} 0 10 20% 8u BlackBox
	Pop $BlackBox
	${NSD_CreateCheckbox} 0 30 20% 8u Bridges
	Pop $Bridges
	${NSD_CreateCheckbox} 0 50 20% 8u Cube
	Pop $Cube
	${NSD_CreateCheckbox} 0 70 20% 8u Dominosa
	Pop $Dominosa
	${NSD_CreateCheckbox} 0 90 20% 8u Fifteen
	Pop $Fifteen
	${NSD_CreateCheckbox} 0 110 20% 8u Filling
	Pop $Filling
	${NSD_CreateCheckbox} 0 130 20% 8u Flip
	Pop $Flip
	${NSD_CreateCheckbox} 0 150 20% 8u Galaxies
	Pop $Galaxies
	${NSD_CreateCheckbox} 0 170 20% 8u Guess
	Pop $Guess
	${NSD_CreateCheckbox} 0 190 20% 8u Inertia
	Pop $Inertia
	${NSD_CreateCheckbox} 110 10 20% 8u LightUp
	Pop $Lightup
	${NSD_CreateCheckbox} 110 30 20% 8u Loopy
	Pop $Loopy
	${NSD_CreateCheckbox} 110 50 20% 8u Map
	Pop $Map
	${NSD_CreateCheckbox} 110 70 20% 8u Mines
	Pop $Mines
	${NSD_CreateCheckbox} 110 90 20% 8u Pegs
	Pop $Pegs
	${NSD_CreateCheckbox} 110 110 20% 8u Sixteen
	Pop $Sixteen
	${NSD_CreateCheckbox} 110 130 20% 8u Slant
	Pop $Slant
	${NSD_CreateCheckbox} 110 150 20% 8u Solo
	Pop $Solo
	${NSD_CreateCheckbox} 110 170 20% 8u Tents
	Pop $Tents
	${NSD_CreateCheckbox} 110 190 20% 8u Twiddle
	Pop $Twiddle
	${NSD_CreateCheckbox} 220 10 20% 8u Unequal
	Pop $Unequal
	${NSD_CreateCheckbox} 220 30 20% 8u Untangle
	Pop $Untangle
	
	; *** Run button w/ notification
	${NSD_CreateButton} 387 205 60 14u "Run!"
	Pop $RunButton
	${NSD_OnClick} $RunButton nsRunProgs ; calls user function nsRunProgs when clicked
	${NSD_SetFocus} $RunButton ; sets focus to button
	
	nsDialogs::Show
FunctionEnd

Function nsRunProgs
	Pop $0
	SendMessage $BlackBox ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\BlackBox.exe"
	SendMessage $Bridges ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Bridges.exe"
	SendMessage $Cube ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Cube.exe"
	SendMessage $Dominosa ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Dominosa.exe"
	SendMessage $Fifteen ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Fifteen.exe"
	SendMessage $Filling ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Filling.exe"
	SendMessage $Flip ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Flip.exe"
	SendMessage $Galaxies ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Galaxies.exe"
	SendMessage $Guess ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Guess.exe"
	SendMessage $Inertia ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Inertia.exe"
	SendMessage $LightUp ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\LightUp.exe"
	SendMessage $Loopy ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Loopy.exe"
	SendMessage $Map ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Map.exe"
	SendMessage $Mines ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Mines.exe"
	SendMessage $Pegs ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Pegs.exe"
	SendMessage $Sixteen ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Sixteen.exe"
	SendMessage $Slant ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Slant.exe"
	SendMessage $Solo ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Solo.exe"
	SendMessage $Tents ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Tents.exe"
	SendMessage $Twiddle ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Twiddle.exe"
	SendMessage $Unequal ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Unequal.exe"
	SendMessage $Untangle ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Untangle.exe"
FunctionEnd

Section
SectionEnd
mecki77
Offline
Last seen: 2 years 11 months ago
Joined: 2008-03-03 02:54
MUI2 Version - great :)

Hello wraithdu, saved your MUI2 Variantt of the GameSuitePortable Launcher Code as .nsi Script and compiled it,... it looks great, when it runs and no problems so far,... Smile
by the way - digitxp your starter and the whole package is great to - nice idea to put it in a portable suite - good work done,... Smile
but why are not all games from the zip included?
Netgame, Netslide, Pattern, Rectangle(rect.exe) and Samegame are missing,...
I took wraitdus script and added them - nothing else edited - I only added the missing games - in alphabetical order - in the Variables-Section and the two Functions-Sections of the code. The executebles of the missing games I put in the \app\games\ folder, where the others are located.
I hope it helped a little,... Wink

;Copyright 2007 Simeon Kühl and Digitxp

;This software is OSI Certified Open Source Software.
;OSI Certified is a certification mark of the Open Source Initiative.

;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either version 2
;of the License, or (at your option) any later version.

;This program 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 General Public License for more details.

;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

!define APPNAME "GamePack"
!define VER "0.9.2.0"
!define WEBSITE "PortableApps.com/DevelopmentTest"
!define DEFAULTAPPDIR "Games"
!define NAME "GamePackPortable"
!define PORTABLEAPPNAME "GamePack Portable"

SetDatablockOptimize on
SetCompress force
SetCompressor /SOLID /FINAL lzma

Icon "..\..\App\AppInfo\Appicon.ico"
;=== Program Details
Name "${PORTABLEAPPNAME}"
OutFile "..\..\${NAME}.exe"
Caption "${PORTABLEAPPNAME} | PortableApps.com"
BrandingText /TRIMRIGHT "${PORTABLEAPPNAME} v${VER}"
VIProductVersion "${VER}"
VIAddVersionKey ProductName "${NAME}"
VIAddVersionKey Comments "Allows a collection of games to be run from a removable drive. For additional details, visit ${WEBSITE}"
VIAddVersionKey CompanyName "PortableApps.com"
VIAddVersionKey LegalCopyright "Portableapps.com and Contributors"
VIAddVersionKey FileDescription "${PORTABLEAPPNAME}"
VIAddVersionKey FileVersion "${VER}"
VIAddVersionKey ProductVersion "${VER}"
VIAddVersionKey InternalName "${PORTABLEAPPNAME}"
VIAddVersionKey LegalTrademarks "PortableApps.com is a Trademark of Rare Ideas, LLC."
VIAddVersionKey OriginalFilename "${NAME}.exe"

RequestExecutionLevel user
CRCCheck On
WindowIcon On
AutoCloseWindow True
RequestExecutionLevel user
XPStyle on

!include MUI2.nsh
!include WinMessages.nsh

!define MUI_ICON "..\..\App\AppInfo\appicon.ico"

Page custom nsDialogsPage

!insertmacro MUI_LANGUAGE "English"

;custom page language strings
LangString PAGE_TITLE ${LANG_ENGLISH} "Welcome to GamePackPortable"
LangString PAGE_SUBTITLE ${LANG_ENGLISH} "Choose some games and click Run..."

;=== Variables
Var BlackBox
Var Bridges
Var Cube
Var Dominosa
Var Fifteen
Var Filling
Var Flip
Var Galaxies
Var Guess
Var Inertia
Var Lightup
Var Loopy
Var Map
Var Mines
Var Netgame
Var Netslide
Var Pattern
Var Pegs
Var Rectangle
Var Samegame
Var Sixteen
Var Slant
Var Solo
Var Tents
Var Twiddle
Var Unequal
Var Untangle

Var RunButton

Function nsDialogsPage
	!insertmacro MUI_HEADER_TEXT $(PAGE_TITLE) $(PAGE_SUBTITLE)
	
	GetDlgItem $0 $HWNDPARENT 2 ; cancel button
	SendMessage $0 ${WM_SETTEXT} 0 "STR:Close" ; change text
	GetDlgItem $0 $HWNDPARENT 1 ; install button
	EnableWindow $0 0 ; disable install button
	ShowWindow $0 ${SW_HIDE} ; hide install button
	
	nsDialogs::Create /NOUNLOAD 1018
	${NSD_CreateCheckbox} 0 10 20% 8u BlackBox
	Pop $BlackBox
	${NSD_CreateCheckbox} 0 30 20% 8u Bridges
	Pop $Bridges
	${NSD_CreateCheckbox} 0 50 20% 8u Cube
	Pop $Cube
	${NSD_CreateCheckbox} 0 70 20% 8u Dominosa
	Pop $Dominosa
	${NSD_CreateCheckbox} 0 90 20% 8u Fifteen
	Pop $Fifteen
	${NSD_CreateCheckbox} 0 110 20% 8u Filling
	Pop $Filling
	${NSD_CreateCheckbox} 0 130 20% 8u Flip
	Pop $Flip
	${NSD_CreateCheckbox} 0 150 20% 8u Galaxies
	Pop $Galaxies
	${NSD_CreateCheckbox} 0 170 20% 8u Guess
	Pop $Guess
	${NSD_CreateCheckbox} 0 190 20% 8u Inertia
	Pop $Inertia
	${NSD_CreateCheckbox} 110 10 20% 8u LightUp
	Pop $Lightup
	${NSD_CreateCheckbox} 110 30 20% 8u Loopy
	Pop $Loopy
	${NSD_CreateCheckbox} 110 50 20% 8u Map
	Pop $Map
	${NSD_CreateCheckbox} 110 70 20% 8u Mines
	Pop $Mines
	${NSD_CreateCheckbox} 110 90 20% 8u Netgame
	Pop $Netgame
	${NSD_CreateCheckbox} 110 110 20% 8u Netslide
	Pop $Netslide
	${NSD_CreateCheckbox} 110 130 20% 8u Pattern
	Pop $Pattern
	${NSD_CreateCheckbox} 110 150 20% 8u Pegs
	Pop $Pegs
	${NSD_CreateCheckbox} 110 170 20% 8u Rectangle
	Pop $Rectangle
	${NSD_CreateCheckbox} 110 190 20% 8u Samegame
	Pop $Samegame
	${NSD_CreateCheckbox} 220 10 20% 8u Sixteen
	Pop $Sixteen
	${NSD_CreateCheckbox} 220 30 20% 8u Slant
	Pop $Slant
	${NSD_CreateCheckbox} 220 50 20% 8u Solo
	Pop $Solo
	${NSD_CreateCheckbox} 220 70 20% 8u Tents
	Pop $Tents
	${NSD_CreateCheckbox} 220 90 20% 8u Twiddle
	Pop $Twiddle
	${NSD_CreateCheckbox} 220 110 20% 8u Unequal
	Pop $Unequal
	${NSD_CreateCheckbox} 220 130 20% 8u Untangle
	Pop $Untangle
	
	; *** Run button w/ notification
	${NSD_CreateButton} 387 205 60 14u "Run!"
	Pop $RunButton
	${NSD_OnClick} $RunButton nsRunProgs ; calls user function nsRunProgs when clicked
	${NSD_SetFocus} $RunButton ; sets focus to button
	
	nsDialogs::Show
FunctionEnd

Function nsRunProgs
	Pop $0
	SendMessage $BlackBox ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\BlackBox.exe"
	SendMessage $Bridges ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Bridges.exe"
	SendMessage $Cube ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Cube.exe"
	SendMessage $Dominosa ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Dominosa.exe"
	SendMessage $Fifteen ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Fifteen.exe"
	SendMessage $Filling ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Filling.exe"
	SendMessage $Flip ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Flip.exe"
	SendMessage $Galaxies ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Galaxies.exe"
	SendMessage $Guess ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Guess.exe"
	SendMessage $Inertia ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Inertia.exe"
	SendMessage $LightUp ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\LightUp.exe"
	SendMessage $Loopy ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Loopy.exe"
	SendMessage $Map ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Map.exe"
	SendMessage $Mines ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Mines.exe"
	SendMessage $Netgame ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Netgame.exe"
	SendMessage $Netslide ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Netslide.exe"	
	SendMessage $Pattern ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Pattern.exe"
	SendMessage $Pegs ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Pegs.exe"
	SendMessage $Rectangle ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Rect.exe"
	SendMessage $Samegame ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Samegame.exe"
	SendMessage $Sixteen ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Sixteen.exe"
	SendMessage $Slant ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Slant.exe"
	SendMessage $Solo ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Solo.exe"
	SendMessage $Tents ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Tents.exe"
	SendMessage $Twiddle ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Twiddle.exe"
	SendMessage $Unequal ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Unequal.exe"
	SendMessage $Untangle ${BM_GETSTATE} 0 0 $1
		StrCmp $1 "1" "" +2
		Exec "$EXEDIR\App\Games\Untangle.exe"		
FunctionEnd

Section
SectionEnd
Patrick Patience
Offline
Last seen: 4 years 11 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Thanks

Thanks for that. Smile

Patrick Patience
Offline
Last seen: 4 years 11 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Note

It should really be 'Welcome to GamePack Portable' with a space, too.

And, and I don't know if there is one, but an error message when a game can't be started. (say, app doesn't exists for some reason).

digitxp
digitxp's picture
Offline
Last seen: 13 years 2 months ago
Joined: 2007-11-03 18:33
I think I should

hand this over to you guys :P. (Homework is so inconvenient, especially on read across america day...)

Insert original signature here with Greasemonkey Script.

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 11 months ago
Developer
Joined: 2006-12-06 18:07
If you want to hand it over,

If you want to hand it over, go right ahead, you did a great job getting things started on this, it was a great idea.

Nice work wraithdu on the MUI2 code, it works great, and thanks mecki77 for making sure all the games were included.

The developer formerly known as ZGitRDun8705

Aciago
Aciago's picture
Offline
Last seen: 1 year 1 month ago
Joined: 2007-01-24 14:23
hey

Thank you very much digitxp.

And wraithdu and mecki77 why not upload your last modifications to share to these (pointing to myself) simple humans that don't code and don't know how to compile?... Wink

Thanks in advance... Smile

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

mecki77
Offline
Last seen: 2 years 11 months ago
Joined: 2008-03-03 02:54
Nice Idea, but....

...it is still the project of digitxp so he deceide how he builds this suite and which code he takes for it, and of course it is at him, to release it,... Wink
I'm not a programmer - i'm only a "Script-Kiddie" *gg* that is addicted in Portable Software. I take code and plays with it to see how it works and for learning purposes - like that it was in this case too: i saw wraitdus modifications and compiled them to see how they work and how he made it. Then i discovered that some games are missing, so i deceided to add them and edit the script and compile it for me. After that i deceided to give the edited code back to the Community, like it should be by Open Source Code under the GPL Wink - that's it...
If digitxp want's to hand out the project to annother one, I think wraithdu should make the job,... NSIS is powerful and easy to learn, but i'm just at the beginning Wink

mecki

Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
Yeah

This Suite is a good example of OpenSource/Community based work.
I wanted a launcher, wraithdu helped me, digitxp saw my code, used it for his Suite and then 3 other people helped him with it. And without John , noone would even know how to use NSIS this way Smile

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

Aciago
Aciago's picture
Offline
Last seen: 1 year 1 month ago
Joined: 2007-01-24 14:23
lol

but I still don't know how to use NSIS... Blum

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

rab040ma
Offline
Last seen: 5 months 1 week ago
Joined: 2007-08-27 13:35
Anyone with a SourceForge

Anyone with a SourceForge account can be added to the project where digitxp has been maintaining this app.

MC

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 11 months ago
Developer
Joined: 2006-12-06 18:07
digitxp, you should really

digitxp, you should really update this and get things ready to go, the scripts that wraithdu and mecki77 fixed up for you are great, it should be a simple update. Remember to give them credit too.

The developer formerly known as ZGitRDun8705

digitxp
digitxp's picture
Offline
Last seen: 13 years 2 months ago
Joined: 2007-11-03 18:33
Okay, sure

but I have no idea what inst files has to do with this:

1 warning:
Page instfiles not used, no sections will be executed!

But I'll post it anyways...

Insert original signature here with Greasemonkey Script.

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 11 months ago
Developer
Joined: 2006-12-06 18:07
Will you include all of the

Will you include all of the games made by ST, as mecki77 has done in his script? I think this would be recommended.

As for that issue, I'm not sure how to handle it. Maybe somebody with a bit more NSIS experience can answer that.

The developer formerly known as ZGitRDun8705

Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
I think

its ok to ignore it. I don't have the time to test it myself atm.
Just try if it works and if it doesn't work you cant ignore it Smile

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

wraithdu
Offline
Last seen: 11 years 5 months ago
Developer
Joined: 2007-06-27 20:22
Yes, just ignore it. It's

Yes, just ignore it. It's because there's no instfiles page defined. But it's not needed, and nothing is done in a section anywhere anyway. It's all done in the functions.

eduardo_38
Offline
Last seen: 9 years 11 months ago
Joined: 2008-03-08 12:57
It can be compressed with UPX

It can be compressed EXEs with UPX.

digitxp
digitxp's picture
Offline
Last seen: 13 years 2 months ago
Joined: 2007-11-03 18:33
Nope

the apps are MIT, and UPX only allowed with gpl apps... (I don't know why). Anyway, there's no point.

Insert original signature here with Greasemonkey Script.

John T. Haller
John T. Haller's picture
Offline
Last seen: 6 hours 46 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Incorrect

UPX is under the GPL but can be used with apps under any license including closed source binaries as long as UPX is unmodified.

Sometimes, the impossible can become possible, if you're awesome!

John Bentley
John Bentley's picture
Offline
Last seen: 15 years 3 months ago
Developer
Joined: 2006-01-24 13:26
It is perfectly

It is perfectly acceptable to UPX MIT licensed apps. (You may be thinking of the mozilla apps.)

cowsay Moo
cowthink 'Dude, why are you staring at me.'

Log in or register to post comments