WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > how to make a common file with two choices
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
ras french
Junior Member

Registered: Dec 2006
From:

how to make a common file with two choices

hi ,

first, sorry for my bad english... i'm french but on french forum i do not find help for this ...

i have made a game and i would put online for the end of this year, so i have choose NSIS to make my installer because i want use my owne skins...

my pb is that i do not know nsis script and it is difficult for me to be ready in two weeks !

ok , my game can be installed in two languages : English and French , so i have 3 folders :
1 commun with all the game
1 french with files for french language
1 english " " " english "


quote:
;Installer Sections

Section "MOD_Version_FR" SecDummy

SetOutPath "$INSTDIR"


i have made two choice for installing this game in FR or EN but i do not want take two times the common file with the game because is very heavy !

i would that the choice "MOD_Version_EN" include only the english langage more the common file

and the same for french choice....

thanks

Quick Link | Report this post to a moderator | IP: Logged

ras french is offline Old Post 12-04-2006 11:59 AM
Click Here to See the Profile for ras french Click here to Send ras french a Private Message Click Here to Email ras french Find more posts by ras french Add ras french to your buddy list Edit/Delete Message Reply w/Quote
Red Wine
Forum King

Registered: Mar 2006
From: Ath. GR

I'm not sure if I got you clearly :-)
Anyway, I guess you're looking for something like this:
Create a hidden section that is always installed with the common files, one section for the english lang and one for the french lang, and ask users make their choise from your components page.

__________________
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS

Quick Link | Report this post to a moderator | IP: Logged

Red Wine is offline Old Post 12-04-2006 12:43 PM
Click Here to See the Profile for Red Wine Click here to Send Red Wine a Private Message Find more posts by Red Wine Add Red Wine to your buddy list Edit/Delete Message Reply w/Quote
ras french
Junior Member

Registered: Dec 2006
From:

thx to answers so quickly !
u have good anderstand me.
common files must be always installed , just add with langage choise the files for FR or EN lang

Quick Link | Report this post to a moderator | IP: Logged

ras french is offline Old Post 12-04-2006 01:00 PM
Click Here to See the Profile for ras french Click here to Send ras french a Private Message Click Here to Email ras french Find more posts by ras french Add ras french to your buddy list Edit/Delete Message Reply w/Quote
Red Wine
Forum King

Registered: Mar 2006
From: Ath. GR

There are several ways to make your installer. One could be by setting up a custom page e.g. with radio buttons and ask users for their choise. I think the proper way should be with the components page. Take a look at the included NSIS examples to find out how you'd manage it.

__________________
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS

Quick Link | Report this post to a moderator | IP: Logged

Red Wine is offline Old Post 12-04-2006 01:08 PM
Click Here to See the Profile for Red Wine Click here to Send Red Wine a Private Message Find more posts by Red Wine Add Red Wine to your buddy list Edit/Delete Message Reply w/Quote
Red Wine
Forum King

Registered: Mar 2006
From: Ath. GR

OK, here comes a minimal working example, modify it to suit your needs.
I hope it is going to help you :-)

code:
name 'sections test' outfile 'sectest.exe' !include "Sections.nsh" Insttype "/CUSTOMSTRING=Please make your choise" Insttype "English Interface" Insttype "French Interface" page components page instfiles Section "Common FIles (Required)" SectionIn RO # common files here SectionEnd Section "English Language Files" SEC_ENG SectionIn 1 # ENG files here SectionEnd Section /o "French Language Files" SEC_FRA SectionIn 2 # FRA files here SectionEnd Function .onInit StrCpy $1 ${SEC_ENG} FunctionEnd Function .onSelChange !insertmacro StartRadioButtons $1 !insertmacro RadioButton ${SEC_ENG} !insertmacro RadioButton ${SEC_FRA} !insertmacro EndRadioButtons FunctionEnd

__________________
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS

Quick Link | Report this post to a moderator | IP: Logged

Red Wine is offline Old Post 12-04-2006 03:09 PM
Click Here to See the Profile for Red Wine Click here to Send Red Wine a Private Message Find more posts by Red Wine Add Red Wine to your buddy list Edit/Delete Message Reply w/Quote
onad
Senior Member

Registered: Dec 2004
From: Turkey

Red Wine, your are always so nice to NSIS beginners, great!

__________________
"Just do it"

Quick Link | Report this post to a moderator | IP: Logged

onad is offline Old Post 12-04-2006 05:46 PM
Click Here to See the Profile for onad Click here to Send onad a Private Message Find more posts by onad Add onad to your buddy list Edit/Delete Message Reply w/Quote
ras french
Junior Member

Registered: Dec 2006
From:

Thx u very much ... Red Wine

with u'r help i will be ready to distribute this game for the 25 december..... happy Chrismas and new year....

Quick Link | Report this post to a moderator | IP: Logged

ras french is offline Old Post 12-05-2006 10:00 AM
Click Here to See the Profile for ras french Click here to Send ras french a Private Message Click Here to Email ras french Find more posts by ras french Add ras french to your buddy list Edit/Delete Message Reply w/Quote
Red Wine
Forum King

Registered: Mar 2006
From: Ath. GR

@ onad:
Thanks, it is just that I feel beginner my self too :-)

@ ras french:
Thanks, best wishes for you too!

__________________
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS

Quick Link | Report this post to a moderator | IP: Logged

Red Wine is offline Old Post 12-05-2006 10:14 AM
Click Here to See the Profile for Red Wine Click here to Send Red Wine a Private Message Find more posts by Red Wine Add Red Wine to your buddy list Edit/Delete Message Reply w/Quote
compmaniac
Junior Member

Registered: Feb 2007
From:

How do I make it so that on the components page, only one of the choices can be selected, and not none or all?

code:
########################################################################## ################## # NSIS Installation Script created by NSIS Quick Setup Script Generator v1.09.18 # Entirely Edited with NullSoft Scriptable Installation System # by Vlasis K. Barkas aka Red Wine Sep 2006 ################################################################################ ############ !define APP_NAME "asdf" !define COMP_NAME "asdf" !define WEB_SITE "http://www.domain.com" !define VERSION "00.00.00.00" !define COPYRIGHT "asdf" !define DESCRIPTION "asdf" !define LICENSE_TXT "readme.txt" !define INSTALLER_NAME "setup.exe" !define INSTALL_TYPE "SetShellVarContext current" !define REG_ROOT "HKCU" ###################################################################### VIProductVersion "${VERSION}" VIAddVersionKey "ProductName" "${APP_NAME}" VIAddVersionKey "CompanyName" "${COMP_NAME}" VIAddVersionKey "LegalCopyright" "${COPYRIGHT}" VIAddVersionKey "FileDescription" "${DESCRIPTION}" VIAddVersionKey "FileVersion" "${VERSION}" ###################################################################### SetCompressor ZLIB Name "${APP_NAME}" Caption "${APP_NAME}" OutFile "${INSTALLER_NAME}" BrandingText "${APP_NAME}" XPStyle on InstallDirRegKey "${REG_ROOT}" "${UNINSTALL_PATH}" "UninstallString" InstallDir "$PROGRAMFILES\" ###################################################################### !include "MUI.nsh" !define MUI_ABORTWARNING !define MUI_UNABORTWARNING !insertmacro MUI_PAGE_WELCOME !ifdef LICENSE_TXT !insertmacro MUI_PAGE_LICENSE "${LICENSE_TXT}" !endif !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_UNPAGE_FINISH !insertmacro MUI_LANGUAGE "English" ###################################################################### Section "1" ${INSTALL_TYPE} SetOverwrite ifnewer SetOutPath "$INSTDIR" CopyFiles "$EXEDIR\files1\*.*" "$INSTDIR\files" SectionEnd Section "2" ${INSTALL_TYPE} SetOverwrite ifnewer SetOutPath "$INSTDIR" CopyFiles "$EXEDIR\files2\*.*" "$INSTDIR\files" SectionEnd Section "3" ${INSTALL_TYPE} SetOverwrite ifnewer SetOutPath "$INSTDIR" CopyFiles "$EXEDIR\files3\*.*" "$INSTDIR\files" SectionEnd

Last edited by compmaniac on 02-22-2007 at 10:44 PM

Quick Link | Report this post to a moderator | IP: Logged

compmaniac is offline Old Post 02-22-2007 09:44 PM
Click Here to See the Profile for compmaniac Click here to Send compmaniac a Private Message Find more posts by compmaniac Add compmaniac to your buddy list Edit/Delete Message Reply w/Quote
Red Wine
Forum King

Registered: Mar 2006
From: Ath. GR

See the included example one-section.nsi

__________________
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS

Quick Link | Report this post to a moderator | IP: Logged

Red Wine is offline Old Post 02-22-2007 09:49 PM
Click Here to See the Profile for Red Wine Click here to Send Red Wine a Private Message Find more posts by Red Wine Add Red Wine to your buddy list Edit/Delete Message Reply w/Quote
compmaniac
Junior Member

Registered: Feb 2007
From:

Thanks, but how do I make the installer set a specific choice to be already ticked off?

Quick Link | Report this post to a moderator | IP: Logged

compmaniac is offline Old Post 02-22-2007 10:33 PM
Click Here to See the Profile for compmaniac Click here to Send compmaniac a Private Message Find more posts by compmaniac Add compmaniac to your buddy list Edit/Delete Message Reply w/Quote
Red Wine
Forum King

Registered: Mar 2006
From: Ath. GR

Section /o is unchecked by default.
Please edit your post above and remove my e-mail address from there!

__________________
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS

Quick Link | Report this post to a moderator | IP: Logged

Red Wine is offline Old Post 02-22-2007 10:39 PM
Click Here to See the Profile for Red Wine Click here to Send Red Wine a Private Message Find more posts by Red Wine Add Red Wine to your buddy list Edit/Delete Message Reply w/Quote
compmaniac
Junior Member

Registered: Feb 2007
From:

quote:
Originally posted by Red Wine
Section /o is unchecked by default.
Please edit your post above and remove my e-mail address from there!



Oh, sorry. What a coincidence! You're Red Wine!

Quick Link | Report this post to a moderator | IP: Logged

compmaniac is offline Old Post 02-22-2007 10:44 PM
Click Here to See the Profile for compmaniac Click here to Send compmaniac a Private Message Find more posts by compmaniac Add compmaniac to your buddy list Edit/Delete Message Reply w/Quote
Red Wine
Forum King

Registered: Mar 2006
From: Ath. GR

Thanks! There is no need to feed spammers

__________________
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS

Quick Link | Report this post to a moderator | IP: Logged

Red Wine is offline Old Post 02-22-2007 10:48 PM
Click Here to See the Profile for Red Wine Click here to Send Red Wine a Private Message Find more posts by Red Wine Add Red Wine to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 07:22 PM. Post New Thread    Post A Reply
  Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > how to make a common file with two choices
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON