Skip to content
\n

Step II

\n

Running the build_nsis() function with srcname = 'launcher_basic.nsi, dstname = 'VS Code.nsi' and data = data (The list from previous step).

\n

Basically this function edits the base nsi file by replacing variables according to the tuples in data.
\nIt adds to the list the tuple ('!addincludedir', osp.join(portable_dir, 'include'),). This probably makes the icon files and other resources available to the NSIS compiler.

\n

It edits (If I got it right) the lines (Insert values inside the \"\"):

\n
!addincludedir \"\"\n!define COMMAND \"\"\n!define PARAMETERS \"\"\n!define WORKDIR \"\"\nIcon \"\"\nOutFile \"\"
\n

So

\n
!addincludedir \"PathToResourcesFolder\"\n!define COMMAND \"wscript.exe\"\n!define PARAMETERS \"Noshell.vbs winvscode.bat\"\n!define WORKDIR \"$EXEDIR\\scripts\"\nIcon \"PathToIcon\"\nOutFile \"VS Code.exe\"
\n

Am I right? Did I miss something?

","upvoteCount":1,"url":"https://github.com/winpython/winpython/discussions/1079#discussioncomment-3058936"}}}
Discussion options

You must be logged in to vote

OK, So basically what I'm after is how the nsi file look like just before it is compiled.
I guess if someone has built the distribution it may share it?

I am trying to go down the rabbit hole.

Step I

Running the function create_launcher() with name = VS Code.exe, icon = pathToIcon, command = wscript.exe, args = Noshell.vbs winvscode.bat, workdir = r'$EXEDIR\scripts and launcher = launcher_basic.nsi.

The function creates the list of tuples:

 data = [
            ('WINPYDIR', '$EXEDIR\%s' % self.python_name),
            ('WINPYVER', self.winpyver),
            ('COMMAND', 'wscript.exe'),
            ('PARAMETERS', 'Noshell.vbs winvscode.bat'),
            ('WORKDIR', '$EXEDIR\scripts'),
  …

Replies: 6 comments 8 replies

Comment options

You must be logged in to vote
4 replies
@RoyiAvital
Comment options

@firai
Comment options

@RoyiAvital
Comment options

@RoyiAvital
Comment options

Comment options

You must be logged in to vote
1 reply
@RoyiAvital
Comment options

Comment options

You must be logged in to vote
1 reply
@RoyiAvital
Comment options

Comment options

You must be logged in to vote
1 reply
@RoyiAvital
Comment options

Comment options

You must be logged in to vote
1 reply
@RoyiAvital
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by RoyiAvital
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants