-
Notifications
You must be signed in to change notification settings - Fork 21
Added Icon and windows exe properties plus Windows MSI installer build #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nivs1978
wants to merge
2
commits into
jno6809:master
Choose a base branch
from
nivs1978:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| 1 VERSIONINFO | ||
| FILEVERSION 0,1,0,0 | ||
| PRODUCTVERSION 0,1,0,0 | ||
| BEGIN | ||
| BLOCK "StringFileInfo" | ||
| BEGIN | ||
| BLOCK "080904E4" | ||
| BEGIN | ||
| VALUE "CompanyName", "jc_reborn" | ||
| VALUE "FileDescription", "JC Reborn Windows Screen Saver" | ||
| VALUE "FileVersion", "0.1" | ||
| VALUE "InternalName", "jc_reborn" | ||
| VALUE "LegalCopyright", "" | ||
| VALUE "OriginalFilename", "jc_reborn.exe" | ||
| VALUE "ProductName", "JC Reborn" | ||
| VALUE "ProductVersion", "0.1" | ||
| END | ||
| END | ||
| BLOCK "VarFileInfo" | ||
| BEGIN | ||
| VALUE "Translation", 0x809, 1252 | ||
| END | ||
| END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| jc_reborn_icon ICON "jc_reborn.ico" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | ||
| <Product Id="*" | ||
| Language="1033" | ||
| Manufacturer="Jérémie Guillaume" | ||
| Name="JC Reborn" | ||
| UpgradeCode="36c19eaf-0929-46a4-b239-7bc8185605f2" | ||
| Version="1.0.0.0" | ||
| Codepage="UTF-8" > | ||
|
|
||
| <Package InstallScope="perMachine" Compressed="yes" /> | ||
|
|
||
| <MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." /> | ||
|
|
||
| <MediaTemplate EmbedCab="yes" /> | ||
|
|
||
| <Directory Id="TARGETDIR" Name="SourceDir"> | ||
| <Directory Id="WindowsFolder" /> | ||
| <Directory Id="SIERRASCRANTIC" FileSource="will_be_overwritten_by_setdirectory"> | ||
| <Component Id="ResourceFiles" Guid="c069467b-289e-4a86-bb01-74ed3e62b0ec"> | ||
| <File Id="resource_001" Source="RESOURCE.001" /> | ||
| <File Id="resource_map" Source="RESOURCE.map" /> | ||
| <File Id="sound0_wav" Source="sound0.wav" /> | ||
| <File Id="sound1_wav" Source="sound1.wav" /> | ||
| <File Id="sound2_wav" Source="sound2.wav" /> | ||
| <File Id="sound3_wav" Source="sound3.wav" /> | ||
| <File Id="sound4_wav" Source="sound4.wav" /> | ||
| <File Id="sound5_wav" Source="sound5.wav" /> | ||
| <File Id="sound6_wav" Source="sound6.wav" /> | ||
| <File Id="sound7_wav" Source="sound7.wav" /> | ||
| <File Id="sound8_wav" Source="sound8.wav" /> | ||
| <File Id="sound9_wav" Source="sound9.wav" /> | ||
| <File Id="sound10_wav" Source="sound10.wav" /> | ||
| <File Id="sound12_wav" Source="sound12.wav" /> | ||
| <File Id="sound14_wav" Source="sound14.wav" /> | ||
| <File Id="sound15_wav" Source="sound15.wav" /> | ||
| <File Id="sound16_wav" Source="sound16.wav" /> | ||
| <File Id="sound17_wav" Source="sound17.wav" /> | ||
| <File Id="sound18_wav" Source="sound18.wav" /> | ||
| <File Id="sound19_wav" Source="sound19.wav" /> | ||
| <File Id="sound20_wav" Source="sound20.wav" /> | ||
| <File Id="sound21_wav" Source="sound21.wav" /> | ||
| <File Id="sound22_wav" Source="sound22.wav" /> | ||
| <File Id="sound23_wav" Source="sound23.wav" /> | ||
| <File Id="sound24_wav" Source="sound24.wav" /> | ||
| <CreateFolder /> | ||
| </Component> | ||
| </Directory> | ||
| </Directory> | ||
|
|
||
| <SetDirectory Id="SIERRASCRANTIC" Value="[WindowsVolume]\SIERRA\SCRANTIC" /> | ||
|
|
||
| <Feature Id="JCInstaller"> | ||
| <ComponentRef Id="scr" /> | ||
| <ComponentRef Id="sdl2" /> | ||
| <ComponentRef Id="ResourceFiles" /> | ||
| </Feature> | ||
|
|
||
| <Icon Id="icon_ico" SourceFile="MSWindows\jc_reborn.ico"/> | ||
|
|
||
| <Property Id="ARPPRODUCTICON" Value="icon_ico" /> | ||
|
|
||
| <CustomAction Id="ShowScreenSaverSettings" Directory="WindowsFolder" Execute="commit" Impersonate="yes" ExeCommand="cmd.exe /c "control desk.cpl,,@screensaver"" Return="asyncNoWait" /> | ||
|
|
||
| <InstallExecuteSequence> | ||
| <Custom Action="ShowScreenSaverSettings" After="InstallInitialize" /> | ||
| </InstallExecuteSequence> | ||
|
|
||
| </Product> | ||
|
|
||
| <Fragment> | ||
| <ComponentGroup Id="ProductComponents" Directory="WindowsFolder"> | ||
| <Component Id="scr" Guid="C0F4841E-092E-4952-962C-891BBB93F410"> | ||
| <File Id="jc_reborn.scr" Source="jc_reborn.scr" KeyPath="yes" /> | ||
| </Component> | ||
| <Component Id="sdl2" Guid="9D26DA33-34AD-491A-B2F4-C2DB829EE605"> | ||
| <File Id="SDL2.dll" Source="SDL2.dll" KeyPath="yes" /> | ||
| </Component> | ||
| </ComponentGroup> | ||
| </Fragment> | ||
| </Wix> |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,11 @@ | ||
| $(shell windres MSWindows\icon.rc -O coff -o icon.res) | ||
| $(shell windres MSWindows\exe_header.rc -O coff -o exe_header.res) | ||
|
|
||
| CFLAGS=-I/include/ -Wall --std=c99 | ||
| CC = "C:\MinGW\bin\gcc.exe" | ||
|
|
||
| LDFLAGS=-L/lib/ -mwindows | ||
| CFLAGS=-IC:\MinGW\include\ -Wall --std=c99 -g3 | ||
|
|
||
| LDFLAGS=-LC:\MinGW\include\lib\ -mwindows | ||
|
|
||
| LDLIBS=-lmingw32 -lSDL2main -lSDL2 | ||
|
|
||
|
|
@@ -22,7 +26,9 @@ OBJ = jc_reborn.o \ | |
| graphics.o \ | ||
| sound.o \ | ||
| events.o \ | ||
| config.o | ||
| config.o \ | ||
| icon.res \ | ||
| exe_header.res | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe a minor indentation issue here ? (spaces vs tabs) |
||
|
|
||
|
|
||
| all: $(EXE) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| @ECHO OFF | ||
| ECHO Checking prerequisites | ||
| IF "%WIX%"=="" GOTO NOWIX | ||
| echo %path% | FINDSTR /c:"MinGW" >nul | ||
| IF ERRORLEVEL 1 GOTO NOMINGW | ||
| IF NOT EXIST "Makefile" GOTO NOMAKEFILE | ||
| for %%x in ( | ||
| SDL2.dll | ||
| RESOURCE.001 | ||
| RESOURCE.MAP | ||
| sound0.wav | ||
| sound1.wav | ||
| sound3.wav | ||
| sound4.wav | ||
| sound5.wav | ||
| sound6.wav | ||
| sound7.wav | ||
| sound8.wav | ||
| sound9.wav | ||
| sound10.wav | ||
| sound12.wav | ||
| sound14.wav | ||
| sound15.wav | ||
| sound16.wav | ||
| sound17.wav | ||
| sound18.wav | ||
| sound19.wav | ||
| sound2.wav | ||
| sound20.wav | ||
| sound21.wav | ||
| sound22.wav | ||
| sound23.wav | ||
| sound24.wav | ||
| ) do ( | ||
| SET filename=%%x | ||
| IF NOT EXIST %%x GOTO FILEMISSING | ||
| ) | ||
|
|
||
| ECHO building | ||
| REM Run ordinary make | ||
| make | ||
| IF ERRORLEVEL 1 GOTO MAKEERROR | ||
| IF EXIST "jc_reborn.scr" DEL jc_reborn.scr | ||
| RENAME jc_reborn.exe jc_reborn.scr | ||
|
|
||
| ECHO Creating MSI | ||
| "%WIX%\bin\candle" MSWindows\*.wxs -o MSWindows\obj\ | ||
| IF ERRORLEVEL 1 GOTO CANDLEERROR | ||
| "%WIX%\bin\light" MSWindows\obj\*.wixobj -o jc_reborn.msi | ||
| IF ERRORLEVEL 1 GOTO LIGHTERROR | ||
| echo Done, you can now install from jc_reborn.msi | ||
| GOTO :EOF | ||
|
|
||
| :NOWIX | ||
| ECHO ERROR: Could not find WiX Toolset | ||
| GOTO :EOF | ||
|
|
||
| :NOMINGW | ||
| ECHO ERROR: Could not find MinGW, mare sure it's in the PATH | ||
| GOTO :EOF | ||
|
|
||
| :NOMAKEFILE | ||
| ECHO ERROR: Please rename Makefile.MinGW to MakeFile | ||
| GOTO :EOF | ||
|
|
||
| :MAKEERROR | ||
| ECHO ERROR: Build failed | ||
| GOTO :EOF | ||
|
|
||
| :FILEMISSING | ||
| ECHO ERROR: %filename% not found | ||
|
|
||
| :CANDLEERROR | ||
| ECHO ERROR: compiling WiX installer WXS file | ||
|
|
||
| :LIGHTERROR | ||
| ECHO ERROR: assembling MSI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,4 +43,5 @@ void hexdump(uint8 *data, uint32 len); | |
| int getDayOfYear(); | ||
| int getHour(); | ||
| char *getMonthAndDay(); | ||
| char* concat(char *str1, char *str2); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indentation issue here, too |
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally MinGW maps windows paths to unix-like ones. Using native Windows paths shouldn't be necessary ...