Ok, so I'm trying to mod the Scratch2exe to do the Panther (.pt) files, but... I can't get it to change. I've edited the Scratch2ExeGUI.nsi file, but it not changing anything, what am I doing wrong? I've changed all the stuff in the kit folder, but I can't work out how to make it work.
The code now looks like:
Name "Panther2EXE"
Caption "Panther2Exe"
OutFile "Panther2Exe.exe"
RequestExecutionLevel user
SetCompressor /SOLID lzma
CRCCheck off
Icon Panthericon.ico
!include "dialogs.nsh"
Function .onInit
SetSilent silent
FunctionEnd
Function RIndexOf
Exch $R0
Exch
Exch $R1
Push $R2
Push $R3
StrCpy $R3 $R0
StrCpy $R0 0
IntOp $R0 $R0 + 1
StrCpy $R2 $R3 1 -$R0
StrCmp $R2 "" +2
StrCmp $R2 $R1 +2 -3
StrCpy $R0 -1
Pop $R3
Pop $R2
Pop $R1
Exch $R0
FunctionEnd
!macro RIndexOf Var Str Char
Push "${Char}"
Push "${Str}"
Call RIndexOf
Pop "${Var}"
!macroend
!define RIndexOf "!insertmacro RIndexOf"
Section
${OpenBox} "Step 1: Choose your Panther Project" "Panther Project (*.pt)|*.pt||" " 1 "$DOCUMENTS" 0 3 ${VAR_1}
${if} $1 == "${NULL}"
Abort
${else}
${RIndexOf} $R0 $1 "\"
StrLen $R1 $1
IntOp $R2 $R1 - $R0
IntOp $R3 $R2 + 1
StrCpy $3 $1 -3 $R3
${endif}
${OpenBox} "Step 2 (Optional): Choose an Icon" "Icon (*.ico)|*.ICO||" " 1 "$DOCUMENTS" 0 3 ${VAR_2}
${if} $2 == "${NULL}"
StrCpy $2 "$EXEDIR\kit\default.ico"
${else}
Nop
${endif}
FileOpen $0 $TEMP\scratch2exe.nsi w
FileWrite $0 'OutFile "$DOCUMENTS\Scratch2Exe\$3.exe" $\r$\n'
FileWrite $0 'RequestExecutionLevel user $\r$\n'
FileWrite $0 "SetCompressor /SOLID lzma $\r$\n"
FileWrite $0 "CRCCheck off $\r$\n"
FileWrite $0 'Icon "$2" $\r$\n'
FileWrite $0 "Function .onInit $\r$\n"
FileWrite $0 " SetSilent silent $\r$\n"
FileWrite $0 "FunctionEnd $\r$\n"
FileWrite $0 "Section $\r$\n"
FileWrite $0 'SetOutPath $$TEMP $\r$\n'
FileWrite $0 ' File "$1" $\r$\n'
FileWrite $0 " File '$EXEDIR\kit\Panther.exe' $\r$\n"
FileWrite $0 " File '$EXEDIR\kit\Mpeg3Plugin.dll' $\r$\n"
FileWrite $0 " File '$EXEDIR\kit\ScratchPlugin.dll' $\r$\n"
FileWrite $0 " File '$EXEDIR\kit\Chirp.remix' $\r$\n"
FileWrite $0 " File '$EXEDIR\kit\license.txt' $\r$\n"
FileWrite $0 " execWait '$\"$$TEMP\Panther.exe$\" $\"$$TEMP\chirp.remix$\" $\"presentation$\" $\"$$TEMP\$3.sb$\"'$\r$\n"
FileWrite $0 " Delete '$$TEMP\Panther.exe' $\r$\n"
FileWrite $0 " Delete '$$TEMP\Mpeg3Plugin.dll' $\r$\n"
FileWrite $0 " Delete '$$TEMP\ScratchPlugin.dll' $\r$\n"
FileWrite $0 " Delete '$$TEMP\license.txt' $\r$\n"
FileWrite $0 " Delete '$$TEMP\Chirp.remix' $\r$\n"
FileWrite $0 " Delete '$$TEMP\$3.sb' $\r$\n"
FileWrite $0 " Delete '$$TEMP\Panther.ini' $\r$\n"
FileWrite $0 " RMDir '$$TEMP\locale' $\r$\n"
FileWrite $0 "SectionEnd $\r$\n"
FileClose $0
ExecWait '"$EXEDIR\mak\makensis.exe" "/V2" "$TEMP\scratch2exe.nsi"' $0
Delete "$TEMP\scratch2exe.nsi"
StrCmp $0 "0" +3 0
MessageBox MB_OK "Compiler Error Code: $0"
Abort
ExecShell "open" "$DOCUMENTS\Scratch2Exe" SW_SHOWNORMAL
SectionEndAm I doing this right? Or just making a fool of my self?
Last edited by markyparky56 (2010-07-10 05:08:57)
Offline
It looks fine but a spelling mistake (*doign*)
Last edited by johnnydean1 (2010-07-10 04:56:30)
Offline
johnnydean1 wrote:
It looks fine but a spelling mistake (*doign*)
Wheres the spelling mistake?
But I don't see how thats going to be a problem, I don't know how to convert the code to an exe, I have no compiler, theres a MakeNSIS program in the mak folder, but when I tried that, I didn't do anything... except open a console window and close again.
Offline
markyparky56 wrote:
Ok, so I'm trying to mod the Scratch2exe to do the Panther (.pt) files, but... I can't get it to change. I've edited the Scratch2ExeGUI.nsi file, but it not changing anything, what am I doign wrong? I've changed all the stuff in the kit folder, but I can't work out how to make it work.
The code now looks like:
Offline
johnnydean1 wrote:
markyparky56 wrote:
Ok, so I'm trying to mod the Scratch2exe to do the Panther (.pt) files, but... I can't get it to change. I've edited the Scratch2ExeGUI.nsi file, but it not changing anything, what am I doign wrong? I've changed all the stuff in the kit folder, but I can't work out how to make it work.
The code now looks like:
Oh harhar...
Offline
could you link to the files? in the kit svp.
oh, this might be a more appropriate file
Panther2Exe.nsi
Name "Panther2EXE"
Caption "Panther2Exe"
OutFile "Panther2Exe.exe"
RequestExecutionLevel user
SetCompressor /SOLID lzma
CRCCheck off
Icon Panthericon.ico
!include "dialogs.nsh"
Function .onInit
SetSilent silent
FunctionEnd
Function RIndexOf
Exch $R0
Exch
Exch $R1
Push $R2
Push $R3
StrCpy $R3 $R0
StrCpy $R0 0
IntOp $R0 $R0 + 1
StrCpy $R2 $R3 1 -$R0
StrCmp $R2 "" +2
StrCmp $R2 $R1 +2 -3
StrCpy $R0 -1
Pop $R3
Pop $R2
Pop $R1
Exch $R0
FunctionEnd
!macro RIndexOf Var Str Char
Push "${Char}"
Push "${Str}"
Call RIndexOf
Pop "${Var}"
!macroend
!define RIndexOf "!insertmacro RIndexOf"
Section
${OpenBox} "Step 1: Choose your Panther Project" "Panther Project (*.pt)|*.pt||" " 1 "$DOCUMENTS" 0 3 ${VAR_1}
${if} $1 == "${NULL}"
Abort
${else}
${RIndexOf} $R0 $1 "\"
StrLen $R1 $1
IntOp $R2 $R1 - $R0
IntOp $R3 $R2 + 1
StrCpy $3 $1 -3 $R3
${endif}
${OpenBox} "Step 2 (Optional): Choose an Icon" "Icon (*.ico)|*.ICO||" " 1 "$DOCUMENTS" 0 3 ${VAR_2}
${if} $2 == "${NULL}"
StrCpy $2 "$EXEDIR\kit\default.ico"
${else}
Nop
${endif}
FileOpen $0 $TEMP\Panther2Exe.nsi w
FileWrite $0 'OutFile "$DOCUMENTS\Panther2Exe\$3.exe" $\r$\n'
FileWrite $0 'RequestExecutionLevel user $\r$\n'
FileWrite $0 "SetCompressor /SOLID lzma $\r$\n"
FileWrite $0 "CRCCheck off $\r$\n"
FileWrite $0 'Icon "$2" $\r$\n'
FileWrite $0 "Function .onInit $\r$\n"
FileWrite $0 " SetSilent silent $\r$\n"
FileWrite $0 "FunctionEnd $\r$\n"
FileWrite $0 "Section $\r$\n"
FileWrite $0 'SetOutPath $$TEMP $\r$\n'
FileWrite $0 ' File "$1" $\r$\n'
FileWrite $0 " File '$EXEDIR\kit\Panther.exe' $\r$\n"
FileWrite $0 " File '$EXEDIR\kit\Mpeg3Plugin.dll' $\r$\n"
FileWrite $0 " File '$EXEDIR\kit\ScratchPlugin.dll' $\r$\n"
FileWrite $0 " File '$EXEDIR\kit\Chirp.remix' $\r$\n"
FileWrite $0 " File '$EXEDIR\kit\license.txt' $\r$\n"
FileWrite $0 " execWait '$\"$$TEMP\Panther.exe$\" $\"$$TEMP\chirp.remix$\" $\"presentation$\" $\"$$TEMP\$3.sb$
\"'$\r$\n"
FileWrite $0 " Delete '$$TEMP\Panther.exe' $\r$\n"
FileWrite $0 " Delete '$$TEMP\Mpeg3Plugin.dll' $\r$\n"
FileWrite $0 " Delete '$$TEMP\ScratchPlugin.dll' $\r$\n"
FileWrite $0 " Delete '$$TEMP\license.txt' $\r$\n"
FileWrite $0 " Delete '$$TEMP\Chirp.remix' $\r$\n"
FileWrite $0 " Delete '$$TEMP\$3.sb' $\r$\n"
FileWrite $0 " Delete '$$TEMP\Panther.ini' $\r$\n"
FileWrite $0 " RMDir '$$TEMP\locale' $\r$\n"
FileWrite $0 "SectionEnd $\r$\n"
FileClose $0
ExecWait '"$EXEDIR\mak\makensis.exe" "/V2" "$TEMP\Panther2Exe.nsi"' $0
Delete "$TEMP\Panther2Exe.nsi"
StrCmp $0 "0" +3 0
MessageBox MB_OK "Compiler Error Code: $0"
Abort
ExecShell "open" "$DOCUMENTS\Panther2Exe" SW_SHOWNORMAL
SectionEndLast edited by cds56 (2010-07-10 20:48:19)
Offline
cds56 wrote:
could you link to the files? in the kit svp.
oh, this might be a more appropriate filePanther2Exe.nsi
Code:
Name "Panther2EXE" Caption "Panther2Exe" OutFile "Panther2Exe.exe" RequestExecutionLevel user SetCompressor /SOLID lzma CRCCheck off Icon Panthericon.ico !include "dialogs.nsh" Function .onInit SetSilent silent FunctionEnd Function RIndexOf Exch $R0 Exch Exch $R1 Push $R2 Push $R3 StrCpy $R3 $R0 StrCpy $R0 0 IntOp $R0 $R0 + 1 StrCpy $R2 $R3 1 -$R0 StrCmp $R2 "" +2 StrCmp $R2 $R1 +2 -3 StrCpy $R0 -1 Pop $R3 Pop $R2 Pop $R1 Exch $R0 FunctionEnd !macro RIndexOf Var Str Char Push "${Char}" Push "${Str}" Call RIndexOf Pop "${Var}" !macroend !define RIndexOf "!insertmacro RIndexOf" Section ${OpenBox} "Step 1: Choose your Panther Project" "Panther Project (*.pt)|*.pt||" " 1 "$DOCUMENTS" 0 3 ${VAR_1} ${if} $1 == "${NULL}" Abort ${else} ${RIndexOf} $R0 $1 "\" StrLen $R1 $1 IntOp $R2 $R1 - $R0 IntOp $R3 $R2 + 1 StrCpy $3 $1 -3 $R3 ${endif} ${OpenBox} "Step 2 (Optional): Choose an Icon" "Icon (*.ico)|*.ICO||" " 1 "$DOCUMENTS" 0 3 ${VAR_2} ${if} $2 == "${NULL}" StrCpy $2 "$EXEDIR\kit\default.ico" ${else} Nop ${endif} FileOpen $0 $TEMP\Panther2Exe.nsi w FileWrite $0 'OutFile "$DOCUMENTS\Panther2Exe\$3.exe" $\r$\n' FileWrite $0 'RequestExecutionLevel user $\r$\n' FileWrite $0 "SetCompressor /SOLID lzma $\r$\n" FileWrite $0 "CRCCheck off $\r$\n" FileWrite $0 'Icon "$2" $\r$\n' FileWrite $0 "Function .onInit $\r$\n" FileWrite $0 " SetSilent silent $\r$\n" FileWrite $0 "FunctionEnd $\r$\n" FileWrite $0 "Section $\r$\n" FileWrite $0 'SetOutPath $$TEMP $\r$\n' FileWrite $0 ' File "$1" $\r$\n' FileWrite $0 " File '$EXEDIR\kit\Panther.exe' $\r$\n" FileWrite $0 " File '$EXEDIR\kit\Mpeg3Plugin.dll' $\r$\n" FileWrite $0 " File '$EXEDIR\kit\ScratchPlugin.dll' $\r$\n" FileWrite $0 " File '$EXEDIR\kit\Chirp.remix' $\r$\n" FileWrite $0 " File '$EXEDIR\kit\license.txt' $\r$\n" FileWrite $0 " execWait '$\"$$TEMP\Panther.exe$\" $\"$$TEMP\chirp.remix$\" $\"presentation$\" $\"$$TEMP\$3.sb$ \"'$\r$\n" FileWrite $0 " Delete '$$TEMP\Panther.exe' $\r$\n" FileWrite $0 " Delete '$$TEMP\Mpeg3Plugin.dll' $\r$\n" FileWrite $0 " Delete '$$TEMP\ScratchPlugin.dll' $\r$\n" FileWrite $0 " Delete '$$TEMP\license.txt' $\r$\n" FileWrite $0 " Delete '$$TEMP\Chirp.remix' $\r$\n" FileWrite $0 " Delete '$$TEMP\$3.sb' $\r$\n" FileWrite $0 " Delete '$$TEMP\Panther.ini' $\r$\n" FileWrite $0 " RMDir '$$TEMP\locale' $\r$\n" FileWrite $0 "SectionEnd $\r$\n" FileClose $0 ExecWait '"$EXEDIR\mak\makensis.exe" "/V2" "$TEMP\Panther2Exe.nsi"' $0 Delete "$TEMP\Panther2Exe.nsi" StrCmp $0 "0" +3 0 MessageBox MB_OK "Compiler Error Code: $0" Abort ExecShell "open" "$DOCUMENTS\Panther2Exe" SW_SHOWNORMAL SectionEnd
Ok thanks, Im going to look up compiling it, but i'll link the kit folder in a few minutes.
http://dl.dropbox.com/u/6273449/Panther2exe/kit.zip thats the link.
Offline
(Double post)
Ok, found a compiler... It says that there is a problem with this piece of code:
!include "dialogs.nsh" Function .onInit SetSilent silent FunctionEnd
It can't find disalogs.nsh and that SetSilent silent is an error in the script... any ideas?
Offline
a couple of quick things:
- if Panther uses a different file suffix (.pt maybe?) you'll want to change that in the source file, too (it say *.sb in there)
- where the code makes references to a file called Chirp.remix you'll want to insert the name of the Panther image file instead
- the dialogs include file is included in the NSI system. Just download and install the whole thing, and you should be fine.
Good luck!
Offline
Jens wrote:
a couple of quick things:
- if Panther uses a different file suffix (.pt maybe?) you'll want to change that in the source file, too (it say *.sb in there)
- where the code makes references to a file called Chirp.remix you'll want to insert the name of the Panther image file instead
- the dialogs include file is included in the NSI system. Just download and install the whole thing, and you should be fine.
Good luck!
I did install it all, thats how I told me that it couldn't find it, and If you look at the code I've shown, you'll see that I did change the *.sb to *.pt, the imagefile one I'll get working on.
Offline
wierd, i tried compiling just as it was, but it gave me loads of errors. we need jens here with a step-by-step guide :p
Offline
LS97 wrote:
wierd, i tried compiling just as it was, but it gave me loads of errors. we need jens here with a step-by-step guide :p
Yeah, a step-by-step guide would be good.
Offline
OK, I know this doesn't go here, but WHERE THE HECK IS SCRATCH2EXE??? I want a download. I am DESPERATE!!!
Offline
TheDarkOne wrote:
OK, I know this doesn't go here, but WHERE THE HECK IS SCRATCH2EXE??? I want a download. I am DESPERATE!!!
http://scratch.mit.edu/forums/viewtopic.php?id=4148&p=1
Offline
1stCorinthians wrote:
I think it involves modding the presentation mode thingy, not the compiler itsself. Anyone know C++?
it involves modding the compiler itself for what we're trying to do.
please inform yourself if you're gonna post.
and sorry if i sound angry.
but i am.
edit.
ha, so you deleted you post did you?
Last edited by LS97 (2010-08-27 11:16:08)
Offline
i have already de-compiled one of my projects, if u want to know how ask.
Offline
dav09 wrote:
i have already de-compiled one of my projects, if u want to know how ask.
That's not really what we're doing, but I'm interested in how you de-compiled one of your projects, (you're meaning the .sb right?)
Offline
bump.
@Jens (If you ever come back here)
I've never found dialogs.nsh, however I have found a file whichs eems similar called nsDialogs.nsh, are these related?
Offline
Hi markyparky56, I think you want to use the normal dialogs plugin
http://nsis.sourceforge.net/Dialogs_plug-in
nsDialogs appears to replace the main window with a new GUI.
Good luck!
Offline
Still having problems, that webpage you game me, I downloaded from both, and... they're completely different, the main one gives me a whole load of C++ files which don't work, (Maybe because the IDE i'm using is out of date) and the mirror gives me what looks like what I need, but there is no dialogs.nsh, theres a dialogs.dll and a defines.nsh, aswell as a load of .nsi files which for some reason can't see defines.nsh when they're in the same folder.
What am I doing wrong!!!!!!!!
Offline